From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:02:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:02:27 +0000 Subject: [PATCH] osmocom-bb[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4604 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba --- M src/host/layer23/src/mobile/vty_interface.c M src/shared/libosmocore/src/gb/gprs_bssgp_vty.c M src/shared/libosmocore/src/gb/gprs_ns_vty.c M src/shared/libosmocore/src/vty/logging_vty.c M src/shared/libosmocore/src/vty/vty.c 5 files changed, 0 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/04/4604/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 2ad95d0..259014e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2838,7 +2838,6 @@ install_element(CONFIG_NODE, &cfg_ms_rename_cmd); install_element(CONFIG_NODE, &cfg_no_ms_cmd); install_node(&ms_node, config_write); - install_default(MS_NODE); install_element(MS_NODE, &cfg_ms_show_this_cmd); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); @@ -2881,7 +2880,6 @@ install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); install_element(MS_NODE, &cfg_ms_support_cmd); install_node(&support_node, config_write_dummy); - install_default(SUPPORT_NODE); install_element(SUPPORT_NODE, &cfg_ms_sup_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_sms_cmd); @@ -2937,7 +2935,6 @@ install_element(SUPPORT_NODE, &cfg_ms_sup_skip_max_per_band_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_skip_max_per_band_cmd); install_node(&testsim_node, config_write_dummy); - install_default(TESTSIM_NODE); install_element(TESTSIM_NODE, &cfg_test_imsi_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_xor_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_comp128_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c index d8e1d32..7017c50 100644 --- a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c @@ -189,7 +189,6 @@ install_element(CONFIG_NODE, &cfg_bssgp_cmd); install_node(&bssgp_node, config_write_bssgp); - install_default(L_BSSGP_NODE); install_element(L_BSSGP_NODE, &libgb_exit_cmd); install_element(L_BSSGP_NODE, &libgb_end_cmd); //install_element(L_BSSGP_NODE, &cfg_bssgp_timer_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_ns_vty.c b/src/shared/libosmocore/src/gb/gprs_ns_vty.c index fac431c..b443601 100644 --- a/src/shared/libosmocore/src/gb/gprs_ns_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_ns_vty.c @@ -559,7 +559,6 @@ install_element(CONFIG_NODE, &cfg_ns_cmd); install_node(&ns_node, config_write_ns); - install_default(L_NS_NODE); install_element(L_NS_NODE, &libgb_exit_cmd); install_element(L_NS_NODE, &libgb_end_cmd); install_element(L_NS_NODE, &cfg_nse_nsvci_cmd); diff --git a/src/shared/libosmocore/src/vty/logging_vty.c b/src/shared/libosmocore/src/vty/logging_vty.c index d473f12..6029d58 100644 --- a/src/shared/libosmocore/src/vty/logging_vty.c +++ b/src/shared/libosmocore/src/vty/logging_vty.c @@ -592,7 +592,6 @@ install_element_ve(&show_logging_vty_cmd); install_node(&cfg_log_node, config_write_log); - install_default(CFG_LOG_NODE); install_element(CFG_LOG_NODE, &config_end_cmd); install_element(CFG_LOG_NODE, &logging_fltr_all_cmd); install_element(CFG_LOG_NODE, &logging_use_clr_cmd); diff --git a/src/shared/libosmocore/src/vty/vty.c b/src/shared/libosmocore/src/vty/vty.c index 696766a..cafe202 100644 --- a/src/shared/libosmocore/src/vty/vty.c +++ b/src/shared/libosmocore/src/vty/vty.c @@ -1753,7 +1753,6 @@ install_element(ENABLE_NODE, &terminal_monitor_cmd); install_element(ENABLE_NODE, &terminal_no_monitor_cmd); - install_default(VTY_NODE); install_element(VTY_NODE, &vty_login_cmd); install_element(VTY_NODE, &no_vty_login_cmd); } -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:04:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:04:13 +0000 Subject: osmocom-bb[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: NOTE: I am not at all sure about this patch. It seems to me that it needs an update of the libosmocore version in src/shared, but I'm completely unfamiliar with this code base! Comments welcome. -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:15 +0000 Subject: [PATCH] cellmgr-ng[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4605 vty: skip installing cmds now always installed by default Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I0fc8142756040c98c1862ddb18a77a032f2a7143 --- M src/mgcp/mgcp_vty.c M src/vty_interface.c 2 files changed, 0 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/05/4605/1 diff --git a/src/mgcp/mgcp_vty.c b/src/mgcp/mgcp_vty.c index dfcc6fe..85c70c5 100644 --- a/src/mgcp/mgcp_vty.c +++ b/src/mgcp/mgcp_vty.c @@ -858,7 +858,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - install_default(MGCP_NODE); install_element(MGCP_NODE, &ournode_exit_cmd); install_element(MGCP_NODE, &ournode_end_cmd); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); @@ -883,7 +882,6 @@ install_element(MGCP_NODE, &cfg_mgcp_vtrunk_cmd); install_node(&vtrunk_node, config_write_vtrunk); - install_default(VTRUNK_NODE); install_element(VTRUNK_NODE, &ournode_exit_cmd); install_element(VTRUNK_NODE, &ournode_end_cmd); install_element(VTRUNK_NODE, &cfg_vtrunk_number_endp_cmd); @@ -897,7 +895,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - install_default(TRUNK_NODE); install_element(TRUNK_NODE, &ournode_exit_cmd); install_element(TRUNK_NODE, &ournode_end_cmd); install_element(TRUNK_NODE, &cfg_trunk_payload_number_cmd); diff --git a/src/vty_interface.c b/src/vty_interface.c index 3a654c0..ab90897 100644 --- a/src/vty_interface.c +++ b/src/vty_interface.c @@ -77,31 +77,6 @@ return vty->node; } - -DEFUN(node_exit, node_exit_cmd, - "exit", "Exit the current node\n") -{ - ss7_go_parent(vty); - return CMD_SUCCESS; -} - -DEFUN(node_end, node_end_cmd, - "end", "End the current mode and change to the enable node\n") -{ - switch (vty->node) { - case VIEW_NODE: - case ENABLE_NODE: - break; - default: - vty_config_unlock(vty); - vty->node = ENABLE_NODE; - vty->index = NULL; - vty->index_sub = NULL; - break; - } - return CMD_SUCCESS; -} - static struct vty_app_info vty_info = { .name = "OsmoSTP", .version = VERSION, @@ -1316,9 +1291,6 @@ static void install_defaults(int node) { - install_default(node); - install_element(node, &node_exit_cmd); - install_element(node, &node_end_cmd); install_element(node, &cfg_description_cmd); install_element(node, &cfg_no_description_cmd); } -- To view, visit https://gerrit.osmocom.org/4605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fc8142756040c98c1862ddb18a77a032f2a7143 Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:18 +0000 Subject: [PATCH] libosmo-abis[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4606 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010 --- M src/e1_input_vty.c M src/ipa_proxy.c 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/06/4606/1 diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index 9d69586..2bd56a4 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -380,7 +380,6 @@ install_element(CONFIG_NODE, &cfg_e1inp_cmd); install_node(&e1inp_node, e1inp_config_write); - vty_install_default(L_E1INP_NODE); install_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd); install_element(L_E1INP_NODE, &cfg_e1_line_port_cmd); install_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd); diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c index 6053bb8..94f48dc 100644 --- a/src/ipa_proxy.c +++ b/src/ipa_proxy.c @@ -652,7 +652,6 @@ install_element(CONFIG_NODE, &ipa_cfg_cmd); install_node(&ipa_node, ipa_cfg_write); - vty_install_default(L_IPA_NODE); install_element(L_IPA_NODE, &ipa_instance_cfg_add_cmd); install_element(L_IPA_NODE, &ipa_route_cfg_add_cmd); } -- To view, visit https://gerrit.osmocom.org/4606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:19 +0000 Subject: [PATCH] libosmo-sccp[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4607 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321 --- M examples/sccp_test_vty.c M src/osmo_ss7_vty.c 2 files changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/07/4607/1 diff --git a/examples/sccp_test_vty.c b/examples/sccp_test_vty.c index d809fbc..c477c8b 100644 --- a/examples/sccp_test_vty.c +++ b/examples/sccp_test_vty.c @@ -139,7 +139,6 @@ g_calling_addr.ssn = ssn; install_node(&scu_node, NULL); - vty_install_default(SCU_NODE); install_element(SCU_NODE, &scu_called_ssn_cmd); install_element(SCU_NODE, &scu_conn_req_cmd); install_element(SCU_NODE, &scu_conn_resp_cmd); diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 8d13865..2c3d78e 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1683,7 +1683,6 @@ static void vty_init_addr(void) { install_node(&sccpaddr_node, NULL); - vty_install_default(L_CS7_SCCPADDR_NODE); install_element(L_CS7_NODE, &cs7_show_sccpaddr_cmd); install_element(L_CS7_NODE, &cs7_sccpaddr_cmd); install_element(L_CS7_NODE, &cs7_sccpaddr_del_cmd); @@ -1706,7 +1705,6 @@ #endif install_element(L_CS7_SCCPADDR_NODE, &cs7_sccpaddr_gt_cmd); install_node(&sccpaddr_gt_node, NULL); - vty_install_default(L_CS7_SCCPADDR_GT_NODE); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_gti_cmd); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_tt_cmd); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_npi_cmd); @@ -1724,7 +1722,6 @@ install_element(CONFIG_NODE, &cs7_instance_cmd); install_node(&cs7_node, config_write_cs7); - vty_install_default(L_CS7_NODE); install_element(L_CS7_NODE, &cfg_description_cmd); install_element(L_CS7_NODE, &cs7_net_ind_cmd); install_element(L_CS7_NODE, &cs7_point_code_cmd); @@ -1734,7 +1731,6 @@ install_element(L_CS7_NODE, &cs7_permit_dyn_rkm_cmd); install_node(&asp_node, NULL); - vty_install_default(L_CS7_ASP_NODE); install_element_ve(&show_cs7_asp_cmd); install_element(L_CS7_NODE, &cs7_asp_cmd); install_element(L_CS7_NODE, &no_cs7_asp_cmd); @@ -1746,7 +1742,6 @@ install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); install_node(&as_node, NULL); - vty_install_default(L_CS7_AS_NODE); install_element_ve(&show_cs7_as_cmd); install_element(L_CS7_NODE, &cs7_as_cmd); install_element(L_CS7_NODE, &no_cs7_as_cmd); @@ -1777,7 +1772,6 @@ vty_init_shared(ctx); install_node(&rtable_node, NULL); - vty_install_default(L_CS7_RTABLE_NODE); install_element_ve(&show_cs7_route_cmd); install_element(L_CS7_NODE, &cs7_route_table_cmd); install_element(L_CS7_RTABLE_NODE, &cfg_description_cmd); @@ -1785,7 +1779,6 @@ install_element(L_CS7_RTABLE_NODE, &cs7_rt_rem_cmd); install_node(&xua_node, NULL); - vty_install_default(L_CS7_XUA_NODE); install_element(L_CS7_NODE, &cs7_xua_cmd); install_element(L_CS7_NODE, &no_cs7_xua_cmd); install_element(L_CS7_XUA_NODE, &xua_local_ip_cmd); -- To view, visit https://gerrit.osmocom.org/4607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:21 +0000 Subject: [PATCH] openbsc[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4608 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9 --- M openbsc/src/libbsc/abis_nm_vty.c M openbsc/src/libbsc/abis_om2000_vty.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libcommon-cs/common_cs_vty.c M openbsc/src/libmgcp/mgcp_vty.c M openbsc/src/libmsc/smpp_vty.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/osmo-bsc/osmo_bsc_vty.c M openbsc/src/osmo-bsc_nat/bsc_nat_vty.c 9 files changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/08/4608/1 diff --git a/openbsc/src/libbsc/abis_nm_vty.c b/openbsc/src/libbsc/abis_nm_vty.c index 6ec0a4a..4dae212 100644 --- a/openbsc/src/libbsc/abis_nm_vty.c +++ b/openbsc/src/libbsc/abis_nm_vty.c @@ -183,7 +183,6 @@ install_element(ENABLE_NODE, &oml_classnum_inst_cmd); install_node(&oml_node, dummy_config_write); - vty_install_default(OML_NODE); install_element(OML_NODE, &oml_chg_adm_state_cmd); install_element(OML_NODE, &oml_opstart_cmd); diff --git a/openbsc/src/libbsc/abis_om2000_vty.c b/openbsc/src/libbsc/abis_om2000_vty.c index a6bc4c7..11dd131 100644 --- a/openbsc/src/libbsc/abis_om2000_vty.c +++ b/openbsc/src/libbsc/abis_om2000_vty.c @@ -582,7 +582,6 @@ install_element(ENABLE_NODE, &om2k_classnum_inst_cmd); install_node(&om2k_node, dummy_config_write); - vty_install_default(OM2K_NODE); install_element(OM2K_NODE, &om2k_reset_cmd); install_element(OM2K_NODE, &om2k_start_cmd); install_element(OM2K_NODE, &om2k_status_cmd); @@ -596,7 +595,6 @@ install_element(OM2K_NODE, &om2k_conf_req_cmd); install_node(&om2k_con_group_node, dummy_config_write); - vty_install_default(OM2K_CON_GROUP_NODE); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_dec_cmd); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_conc_cmd); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 5fb1c5d..60bea4f 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -4229,7 +4229,6 @@ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); - vty_install_default(BTS_NODE); install_element(BTS_NODE, &cfg_bts_type_cmd); install_element(BTS_NODE, &cfg_description_cmd); install_element(BTS_NODE, &cfg_no_description_cmd); @@ -4336,7 +4335,6 @@ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); - vty_install_default(TRX_NODE); install_element(TRX_NODE, &cfg_trx_arfcn_cmd); install_element(TRX_NODE, &cfg_description_cmd); install_element(TRX_NODE, &cfg_no_description_cmd); @@ -4348,7 +4346,6 @@ install_element(TRX_NODE, &cfg_ts_cmd); install_node(&ts_node, dummy_config_write); - vty_install_default(TS_NODE); install_element(TS_NODE, &cfg_ts_pchan_cmd); install_element(TS_NODE, &cfg_ts_pchan_compat_cmd); install_element(TS_NODE, &cfg_ts_tsc_cmd); diff --git a/openbsc/src/libcommon-cs/common_cs_vty.c b/openbsc/src/libcommon-cs/common_cs_vty.c index bcc001d..f7b4886 100644 --- a/openbsc/src/libcommon-cs/common_cs_vty.c +++ b/openbsc/src/libcommon-cs/common_cs_vty.c @@ -292,7 +292,6 @@ install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c index 7d4b2da..b97d7f8 100644 --- a/openbsc/src/libmgcp/mgcp_vty.c +++ b/openbsc/src/libmgcp/mgcp_vty.c @@ -1345,7 +1345,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - vty_install_default(MGCP_NODE); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bts_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); @@ -1404,7 +1403,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - vty_install_default(TRUNK_NODE); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_cmd); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_once_cmd); install_element(TRUNK_NODE, &cfg_trunk_no_rtp_keepalive_cmd); diff --git a/openbsc/src/libmsc/smpp_vty.c b/openbsc/src/libmsc/smpp_vty.c index 13467f1..0a84358 100644 --- a/openbsc/src/libmsc/smpp_vty.c +++ b/openbsc/src/libmsc/smpp_vty.c @@ -579,7 +579,6 @@ int smpp_vty_init(void) { install_node(&smpp_node, config_write_smpp); - vty_install_default(SMPP_NODE); install_element(CONFIG_NODE, &cfg_smpp_cmd); install_element(SMPP_NODE, &cfg_smpp_first_cmd); @@ -592,7 +591,6 @@ install_element(SMPP_NODE, &cfg_no_esme_cmd); install_node(&esme_node, config_write_esme); - vty_install_default(SMPP_ESME_NODE); install_element(SMPP_ESME_NODE, &cfg_esme_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_no_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_route_pfx_cmd); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index f66769b..b88c139 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1282,7 +1282,6 @@ install_element(CONFIG_NODE, &cfg_mncc_int_cmd); install_node(&mncc_int_node, config_write_mncc_int); - vty_install_default(MNCC_INT_NODE); install_element(MNCC_INT_NODE, &mnccint_def_codec_f_cmd); install_element(MNCC_INT_NODE, &mnccint_def_codec_h_cmd); install_element(MNCC_INT_NODE, &mnccint_meas_feed_cmd); @@ -1294,7 +1293,6 @@ install_element(CONFIG_NODE, &cfg_nitb_cmd); install_node(&nitb_node, config_write_nitb); - vty_install_default(NITB_NODE); install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); install_element(NITB_NODE, &cfg_nitb_subscr_random_cmd); install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index 2e2e99b..7bb123d 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -883,7 +883,6 @@ install_element(CONFIG_NODE, &cfg_net_bsc_cmd); install_node(&bsc_node, config_write_bsc); - vty_install_default(BSC_NODE); install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd); install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd); install_element(BSC_NODE, &cfg_net_rf_socket_cmd); @@ -895,7 +894,6 @@ install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd); install_node(&msc_node, config_write_msc); - vty_install_default(MSC_NODE); install_element(MSC_NODE, &cfg_net_bsc_token_cmd); install_element(MSC_NODE, &cfg_net_bsc_key_cmd); install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index a11ae15..d4cef5d 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -1257,7 +1257,6 @@ /* nat group */ install_element(CONFIG_NODE, &cfg_nat_cmd); install_node(&nat_node, config_write_nat); - vty_install_default(NAT_NODE); install_element(NAT_NODE, &cfg_nat_msc_ip_cmd); install_element(NAT_NODE, &cfg_nat_msc_port_cmd); install_element(NAT_NODE, &cfg_nat_auth_time_cmd); @@ -1299,14 +1298,12 @@ install_element(NAT_NODE, &cfg_nat_pgroup_cmd); install_element(NAT_NODE, &cfg_nat_no_pgroup_cmd); install_node(&pgroup_node, config_write_pgroup); - vty_install_default(PGROUP_NODE); install_element(PGROUP_NODE, &cfg_pgroup_lac_cmd); install_element(PGROUP_NODE, &cfg_pgroup_no_lac_cmd); /* BSC subgroups */ install_element(NAT_NODE, &cfg_bsc_cmd); install_node(&bsc_node, NULL); - vty_install_default(NAT_BSC_NODE); install_element(NAT_BSC_NODE, &cfg_bsc_token_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_auth_key_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_no_auth_key_cmd); -- To view, visit https://gerrit.osmocom.org/4608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:25 +0000 Subject: [PATCH] osmo-bsc[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4609 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6 --- M src/libbsc/abis_nm_vty.c M src/libbsc/abis_om2000_vty.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/osmo-bsc/osmo_bsc_vty.c M src/osmo-bsc_nat/bsc_nat_vty.c 6 files changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/4609/1 diff --git a/src/libbsc/abis_nm_vty.c b/src/libbsc/abis_nm_vty.c index a0d72c2..956d28b 100644 --- a/src/libbsc/abis_nm_vty.c +++ b/src/libbsc/abis_nm_vty.c @@ -183,7 +183,6 @@ install_element(ENABLE_NODE, &oml_classnum_inst_cmd); install_node(&oml_node, dummy_config_write); - vty_install_default(OML_NODE); install_element(OML_NODE, &oml_chg_adm_state_cmd); install_element(OML_NODE, &oml_opstart_cmd); diff --git a/src/libbsc/abis_om2000_vty.c b/src/libbsc/abis_om2000_vty.c index b75d420..e1dd914 100644 --- a/src/libbsc/abis_om2000_vty.c +++ b/src/libbsc/abis_om2000_vty.c @@ -582,7 +582,6 @@ install_element(ENABLE_NODE, &om2k_classnum_inst_cmd); install_node(&om2k_node, dummy_config_write); - vty_install_default(OM2K_NODE); install_element(OM2K_NODE, &om2k_reset_cmd); install_element(OM2K_NODE, &om2k_start_cmd); install_element(OM2K_NODE, &om2k_status_cmd); @@ -596,7 +595,6 @@ install_element(OM2K_NODE, &om2k_conf_req_cmd); install_node(&om2k_con_group_node, dummy_config_write); - vty_install_default(OM2K_CON_GROUP_NODE); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_dec_cmd); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_conc_cmd); diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 461e3d3..3ddd5de 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -4250,7 +4250,6 @@ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); - vty_install_default(BTS_NODE); install_element(BTS_NODE, &cfg_bts_type_cmd); install_element(BTS_NODE, &cfg_description_cmd); install_element(BTS_NODE, &cfg_no_description_cmd); @@ -4355,7 +4354,6 @@ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); - vty_install_default(TRX_NODE); install_element(TRX_NODE, &cfg_trx_arfcn_cmd); install_element(TRX_NODE, &cfg_description_cmd); install_element(TRX_NODE, &cfg_no_description_cmd); @@ -4367,7 +4365,6 @@ install_element(TRX_NODE, &cfg_ts_cmd); install_node(&ts_node, dummy_config_write); - vty_install_default(TS_NODE); install_element(TS_NODE, &cfg_ts_pchan_cmd); install_element(TS_NODE, &cfg_ts_pchan_compat_cmd); install_element(TS_NODE, &cfg_ts_tsc_cmd); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index fd10836..040aa15 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -325,7 +325,6 @@ install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index b5232c4..f816ae4 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -976,7 +976,6 @@ install_element(CONFIG_NODE, &cfg_net_bsc_cmd); install_node(&bsc_node, config_write_bsc); - vty_install_default(BSC_NODE); install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd); install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd); install_element(BSC_NODE, &cfg_net_rf_socket_cmd); @@ -988,7 +987,6 @@ install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd); install_node(&msc_node, config_write_msc); - vty_install_default(MSC_NODE); install_element(MSC_NODE, &cfg_net_bsc_token_cmd); install_element(MSC_NODE, &cfg_net_bsc_key_cmd); install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd); diff --git a/src/osmo-bsc_nat/bsc_nat_vty.c b/src/osmo-bsc_nat/bsc_nat_vty.c index 5f7cbc8..64608bd 100644 --- a/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/src/osmo-bsc_nat/bsc_nat_vty.c @@ -1257,7 +1257,6 @@ /* nat group */ install_element(CONFIG_NODE, &cfg_nat_cmd); install_node(&nat_node, config_write_nat); - vty_install_default(NAT_NODE); install_element(NAT_NODE, &cfg_nat_msc_ip_cmd); install_element(NAT_NODE, &cfg_nat_msc_port_cmd); install_element(NAT_NODE, &cfg_nat_auth_time_cmd); @@ -1299,14 +1298,12 @@ install_element(NAT_NODE, &cfg_nat_pgroup_cmd); install_element(NAT_NODE, &cfg_nat_no_pgroup_cmd); install_node(&pgroup_node, config_write_pgroup); - vty_install_default(PGROUP_NODE); install_element(PGROUP_NODE, &cfg_pgroup_lac_cmd); install_element(PGROUP_NODE, &cfg_pgroup_no_lac_cmd); /* BSC subgroups */ install_element(NAT_NODE, &cfg_bsc_cmd); install_node(&bsc_node, NULL); - vty_install_default(NAT_BSC_NODE); install_element(NAT_BSC_NODE, &cfg_bsc_token_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_auth_key_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_no_auth_key_cmd); -- To view, visit https://gerrit.osmocom.org/4609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:26 +0000 Subject: [PATCH] osmo-bts[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4610 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I5e8e9d7989ee20fe722bdd3109965d5bce9519fb --- M src/common/vty.c M src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c M src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c 3 files changed, 0 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/4610/1 diff --git a/src/common/vty.c b/src/common/vty.c index 1a158db..050f922 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1073,7 +1073,6 @@ install_node(&bts_node, config_write_bts); install_element(CONFIG_NODE, &cfg_bts_cmd); install_element(CONFIG_NODE, &cfg_vty_telnet_port_cmd); - install_default(BTS_NODE); install_element(BTS_NODE, &cfg_bts_unit_id_cmd); install_element(BTS_NODE, &cfg_bts_oml_ip_cmd); install_element(BTS_NODE, &cfg_bts_rtp_bind_ip_cmd); @@ -1096,7 +1095,6 @@ /* add and link to TRX config node */ install_element(BTS_NODE, &cfg_bts_trx_cmd); install_node(&trx_node, config_write_dummy); - install_default(TRX_NODE); install_element(TRX_NODE, &cfg_trx_user_gain_cmd); install_element(TRX_NODE, &cfg_trx_pr_max_initial_cmd); @@ -1111,12 +1109,10 @@ install_element(CONFIG_NODE, &cfg_phy_cmd); install_node(&phy_node, config_write_phy); - install_default(PHY_NODE); install_element(PHY_NODE, &cfg_phy_inst_cmd); install_element(PHY_NODE, &cfg_phy_no_inst_cmd); install_node(&phy_inst_node, config_write_dummy); - install_default(PHY_INST_NODE); return 0; } diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c index 189a7e2..e1ddfc7 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c @@ -979,95 +979,75 @@ install_node(&mgr_node, config_write_mgr); install_element(CONFIG_NODE, &cfg_mgr_cmd); - vty_install_default(MGR_NODE); /* install the limit nodes */ install_node(&limit_supply_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_temp_cmd); - vty_install_default(LIMIT_SUPPLY_TEMP_NODE); install_node(&limit_soc_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_soc_temp_cmd); - vty_install_default(LIMIT_SOC_NODE); install_node(&limit_fpga_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_fpga_temp_cmd); - vty_install_default(LIMIT_FPGA_NODE); install_node(&limit_rmsdet_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_rmsdet_temp_cmd); - vty_install_default(LIMIT_RMSDET_NODE); install_node(&limit_ocxo_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_ocxo_temp_cmd); - vty_install_default(LIMIT_OCXO_NODE); install_node(&limit_tx0_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx0_temp_cmd); - vty_install_default(LIMIT_TX0_TEMP_NODE); install_node(&limit_tx1_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx1_temp_cmd); - vty_install_default(LIMIT_TX1_TEMP_NODE); install_node(&limit_pa0_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa0_temp_cmd); - vty_install_default(LIMIT_PA0_TEMP_NODE); install_node(&limit_pa1_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa1_temp_cmd); - vty_install_default(LIMIT_PA1_TEMP_NODE); install_node(&limit_supply_volt_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_volt_cmd); register_limit(LIMIT_SUPPLY_VOLT_NODE, MGR_LIMIT_TYPE_VOLT); - vty_install_default(LIMIT_SUPPLY_VOLT_NODE); install_node(&limit_tx0_vswr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx0_vswr_cmd); register_limit(LIMIT_TX0_VSWR_NODE, MGR_LIMIT_TYPE_VSWR); - vty_install_default(LIMIT_TX0_VSWR_NODE); install_node(&limit_tx1_vswr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx1_vswr_cmd); register_limit(LIMIT_TX1_VSWR_NODE, MGR_LIMIT_TYPE_VSWR); - vty_install_default(LIMIT_TX1_VSWR_NODE); install_node(&limit_supply_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_pwr_cmd); register_limit(LIMIT_SUPPLY_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_SUPPLY_PWR_NODE); install_node(&limit_pa0_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa0_pwr_cmd); register_limit(LIMIT_PA0_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_PA0_PWR_NODE); install_node(&limit_pa1_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa1_pwr_cmd); register_limit(LIMIT_PA1_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_PA1_PWR_NODE); install_node(&limit_gps_fix_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_gps_fix_cmd); - vty_install_default(LIMIT_GPS_FIX_NODE); /* install the normal node */ install_node(&act_norm_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_normal_cmd); register_normal_action(ACT_NORM_NODE); - vty_install_default(ACT_NORM_NODE); /* install the warning and critical node */ install_node(&act_warn_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_warn_cmd); register_action(ACT_WARN_NODE); - vty_install_default(ACT_WARN_NODE); install_node(&act_crit_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_critical_cmd); register_action(ACT_CRIT_NODE); - vty_install_default(ACT_CRIT_NODE); /* install LED pattern command for debugging purpose */ install_element_ve(&set_led_pattern_cmd); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c index cba4fbb..444ee7c 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c @@ -480,45 +480,37 @@ install_node(&mgr_node, config_write_mgr); install_element(CONFIG_NODE, &cfg_mgr_cmd); - vty_install_default(MGR_NODE); /* install the limit nodes */ install_node(&limit_rf_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_rf_cmd); register_limit(LIMIT_RF_NODE); - vty_install_default(LIMIT_RF_NODE); install_node(&limit_digital_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_digital_cmd); register_limit(LIMIT_DIGITAL_NODE); - vty_install_default(LIMIT_DIGITAL_NODE); install_node(&limit_board_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_board_cmd); register_limit(LIMIT_BOARD_NODE); - vty_install_default(LIMIT_BOARD_NODE); install_node(&limit_pa_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa_cmd); register_limit(LIMIT_PA_NODE); - vty_install_default(LIMIT_PA_NODE); /* install the normal node */ install_node(&act_norm_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_normal_cmd); register_normal_action(ACT_NORM_NODE); - vty_install_default(ACT_NORM_NODE); /* install the warning and critical node */ install_node(&act_warn_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_warn_cmd); register_action(ACT_WARN_NODE); - vty_install_default(ACT_WARN_NODE); install_node(&act_crit_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_critical_cmd); register_action(ACT_CRIT_NODE); - vty_install_default(ACT_CRIT_NODE); return 0; } -- To view, visit https://gerrit.osmocom.org/4610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e8e9d7989ee20fe722bdd3109965d5bce9519fb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:28 +0000 Subject: [PATCH] osmo-hlr[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4611 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I09762f110c7bcaf85c0ef2f472eb43ac543c74e9 --- M src/hlr_vty.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/4611/1 diff --git a/src/hlr_vty.c b/src/hlr_vty.c index a5eb26f..202f7f7 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -129,11 +129,9 @@ install_element(CONFIG_NODE, &cfg_hlr_cmd); install_node(&hlr_node, config_write_hlr); - install_default(HLR_NODE); install_element(HLR_NODE, &cfg_gsup_cmd); install_node(&gsup_node, config_write_hlr_gsup); - install_default(GSUP_NODE); install_element(GSUP_NODE, &cfg_hlr_gsup_bind_ip_cmd); -- To view, visit https://gerrit.osmocom.org/4611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09762f110c7bcaf85c0ef2f472eb43ac543c74e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:30 +0000 Subject: [PATCH] osmo-iuh[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4612 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I61b79f633d36814b53e40f1a92b5847c9ff4fde0 --- M src/hnbgw_vty.c M src/tests/hnb-test.c 2 files changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/12/4612/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index ddea578..f504dd5 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -268,11 +268,9 @@ install_element(CONFIG_NODE, &cfg_hnbgw_cmd); install_node(&hnbgw_node, config_write_hnbgw); - vty_install_default(HNBGW_NODE); install_element(HNBGW_NODE, &cfg_hnbgw_iuh_cmd); install_node(&iuh_node, config_write_hnbgw_iuh); - vty_install_default(IUH_NODE); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_ip_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); @@ -280,13 +278,11 @@ install_element(HNBGW_NODE, &cfg_hnbgw_iucs_cmd); install_node(&iucs_node, config_write_hnbgw_iucs); - vty_install_default(IUCS_NODE); install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_addr_cmd); install_element(HNBGW_NODE, &cfg_hnbgw_iups_cmd); install_node(&iups_node, config_write_hnbgw_iups); - vty_install_default(IUPS_NODE); install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_addr_cmd); diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c index 68a3117..32f4ba8 100644 --- a/src/tests/hnb-test.c +++ b/src/tests/hnb-test.c @@ -904,7 +904,6 @@ install_element_ve(&chan_cmd); install_node(&chan_node, NULL); - vty_install_default(CHAN_NODE); } static void handle_options(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/4612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61b79f633d36814b53e40f1a92b5847c9ff4fde0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:31 +0000 Subject: [PATCH] osmo-mgw[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4613 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I246853156c4bd2a47690e580e647105eb838ca92 --- M src/libosmo-legacy-mgcp/mgcp_vty.c M src/libosmo-mgcp/mgcp_vty.c 2 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/13/4613/1 diff --git a/src/libosmo-legacy-mgcp/mgcp_vty.c b/src/libosmo-legacy-mgcp/mgcp_vty.c index a48e205..7b11422 100644 --- a/src/libosmo-legacy-mgcp/mgcp_vty.c +++ b/src/libosmo-legacy-mgcp/mgcp_vty.c @@ -1356,7 +1356,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - vty_install_default(MGCP_NODE); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bts_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); @@ -1416,7 +1415,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - vty_install_default(TRUNK_NODE); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_cmd); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_once_cmd); install_element(TRUNK_NODE, &cfg_trunk_no_rtp_keepalive_cmd); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index a1299b2..e8ad818 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1156,7 +1156,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - vty_install_default(MGCP_NODE); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); @@ -1204,7 +1203,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - vty_install_default(TRUNK_NODE); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_cmd); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_once_cmd); install_element(TRUNK_NODE, &cfg_trunk_no_rtp_keepalive_cmd); -- To view, visit https://gerrit.osmocom.org/4613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I246853156c4bd2a47690e580e647105eb838ca92 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:32 +0000 Subject: [PATCH] osmo-msc[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4614 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I34708c73d8084db4e6c83a39be8fdaeaa492d743 --- M src/libcommon-cs/common_cs_vty.c M src/libmsc/msc_vty.c M src/libmsc/smpp_vty.c M src/libmsc/vty_interface_layer3.c 4 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/4614/1 diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index cdefa09..4754531 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -325,7 +325,6 @@ install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index c19666f..d070b4d 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -178,7 +178,6 @@ install_element(CONFIG_NODE, &cfg_msc_cmd); install_node(&msc_node, config_write_msc); - vty_install_default(MSC_NODE); install_element(MSC_NODE, &cfg_msc_assign_tmsi_cmd); install_element(MSC_NODE, &cfg_msc_no_assign_tmsi_cmd); install_element(MSC_NODE, &cfg_msc_auth_tuple_max_reuse_count_cmd); diff --git a/src/libmsc/smpp_vty.c b/src/libmsc/smpp_vty.c index c0309d6..be55c4d 100644 --- a/src/libmsc/smpp_vty.c +++ b/src/libmsc/smpp_vty.c @@ -579,7 +579,6 @@ int smpp_vty_init(void) { install_node(&smpp_node, config_write_smpp); - vty_install_default(SMPP_NODE); install_element(CONFIG_NODE, &cfg_smpp_cmd); install_element(SMPP_NODE, &cfg_smpp_first_cmd); @@ -592,7 +591,6 @@ install_element(SMPP_NODE, &cfg_no_esme_cmd); install_node(&esme_node, config_write_esme); - vty_install_default(SMPP_ESME_NODE); install_element(SMPP_ESME_NODE, &cfg_esme_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_no_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_route_pfx_cmd); diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index edc698d..6211d48 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -946,7 +946,6 @@ install_element(CONFIG_NODE, &cfg_mncc_int_cmd); install_node(&mncc_int_node, config_write_mncc_int); - vty_install_default(MNCC_INT_NODE); install_element(MNCC_INT_NODE, &mnccint_def_codec_f_cmd); install_element(MNCC_INT_NODE, &mnccint_def_codec_h_cmd); install_element(MNCC_INT_NODE, &mnccint_meas_feed_cmd); @@ -956,7 +955,6 @@ install_element(CONFIG_NODE, &cfg_hlr_cmd); install_node(&hlr_node, config_write_hlr); - vty_install_default(HLR_NODE); install_element(HLR_NODE, &cfg_hlr_remote_ip_cmd); install_element(HLR_NODE, &cfg_hlr_remote_port_cmd); -- To view, visit https://gerrit.osmocom.org/4614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34708c73d8084db4e6c83a39be8fdaeaa492d743 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:35 +0000 Subject: [PATCH] osmo-pcu[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4615 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a --- M src/pcu_vty.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/4615/1 diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 5ec16ea..dff331f 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1138,7 +1138,6 @@ install_node(&pcu_node, config_write_pcu); install_element(CONFIG_NODE, &cfg_pcu_cmd); - vty_install_default(PCU_NODE); install_element(PCU_NODE, &cfg_pcu_egprs_cmd); install_element(PCU_NODE, &cfg_pcu_no_egprs_cmd); install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd); -- To view, visit https://gerrit.osmocom.org/4615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 00:05:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 00:05:36 +0000 Subject: [PATCH] osmo-sip-connector[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4616 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06 --- M src/vty.c 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/16/4616/1 diff --git a/src/vty.c b/src/vty.c index 83e250d..f3d9467 100644 --- a/src/vty.c +++ b/src/vty.c @@ -300,18 +300,15 @@ install_element(CONFIG_NODE, &cfg_sip_cmd); install_node(&sip_node, config_write_sip); - vty_install_default(SIP_NODE); install_element(SIP_NODE, &cfg_sip_local_addr_cmd); install_element(SIP_NODE, &cfg_sip_remote_addr_cmd); install_element(CONFIG_NODE, &cfg_mncc_cmd); install_node(&mncc_node, config_write_mncc); - vty_install_default(MNCC_NODE); install_element(MNCC_NODE, &cfg_mncc_path_cmd); install_element(CONFIG_NODE, &cfg_app_cmd); install_node(&app_node, config_write_app); - vty_install_default(APP_NODE); install_element(APP_NODE, &cfg_use_imsi_cmd); install_element(APP_NODE, &cfg_no_use_imsi_cmd); -- To view, visit https://gerrit.osmocom.org/4616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From admin at opensuse.org Wed Nov 1 01:00:10 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 01 Nov 2017 01:00:10 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <59f91ca28a84c_7cda6aef782623ae@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_16.10/i586 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 219s] | [ 219s] | This file was extended by libosmocore config.status 0.10.1, which was [ 219s] | generated by GNU Autoconf 2.69. Invocation command line was [ 219s] | [ 219s] | CONFIG_FILES = [ 219s] | CONFIG_HEADERS = [ 219s] | CONFIG_LINKS = [ 219s] | CONFIG_COMMANDS = [ 219s] | $ ./config.status Doxyfile.core [ 219s] | [ 219s] | on build36 [ 219s] | [ 219s] | config.status:1174: creating Doxyfile.core [ 219s] [ 219s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 219s] make[1]: *** [override_dh_auto_test] Error 1 [ 219s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 219s] debian/rules:15: recipe for target 'build' failed [ 219s] make: *** [build] Error 2 [ 219s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 219s] [ 219s] build36 failed "build libosmocore_0.10.1.dsc" at Wed Nov 1 00:59:55 UTC 2017. [ 219s] [ 219s] ### VM INTERACTION START ### [ 222s] [ 212.669154] reboot: Power down [ 222s] ### VM INTERACTION END ### [ 222s] [ 222s] build36 failed "build libosmocore_0.10.1.dsc" at Wed Nov 1 00:59:58 UTC 2017. [ 222s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:12:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 09:12:46 +0000 Subject: [MERGED] libosmocore[master]: Move additional libraries to appropriate place In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Move additional libraries to appropriate place ...................................................................... Move additional libraries to appropriate place According to https://www.gnu.org/software/automake/manual/automake.html#Libtool-Flags the libraries supposed to be added to *_LDADD or *_LIBADD while *_LDFLAGS should contain additional libtool linking flags. Previously we used both. Let's unify this and move all the libraries into proper automake variable. While at it - also add libosmocore.la for tests to LDADD since all the tests link against it anyway. Change-Id: Ia657a66db75df831421af5df1175a992da5ba80f --- M src/Makefile.am M src/ctrl/Makefile.am M src/gb/Makefile.am M src/gsm/Makefile.am M src/sim/Makefile.am M src/vty/Makefile.am M tests/Makefile.am 7 files changed, 46 insertions(+), 60 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index cff5f44..e7f94ce 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,11 +44,11 @@ BUILT_SOURCES = crc8gen.c crc16gen.c crc32gen.c crc64gen.c EXTRA_DIST = conv_acc_sse_impl.h +libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined + if ENABLE_PLUGIN libosmocore_la_SOURCES += plugin.c -libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) $(TALLOC_LIBS) $(LIBRARY_DL) -no-undefined -else -libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) $(TALLOC_LIBS) -no-undefined +libosmocore_la_LIBADD += $(LIBRARY_DL) endif if ENABLE_MSGFILE diff --git a/src/ctrl/Makefile.am b/src/ctrl/Makefile.am index 8e10c6b..2bda5b7 100644 --- a/src/ctrl/Makefile.am +++ b/src/ctrl/Makefile.am @@ -10,8 +10,8 @@ libosmoctrl_la_SOURCES = control_cmd.c control_if.c fsm_ctrl_commands.c -libosmoctrl_la_LDFLAGS = $(LTLDFLAGS_OSMOCTRL) $(TALLOC_LIBS) -version-info $(LIBVERSION) -no-undefined -libosmoctrl_la_LIBADD = \ +libosmoctrl_la_LDFLAGS = $(LTLDFLAGS_OSMOCTRL) -version-info $(LIBVERSION) -no-undefined +libosmoctrl_la_LIBADD = $(TALLOC_LIBS) \ $(top_builddir)/src/libosmocore.la \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/vty/libosmovty.la diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am index 199e16e..1e0aa1e 100644 --- a/src/gb/Makefile.am +++ b/src/gb/Makefile.am @@ -11,8 +11,8 @@ if ENABLE_GB lib_LTLIBRARIES = libosmogb.la -libosmogb_la_LDFLAGS = $(LTLDFLAGS_OSMOGB) -version-info $(LIBVERSION) $(TALLOC_LIBS) -libosmogb_la_LIBADD = \ +libosmogb_la_LDFLAGS = $(LTLDFLAGS_OSMOGB) -version-info $(LIBVERSION) +libosmogb_la_LIBADD = $(TALLOC_LIBS) \ $(top_builddir)/src/libosmocore.la \ $(top_builddir)/src/vty/libosmovty.la \ $(top_builddir)/src/gsm/libosmogsm.la diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 9b52f03..4476971 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,8 +35,8 @@ libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la libosmogsm_la_SOURCES = -libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) -libosmogsm_la_LIBADD = libgsmint.la +libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined +libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) EXTRA_DIST = libosmogsm.map diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index 9590d6c..869e12d 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) -AM_LDFLAGS = $(COVERAGE_LDFLAGS) $(TALLOC_LIBS) +AM_LDFLAGS = $(COVERAGE_LDFLAGS) if ENABLE_PCSC # FIXME: only build the PC/SC dependent part conditional, but always build other parts diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index 32b38fb..7b5e1e5 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -12,6 +12,6 @@ libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \ telnet_interface.c logging_vty.c stats_vty.c \ fsm_vty.c talloc_ctx_vty.c -libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) -libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la +libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined +libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 7fb9a7b..1d4fb24 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) -AM_LDFLAGS = $(TALLOC_LIBS) +AM_LDFLAGS = +LDADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \ smscb/smscb_test bits/bitrev_test a5/a5_test \ @@ -43,155 +44,140 @@ endif utils_utils_test_SOURCES = utils/utils_test.c -utils_utils_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +utils_utils_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la stats_stats_test_SOURCES = stats/stats_test.c -stats_stats_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +stats_stats_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la a5_a5_test_SOURCES = a5/a5_test.c -a5_a5_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la +a5_a5_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la kasumi_kasumi_test_SOURCES = kasumi/kasumi_test.c -kasumi_kasumi_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la +kasumi_kasumi_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la comp128_comp128_test_SOURCES = comp128/comp128_test.c -comp128_comp128_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +comp128_comp128_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la auth_milenage_test_SOURCES = auth/milenage_test.c -auth_milenage_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +auth_milenage_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la abis_abis_test_SOURCES = abis/abis_test.c -abis_abis_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +abis_abis_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la ctrl_ctrl_test_SOURCES = ctrl/ctrl_test.c -ctrl_ctrl_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/ctrl/libosmoctrl.la +ctrl_ctrl_test_LDADD = $(LDADD) $(top_builddir)/src/ctrl/libosmoctrl.la gea_gea_test_SOURCES = gea/gea_test.c -gea_gea_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +gea_gea_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la bits_bitrev_test_SOURCES = bits/bitrev_test.c -bits_bitrev_test_LDADD = $(top_builddir)/src/libosmocore.la bitvec_bitvec_test_SOURCES = bitvec/bitvec_test.c -bitvec_bitvec_test_LDADD = $(top_builddir)/src/libosmocore.la bits_bitcomp_test_SOURCES = bits/bitcomp_test.c -bits_bitcomp_test_LDADD = $(top_builddir)/src/libosmocore.la bits_bitfield_test_SOURCES = bits/bitfield_test.c -bits_bitfield_test_LDADD = $(top_builddir)/src/libosmocore.la conv_conv_test_SOURCES = conv/conv_test.c conv/conv.c -conv_conv_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la +conv_conv_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la conv_conv_gsm0503_test_SOURCES = conv/conv_gsm0503_test.c conv/conv.c conv/gsm0503_test_vectors.c -conv_conv_gsm0503_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la +conv_conv_gsm0503_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la conv_conv_gsm0503_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/conv gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c -gsm0808_gsm0808_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +gsm0808_gsm0808_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la gsm0408_gsm0408_test_SOURCES = gsm0408/gsm0408_test.c -gsm0408_gsm0408_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +gsm0408_gsm0408_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la gprs_gprs_test_SOURCES = gprs/gprs_test.c -gprs_gprs_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +gprs_gprs_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la lapd_lapd_test_SOURCES = lapd/lapd_test.c -lapd_lapd_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +lapd_lapd_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la msgb_msgb_test_SOURCES = msgb/msgb_test.c -msgb_msgb_test_LDADD = $(top_builddir)/src/libosmocore.la msgfile_msgfile_test_SOURCES = msgfile/msgfile_test.c -msgfile_msgfile_test_LDADD = $(top_builddir)/src/libosmocore.la smscb_smscb_test_SOURCES = smscb/smscb_test.c -smscb_smscb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +smscb_smscb_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la smscb_gsm0341_test_SOURCES = smscb/gsm0341_test.c -smscb_gsm0341_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +smscb_gsm0341_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la sms_sms_test_SOURCES = sms/sms_test.c -sms_sms_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +sms_sms_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la timer_timer_test_SOURCES = timer/timer_test.c -timer_timer_test_LDADD = $(top_builddir)/src/libosmocore.la ussd_ussd_test_SOURCES = ussd/ussd_test.c -ussd_ussd_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la +ussd_ussd_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la gb_bssgp_fc_test_SOURCES = gb/bssgp_fc_test.c -gb_bssgp_fc_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la \ +gb_bssgp_fc_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la \ $(top_builddir)/src/gsm/libosmogsm.la gb_gprs_bssgp_test_SOURCES = gb/gprs_bssgp_test.c -gb_gprs_bssgp_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ +gb_gprs_bssgp_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ $(top_builddir)/src/gsm/libosmogsm.la gb_gprs_ns_test_SOURCES = gb/gprs_ns_test.c -gb_gprs_ns_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ +gb_gprs_ns_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ $(top_builddir)/src/gsm/libosmogsm.la logging_logging_test_SOURCES = logging/logging_test.c -logging_logging_test_LDADD = $(top_builddir)/src/libosmocore.la fr_fr_test_SOURCES = fr/fr_test.c -fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ +fr_fr_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) \ $(top_builddir)/src/gsm/libosmogsm.la codec_codec_test_SOURCES = codec/codec_test.c -codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la +codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c -loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la +loggingrb_loggingrb_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la strrb_strrb_test_SOURCES = strrb/strrb_test.c -strrb_strrb_test_LDADD = $(top_builddir)/src/libosmocore.la vty_vty_test_SOURCES = vty/vty_test.c -vty_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(top_builddir)/src/libosmocore.la +vty_vty_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la sim_sim_test_SOURCES = sim/sim_test.c -sim_sim_test_LDADD = $(top_builddir)/src/sim/libosmosim.la $(top_builddir)/src/libosmocore.la \ +sim_sim_test_LDADD = $(LDADD) $(top_builddir)/src/sim/libosmosim.la \ $(top_builddir)/src/gsm/libosmogsm.la tlv_tlv_test_SOURCES = tlv/tlv_test.c -tlv_tlv_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/libosmocore.la +tlv_tlv_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la gsup_gsup_test_SOURCES = gsup/gsup_test.c -gsup_gsup_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/libosmocore.la +gsup_gsup_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la oap_oap_test_SOURCES = oap/oap_test.c -oap_oap_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/libosmocore.la +oap_oap_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la fsm_fsm_test_SOURCES = fsm/fsm_test.c -fsm_fsm_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/ctrl/libosmoctrl.la +fsm_fsm_test_LDADD = $(LDADD) $(top_builddir)/src/ctrl/libosmoctrl.la write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c -write_queue_wqueue_test_LDADD = $(top_builddir)/src/libosmocore.la socket_socket_test_SOURCES = socket/socket_test.c -socket_socket_test_LDADD = $(top_builddir)/src/libosmocore.la coding_coding_test_SOURCES = coding/coding_test.c coding_coding_test_LDADD = \ - $(top_builddir)/src/libosmocore.la \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la endian_endian_test_SOURCES = endian/endian_test.c -endian_endian_test_LDADD = $(top_builddir)/src/libosmocore.la sercomm_sercomm_test_SOURCES = sercomm/sercomm_test.c -sercomm_sercomm_test_LDADD = $(top_builddir)/src/libosmocore.la prbs_prbs_test_SOURCES = prbs/prbs_test.c -prbs_prbs_test_LDADD = $(top_builddir)/src/libosmocore.la gsm23003_gsm23003_test_SOURCES = gsm23003/gsm23003_test.c -gsm23003_gsm23003_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/libosmocore.la +gsm23003_gsm23003_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac -- To view, visit https://gerrit.osmocom.org/4591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia657a66db75df831421af5df1175a992da5ba80f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:18:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 09:18:31 +0000 Subject: osmo-sgsn[master]: change default config filename to osmo-sgsn.cfg, not osmo_sg... In-Reply-To: References: Message-ID: Patch Set 2: I think it's way too complex: the backward compatibility can be achieved with '-c' option, and the absence of expected config file is clearly reported. -- To view, visit https://gerrit.osmocom.org/4603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:23:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:23:34 +0000 Subject: osmo-sgsn[master]: change default config filename to osmo-sgsn.cfg, not osmo_sg... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:23:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:23:47 +0000 Subject: osmocom-bb[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:01 +0000 Subject: osmo-bsc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:04 +0000 Subject: osmo-msc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34708c73d8084db4e6c83a39be8fdaeaa492d743 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:08 +0000 Subject: osmo-bts[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5e8e9d7989ee20fe722bdd3109965d5bce9519fb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:15 +0000 Subject: libosmo-sccp[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:20 +0000 Subject: osmo-mgw[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I246853156c4bd2a47690e580e647105eb838ca92 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:27 +0000 Subject: libosmo-abis[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:30 +0000 Subject: osmo-sip-connector[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:24:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:24:32 +0000 Subject: osmo-pcu[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:26:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:26:48 +0000 Subject: osmo-mgw[master]: client: add unified function to generate MGCP messages In-Reply-To: References: Message-ID: Patch Set 13: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I29c5e2fb972896faeb771ba040f015592487fcbe Gerrit-PatchSet: 13 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:27:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:27:40 +0000 Subject: osmo-mgw[master]: client: add ip address parsing to the client In-Reply-To: References: Message-ID: Patch Set 14: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I44b338b09de45e1675cedf9737fa72dde72e979a Gerrit-PatchSet: 14 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:43:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 09:43:33 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: make dummy packet handling more explicit Message-ID: Review at https://gerrit.osmocom.org/4617 cosmetic: make dummy packet handling more explicit The way how osmo-mgw decides when to send a dummy packet and when not is not very obvious. use more explicit if statements, and define constants. Also add comments that explain how it works. Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 41 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/17/4617/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 83505a2..59147f0 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -98,7 +98,17 @@ int last_port; }; +/* There are up to three modes in which the keep-alive dummy packet can be + * sent. The beviour is controlled viw the keepalive_interval member of the + * trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy- + * packet is sent at all and the timer that sends regular dummy packets + * is no longer scheduled. If the keepalive_interval is set to -1, only + * one dummy packet is sent when an CRCX or an MDCX is performed. No timer + * is scheduled. For all vales greater 0, the a timer is scheduled and the + * value is used as interval. See also mgcp_keepalive_timer_cb(), + * handle_modify_con(), and handle_create_con() */ #define MGCP_KEEPALIVE_ONCE (-1) +#define MGCP_KEEPALIVE_NEVER 0 struct mgcp_trunk_config { struct llist_head entry; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9c92c65..ba8ae4f 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -666,9 +666,11 @@ if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); - if (conn->conn->mode & MGCP_CONN_RECV_ONLY - && tcfg->keepalive_interval != 0) { - send_dummy(endp, conn); + /* Send dummy packet, see also commens in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(tcfg->keepalive_interval >= -1); + if (conn->conn->mode & MGCP_CONN_RECV_ONLY) { + if (tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) + send_dummy(endp, conn); } LOGP(DLMGCP, LOGL_NOTICE, @@ -815,9 +817,12 @@ p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_MDCX); - if (conn->conn->mode & MGCP_CONN_RECV_ONLY && - endp->tcfg->keepalive_interval != 0) - send_dummy(endp, conn); + /* Send dummy packet, see also commens in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(endp->tcfg->keepalive_interval >= -1); + if (conn->conn->mode & MGCP_CONN_RECV_ONLY) { + if (endp->tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) + send_dummy(endp, conn); + } if (silent) goto out_silent; @@ -1051,10 +1056,25 @@ struct mgcp_conn *conn; int i; - LOGP(DLMGCP, LOGL_DEBUG, "Triggered trunk %d keepalive timer.\n", + LOGP(DLMGCP, LOGL_DEBUG, "triggered trunk %d keepalive timer\n", tcfg->trunk_nr); - if (tcfg->keepalive_interval <= 0) + /* Do not accept invalid configuration values + * valid is MGCP_KEEPALIVE_NEVER, MGCP_KEEPALIVE_ONCE and + * values greater 0 */ + OSMO_ASSERT(tcfg->keepalive_interval >= -1) + + /* The dummy packet functionality has been disabled, we will exit + * immediately, no further timer is scheduled, which means we will no + * longer send dummy packets even when we did before */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_NEVER) + return; + + /* In cases where only one dummy packet is sent, we do not need + * the timer since the functions that handle the CRCX and MDCX are + * triggering the sending of the dummy packet. So we behave like in + * the MGCP_KEEPALIVE_NEVER case */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_ONCE) return; /* Send walk over all endpoints and send out dummy packets through @@ -1067,7 +1087,8 @@ } } - LOGP(DLMGCP, LOGL_DEBUG, "Rescheduling trunk %d keepalive timer.\n", + /* Schedule the keepalive timer for the next round */ + LOGP(DLMGCP, LOGL_DEBUG, "rescheduling trunk %d keepalive timer\n", tcfg->trunk_nr); osmo_timer_schedule(&tcfg->keepalive_timer, tcfg->keepalive_interval, 0); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index a1299b2..1709f52 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -569,7 +569,7 @@ cfg_mgcp_no_rtp_keepalive_cmd, "no rtp keep-alive", NO_STR RTP_STR RTP_KEEPALIVE_STR) { - mgcp_trunk_set_keepalive(&g_cfg->trunk, 0); + mgcp_trunk_set_keepalive(&g_cfg->trunk, MGCP_KEEPALIVE_NEVER); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:50:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:50:12 +0000 Subject: osmo-ci[master]: gerrit-verifications.yml: Remove FreeBSD_amd64 builds In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c6d2a17c3cf9d8c78c3675995493e30cbc6be0d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:50:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:50:14 +0000 Subject: osmo-ci[master]: gerrit-verifications.yml: Remove FreeBSD_amd64 builds In-Reply-To: References: Message-ID: Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/4576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c6d2a17c3cf9d8c78c3675995493e30cbc6be0d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:50:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 09:50:16 +0000 Subject: [MERGED] osmo-ci[master]: gerrit-verifications.yml: Remove FreeBSD_amd64 builds In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gerrit-verifications.yml: Remove FreeBSD_amd64 builds ...................................................................... gerrit-verifications.yml: Remove FreeBSD_amd64 builds In early September we asked on the public mailing list if there are any users of the FreeBSD builds, and there was no response at all. Let's disable the build testing on FreeBSD. This will significantly speed up our build testing, as well as pave the way for a more comprehensive docker/containerization of build testing. We're still extremely happy to merge any patches for support of FreeBSD or other operating systems. But the core Osmocom developers will not perform related testing / porting. Change-Id: I2c6d2a17c3cf9d8c78c3675995493e30cbc6be0d --- M jobs/gerrit-verifications.yml 1 file changed, 9 insertions(+), 23 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 46a30ba..49290f1 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -23,8 +23,7 @@ # in alphabetical order repos: - - asn1c: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] + - asn1c - cellmgr-ng: concurrent: true @@ -35,20 +34,12 @@ -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh - - libasn1c: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] - - - libosmo-abis: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] - - - libosmo-netif: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] - - - libosmo-sccp: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] + - libasn1c + - libosmo-abis + - libosmo-netif + - libosmo-sccp - libosmocore: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' @@ -60,8 +51,7 @@ ./contrib/jenkins.sh fi - - libsmpp34: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] + - libsmpp34 - openBSC: a1_name: SMPP @@ -82,8 +72,7 @@ -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - openggsn: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] + - openggsn - osmo-bsc: concurrent: true @@ -110,9 +99,7 @@ (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - - osmo-ggsn: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] - + - osmo-ggsn - osmo-gsm-manuals - osmo-hlr: @@ -146,8 +133,7 @@ -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - osmo-pcap: - slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64] + - osmo-pcap - osmo-pcu: a1_name: FIRMWARE_VERSION -- To view, visit https://gerrit.osmocom.org/4576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c6d2a17c3cf9d8c78c3675995493e30cbc6be0d Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 09:58:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 09:58:01 +0000 Subject: osmo-mgw[master]: network: add separate log category In-Reply-To: References: Message-ID: Patch Set 3: > I thin "newtwork" is extremely generic, as pretty much everything > we do is transmitted over some type of network. Please be very > clear and conscise in what this log category is about and name it > accordingly. I think its best to call it DRTP then. We will have to split/rename network.c anyway when we add support for E1 because network.c is already very big and we probably do not want to mix RTP with E1 functionality. -- To view, visit https://gerrit.osmocom.org/4443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 10:18:46 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 10:18:46 +0000 Subject: [PATCH] osmo-mgw[master]: network: add separate log category In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4443 to look at the new patch set (#4). network: add separate log category the network (mgcp_network.c) part and the protocol part (mgcp_protoocl.c) share a single loglevel DLMGCP. This makes debuging hard because when debugging the protocol we also get the log output from the RTP packets. assign the network part a private loglevel and keep DLMGCP for the directly MGCP related code Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 --- M include/osmocom/mgcp/Makefile.am A include/osmocom/mgcp/debug.h M src/libosmo-mgcp/mgcp_network.c M src/osmo-mgw/mgw_main.c 4 files changed, 108 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/43/4443/4 diff --git a/include/osmocom/mgcp/Makefile.am b/include/osmocom/mgcp/Makefile.am index cd8f599..d706807 100644 --- a/include/osmocom/mgcp/Makefile.am +++ b/include/osmocom/mgcp/Makefile.am @@ -5,4 +5,5 @@ mgcp_stat.h \ mgcp_ep.h \ mgcp_sdp.h \ + debug.h \ $(NULL) diff --git a/include/osmocom/mgcp/debug.h b/include/osmocom/mgcp/debug.h new file mode 100644 index 0000000..ddeb0dc --- /dev/null +++ b/include/osmocom/mgcp/debug.h @@ -0,0 +1,35 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +#define DEBUG +#include + +/* Debug Areas of the code */ +enum { + DRTP, + Debug_LastEntry, +}; + +extern const struct log_info log_info; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index dac1698..3d52d07 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -40,6 +40,7 @@ #include #include #include +#include #define RTP_SEQ_MOD (1 << 16) #define RTP_MAX_DROPOUT 3000 @@ -64,7 +65,7 @@ memset(&tp, 0, sizeof(tp)); if (clock_gettime(CLOCK_MONOTONIC, &tp) != 0) - LOGP(DLMGCP, LOGL_NOTICE, "Getting the clock failed.\n"); + LOGP(DRTP, LOGL_NOTICE, "Getting the clock failed.\n"); /* convert it to 1/unit seconds */ ret = tp.tv_sec; @@ -85,7 +86,7 @@ { struct sockaddr_in out; - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "sending %i bytes length packet to %s:%u ...\n", len, inet_ntoa(*addr), ntohs(port)); @@ -109,9 +110,9 @@ OSMO_ASSERT(endp); OSMO_ASSERT(conn); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr, @@ -131,7 +132,7 @@ return rc; failed: - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x Failed to send dummy %s packet.\n", ENDPOINT_NUMBER(endp), was_rtcp ? "RTCP" : "RTP"); @@ -172,7 +173,7 @@ if (seq == sstate->last_seq) { if (timestamp != sstate->last_timestamp) { sstate->err_ts_counter += 1; - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "The %s timestamp delta is != 0 but the sequence " "number %d is the same, " "TS offset: %d, SeqNo offset: %d " @@ -192,7 +193,7 @@ if (tsdelta == 0) { /* Don't update *tsdelta_out */ - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "The %s timestamp delta is %d " "on 0x%x SSRC: %u timestamp: %u " "from %s:%d\n", @@ -205,7 +206,7 @@ if (sstate->last_tsdelta != tsdelta) { if (sstate->last_tsdelta) { - LOGP(DLMGCP, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "The %s timestamp delta changes from %d to %d " "on 0x%x SSRC: %u timestamp: %u from %s:%d\n", text, sstate->last_tsdelta, tsdelta, @@ -222,7 +223,7 @@ if (timestamp_error) { sstate->err_ts_counter += 1; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "The %s timestamp has an alignment error of %d " "on 0x%x SSRC: %u " "SeqNo delta: %d, TS delta: %d, dTS/dSeq: %d " @@ -252,7 +253,7 @@ if (tsdelta == 0) { tsdelta = state->out_stream.last_tsdelta; if (tsdelta != 0) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "A fixed packet duration is not available on 0x%x, " "using last output timestamp delta instead: %d " "from %s:%d\n", @@ -260,7 +261,7 @@ inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } else { tsdelta = rtp_end->codec.rate * 20 / 1000; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Fixed packet duration and last timestamp delta " "are not available on 0x%x, " "using fixed 20ms instead: %d " @@ -276,7 +277,7 @@ if (state->timestamp_offset != timestamp_offset) { state->timestamp_offset = timestamp_offset; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Timestamp offset change on 0x%x SSRC: %u " "SeqNo delta: %d, TS offset: %d, " "from %s:%d\n", @@ -308,7 +309,7 @@ if (ts_error) { state->timestamp_offset += ptime - ts_error; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Corrected timestamp alignment error of %d on 0x%x SSRC: %u " "new TS offset: %d, " "from %s:%d\n", @@ -341,7 +342,7 @@ struct mgcp_rtp_end *dst_end, char *data, int *len, int buf_size) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -355,7 +356,7 @@ struct mgcp_rtp_end *dst_end, struct mgcp_rtp_end *src_end) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -366,7 +367,7 @@ const char **fmtp_extra, struct mgcp_conn_rtp *conn) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s using format defaults\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); @@ -405,7 +406,7 @@ if (seq < state->stats_max_seq) state->stats_cycles += RTP_SEQ_MOD; } else if (udelta <= RTP_SEQ_MOD - RTP_MAX_MISORDER) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "RTP seqno made a very large jump on 0x%x delta: %u\n", ENDPOINT_NUMBER(endp), udelta); } @@ -463,7 +464,7 @@ state->out_stream = state->in_stream; state->out_stream.last_timestamp = timestamp; state->out_stream.ssrc = ssrc - 1; /* force output SSRC change */ - LOGP(DLMGCP, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "endpoint:%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, @@ -472,14 +473,14 @@ if (state->packet_duration == 0) { state->packet_duration = rtp_end->codec.rate * 20 / 1000; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x fixed packet duration is not available, " "using fixed 20ms instead: %d from %s:%d\n", ENDPOINT_NUMBER(endp), state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } } else if (state->in_stream.ssrc != ssrc) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x SSRC changed: %u -> %u " "from %s:%d\n", ENDPOINT_NUMBER(endp), @@ -508,7 +509,7 @@ if (rtp_end->force_constant_ssrc != -1) rtp_end->force_constant_ssrc -= 1; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x SSRC patching enabled, SSRC: %u " "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", @@ -566,7 +567,7 @@ return; #if 0 - DEBUGP(DLMGCP, + DEBUGP(DRTP, "endpoint:%x payload hdr payload %u -> endp payload %u\n", ENDPOINT_NUMBER(endp), rtp_hdr->payload_type, payload); rtp_hdr->payload_type = payload; @@ -611,22 +612,22 @@ OSMO_ASSERT(conn_dst); if (is_rtp) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x delivering RTP packet...\n", ENDPOINT_NUMBER(endp)); } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x delivering RTCP packet...\n", ENDPOINT_NUMBER(endp)); } - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x loop:%d, mode:%d ", ENDPOINT_NUMBER(endp), tcfg->audio_loop, conn_src->conn->mode); if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) - LOGPC(DLMGCP, LOGL_DEBUG, "(loopback)\n"); + LOGPC(DRTP, LOGL_DEBUG, "(loopback)\n"); else - LOGPC(DLMGCP, LOGL_DEBUG, "\n"); + LOGPC(DRTP, LOGL_DEBUG, "\n"); /* Note: In case of loopback configuration, both, the source and the * destination will point to the same connection. */ @@ -636,7 +637,7 @@ if (!rtp_end->output_enabled) { rtp_end->dropped_packets += 1; - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), @@ -659,7 +660,7 @@ if (addr) mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, buflen); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x process/send to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -698,7 +699,7 @@ } while (buflen > 0); return nbytes; } else if (!tcfg->omit_rtcp) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x send to %s %s rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -740,19 +741,19 @@ rc = recvfrom(fd, buf, bufsize, 0, (struct sockaddr *)addr, &slen); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "receiving %u bytes length packet from %s:%u ...\n", rc, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); if (rc < 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to receive packet, errno: %d/%s\n", ENDPOINT_NUMBER(endp), errno, strerror(errno)); return -1; } if (tossed) { - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); } @@ -771,12 +772,12 @@ * which we send our outgoing RTP traffic. */ if (memcmp(&addr->sin_addr, &conn->end.addr, sizeof(addr->sin_addr)) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x data from wrong address: %s, ", ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); - LOGPC(DLMGCP, LOGL_ERROR, "expected: %s\n", + LOGPC(DRTP, LOGL_ERROR, "expected: %s\n", inet_ntoa(conn->end.addr)); - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -787,13 +788,13 @@ * plausibility. */ if (conn->end.rtp_port != addr->sin_port && conn->end.rtcp_port != addr->sin_port) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x data from wrong source port: %d, ", ENDPOINT_NUMBER(endp), ntohs(addr->sin_port)); - LOGPC(DLMGCP, LOGL_ERROR, + LOGPC(DRTP, LOGL_ERROR, "expected: %d for RTP or %d for RTCP\n", ntohs(conn->end.rtp_port), ntohs(conn->end.rtcp_port)); - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -809,14 +810,14 @@ endp = conn->conn->endp; if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x destination IP-address is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } if (conn->end.rtp_port == 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x destination rtp port is invalid\n", ENDPOINT_NUMBER(endp)); return -1; @@ -839,7 +840,7 @@ endp = conn->conn->endp; tcfg = endp->tcfg; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", ENDPOINT_NUMBER(endp)); rc = receive_from(endp, fd->fd, addr, buf, buf_size); @@ -847,11 +848,11 @@ return -1; *proto = fd == &conn->end.rtp ? MGCP_PROTO_RTP : MGCP_PROTO_RTCP; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); - LOGPC(DLMGCP, LOGL_DEBUG, "receiveing from %s %s %d\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); + LOGPC(DRTP, LOGL_DEBUG, "receiveing from %s %s %d\n", conn->conn->name, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); /* Check if the origin of the RTP packet seems plausible */ @@ -862,10 +863,10 @@ /* Filter out dummy message */ if (rc == 1 && buf[0] == MGCP_DUMMY_LOAD) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x dummy message received\n", ENDPOINT_NUMBER(endp)); - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -890,7 +891,7 @@ struct mgcp_endpoint *endp; endp = conn_src->conn->endp; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_dst->conn)); /* Before we try to deliver the packet, we check if the destination @@ -903,7 +904,7 @@ * destination connection. */ switch (conn_dst->type) { case MGCP_RTP_DEFAULT: - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x endpoint type is MGCP_RTP_DEFAULT, " "using mgcp_send() to forward data directly\n", ENDPOINT_NUMBER(endp)); @@ -911,7 +912,7 @@ addr, buf, buf_size, conn_src, conn_dst); case MGCP_OSMUX_BSC_NAT: case MGCP_OSMUX_BSC: - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x endpoint type is MGCP_OSMUX_BSC_NAT, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n", ENDPOINT_NUMBER(endp)); @@ -921,7 +922,7 @@ /* If the data has not been handled/forwarded until here, it will * be discarded, this should not happen, normally the MGCP type * should be properly set */ - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x bad MGCP type -- data discarded!\n", ENDPOINT_NUMBER(endp)); @@ -966,7 +967,7 @@ /* There is no destination conn, stop here */ if (!conn_dst) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x unable to find destination conn\n", ENDPOINT_NUMBER(endp)); return -1; @@ -974,7 +975,7 @@ /* The destination conn is not an RTP connection */ if (conn_dst->type != MGCP_CONN_TYPE_RTP) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x unable to find suitable destination conn\n", ENDPOINT_NUMBER(endp)); return -1; @@ -1009,7 +1010,7 @@ endp = conn_src->conn->endp; OSMO_ASSERT(endp); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ @@ -1056,16 +1057,16 @@ fd->fd = socket(AF_INET, SOCK_DGRAM, 0); if (fd->fd < 0) { - LOGP(DLMGCP, LOGL_ERROR, "failed to create UDP port (%s:%i).\n", + LOGP(DRTP, LOGL_ERROR, "failed to create UDP port (%s:%i).\n", source_addr, port); return -1; } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "created UDP port (%s:%i).\n", source_addr, port); } if (setsockopt(fd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "failed to set socket options (%s:%i).\n", source_addr, port); return -1; @@ -1079,11 +1080,11 @@ if (bind(fd->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { close(fd->fd); fd->fd = -1; - LOGP(DLMGCP, LOGL_ERROR, "failed to bind UDP port (%s:%i).\n", + LOGP(DRTP, LOGL_ERROR, "failed to bind UDP port (%s:%i).\n", source_addr, port); return -1; } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "bound UDP port (%s:%i).\n", source_addr, port); } @@ -1099,7 +1100,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtp, rtp_end->local_port) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to create RTP port: %s:%d\n", endpno, source_addr, rtp_end->local_port); goto cleanup0; @@ -1107,7 +1108,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtcp, rtp_end->local_port + 1) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to create RTCP port: %s:%d\n", endpno, source_addr, rtp_end->local_port + 1); goto cleanup1; @@ -1119,7 +1120,7 @@ rtp_end->rtp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to register RTP port %d\n", endpno, rtp_end->local_port); goto cleanup2; @@ -1127,7 +1128,7 @@ rtp_end->rtcp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to register RTCP port %d\n", endpno, rtp_end->local_port + 1); goto cleanup3; @@ -1162,7 +1163,7 @@ end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x %u was already bound on conn:%s\n", ENDPOINT_NUMBER(endp), rtp_port, mgcp_conn_dump(conn->conn)); diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index aef99ae..ab54e62 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -233,6 +234,12 @@ static const struct log_info_cat log_categories[] = { /* DLMGCP is provided by the MGCP library */ + [DRTP] = { + .name = "DRTP", + .description = "RTP stream handling", + .color = "\033[1;30m", + .enabled = 1,.loglevel = LOGL_NOTICE, + }, }; const struct log_info log_info = { -- To view, visit https://gerrit.osmocom.org/4443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 1 10:27:56 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 10:27:56 +0000 Subject: osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Patch Set 7: > ...and what with the build failure? I think this just because the osmo-mgw patches are not merged yet (see depends in commit message). When I come to correcting the new review issues I will have a closer look to the jenkins job to see if it is really like this. -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 10:43:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 10:43:57 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp Message-ID: Review at https://gerrit.osmocom.org/4618 osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp This fixes the following dpkg-shlibeps warnings: Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libosmogsm.so.8 (it uses none of the library's symbols) dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libsctp.so.1 (it uses none of the library's symbols) --- M src/Makefile.am 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/18/4618/1 diff --git a/src/Makefile.am b/src/Makefile.am index d815394..a45b70b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,6 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -COMMON_LDADD = -lsctp # build the shared RANAP library # @@ -68,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) $(OSMOGSM_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) $(COMMON_LDADD) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Nov 1 10:43:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 10:43:59 +0000 Subject: [PATCH] osmo-iuh[master]: Link libosmo-ranap against libosmovty Message-ID: Review at https://gerrit.osmocom.org/4619 Link libosmo-ranap against libosmovty This fixes the following dh-shlibdeps warnings: Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24 dpkg-shlibdeps: warning: symbol install_element used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol vty_out used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries --- M src/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/19/4619/1 diff --git a/src/Makefile.am b/src/Makefile.am index a45b70b..ebed2bf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,7 +51,7 @@ RANAP_LIBVERSION=1:0:0 lib_LTLIBRARIES = libosmo-ranap.la libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION) -libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOSIGTRAN_LIBS) \ +libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ ranap_common_cn.c iu_client.c iu_client_vty.c -- To view, visit https://gerrit.osmocom.org/4619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Nov 1 10:47:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 10:47:23 +0000 Subject: libosmocore[master]: utils: move linked libraries into common variable In-Reply-To: References: Message-ID: Patch Set 1: > are you sure this is correct? Yes, I'm pretty sure. What gives you pause? > Do we need the exact same set of libraries for both tools? You mean osmo-arfcn and osmo-auc-gen? At the moment, yes. > Do you get dpkg-shlibdeps warnings for any of those? No. There're warnings for libosmogb.so and libosmosim.so but those are unrelated. It's really just a trivial move of common deps to standard single variable to make it more readable. I've tried all the utils with this patch to double-check that they still work. -- To view, visit https://gerrit.osmocom.org/4592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54f4e439cc232d926b42ddba9648d4f5e7487c3e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:07:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 11:07:47 +0000 Subject: libosmocore[master]: utils: move linked libraries into common variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54f4e439cc232d926b42ddba9648d4f5e7487c3e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:08:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 11:08:22 +0000 Subject: osmo-mgw[master]: network: add separate log category In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:09:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 11:09:41 +0000 Subject: osmo-mgw[master]: cosmetic: make dummy packet handling more explicit In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:10:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:10:22 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 2: > it makes sense to cache the failure of the syscall and not attempt to use the syscall at every random number generation to then fall back to gnutls Could you elaborate why that's more efficient? AFAIK with the way we use getrandom, it can only fail permanently iff we use it in a wrong way e. g. wrong flags, wrong buffer address etc. Instead of hiding this with GnuTLS fallback I think it's better to expose it right away to make sure it's fixed immediately. In general, I think before making any such optimizations we first have to make some benchmark or test setup to make sure that 1) there's actually a problem and 2) our optimization actually improve things. Moreover, I think GnuTLS uses getrandom internal when it's available so I doubt that direct getrandom() call would fail for us but succeed for GnuTLS. Overall, I'd rather keep it as it is: isolated fallback for old systems which can be trivially removed once we do not have to support them anymore. Unless you have strong opinion to the contrary of course. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:11:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:11:32 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 2: > I would argue to activate the --enable-gnutls by default, if it is present on the system. > Or maybe rather, fail configure.ac if gnutls is not found AND no --disable-gnutls was present. What should be the default for .deb packages? -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:11:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:11:46 +0000 Subject: [MERGED] libosmocore[master]: utils: move linked libraries into common variable In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: utils: move linked libraries into common variable ...................................................................... utils: move linked libraries into common variable Change-Id: I54f4e439cc232d926b42ddba9648d4f5e7487c3e --- M utils/Makefile.am 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/Makefile.am b/utils/Makefile.am index 51af3d8..d4999bd 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,21 +1,20 @@ if ENABLE_UTILITIES AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall +LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la EXTRA_DIST = conv_gen.py conv_codes_gsm.py bin_PROGRAMS = osmo-arfcn osmo-auc-gen osmo_arfcn_SOURCES = osmo-arfcn.c -osmo_arfcn_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la osmo_auc_gen_SOURCES = osmo-auc-gen.c -osmo_auc_gen_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la if ENABLE_PCSC noinst_PROGRAMS = osmo-sim-test osmo_sim_test_SOURCES = osmo-sim-test.c -osmo_sim_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/sim/libosmosim.la $(PCSC_LIBS) +osmo_sim_test_LDADD = $(LDADD) $(top_builddir)/src/sim/libosmosim.la $(PCSC_LIBS) osmo_sim_test_CFLAGS = $(PCSC_CFLAGS) endif endif -- To view, visit https://gerrit.osmocom.org/4592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54f4e439cc232d926b42ddba9648d4f5e7487c3e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:19:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 11:19:18 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 2: > Could you elaborate why that's more efficient? Isn't it the cost of a syscall (very expensive) vs. the cost of a single conditional if statement? Or am I missing something? > AFAIK with the way we use getrandom, it can only fail permanently yes, exactly. This means that on the first getrandom() call it will fail the syscall -> we fall back to gnutls and memorize that fact. On second and further calls, we simply go directly to gnutls. > Moreover, I think GnuTLS uses getrandom internal when it's > available so I doubt that direct getrandom() call would fail for us > but succeed for GnuTLS. we are using gnutls for fallback in case there is no getrandom(). So gnutls would never be used in a situation where getrandom() is available, right? > Overall, I'd rather keep it as it is: isolated fallback for old > systems which can be trivially removed once we do not have to > support them anymore. Unless you have strong opinion to the > contrary of course. I am arguing for a "trivial fallback" but in a way that a single binary will determine at runtime if getrandom() is available, or if not, fall back to gnutls. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:20:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 11:20:56 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 2: > > I would argue to activate the --enable-gnutls by default, if it > is present on the system. > > > Or maybe rather, fail configure.ac if gnutls is not found AND no > --disable-gnutls was present. > > What should be the default for .deb packages? a run-time fallback to gnutls should be enabled. So we first try getrandom() and if that fails, we use gnutls. This will produce a binary that will do the best possible option on any particular kernel version / sytem. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:22:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:22:11 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 2: > I am arguing for a "trivial fallback" but in a way that a single binary will determine at runtime if getrandom() is available, or if not, fall back to gnutls. Ah, get it now - misunderstood your comment altogether. Will send updated patch shortly. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:29:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 Nov 2017 11:29:50 +0000 Subject: [PATCH] osmo-bts[master]: lc15: Fix cfg indentation Message-ID: Review at https://gerrit.osmocom.org/4620 lc15: Fix cfg indentation I was unable to start osmo-bts-lc15 with this config file until this change was made, it said this command didn't exist. Change-Id: Iae80e2ed504b5e26d748d57be7558ce470555f97 --- M doc/examples/litecell15/osmo-bts.cfg 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/20/4620/1 diff --git a/doc/examples/litecell15/osmo-bts.cfg b/doc/examples/litecell15/osmo-bts.cfg index 3036283..f0bafe8 100644 --- a/doc/examples/litecell15/osmo-bts.cfg +++ b/doc/examples/litecell15/osmo-bts.cfg @@ -29,10 +29,10 @@ ! phy 0 instance 0 - trx-calibration-path /mnt/rom/factory/calib + trx-calibration-path /mnt/rom/factory/calib phy 1 instance 0 - trx-calibration-path /mnt/rom/factory/calib + trx-calibration-path /mnt/rom/factory/calib bts 0 band 900 ipa unit-id 1500 0 -- To view, visit https://gerrit.osmocom.org/4620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae80e2ed504b5e26d748d57be7558ce470555f97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:37:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:37:55 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#3). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. N. B: the fallback is purely compile-time - the syscall and GnuTLS availability is checked at compile-time and appropriate code is compiled in. There's no runtime check. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/3 diff --git a/configure.ac b/configure.ac index d9390cf..cf5a3c1 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,6 +242,7 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..627c79a 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -104,6 +104,10 @@ #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif +#elif (USE_GNUTLS) +#pragma message ("Secure random unavailable: including GnuTLS.") +#include +#include #endif /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -415,14 +419,33 @@ if (len > OSMO_MAX_RAND_ID_LEN) return -E2BIG; + /* The conditional compile below is necessary to support legacy systems: + 1) On systems with recent enough glibc (>= 2.25) we use it and the rest is not compiled in + 2) On systems with old glibc but with recent enough kernel (>=3.17) we use syscall directly + 3) On systems with older kernel we check for GnuTLS fallback availability + 3a) If it's available at compile time - use it + 3b) Otherwise just return failure + FIXME: + * Once we do not have to support old kernels, 3a can be removed + * Once we do not have to support old glibc, 2 and 3 can be removed */ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25) + /* 1) "main" branch (i. e. ) of conditional compile ifdef: use glibc */ rc = getrandom(out, len, GRND_NONBLOCK); #elif HAVE_DECL_SYS_GETRANDOM + /* 2) "alternative" branch (i. e. ) of conditional compile ifdef: use syscall */ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); #else + /* 3) "final" branch (i. e. ) of conditional compile ifdef: use fallback (if available) */ +#if (USE_GNUTLS) +#pragma message ("Secure random unavailable: using GnuTLS fallback.") + /* 3a) GnuTLS is available - use it as fallback */ + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#else #pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") +#endif + /* 3b) All other options exhausted - fail. */ return -ENOTSUP; #endif /* getrandom() failed entirely: */ -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:42:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:42:06 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 3: I've updated comments and commit message. My confusion comes from following: currently we check for glibc version and syscall availability at compile time - and use either of those if available. The GnuTLS fallback is added in the same way: if compile-time check for getrandom (both as glibc function and as syscall) fails, only than we compile in GnuTLS. There's no run-time checks. Is this approach wrong? Shall we do run-time checks instead? Not sure yet how this can be done. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:46:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:46:21 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#5). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. N. B: the fallback is purely compile-time - the syscall and GnuTLS availability is checked at compile-time and appropriate code is compiled in. There's no runtime check. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 44 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/5 diff --git a/configure.ac b/configure.ac index d9390cf..6089c17 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,10 +242,12 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..627c79a 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -104,6 +104,10 @@ #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif +#elif (USE_GNUTLS) +#pragma message ("Secure random unavailable: including GnuTLS.") +#include +#include #endif /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -415,14 +419,33 @@ if (len > OSMO_MAX_RAND_ID_LEN) return -E2BIG; + /* The conditional compile below is necessary to support legacy systems: + 1) On systems with recent enough glibc (>= 2.25) we use it and the rest is not compiled in + 2) On systems with old glibc but with recent enough kernel (>=3.17) we use syscall directly + 3) On systems with older kernel we check for GnuTLS fallback availability + 3a) If it's available at compile time - use it + 3b) Otherwise just return failure + FIXME: + * Once we do not have to support old kernels, 3a can be removed + * Once we do not have to support old glibc, 2 and 3 can be removed */ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25) + /* 1) "main" branch (i. e. ) of conditional compile ifdef: use glibc */ rc = getrandom(out, len, GRND_NONBLOCK); #elif HAVE_DECL_SYS_GETRANDOM + /* 2) "alternative" branch (i. e. ) of conditional compile ifdef: use syscall */ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); #else + /* 3) "final" branch (i. e. ) of conditional compile ifdef: use fallback (if available) */ +#if (USE_GNUTLS) +#pragma message ("Secure random unavailable: using GnuTLS fallback.") + /* 3a) GnuTLS is available - use it as fallback */ + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#else #pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") +#endif + /* 3b) All other options exhausted - fail. */ return -ENOTSUP; #endif /* getrandom() failed entirely: */ -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:52:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:52:48 +0000 Subject: [MERGED] libosmo-abis[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010 --- M src/e1_input_vty.c M src/ipa_proxy.c 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index 9d69586..2bd56a4 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -380,7 +380,6 @@ install_element(CONFIG_NODE, &cfg_e1inp_cmd); install_node(&e1inp_node, e1inp_config_write); - vty_install_default(L_E1INP_NODE); install_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd); install_element(L_E1INP_NODE, &cfg_e1_line_port_cmd); install_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd); diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c index 6053bb8..94f48dc 100644 --- a/src/ipa_proxy.c +++ b/src/ipa_proxy.c @@ -652,7 +652,6 @@ install_element(CONFIG_NODE, &ipa_cfg_cmd); install_node(&ipa_node, ipa_cfg_write); - vty_install_default(L_IPA_NODE); install_element(L_IPA_NODE, &ipa_instance_cfg_add_cmd); install_element(L_IPA_NODE, &ipa_route_cfg_add_cmd); } -- To view, visit https://gerrit.osmocom.org/4606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:52:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:52:57 +0000 Subject: [MERGED] osmo-pcu[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a --- M src/pcu_vty.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 5ec16ea..dff331f 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1138,7 +1138,6 @@ install_node(&pcu_node, config_write_pcu); install_element(CONFIG_NODE, &cfg_pcu_cmd); - vty_install_default(PCU_NODE); install_element(PCU_NODE, &cfg_pcu_egprs_cmd); install_element(PCU_NODE, &cfg_pcu_no_egprs_cmd); install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd); -- To view, visit https://gerrit.osmocom.org/4615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:04 +0000 Subject: [MERGED] osmo-sip-connector[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06 --- M src/vty.c 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty.c b/src/vty.c index 83e250d..f3d9467 100644 --- a/src/vty.c +++ b/src/vty.c @@ -300,18 +300,15 @@ install_element(CONFIG_NODE, &cfg_sip_cmd); install_node(&sip_node, config_write_sip); - vty_install_default(SIP_NODE); install_element(SIP_NODE, &cfg_sip_local_addr_cmd); install_element(SIP_NODE, &cfg_sip_remote_addr_cmd); install_element(CONFIG_NODE, &cfg_mncc_cmd); install_node(&mncc_node, config_write_mncc); - vty_install_default(MNCC_NODE); install_element(MNCC_NODE, &cfg_mncc_path_cmd); install_element(CONFIG_NODE, &cfg_app_cmd); install_node(&app_node, config_write_app); - vty_install_default(APP_NODE); install_element(APP_NODE, &cfg_use_imsi_cmd); install_element(APP_NODE, &cfg_no_use_imsi_cmd); -- To view, visit https://gerrit.osmocom.org/4616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97dab6871ff37279be2caf24a8e8dc6af39d1e06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:09 +0000 Subject: [MERGED] osmo-mgw[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I246853156c4bd2a47690e580e647105eb838ca92 --- M src/libosmo-legacy-mgcp/mgcp_vty.c M src/libosmo-mgcp/mgcp_vty.c 2 files changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-legacy-mgcp/mgcp_vty.c b/src/libosmo-legacy-mgcp/mgcp_vty.c index a48e205..7b11422 100644 --- a/src/libosmo-legacy-mgcp/mgcp_vty.c +++ b/src/libosmo-legacy-mgcp/mgcp_vty.c @@ -1356,7 +1356,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - vty_install_default(MGCP_NODE); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bts_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); @@ -1416,7 +1415,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - vty_install_default(TRUNK_NODE); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_cmd); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_once_cmd); install_element(TRUNK_NODE, &cfg_trunk_no_rtp_keepalive_cmd); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index a1299b2..e8ad818 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1156,7 +1156,6 @@ install_element(CONFIG_NODE, &cfg_mgcp_cmd); install_node(&mgcp_node, config_write_mgcp); - vty_install_default(MGCP_NODE); install_element(MGCP_NODE, &cfg_mgcp_local_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); @@ -1204,7 +1203,6 @@ install_element(MGCP_NODE, &cfg_mgcp_trunk_cmd); install_node(&trunk_node, config_write_trunk); - vty_install_default(TRUNK_NODE); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_cmd); install_element(TRUNK_NODE, &cfg_trunk_rtp_keepalive_once_cmd); install_element(TRUNK_NODE, &cfg_trunk_no_rtp_keepalive_cmd); -- To view, visit https://gerrit.osmocom.org/4613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I246853156c4bd2a47690e580e647105eb838ca92 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:16 +0000 Subject: [MERGED] libosmo-sccp[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321 --- M examples/sccp_test_vty.c M src/osmo_ss7_vty.c 2 files changed, 0 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/examples/sccp_test_vty.c b/examples/sccp_test_vty.c index d809fbc..c477c8b 100644 --- a/examples/sccp_test_vty.c +++ b/examples/sccp_test_vty.c @@ -139,7 +139,6 @@ g_calling_addr.ssn = ssn; install_node(&scu_node, NULL); - vty_install_default(SCU_NODE); install_element(SCU_NODE, &scu_called_ssn_cmd); install_element(SCU_NODE, &scu_conn_req_cmd); install_element(SCU_NODE, &scu_conn_resp_cmd); diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 8d13865..2c3d78e 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1683,7 +1683,6 @@ static void vty_init_addr(void) { install_node(&sccpaddr_node, NULL); - vty_install_default(L_CS7_SCCPADDR_NODE); install_element(L_CS7_NODE, &cs7_show_sccpaddr_cmd); install_element(L_CS7_NODE, &cs7_sccpaddr_cmd); install_element(L_CS7_NODE, &cs7_sccpaddr_del_cmd); @@ -1706,7 +1705,6 @@ #endif install_element(L_CS7_SCCPADDR_NODE, &cs7_sccpaddr_gt_cmd); install_node(&sccpaddr_gt_node, NULL); - vty_install_default(L_CS7_SCCPADDR_GT_NODE); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_gti_cmd); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_tt_cmd); install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_npi_cmd); @@ -1724,7 +1722,6 @@ install_element(CONFIG_NODE, &cs7_instance_cmd); install_node(&cs7_node, config_write_cs7); - vty_install_default(L_CS7_NODE); install_element(L_CS7_NODE, &cfg_description_cmd); install_element(L_CS7_NODE, &cs7_net_ind_cmd); install_element(L_CS7_NODE, &cs7_point_code_cmd); @@ -1734,7 +1731,6 @@ install_element(L_CS7_NODE, &cs7_permit_dyn_rkm_cmd); install_node(&asp_node, NULL); - vty_install_default(L_CS7_ASP_NODE); install_element_ve(&show_cs7_asp_cmd); install_element(L_CS7_NODE, &cs7_asp_cmd); install_element(L_CS7_NODE, &no_cs7_asp_cmd); @@ -1746,7 +1742,6 @@ install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); install_node(&as_node, NULL); - vty_install_default(L_CS7_AS_NODE); install_element_ve(&show_cs7_as_cmd); install_element(L_CS7_NODE, &cs7_as_cmd); install_element(L_CS7_NODE, &no_cs7_as_cmd); @@ -1777,7 +1772,6 @@ vty_init_shared(ctx); install_node(&rtable_node, NULL); - vty_install_default(L_CS7_RTABLE_NODE); install_element_ve(&show_cs7_route_cmd); install_element(L_CS7_NODE, &cs7_route_table_cmd); install_element(L_CS7_RTABLE_NODE, &cfg_description_cmd); @@ -1785,7 +1779,6 @@ install_element(L_CS7_RTABLE_NODE, &cs7_rt_rem_cmd); install_node(&xua_node, NULL); - vty_install_default(L_CS7_XUA_NODE); install_element(L_CS7_NODE, &cs7_xua_cmd); install_element(L_CS7_NODE, &no_cs7_xua_cmd); install_element(L_CS7_XUA_NODE, &xua_local_ip_cmd); -- To view, visit https://gerrit.osmocom.org/4607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:19 +0000 Subject: [MERGED] osmo-bts[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I5e8e9d7989ee20fe722bdd3109965d5bce9519fb --- M src/common/vty.c M src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c M src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c 3 files changed, 0 insertions(+), 32 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/vty.c b/src/common/vty.c index 1a158db..050f922 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1073,7 +1073,6 @@ install_node(&bts_node, config_write_bts); install_element(CONFIG_NODE, &cfg_bts_cmd); install_element(CONFIG_NODE, &cfg_vty_telnet_port_cmd); - install_default(BTS_NODE); install_element(BTS_NODE, &cfg_bts_unit_id_cmd); install_element(BTS_NODE, &cfg_bts_oml_ip_cmd); install_element(BTS_NODE, &cfg_bts_rtp_bind_ip_cmd); @@ -1096,7 +1095,6 @@ /* add and link to TRX config node */ install_element(BTS_NODE, &cfg_bts_trx_cmd); install_node(&trx_node, config_write_dummy); - install_default(TRX_NODE); install_element(TRX_NODE, &cfg_trx_user_gain_cmd); install_element(TRX_NODE, &cfg_trx_pr_max_initial_cmd); @@ -1111,12 +1109,10 @@ install_element(CONFIG_NODE, &cfg_phy_cmd); install_node(&phy_node, config_write_phy); - install_default(PHY_NODE); install_element(PHY_NODE, &cfg_phy_inst_cmd); install_element(PHY_NODE, &cfg_phy_no_inst_cmd); install_node(&phy_inst_node, config_write_dummy); - install_default(PHY_INST_NODE); return 0; } diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c index 189a7e2..e1ddfc7 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c @@ -979,95 +979,75 @@ install_node(&mgr_node, config_write_mgr); install_element(CONFIG_NODE, &cfg_mgr_cmd); - vty_install_default(MGR_NODE); /* install the limit nodes */ install_node(&limit_supply_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_temp_cmd); - vty_install_default(LIMIT_SUPPLY_TEMP_NODE); install_node(&limit_soc_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_soc_temp_cmd); - vty_install_default(LIMIT_SOC_NODE); install_node(&limit_fpga_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_fpga_temp_cmd); - vty_install_default(LIMIT_FPGA_NODE); install_node(&limit_rmsdet_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_rmsdet_temp_cmd); - vty_install_default(LIMIT_RMSDET_NODE); install_node(&limit_ocxo_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_ocxo_temp_cmd); - vty_install_default(LIMIT_OCXO_NODE); install_node(&limit_tx0_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx0_temp_cmd); - vty_install_default(LIMIT_TX0_TEMP_NODE); install_node(&limit_tx1_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx1_temp_cmd); - vty_install_default(LIMIT_TX1_TEMP_NODE); install_node(&limit_pa0_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa0_temp_cmd); - vty_install_default(LIMIT_PA0_TEMP_NODE); install_node(&limit_pa1_temp_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa1_temp_cmd); - vty_install_default(LIMIT_PA1_TEMP_NODE); install_node(&limit_supply_volt_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_volt_cmd); register_limit(LIMIT_SUPPLY_VOLT_NODE, MGR_LIMIT_TYPE_VOLT); - vty_install_default(LIMIT_SUPPLY_VOLT_NODE); install_node(&limit_tx0_vswr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx0_vswr_cmd); register_limit(LIMIT_TX0_VSWR_NODE, MGR_LIMIT_TYPE_VSWR); - vty_install_default(LIMIT_TX0_VSWR_NODE); install_node(&limit_tx1_vswr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_tx1_vswr_cmd); register_limit(LIMIT_TX1_VSWR_NODE, MGR_LIMIT_TYPE_VSWR); - vty_install_default(LIMIT_TX1_VSWR_NODE); install_node(&limit_supply_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_supply_pwr_cmd); register_limit(LIMIT_SUPPLY_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_SUPPLY_PWR_NODE); install_node(&limit_pa0_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa0_pwr_cmd); register_limit(LIMIT_PA0_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_PA0_PWR_NODE); install_node(&limit_pa1_pwr_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa1_pwr_cmd); register_limit(LIMIT_PA1_PWR_NODE, MGR_LIMIT_TYPE_PWR); - vty_install_default(LIMIT_PA1_PWR_NODE); install_node(&limit_gps_fix_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_gps_fix_cmd); - vty_install_default(LIMIT_GPS_FIX_NODE); /* install the normal node */ install_node(&act_norm_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_normal_cmd); register_normal_action(ACT_NORM_NODE); - vty_install_default(ACT_NORM_NODE); /* install the warning and critical node */ install_node(&act_warn_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_warn_cmd); register_action(ACT_WARN_NODE); - vty_install_default(ACT_WARN_NODE); install_node(&act_crit_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_critical_cmd); register_action(ACT_CRIT_NODE); - vty_install_default(ACT_CRIT_NODE); /* install LED pattern command for debugging purpose */ install_element_ve(&set_led_pattern_cmd); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c index cba4fbb..444ee7c 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c @@ -480,45 +480,37 @@ install_node(&mgr_node, config_write_mgr); install_element(CONFIG_NODE, &cfg_mgr_cmd); - vty_install_default(MGR_NODE); /* install the limit nodes */ install_node(&limit_rf_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_rf_cmd); register_limit(LIMIT_RF_NODE); - vty_install_default(LIMIT_RF_NODE); install_node(&limit_digital_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_digital_cmd); register_limit(LIMIT_DIGITAL_NODE); - vty_install_default(LIMIT_DIGITAL_NODE); install_node(&limit_board_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_board_cmd); register_limit(LIMIT_BOARD_NODE); - vty_install_default(LIMIT_BOARD_NODE); install_node(&limit_pa_node, config_write_dummy); install_element(MGR_NODE, &cfg_limit_pa_cmd); register_limit(LIMIT_PA_NODE); - vty_install_default(LIMIT_PA_NODE); /* install the normal node */ install_node(&act_norm_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_normal_cmd); register_normal_action(ACT_NORM_NODE); - vty_install_default(ACT_NORM_NODE); /* install the warning and critical node */ install_node(&act_warn_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_warn_cmd); register_action(ACT_WARN_NODE); - vty_install_default(ACT_WARN_NODE); install_node(&act_crit_node, config_write_dummy); install_element(MGR_NODE, &cfg_action_critical_cmd); register_action(ACT_CRIT_NODE); - vty_install_default(ACT_CRIT_NODE); return 0; } -- To view, visit https://gerrit.osmocom.org/4610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e8e9d7989ee20fe722bdd3109965d5bce9519fb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:25 +0000 Subject: [MERGED] osmo-msc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I34708c73d8084db4e6c83a39be8fdaeaa492d743 --- M src/libcommon-cs/common_cs_vty.c M src/libmsc/msc_vty.c M src/libmsc/smpp_vty.c M src/libmsc/vty_interface_layer3.c 4 files changed, 0 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index cdefa09..4754531 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -325,7 +325,6 @@ install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index c19666f..d070b4d 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -178,7 +178,6 @@ install_element(CONFIG_NODE, &cfg_msc_cmd); install_node(&msc_node, config_write_msc); - vty_install_default(MSC_NODE); install_element(MSC_NODE, &cfg_msc_assign_tmsi_cmd); install_element(MSC_NODE, &cfg_msc_no_assign_tmsi_cmd); install_element(MSC_NODE, &cfg_msc_auth_tuple_max_reuse_count_cmd); diff --git a/src/libmsc/smpp_vty.c b/src/libmsc/smpp_vty.c index c0309d6..be55c4d 100644 --- a/src/libmsc/smpp_vty.c +++ b/src/libmsc/smpp_vty.c @@ -579,7 +579,6 @@ int smpp_vty_init(void) { install_node(&smpp_node, config_write_smpp); - vty_install_default(SMPP_NODE); install_element(CONFIG_NODE, &cfg_smpp_cmd); install_element(SMPP_NODE, &cfg_smpp_first_cmd); @@ -592,7 +591,6 @@ install_element(SMPP_NODE, &cfg_no_esme_cmd); install_node(&esme_node, config_write_esme); - vty_install_default(SMPP_ESME_NODE); install_element(SMPP_ESME_NODE, &cfg_esme_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_no_passwd_cmd); install_element(SMPP_ESME_NODE, &cfg_esme_route_pfx_cmd); diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index edc698d..6211d48 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -946,7 +946,6 @@ install_element(CONFIG_NODE, &cfg_mncc_int_cmd); install_node(&mncc_int_node, config_write_mncc_int); - vty_install_default(MNCC_INT_NODE); install_element(MNCC_INT_NODE, &mnccint_def_codec_f_cmd); install_element(MNCC_INT_NODE, &mnccint_def_codec_h_cmd); install_element(MNCC_INT_NODE, &mnccint_meas_feed_cmd); @@ -956,7 +955,6 @@ install_element(CONFIG_NODE, &cfg_hlr_cmd); install_node(&hlr_node, config_write_hlr); - vty_install_default(HLR_NODE); install_element(HLR_NODE, &cfg_hlr_remote_ip_cmd); install_element(HLR_NODE, &cfg_hlr_remote_port_cmd); -- To view, visit https://gerrit.osmocom.org/4614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34708c73d8084db4e6c83a39be8fdaeaa492d743 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 11:53:30 +0000 Subject: [MERGED] osmo-bsc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6 --- M src/libbsc/abis_nm_vty.c M src/libbsc/abis_om2000_vty.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/osmo-bsc/osmo_bsc_vty.c M src/osmo-bsc_nat/bsc_nat_vty.c 6 files changed, 0 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/abis_nm_vty.c b/src/libbsc/abis_nm_vty.c index a0d72c2..956d28b 100644 --- a/src/libbsc/abis_nm_vty.c +++ b/src/libbsc/abis_nm_vty.c @@ -183,7 +183,6 @@ install_element(ENABLE_NODE, &oml_classnum_inst_cmd); install_node(&oml_node, dummy_config_write); - vty_install_default(OML_NODE); install_element(OML_NODE, &oml_chg_adm_state_cmd); install_element(OML_NODE, &oml_opstart_cmd); diff --git a/src/libbsc/abis_om2000_vty.c b/src/libbsc/abis_om2000_vty.c index b75d420..e1dd914 100644 --- a/src/libbsc/abis_om2000_vty.c +++ b/src/libbsc/abis_om2000_vty.c @@ -582,7 +582,6 @@ install_element(ENABLE_NODE, &om2k_classnum_inst_cmd); install_node(&om2k_node, dummy_config_write); - vty_install_default(OM2K_NODE); install_element(OM2K_NODE, &om2k_reset_cmd); install_element(OM2K_NODE, &om2k_start_cmd); install_element(OM2K_NODE, &om2k_status_cmd); @@ -596,7 +595,6 @@ install_element(OM2K_NODE, &om2k_conf_req_cmd); install_node(&om2k_con_group_node, dummy_config_write); - vty_install_default(OM2K_CON_GROUP_NODE); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_dec_cmd); install_element(OM2K_CON_GROUP_NODE, &cfg_om2k_con_path_conc_cmd); diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 461e3d3..3ddd5de 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -4250,7 +4250,6 @@ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); - vty_install_default(BTS_NODE); install_element(BTS_NODE, &cfg_bts_type_cmd); install_element(BTS_NODE, &cfg_description_cmd); install_element(BTS_NODE, &cfg_no_description_cmd); @@ -4355,7 +4354,6 @@ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); - vty_install_default(TRX_NODE); install_element(TRX_NODE, &cfg_trx_arfcn_cmd); install_element(TRX_NODE, &cfg_description_cmd); install_element(TRX_NODE, &cfg_no_description_cmd); @@ -4367,7 +4365,6 @@ install_element(TRX_NODE, &cfg_ts_cmd); install_node(&ts_node, dummy_config_write); - vty_install_default(TS_NODE); install_element(TS_NODE, &cfg_ts_pchan_cmd); install_element(TS_NODE, &cfg_ts_pchan_compat_cmd); install_element(TS_NODE, &cfg_ts_tsc_cmd); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index fd10836..040aa15 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -325,7 +325,6 @@ install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index b5232c4..f816ae4 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -976,7 +976,6 @@ install_element(CONFIG_NODE, &cfg_net_bsc_cmd); install_node(&bsc_node, config_write_bsc); - vty_install_default(BSC_NODE); install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd); install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd); install_element(BSC_NODE, &cfg_net_rf_socket_cmd); @@ -988,7 +987,6 @@ install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd); install_node(&msc_node, config_write_msc); - vty_install_default(MSC_NODE); install_element(MSC_NODE, &cfg_net_bsc_token_cmd); install_element(MSC_NODE, &cfg_net_bsc_key_cmd); install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd); diff --git a/src/osmo-bsc_nat/bsc_nat_vty.c b/src/osmo-bsc_nat/bsc_nat_vty.c index 5f7cbc8..64608bd 100644 --- a/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/src/osmo-bsc_nat/bsc_nat_vty.c @@ -1257,7 +1257,6 @@ /* nat group */ install_element(CONFIG_NODE, &cfg_nat_cmd); install_node(&nat_node, config_write_nat); - vty_install_default(NAT_NODE); install_element(NAT_NODE, &cfg_nat_msc_ip_cmd); install_element(NAT_NODE, &cfg_nat_msc_port_cmd); install_element(NAT_NODE, &cfg_nat_auth_time_cmd); @@ -1299,14 +1298,12 @@ install_element(NAT_NODE, &cfg_nat_pgroup_cmd); install_element(NAT_NODE, &cfg_nat_no_pgroup_cmd); install_node(&pgroup_node, config_write_pgroup); - vty_install_default(PGROUP_NODE); install_element(PGROUP_NODE, &cfg_pgroup_lac_cmd); install_element(PGROUP_NODE, &cfg_pgroup_no_lac_cmd); /* BSC subgroups */ install_element(NAT_NODE, &cfg_bsc_cmd); install_node(&bsc_node, NULL); - vty_install_default(NAT_BSC_NODE); install_element(NAT_BSC_NODE, &cfg_bsc_token_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_auth_key_cmd); install_element(NAT_BSC_NODE, &cfg_bsc_no_auth_key_cmd); -- To view, visit https://gerrit.osmocom.org/4609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2edf59a687a78d6db6bc73117a27509374b0fc6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 11:53:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 11:53:55 +0000 Subject: [PATCH] osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3820 to look at the new patch set (#4). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 --- M configure.ac M debian/control M src/libmsc/Makefile.am M src/libmsc/auth.c M src/libmsc/db.c M src/libmsc/gsm_04_08.c M src/libvlr/Makefile.am M src/libvlr/vlr.c M src/osmo-msc/Makefile.am M tests/db/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/Makefile.am 13 files changed, 11 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/3820/4 diff --git a/configure.ac b/configure.ac index 601b438..7fd4844 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) # Enable/disable smpp support in the msc? diff --git a/debian/control b/debian/control index 60d468e..6219ea4 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,6 @@ pkg-config, libdbi-dev, libtalloc-dev, - libssl-dev (>= 0.9.5), libsmpp34-dev (>= 1.12), libasn1c-dev (>= 0.9.28), libosmocore-dev (>= 0.10.0), diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..59c2732 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c index 7b5367b..7c78c6e 100644 --- a/src/libmsc/auth.c +++ b/src/libmsc/auth.c @@ -28,8 +28,6 @@ #include #include -#include - #include const struct value_string auth_action_names[] = { diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4e4477b..36f7526 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -42,8 +42,6 @@ #include #include -#include - static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 8a5265b..fd2052a 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "bscconfig.h" diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 17ad411..c5ab4a6 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) + $(COVERAGE_CFLAGS) noinst_HEADERS = \ vlr_access_req_fsm.h \ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 07c31ee..4279640 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -31,8 +31,6 @@ #include #include -#include - #include #include #include @@ -275,12 +273,13 @@ { struct vlr_instance *vlr = vsub->vlr; uint32_t tmsi; - int tried; + int tried, rc; for (tried = 0; tried < 100; tried++) { - if (RAND_bytes((uint8_t *) &tmsi, sizeof(tmsi)) != 1) { - LOGP(DVLR, LOGL_ERROR, "RAND_bytes failed\n"); - return -1; + rc = osmo_get_rand_id((uint8_t *) &tmsi, sizeof(tmsi)); + if (rc < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return rc; } /* throw the dice again, if the TSMI doesn't fit */ if (tmsi == GSM_RESERVED_TMSI) diff --git a/src/osmo-msc/Makefile.am b/src/osmo-msc/Makefile.am index e296f97..1d8bfbd 100644 --- a/src/osmo-msc/Makefile.am +++ b/src/osmo-msc/Makefile.am @@ -13,7 +13,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -43,7 +42,6 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBSMPP34_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ -ldbi \ diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index bcb66ec..720e005 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -42,6 +42,5 @@ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ $(LIBOSMOVTY_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 7fc9212..a6f7cfb 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -9,7 +9,6 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -30,7 +29,7 @@ -Wl,--wrap=ranap_iu_page_cs \ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ $(NULL) LDADD = \ @@ -41,7 +40,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7b1db1b..4b4802b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -250,11 +250,11 @@ } unsigned char next_rand_byte = 0; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int __wrap_RAND_bytes(unsigned char *buf, int num) +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *buf, size_t num); +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - int i; + size_t i; for (i = 0; i < num; i++) buf[i] = next_rand_byte++; return 1; diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index a912be1..8c538b0 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -38,7 +37,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:02:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:02:11 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#6). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. N. B: the fallback is purely compile-time - the syscall and GnuTLS availability is checked at compile-time and appropriate code is compiled in. There's no runtime check. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/6 diff --git a/configure.ac b/configure.ac index d9390cf..a8c1d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,12 +242,15 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..627c79a 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -104,6 +104,10 @@ #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif +#elif (USE_GNUTLS) +#pragma message ("Secure random unavailable: including GnuTLS.") +#include +#include #endif /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -415,14 +419,33 @@ if (len > OSMO_MAX_RAND_ID_LEN) return -E2BIG; + /* The conditional compile below is necessary to support legacy systems: + 1) On systems with recent enough glibc (>= 2.25) we use it and the rest is not compiled in + 2) On systems with old glibc but with recent enough kernel (>=3.17) we use syscall directly + 3) On systems with older kernel we check for GnuTLS fallback availability + 3a) If it's available at compile time - use it + 3b) Otherwise just return failure + FIXME: + * Once we do not have to support old kernels, 3a can be removed + * Once we do not have to support old glibc, 2 and 3 can be removed */ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25) + /* 1) "main" branch (i. e. ) of conditional compile ifdef: use glibc */ rc = getrandom(out, len, GRND_NONBLOCK); #elif HAVE_DECL_SYS_GETRANDOM + /* 2) "alternative" branch (i. e. ) of conditional compile ifdef: use syscall */ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); #else + /* 3) "final" branch (i. e. ) of conditional compile ifdef: use fallback (if available) */ +#if (USE_GNUTLS) +#pragma message ("Secure random unavailable: using GnuTLS fallback.") + /* 3a) GnuTLS is available - use it as fallback */ + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#else #pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") +#endif + /* 3b) All other options exhausted - fail. */ return -ENOTSUP; #endif /* getrandom() failed entirely: */ -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:04:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 12:04:14 +0000 Subject: osmo-mgw[master]: cosmetic: make dummy packet handling more explicit In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (5 comments) https://gerrit.osmocom.org/#/c/4617/2/include/osmocom/mgcp/mgcp.h File include/osmocom/mgcp/mgcp.h: Line 102: * sent. The beviour is controlled viw the keepalive_interval member of the ("via" or "by"?) Line 108: * value is used as interval. See also mgcp_keepalive_timer_cb(), (the a) https://gerrit.osmocom.org/#/c/4617/2/src/libosmo-mgcp/mgcp_protocol.c File src/libosmo-mgcp/mgcp_protocol.c: Line 669: /* Send dummy packet, see also commens in mgcp_keepalive_timer_cb() */ (comments) Line 670: OSMO_ASSERT(tcfg->keepalive_interval >= -1); (rather use the defined constant?) (I guess Holger would say: do we really need to crash the program with the assertion, can't we just do 'if (interval <= MGCP_KEEPALIVE_NEVER)' below?) Line 824: send_dummy(endp, conn); (our usual coding style would have avoided the nested if) -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:06:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 12:06:06 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 6: Code-Review-1 * getrandom() and SYS_getrandom only used if detected at compile time * if either of those returns an error at runtime, fall back to gnutls (if present/selected at compile time) -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:06:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 12:06:32 +0000 Subject: osmo-bts[master]: lc15: Fix cfg indentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae80e2ed504b5e26d748d57be7558ce470555f97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:06:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 Nov 2017 12:06:35 +0000 Subject: [MERGED] osmo-bts[master]: lc15: Fix cfg indentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: lc15: Fix cfg indentation ...................................................................... lc15: Fix cfg indentation I was unable to start osmo-bts-lc15 with this config file until this change was made, it said this command didn't exist. Change-Id: Iae80e2ed504b5e26d748d57be7558ce470555f97 --- M doc/examples/litecell15/osmo-bts.cfg 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/litecell15/osmo-bts.cfg b/doc/examples/litecell15/osmo-bts.cfg index 3036283..f0bafe8 100644 --- a/doc/examples/litecell15/osmo-bts.cfg +++ b/doc/examples/litecell15/osmo-bts.cfg @@ -29,10 +29,10 @@ ! phy 0 instance 0 - trx-calibration-path /mnt/rom/factory/calib + trx-calibration-path /mnt/rom/factory/calib phy 1 instance 0 - trx-calibration-path /mnt/rom/factory/calib + trx-calibration-path /mnt/rom/factory/calib bts 0 band 900 ipa unit-id 1500 0 -- To view, visit https://gerrit.osmocom.org/4620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae80e2ed504b5e26d748d57be7558ce470555f97 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:20:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:20:52 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#7). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 35 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/7 diff --git a/configure.ac b/configure.ac index d9390cf..a8c1d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,12 +242,15 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..a7fe49e 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -104,6 +104,11 @@ #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif + +#if (USE_GNUTLS) +#pragma message ("including GnuTLS for getrandom fallback.") +#include +#include #endif /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -409,7 +414,7 @@ */ int osmo_get_rand_id(uint8_t *out, size_t len) { - int rc; + int rc = -ENOTSUP; /* this function is intended for generating short identifiers only, not arbitrary-length random data */ if (len > OSMO_MAX_RAND_ID_LEN) @@ -421,13 +426,16 @@ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); -#else -#pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") - return -ENOTSUP; #endif + /* getrandom() failed entirely: */ - if (rc < 0) + if (rc < 0) { +#if (USE_GNUTLS) +#pragma message ("Secure random failed: using GnuTLS fallback.") + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#endif return -errno; + } /* getrandom() failed partially due to signal interruption: this should never happen (according to getrandom(2)) as long as OSMO_MAX_RAND_ID_LEN < 256 -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:23:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:23:45 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#8). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 36 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/8 diff --git a/configure.ac b/configure.ac index d9390cf..a8c1d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,12 +242,15 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..ea72cc8 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -106,6 +106,12 @@ #endif #endif +#if (USE_GNUTLS) +#pragma message ("including GnuTLS for getrandom fallback.") +#include +#include +#endif + /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet * Greek symbols at hex positions 0x10 and 0x12-0x1a * left out as they can't be handled with a char and @@ -409,7 +415,7 @@ */ int osmo_get_rand_id(uint8_t *out, size_t len) { - int rc; + int rc = -ENOTSUP; /* this function is intended for generating short identifiers only, not arbitrary-length random data */ if (len > OSMO_MAX_RAND_ID_LEN) @@ -421,13 +427,16 @@ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); -#else -#pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") - return -ENOTSUP; #endif + /* getrandom() failed entirely: */ - if (rc < 0) + if (rc < 0) { +#if (USE_GNUTLS) +#pragma message ("Secure random failed: using GnuTLS fallback.") + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#endif return -errno; + } /* getrandom() failed partially due to signal interruption: this should never happen (according to getrandom(2)) as long as OSMO_MAX_RAND_ID_LEN < 256 -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:29:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:29:01 +0000 Subject: [PATCH] osmo-sgsn[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3821 to look at the new patch set (#7). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 --- M configure.ac M debian/control M src/gprs/Makefile.am M src/gprs/gb_proxy.c M src/gprs/gprs_gmm.c M src/gprs/gprs_llc.c M src/gprs/gprs_sgsn.c M tests/gbproxy/Makefile.am M tests/gbproxy/gbproxy_test.c M tests/sgsn/Makefile.am M tests/sgsn/sgsn_test.c M tests/sndcp_xid/Makefile.am M tests/xid/Makefile.am 13 files changed, 57 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/21/3821/7 diff --git a/configure.ac b/configure.ac index 0daa5e2..7919d99 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) # Enable/disable 3G aka IuPS + IuCS support? AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])], diff --git a/debian/control b/debian/control index ce2167a..330945f 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,6 @@ automake, libtool, pkg-config, - libssl-dev, libtalloc-dev, libc-ares-dev, libgtp-dev, diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am index 764acba..b0fca6f 100644 --- a/src/gprs/Makefile.am +++ b/src/gprs/Makefile.am @@ -15,7 +15,6 @@ $(LIBOSMOGB_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBCARES_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBGTP_CFLAGS) \ $(NULL) if BUILD_IU @@ -61,7 +60,6 @@ $(NULL) osmo_gbproxy_LDADD = \ $(OSMO_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) @@ -97,7 +95,6 @@ $(OSMO_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 17a0109..09e291b 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -50,8 +50,6 @@ #include #include -#include - extern void *tall_bsc_ctx; static const struct rate_ctr_desc global_ctr_description[] = { @@ -232,12 +230,13 @@ uint32_t sgsn_ptmsi) { uint32_t bss_ptmsi; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { bss_ptmsi = sgsn_ptmsi; } else { do { - if (RAND_bytes((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)); + if (rc < 0) { bss_ptmsi = GSM_RESERVED_TMSI; break; } @@ -250,7 +249,7 @@ } if (bss_ptmsi == GSM_RESERVED_TMSI) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI: %d (%s)\n", rc, strerror(-rc)); return bss_ptmsi; } @@ -260,7 +259,7 @@ uint32_t bss_tlli) { uint32_t sgsn_tlli; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { sgsn_tlli = bss_tlli; } else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI && @@ -274,7 +273,8 @@ } else { do { /* create random TLLI, 0b01111xxx... */ - if (RAND_bytes((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)); + if (rc < 0) { sgsn_tlli = 0; break; } @@ -287,7 +287,7 @@ } if (!sgsn_tlli) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI: %d (%s)\n", rc, strerror(-rc)); return sgsn_tlli; } diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 147e001..ee0a575 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -31,8 +31,6 @@ #include #include -#include - #include "bscconfig.h" #include @@ -587,6 +585,7 @@ struct gsm48_hdr *gh; struct gsm48_auth_ciph_req *acreq; uint8_t *m_rand, *m_cksn, rbyte; + int rc; LOGMMCTXP(LOGL_INFO, mm, "<- GPRS AUTH AND CIPHERING REQ (rand = %s", osmo_hexdump(vec->rand, sizeof(vec->rand))); @@ -610,12 +609,13 @@ /* ? 10.5.5.7: */ acreq->force_stby = force_standby; /* 3GPP TS 24.008 ? 10.5.5.19: */ - if (RAND_bytes(&rbyte, 1) != 1) { - LOGP(DMM, LOGL_NOTICE, "RAND_bytes failed for A&C ref, falling " - "back to rand()\n"); - acreq->ac_ref_nr = rand(); - } else - acreq->ac_ref_nr = rbyte; + rc = osmo_get_rand_id(&rbyte, 1); + if (rc < 0) { + LOGP(DMM, LOGL_ERROR, "osmo_get_rand_id() failed for A&C ref: %s\n", strerror(-rc)); + return rc; + } + + acreq->ac_ref_nr = rbyte; mm->ac_ref_nr_used = acreq->ac_ref_nr; /* Only if authentication is requested we need to set RAND + CKSN */ @@ -2086,6 +2086,7 @@ { struct sgsn_mm_ctx *mm = _mm; struct gsm_auth_tuple *at; + int rc; mm->num_T_exp++; @@ -2130,8 +2131,11 @@ } at = &mm->auth_triplet; - gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); - osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); + rc = gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); + if (rc < 0) + LOGMMCTXP(LOGL_ERROR, mm, "failed sending Auth. & Ciph. Reuqest: %s \n", strerror(-rc)); + else + osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); break; case 3370: /* waiting for IDENTITY RESPONSE */ if (mm->num_T_exp >= 5) { diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index 22743fe..1a7cf3d 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include @@ -1065,14 +1063,15 @@ struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); struct gprs_llc_lle *lle = &llme->lle[1]; uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ @@ -1098,14 +1097,15 @@ { struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 4cd3df1..abe4fab 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -46,8 +46,6 @@ #include -#include - #include "../../bscconfig.h" #if BUILD_IU @@ -641,10 +639,11 @@ { struct sgsn_mm_ctx *mm; uint32_t ptmsi = 0xdeadbeef; - int max_retries = 100; + int max_retries = 100, rc = 0; restart: - if (RAND_bytes((uint8_t *) &ptmsi, sizeof(ptmsi)) != 1) + rc = osmo_get_rand_id((uint8_t *) &ptmsi, sizeof(ptmsi)); + if (rc < 0) goto failed; /* Enforce that the 2 MSB are set without loosing the distance between @@ -682,7 +681,7 @@ return ptmsi; failed: - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI: %d (%s)\n", rc, strerror(-rc)); return GSM_RESERVED_TMSI; } diff --git a/tests/gbproxy/Makefile.am b/tests/gbproxy/Makefile.am index 3291839..ef38fb6 100644 --- a/tests/gbproxy/Makefile.am +++ b/tests/gbproxy/Makefile.am @@ -28,7 +28,7 @@ $(NULL) gbproxy_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ $(NULL) gbproxy_test_LDADD = \ @@ -46,6 +46,5 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBRARY_DL) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c index e8a4ef9..3ebdccb 100644 --- a/tests/gbproxy/gbproxy_test.c +++ b/tests/gbproxy/gbproxy_test.c @@ -37,8 +37,6 @@ #include #include -#include - #define REMOTE_BSS_ADDR 0x01020304 #define REMOTE_SGSN_ADDR 0x05060708 @@ -55,24 +53,23 @@ struct llist_head *received_messages = NULL; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } static int rand_seq_num = 0; -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { uint32_t val; OSMO_ASSERT(num == sizeof(val)); - OSMO_ASSERT(__real_RAND_bytes(buf, num) == 1); val = 0x00dead00 + rand_seq_num; diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am index 36026dd..802811d 100644 --- a/tests/sgsn/Makefile.am +++ b/tests/sgsn/Makefile.am @@ -32,7 +32,7 @@ $(NULL) sgsn_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ -Wl,--wrap=sgsn_update_subscriber_data \ -Wl,--wrap=gprs_subscr_request_update_location \ -Wl,--wrap=gprs_subscr_request_auth_info \ @@ -67,7 +67,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index a486794..219587a 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -100,21 +100,21 @@ return 0; } -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } /* make results of A&C ref predictable */ -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { if (num > 1) - return __real_RAND_bytes(buf, num); + return __real_osmo_get_rand_id(buf, num); buf[0] = 0; return 1; } diff --git a/tests/sndcp_xid/Makefile.am b/tests/sndcp_xid/Makefile.am index d09c41b..fbcb36c 100644 --- a/tests/sndcp_xid/Makefile.am +++ b/tests/sndcp_xid/Makefile.am @@ -14,7 +14,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt -lm diff --git a/tests/xid/Makefile.am b/tests/xid/Makefile.am index 6c3689f..92876ec 100644 --- a/tests/xid/Makefile.am +++ b/tests/xid/Makefile.am @@ -30,7 +30,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ -- To view, visit https://gerrit.osmocom.org/3821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 Gerrit-PatchSet: 7 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:30:43 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:30:43 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 8: That's odd - why there're 2 rebuilds triggered by single gerrit push? -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 Nov 2017 12:35:55 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 2: > IUUC it doesn't only fix the warning, but was also an actual error. > vector_slot(V,I) should amount to a void*, right? In the > surrounding code, it is used as char*, and the vline vector, IIUC, > is a list of string tokens, each terminated by '\0'. So this should > actually be a functional change, checking whether the current token > is just "\0", in contrast to before, where it checked, in effect, > whether the token is NULL. Can we pinpoint a functional change from > this patch / could there be fallout? To be honest I don't know all this VTY code that well, but looking at the code around indeed it seems it handles an array of null terminated string pointers, and the fact that the comparison was made against '\0' and not NULL was giving the hint that the intention here was to check for the string being empty and not for it being NULL (which if I understand should not happen). I submitted the patch hoping people who know better this part of the code could give better verdict. -- To view, visit https://gerrit.osmocom.org/4389 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaba9e3450d68c51e16a7bda2fc0fc370992ca866 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:39:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:39:44 +0000 Subject: [PATCH] osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3820 to look at the new patch set (#5). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 --- M configure.ac M debian/control M src/libmsc/Makefile.am M src/libmsc/auth.c M src/libmsc/db.c M src/libmsc/gsm_04_08.c M src/libvlr/Makefile.am M src/libvlr/vlr.c M src/osmo-msc/Makefile.am M tests/db/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/Makefile.am 13 files changed, 11 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/3820/5 diff --git a/configure.ac b/configure.ac index 601b438..7fd4844 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) # Enable/disable smpp support in the msc? diff --git a/debian/control b/debian/control index 60d468e..6219ea4 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,6 @@ pkg-config, libdbi-dev, libtalloc-dev, - libssl-dev (>= 0.9.5), libsmpp34-dev (>= 1.12), libasn1c-dev (>= 0.9.28), libosmocore-dev (>= 0.10.0), diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..59c2732 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c index 7b5367b..7c78c6e 100644 --- a/src/libmsc/auth.c +++ b/src/libmsc/auth.c @@ -28,8 +28,6 @@ #include #include -#include - #include const struct value_string auth_action_names[] = { diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4e4477b..36f7526 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -42,8 +42,6 @@ #include #include -#include - static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 8a5265b..fd2052a 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "bscconfig.h" diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 17ad411..c5ab4a6 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) + $(COVERAGE_CFLAGS) noinst_HEADERS = \ vlr_access_req_fsm.h \ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 07c31ee..4279640 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -31,8 +31,6 @@ #include #include -#include - #include #include #include @@ -275,12 +273,13 @@ { struct vlr_instance *vlr = vsub->vlr; uint32_t tmsi; - int tried; + int tried, rc; for (tried = 0; tried < 100; tried++) { - if (RAND_bytes((uint8_t *) &tmsi, sizeof(tmsi)) != 1) { - LOGP(DVLR, LOGL_ERROR, "RAND_bytes failed\n"); - return -1; + rc = osmo_get_rand_id((uint8_t *) &tmsi, sizeof(tmsi)); + if (rc < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return rc; } /* throw the dice again, if the TSMI doesn't fit */ if (tmsi == GSM_RESERVED_TMSI) diff --git a/src/osmo-msc/Makefile.am b/src/osmo-msc/Makefile.am index e296f97..1d8bfbd 100644 --- a/src/osmo-msc/Makefile.am +++ b/src/osmo-msc/Makefile.am @@ -13,7 +13,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -43,7 +42,6 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBSMPP34_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ -ldbi \ diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index bcb66ec..720e005 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -42,6 +42,5 @@ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ $(LIBOSMOVTY_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 7fc9212..a6f7cfb 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -9,7 +9,6 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -30,7 +29,7 @@ -Wl,--wrap=ranap_iu_page_cs \ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ $(NULL) LDADD = \ @@ -41,7 +40,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7b1db1b..4b4802b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -250,11 +250,11 @@ } unsigned char next_rand_byte = 0; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int __wrap_RAND_bytes(unsigned char *buf, int num) +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *buf, size_t num); +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - int i; + size_t i; for (i = 0; i < num; i++) buf[i] = next_rand_byte++; return 1; diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index a912be1..8c538b0 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -38,7 +37,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:45:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 12:45:37 +0000 Subject: [PATCH] osmo-sgsn[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3821 to look at the new patch set (#8). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Related: OS#1694 Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 --- M configure.ac M debian/control M src/gprs/Makefile.am M src/gprs/gb_proxy.c M src/gprs/gprs_gmm.c M src/gprs/gprs_llc.c M src/gprs/gprs_sgsn.c M tests/gbproxy/Makefile.am M tests/gbproxy/gbproxy_test.c M tests/sgsn/Makefile.am M tests/sgsn/sgsn_test.c M tests/sndcp_xid/Makefile.am M tests/xid/Makefile.am 13 files changed, 57 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/21/3821/8 diff --git a/configure.ac b/configure.ac index 0daa5e2..7919d99 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) # Enable/disable 3G aka IuPS + IuCS support? AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])], diff --git a/debian/control b/debian/control index ce2167a..330945f 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,6 @@ automake, libtool, pkg-config, - libssl-dev, libtalloc-dev, libc-ares-dev, libgtp-dev, diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am index 764acba..b0fca6f 100644 --- a/src/gprs/Makefile.am +++ b/src/gprs/Makefile.am @@ -15,7 +15,6 @@ $(LIBOSMOGB_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBCARES_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBGTP_CFLAGS) \ $(NULL) if BUILD_IU @@ -61,7 +60,6 @@ $(NULL) osmo_gbproxy_LDADD = \ $(OSMO_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) @@ -97,7 +95,6 @@ $(OSMO_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 17a0109..09e291b 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -50,8 +50,6 @@ #include #include -#include - extern void *tall_bsc_ctx; static const struct rate_ctr_desc global_ctr_description[] = { @@ -232,12 +230,13 @@ uint32_t sgsn_ptmsi) { uint32_t bss_ptmsi; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { bss_ptmsi = sgsn_ptmsi; } else { do { - if (RAND_bytes((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)); + if (rc < 0) { bss_ptmsi = GSM_RESERVED_TMSI; break; } @@ -250,7 +249,7 @@ } if (bss_ptmsi == GSM_RESERVED_TMSI) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI: %d (%s)\n", rc, strerror(-rc)); return bss_ptmsi; } @@ -260,7 +259,7 @@ uint32_t bss_tlli) { uint32_t sgsn_tlli; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { sgsn_tlli = bss_tlli; } else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI && @@ -274,7 +273,8 @@ } else { do { /* create random TLLI, 0b01111xxx... */ - if (RAND_bytes((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)); + if (rc < 0) { sgsn_tlli = 0; break; } @@ -287,7 +287,7 @@ } if (!sgsn_tlli) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI: %d (%s)\n", rc, strerror(-rc)); return sgsn_tlli; } diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 147e001..ee0a575 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -31,8 +31,6 @@ #include #include -#include - #include "bscconfig.h" #include @@ -587,6 +585,7 @@ struct gsm48_hdr *gh; struct gsm48_auth_ciph_req *acreq; uint8_t *m_rand, *m_cksn, rbyte; + int rc; LOGMMCTXP(LOGL_INFO, mm, "<- GPRS AUTH AND CIPHERING REQ (rand = %s", osmo_hexdump(vec->rand, sizeof(vec->rand))); @@ -610,12 +609,13 @@ /* ? 10.5.5.7: */ acreq->force_stby = force_standby; /* 3GPP TS 24.008 ? 10.5.5.19: */ - if (RAND_bytes(&rbyte, 1) != 1) { - LOGP(DMM, LOGL_NOTICE, "RAND_bytes failed for A&C ref, falling " - "back to rand()\n"); - acreq->ac_ref_nr = rand(); - } else - acreq->ac_ref_nr = rbyte; + rc = osmo_get_rand_id(&rbyte, 1); + if (rc < 0) { + LOGP(DMM, LOGL_ERROR, "osmo_get_rand_id() failed for A&C ref: %s\n", strerror(-rc)); + return rc; + } + + acreq->ac_ref_nr = rbyte; mm->ac_ref_nr_used = acreq->ac_ref_nr; /* Only if authentication is requested we need to set RAND + CKSN */ @@ -2086,6 +2086,7 @@ { struct sgsn_mm_ctx *mm = _mm; struct gsm_auth_tuple *at; + int rc; mm->num_T_exp++; @@ -2130,8 +2131,11 @@ } at = &mm->auth_triplet; - gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); - osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); + rc = gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); + if (rc < 0) + LOGMMCTXP(LOGL_ERROR, mm, "failed sending Auth. & Ciph. Reuqest: %s \n", strerror(-rc)); + else + osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); break; case 3370: /* waiting for IDENTITY RESPONSE */ if (mm->num_T_exp >= 5) { diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index 22743fe..1a7cf3d 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include @@ -1065,14 +1063,15 @@ struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); struct gprs_llc_lle *lle = &llme->lle[1]; uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ @@ -1098,14 +1097,15 @@ { struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 4cd3df1..abe4fab 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -46,8 +46,6 @@ #include -#include - #include "../../bscconfig.h" #if BUILD_IU @@ -641,10 +639,11 @@ { struct sgsn_mm_ctx *mm; uint32_t ptmsi = 0xdeadbeef; - int max_retries = 100; + int max_retries = 100, rc = 0; restart: - if (RAND_bytes((uint8_t *) &ptmsi, sizeof(ptmsi)) != 1) + rc = osmo_get_rand_id((uint8_t *) &ptmsi, sizeof(ptmsi)); + if (rc < 0) goto failed; /* Enforce that the 2 MSB are set without loosing the distance between @@ -682,7 +681,7 @@ return ptmsi; failed: - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI: %d (%s)\n", rc, strerror(-rc)); return GSM_RESERVED_TMSI; } diff --git a/tests/gbproxy/Makefile.am b/tests/gbproxy/Makefile.am index 3291839..ef38fb6 100644 --- a/tests/gbproxy/Makefile.am +++ b/tests/gbproxy/Makefile.am @@ -28,7 +28,7 @@ $(NULL) gbproxy_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ $(NULL) gbproxy_test_LDADD = \ @@ -46,6 +46,5 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBRARY_DL) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c index e8a4ef9..3ebdccb 100644 --- a/tests/gbproxy/gbproxy_test.c +++ b/tests/gbproxy/gbproxy_test.c @@ -37,8 +37,6 @@ #include #include -#include - #define REMOTE_BSS_ADDR 0x01020304 #define REMOTE_SGSN_ADDR 0x05060708 @@ -55,24 +53,23 @@ struct llist_head *received_messages = NULL; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } static int rand_seq_num = 0; -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { uint32_t val; OSMO_ASSERT(num == sizeof(val)); - OSMO_ASSERT(__real_RAND_bytes(buf, num) == 1); val = 0x00dead00 + rand_seq_num; diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am index 36026dd..802811d 100644 --- a/tests/sgsn/Makefile.am +++ b/tests/sgsn/Makefile.am @@ -32,7 +32,7 @@ $(NULL) sgsn_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ -Wl,--wrap=sgsn_update_subscriber_data \ -Wl,--wrap=gprs_subscr_request_update_location \ -Wl,--wrap=gprs_subscr_request_auth_info \ @@ -67,7 +67,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index a486794..219587a 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -100,21 +100,21 @@ return 0; } -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } /* make results of A&C ref predictable */ -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { if (num > 1) - return __real_RAND_bytes(buf, num); + return __real_osmo_get_rand_id(buf, num); buf[0] = 0; return 1; } diff --git a/tests/sndcp_xid/Makefile.am b/tests/sndcp_xid/Makefile.am index d09c41b..fbcb36c 100644 --- a/tests/sndcp_xid/Makefile.am +++ b/tests/sndcp_xid/Makefile.am @@ -14,7 +14,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt -lm diff --git a/tests/xid/Makefile.am b/tests/xid/Makefile.am index 6c3689f..92876ec 100644 --- a/tests/xid/Makefile.am +++ b/tests/xid/Makefile.am @@ -30,7 +30,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ -- To view, visit https://gerrit.osmocom.org/3821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 Gerrit-PatchSet: 8 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:47:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 12:47:49 +0000 Subject: [PATCH] osmo-ci[master]: osmo-deps.sh: fix: add 'origin/' to branch, to properly update Message-ID: Review at https://gerrit.osmocom.org/4621 osmo-deps.sh: fix: add 'origin/' to branch, to properly update If I have a git clone that once did 'checkout [-f] branch', and if then origin/branch gets updates, doing another 'checkout -f branch' only goes back to the local tracking-branch of origin/branch. We never pull in changes from origin/branch anymore as soon as a local branch exists. Always prepend 'origin/', so that 'checkout -f' goes into detached-HEAD state onto the newest fetched revision. Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd --- M scripts/osmo-deps.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/21/4621/1 diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index 0610037..d5a724b 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -1,7 +1,7 @@ #!/bin/sh set -ex project="$1" -branch="${2:-origin/master}" +branch="origin/${2:-master}" if ! test -d "$project"; then -- To view, visit https://gerrit.osmocom.org/4621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:48:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 12:48:55 +0000 Subject: osmo-ci[master]: osmo-deps.sh: fix: add 'origin/' to branch, to properly update In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 I need this now to test / fix osmo-iuh -- To view, visit https://gerrit.osmocom.org/4621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 12:48:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 12:48:59 +0000 Subject: [MERGED] osmo-ci[master]: osmo-deps.sh: fix: add 'origin/' to branch, to properly update In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-deps.sh: fix: add 'origin/' to branch, to properly update ...................................................................... osmo-deps.sh: fix: add 'origin/' to branch, to properly update If I have a git clone that once did 'checkout [-f] branch', and if then origin/branch gets updates, doing another 'checkout -f branch' only goes back to the local tracking-branch of origin/branch. We never pull in changes from origin/branch anymore as soon as a local branch exists. Always prepend 'origin/', so that 'checkout -f' goes into detached-HEAD state onto the newest fetched revision. Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd --- M scripts/osmo-deps.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index 0610037..d5a724b 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -1,7 +1,7 @@ #!/bin/sh set -ex project="$1" -branch="${2:-origin/master}" +branch="origin/${2:-master}" if ! test -d "$project"; then -- To view, visit https://gerrit.osmocom.org/4621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 13:16:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 13:16:14 +0000 Subject: osmo-sgsn[master]: change default config filename to osmo-sgsn.cfg, not osmo_sg... In-Reply-To: References: Message-ID: Patch Set 2: > I think it's way too complex: the backward compatibility can be > achieved with '-c' option, and the absence of expected config file > is clearly reported. The point is to still support the default behavior of "osmo_sgsn.cfg" picked up without a '-c', to not break users' setups like that with a software update. -- To view, visit https://gerrit.osmocom.org/4603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 13:16:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 13:16:29 +0000 Subject: [MERGED] osmo-sgsn[master]: change default config filename to osmo-sgsn.cfg, not osmo_sg... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: change default config filename to osmo-sgsn.cfg, not osmo_sgsn.cfg ...................................................................... change default config filename to osmo-sgsn.cfg, not osmo_sgsn.cfg All other Osmocom programs I know of have a default config file using a dash. Comply. Be backwards compatible: when a legacy osmo_sgsn.cfg exists but no osmo-sgsn.cfg, use the old config file instead. (Verified to work by manual tests.) Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61 --- M src/gprs/sgsn_main.c 1 file changed, 26 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index e48d8d1..8cd68ff 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -85,8 +85,11 @@ "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n"; +#define CONFIG_FILE_DEFAULT "osmo-sgsn.cfg" +#define CONFIG_FILE_LEGACY "osmo_sgsn.cfg" + static struct sgsn_instance sgsn_inst = { - .config_file = "osmo_sgsn.cfg", + .config_file = NULL, .cfg = { .gtp_statedir = "./", .auth_policy = SGSN_AUTH_POLICY_CLOSED, @@ -216,7 +219,7 @@ printf(" -D --daemonize\tFork the process into a background daemon\n"); printf(" -d option --debug\tenable Debugging\n"); printf(" -s --disable-color\n"); - printf(" -c --config-file\tThe config file to use [%s]\n", sgsn->config_file); + printf(" -c --config-file\tThe config file to use [%s]\n", CONFIG_FILE_DEFAULT); printf(" -e --log-level number\tSet a global log level\n"); } @@ -356,6 +359,12 @@ int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); #endif +static bool file_exists(const char *path) +{ + struct stat sb; + return stat(path, &sb) ? false : true; +} + int main(int argc, char **argv) { struct ctrl_handle *ctrl; @@ -392,6 +401,21 @@ handle_options(argc, argv); + /* Backwards compatibility: for years, the default config file name was + * osmo_sgsn.cfg. All other Osmocom programs use osmo-*.cfg with a + * dash. To be able to use the new config file name without breaking + * previous setups that might rely on the legacy default config file + * name, we need to look for the old config file if no -c option was + * passed AND no file exists with the new default file name. */ + if (!sgsn_inst.config_file) { + /* No -c option was passed */ + if (file_exists(CONFIG_FILE_LEGACY) + && !file_exists(CONFIG_FILE_DEFAULT)) + sgsn_inst.config_file = CONFIG_FILE_LEGACY; + else + sgsn_inst.config_file = CONFIG_FILE_DEFAULT; + } + rate_ctr_init(tall_bsc_ctx); gprs_ns_set_log_ss(DNS); -- To view, visit https://gerrit.osmocom.org/4603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 13:54:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 13:54:00 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp client: vty: tweak doc strings In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4598 to look at the new patch set (#2). mgcp client: vty: tweak doc strings Fix errors like "remote bind address", mention 'MGW' instead of 'MGCP gateway', minor typos and wording tweaks. Change-Id: Ie1a408f9e651c5fb3424a84ceaaa603e20ad595c --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/98/4598/2 diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index 4ead0f7..68edfb9 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -29,14 +29,14 @@ #include -#define MGW_STR "MGCP gateway configuration for RTP streams\n" +#define MGW_STR "Configure MGCP connection to Media Gateway\n" void *global_mgcp_client_ctx = NULL; struct mgcp_client_conf *global_mgcp_client_conf = NULL; DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd, "mgw local-ip A.B.C.D", - MGW_STR "local bind to connect to MGCP gateway with\n" + MGW_STR "local bind to connect to MGW from\n" "local bind IP address\n") { if (!global_mgcp_client_conf) @@ -49,7 +49,7 @@ DEFUN(cfg_mgw_local_port, cfg_mgw_local_port_cmd, "mgw local-port <0-65535>", - MGW_STR "local bind to connect to MGCP gateway with\n" + MGW_STR "local port to connect to MGW from\n" "local bind port\n") { if (!global_mgcp_client_conf) @@ -60,8 +60,8 @@ DEFUN(cfg_mgw_remote_ip, cfg_mgw_remote_ip_cmd, "mgw remote-ip A.B.C.D", - MGW_STR "remote bind to connect to MGCP gateway with\n" - "remote bind IP address\n") + MGW_STR "remote IP address to reach the MGW at\n" + "remote IP address\n") { if (!global_mgcp_client_conf) return CMD_ERR_NOTHING_TODO; @@ -73,8 +73,8 @@ DEFUN(cfg_mgw_remote_port, cfg_mgw_remote_port_cmd, "mgw remote-port <0-65535>", - MGW_STR "remote bind to connect to MGCP gateway with\n" - "remote bind port\n") + MGW_STR "remote port to reach the MGW at\n" + "remote port\n") { if (!global_mgcp_client_conf) return CMD_ERR_NOTHING_TODO; @@ -85,8 +85,8 @@ DEFUN(cfg_mgw_endpoint_range, cfg_mgw_endpoint_range_cmd, "mgw endpoint-range <1-65534> <1-65534>", MGW_STR "usable range of endpoint identifiers\n" - "set first useable endpoint identifier\n" - "set the last useable endpoint identifier\n") + "set first usable endpoint identifier\n" + "set last usable endpoint identifier\n") { uint16_t first_endpoint = atoi(argv[0]); uint16_t last_endpoint = atoi(argv[1]); -- To view, visit https://gerrit.osmocom.org/4598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie1a408f9e651c5fb3424a84ceaaa603e20ad595c Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 14:18:48 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 14:18:48 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#8). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. TODO: Handover will not work yet, because there is no functionality to update the connection with the port/ip of the new BTS. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,056 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/8 diff --git a/configure.ac b/configure.ac index 4edbb83..f73f33c 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran) # TODO version? PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 51b2c98..5cb7efd 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..f4ba1d1 --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,45 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..326703d 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -124,11 +87,9 @@ * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..e474b98 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,29 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + conn->mgcp_ctx = NULL; + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +442,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +546,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +755,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..e0e477c --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,879 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_DLCX, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_DLCX, "ST_DLCX (delete all rtp connections)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_DLCX, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_BTS_RESP: + break; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_ASS_COMPLETE: + break; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_DLCX, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_DLCX: Remove connection for the BTS and NET side. */ +static void fsm_dlcx_all_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "removing connection for the BTS and NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_DLCX), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. */ + [ST_DLCX] = { + .in_event_mask = (1 << EV_TEARDOWN), + .out_state_mask = (1 << ST_HALT), + .name = "ST_DLCX", + .action = fsm_dlcx_all_cb, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..59f5b3b 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index b5232c4..78fce4c 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1036,5 +1040,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 8 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 1 14:28:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 14:28:33 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#9). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. TODO: Handover will not work yet, because there is no functionality to update the connection with the port/ip of the new BTS. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,056 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/9 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 51b2c98..5cb7efd 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..f4ba1d1 --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,45 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..326703d 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -124,11 +87,9 @@ * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..e474b98 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,29 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + conn->mgcp_ctx = NULL; + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +442,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +546,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +755,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..e0e477c --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,879 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_DLCX, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_DLCX, "ST_DLCX (delete all rtp connections)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_DLCX, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_BTS_RESP: + break; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_ASS_COMPLETE: + break; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_DLCX, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_DLCX: Remove connection for the BTS and NET side. */ +static void fsm_dlcx_all_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "removing connection for the BTS and NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_DLCX) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_DLCX), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. */ + [ST_DLCX] = { + .in_event_mask = (1 << EV_TEARDOWN), + .out_state_mask = (1 << ST_HALT), + .name = "ST_DLCX", + .action = fsm_dlcx_all_cb, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..59f5b3b 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 9 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 1 14:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 1 Nov 2017 14:44:54 +0000 Subject: [PATCH] osmo-bts[master]: octphy: override firmware version check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4446 to look at the new patch set (#3). octphy: override firmware version check When osmo-bts detects a mismatch between the firmware of the DSP and the header version which it was compile with, a hard exit is performed. In some cases this may hinder debugging/testing things. Implement a commandline option to intentinally override the check. Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 --- M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/main.c 2 files changed, 23 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/4446/3 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index d1d5bf6..a1c384a 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -52,6 +52,8 @@ #include #include +bool no_fw_check = 0; + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -1161,11 +1163,23 @@ "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s', ver_hdr='%s')\n", air->szName, air->szDescription, air->szVersion, ver_hdr); - /* Bail if dsp firmware does not match up the header version info */ + /* Check if the firmware version of the DSP matches the header files + * that were used to compile osmo-bts */ if (strcmp(air->szVersion, ver_hdr) != 0) { LOGP(DL1C, LOGL_ERROR, - "Invalid header-file / dsp-firmware combination, exiting...\n"); - exit(1); + "Invalid header-file-version / dsp-firmware-version combination\n"); + LOGP(DL1C, LOGL_ERROR, + "Expected firmware version: %s\n", ver_hdr); + LOGP(DL1C, LOGL_ERROR, + "Actual firmware version: %s\n", air->szVersion); + + if (!no_fw_check) { + LOGP(DL1C, LOGL_ERROR, + "use option -I to override the check (not recommened)\n"); + LOGP(DL1C, LOGL_ERROR, + "exiting...\n"); + exit(1); + } } talloc_replace(fl1h->info.app.name, fl1h, air->szName); diff --git a/src/osmo-bts-octphy/main.c b/src/osmo-bts-octphy/main.c index 0f4d0dd..8c68485 100644 --- a/src/osmo-bts-octphy/main.c +++ b/src/osmo-bts-octphy/main.c @@ -51,6 +51,7 @@ #define RF_LOCK_PATH "/var/lock/bts_rf_lock" extern int pcu_direct; +extern bool no_fw_check; int bts_model_print_help() { @@ -65,15 +66,19 @@ int option_idx = 0, c; static const struct option long_options[] = { /* specific to this hardware */ + { "no-fw-check", 0, 0, 'I' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "", + c = getopt_long(argc, argv, "I", long_options, &option_idx); if (c == -1) break; switch (c) { + case 'I': + no_fw_check = true; + break; default: num_errors++; break; -- To view, visit https://gerrit.osmocom.org/4446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 15:54:35 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 Nov 2017 15:54:35 +0000 Subject: osmo-gsm-tester[master]: Change example config to use only 1 TRX for osmo-bts-octphy ... In-Reply-To: References: Message-ID: Patch Set 1: > the OCTBTS conists of two DSPs, and each of them can be single-TRX > or multi-TRX. The multi-TRX license relates to running multiple > soft TRXs on one DSP. > > Result: you should be able to run two TRXs (one on each DSP) > perfectly fine with current software. There seems to be some issues configuring the 2nd DSP, I created a task to follow up on it and assigned it to Philipp after discussing it with him. -- To view, visit https://gerrit.osmocom.org/4426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2c415deb85187feb42fb6d24cc86273eb722936 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 18:51:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 18:51:29 +0000 Subject: [PATCH] osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4072 to look at the new patch set (#3). Add multislot classes from latest spec The table B.1 is copy-pasted from 3GPP TS 45.002 and reformatted via Emacs macros into C struct to avoid typos. The test output expanded accordingly. Note: classes 35-45 which need TA offset are not properly supported yet. This can be extended once we have such devices available for tests. Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp M src/mslot_class.c M src/mslot_class.h M tests/alloc/MslotTest.ok 4 files changed, 651 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/72/4072/3 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 471b601..b5edf05 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -469,8 +469,12 @@ Sum = mslot_class_get_sum(mslot_class); Tta = mslot_class_get_ta(mslot_class); Ttb = mslot_class_get_tb(mslot_class); - Tra = mslot_class_get_ra(mslot_class); - Trb = mslot_class_get_rb(mslot_class); + + /* FIXME: use actual TA offset for computation - make sure to adjust "1 + MS_TO" accordingly + see also "Offset required" bit in 3GPP TS 24.008 ?10.5.1.7 */ + Tra = mslot_class_get_ra(mslot_class, 0); + Trb = mslot_class_get_rb(mslot_class, 0); + Type = mslot_class_get_type(mslot_class); if (Tx == MS_NA) { diff --git a/src/mslot_class.c b/src/mslot_class.c index 6d7c09d..936afb3 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -27,7 +27,7 @@ #include -/* 3GPP TS 05.02 Annex B.1 */ +/* 3GPP TS 45.002 Annex B Table B.1 */ struct gprs_ms_multislot_class { uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ @@ -35,7 +35,7 @@ uint8_t type; /* Type of Mobile */ }; -static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { +static const struct gprs_ms_multislot_class gprs_ms_multislot_class[] = { /* M-S Class | Max # of slots | Min # of slots | Type */ /* | Rx Tx Sum | Tta Ttb Tra Trb | */ /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, @@ -68,8 +68,22 @@ /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, + /* 30 */ { 5, 1, 6, 2, 1, 1, 1, 1 }, + /* 31 */ { 5, 2, 6, 2, 1, 1, 1, 1 }, + /* 32 */ { 5, 3, 6, 2, 1, 1, 1, 1 }, + /* 33 */ { 5, 4, 6, 2, 1, 1, 1, 1 }, + /* 34 */ { 5, 5, 6, 2, 1, 1, 1, 1 }, + /* 35 */ { 5, 1, 6, 2, 1, MS_TO, 1, 1 }, + /* 36 */ { 5, 2, 6, 2, 1, MS_TO, 1, 1 }, + /* 37 */ { 5, 3, 6, 2, 1, MS_TO, 1, 1 }, + /* 38 */ { 5, 4, 6, 2, 1, MS_TO, 1, 1 }, + /* 39 */ { 5, 5, 6, 2, 1, MS_TO, 1, 1 }, + /* 40 */ { 6, 1, 7, 1, 1, 1, MS_TO, 1 }, + /* 41 */ { 6, 2, 7, 1, 1, 1, MS_TO, 1 }, + /* 42 */ { 6, 3, 7, 1, 1, 1, MS_TO, 1 }, + /* 43 */ { 6, 4, 7, 1, 1, 1, MS_TO, 1 }, + /* 44 */ { 6, 5, 7, 1, 1, 1, MS_TO, 1 }, + /* 45 */ { 6, 6, 7, 1, 1, 1, MS_TO, 1 }, }; static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl) @@ -104,12 +118,19 @@ } } -uint8_t mslot_class_get_ra(uint8_t ms_cl) +uint8_t mslot_class_get_ra(uint8_t ms_cl, uint8_t ta) { - return get_mslot_table(ms_cl)->ra; + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->ra) { + case MS_TO: + return ta + 1; + default: + return t->ra; + } } -uint8_t mslot_class_get_rb(uint8_t ms_cl) +uint8_t mslot_class_get_rb(uint8_t ms_cl, uint8_t ta) { const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); @@ -118,6 +139,8 @@ return 0; case MS_C: return 1; + case MS_TO: + return ta; default: return t->rb; } diff --git a/src/mslot_class.h b/src/mslot_class.h index f26bd64..3fa507d 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -32,14 +32,15 @@ #define MS_A 254 /* 1 with hopping, 0 without */ #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ +#define MS_TO 251 /* 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value) */ #define DEFAULT_MSLOT_CLASS 12 /* multislot class selection routines */ uint8_t mslot_class_get_ta(uint8_t ms_cl); uint8_t mslot_class_get_tb(uint8_t ms_cl); -uint8_t mslot_class_get_ra(uint8_t ms_cl); -uint8_t mslot_class_get_rb(uint8_t ms_cl); +uint8_t mslot_class_get_ra(uint8_t ms_cl, uint8_t ta); +uint8_t mslot_class_get_rb(uint8_t ms_cl, uint8_t ta); uint8_t mslot_class_get_tx(uint8_t ms_cl); uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); diff --git a/tests/alloc/MslotTest.ok b/tests/alloc/MslotTest.ok index 0cd50c8..86526bf 100644 --- a/tests/alloc/MslotTest.ok +++ b/tests/alloc/MslotTest.ok @@ -30,7 +30,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: .......1 [0] [SEQ] multislot class 28 - UL: .......1 DL: .......1 [0] [SEQ] multislot class 29 - UL: .......1 DL: .......1 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 31 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 32 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 33 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 34 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 35 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 36 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 37 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 38 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 39 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 40 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 41 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 42 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 43 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 44 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 45 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 1 for multislot tests... [SEQ] multislot class 0 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -62,7 +78,23 @@ [SEQ] multislot class 27 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 28 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 29 - UL: ......11 DL: ......11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 31 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 32 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 33 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 34 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 36 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 37 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 38 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 39 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 41 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 42 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 43 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 44 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 45 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 2 for multislot tests... [SEQ] multislot class 0 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -94,7 +126,23 @@ [SEQ] multislot class 27 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 28 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 29 - UL: .....11. DL: .....111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 31 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 32 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 33 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 34 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 35 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 36 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 37 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 38 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 39 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 40 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 41 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 42 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 43 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 44 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 45 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 3 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -126,7 +174,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 31 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 32 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 33 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 34 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 35 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 36 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 37 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 38 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 39 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 40 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 41 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 42 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 43 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 44 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 45 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 4 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -158,7 +222,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 41 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 42 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 43 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 44 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 45 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 5 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -190,7 +270,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 41 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 42 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 43 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 44 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 45 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 6 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -222,7 +318,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 41 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 42 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 43 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 44 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 45 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 7 for multislot tests... [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -254,7 +366,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 31 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 32 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 33 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 34 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 36 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 37 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 38 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 39 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 41 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 42 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 43 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 44 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 45 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_total_ascending(): accumulative Enabled PDCH 0 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: .......1 [0] @@ -287,7 +415,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] Enabled PDCH 1 for multislot tests... [ACC] multislot class 0 - UL: ......11 DL: ......11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -319,7 +463,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] Enabled PDCH 2 for multislot tests... [ACC] multislot class 0 - UL: .....11. DL: .....111 [0] [ACC] multislot class 1 - UL: ......1. DL: ......1. [0] @@ -351,7 +511,23 @@ [ACC] multislot class 27 - UL: ......1. DL: ......1. [0] [ACC] multislot class 28 - UL: ......1. DL: ......1. [0] [ACC] multislot class 29 - UL: ......1. DL: ......1. [0] - [ACC] multislot class 30 - UL: ......1. DL: ......1. [-22] + [ACC] multislot class 30 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 31 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 32 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 33 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 34 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 35 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 36 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 37 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 38 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 39 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 40 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 41 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 42 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 43 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 44 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 45 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 46 - UL: ......1. DL: ......1. [-22] Enabled PDCH 3 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -383,7 +559,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 4 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -415,7 +607,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 5 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -447,7 +655,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 6 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -479,7 +703,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 7 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -511,7 +751,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] test_multislot_total_descending(): sequential Enabled PDCH 7 for multislot tests... [SEQ] multislot class 0 - UL: 1....... DL: 1....... [0] @@ -544,7 +800,23 @@ [SEQ] multislot class 27 - UL: 1....... DL: 1....... [0] [SEQ] multislot class 28 - UL: 1....... DL: 1....... [0] [SEQ] multislot class 29 - UL: 1....... DL: 1....... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 31 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 32 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 33 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 34 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 35 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 36 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 37 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 38 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 39 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 40 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 41 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 42 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 43 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 44 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 45 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 6 for multislot tests... [SEQ] multislot class 0 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -576,7 +848,23 @@ [SEQ] multislot class 27 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 28 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 29 - UL: 11...... DL: 11...... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 5 for multislot tests... [SEQ] multislot class 0 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 1 - UL: ..1..... DL: ..1..... [0] @@ -608,7 +896,23 @@ [SEQ] multislot class 27 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 28 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 29 - UL: 11...... DL: 111..... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 4 for multislot tests... [SEQ] multislot class 0 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 1 - UL: ...1.... DL: ...1.... [0] @@ -640,7 +944,23 @@ [SEQ] multislot class 27 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 28 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 29 - UL: .1...... DL: 1111.... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 3 for multislot tests... [SEQ] multislot class 0 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -672,7 +992,23 @@ [SEQ] multislot class 27 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 28 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 29 - UL: ..1..... DL: .1111... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 31 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 32 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 33 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 34 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 36 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 37 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 38 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 39 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 2 for multislot tests... [SEQ] multislot class 0 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -704,7 +1040,23 @@ [SEQ] multislot class 27 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 28 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 29 - UL: ...1.... DL: ..1111.. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 31 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 32 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 33 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 34 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 35 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 36 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 37 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 38 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 39 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 40 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 41 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 42 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 43 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 44 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 45 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 1 for multislot tests... [SEQ] multislot class 0 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 1 - UL: ......1. DL: ......1. [0] @@ -736,7 +1088,23 @@ [SEQ] multislot class 27 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 28 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 29 - UL: ....1... DL: ...1111. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 31 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 32 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 33 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 34 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 35 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 36 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 37 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 38 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 39 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 40 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 41 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 42 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 43 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 44 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 45 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 0 for multislot tests... [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -768,7 +1136,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 31 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 32 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 33 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 34 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 36 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 37 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 38 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 39 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 41 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 42 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 43 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 44 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 45 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_total_descending(): accumulative Enabled PDCH 7 for multislot tests... [ACC] multislot class 0 - UL: 1....... DL: 1....... [0] @@ -801,7 +1185,23 @@ [ACC] multislot class 27 - UL: 1....... DL: 1....... [0] [ACC] multislot class 28 - UL: 1....... DL: 1....... [0] [ACC] multislot class 29 - UL: 1....... DL: 1....... [0] - [ACC] multislot class 30 - UL: 1....... DL: 1....... [-22] + [ACC] multislot class 30 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 31 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 32 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 33 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 34 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 35 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 36 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 37 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 38 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 39 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 40 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 41 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 42 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 43 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 44 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 45 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 46 - UL: 1....... DL: 1....... [-22] Enabled PDCH 6 for multislot tests... [ACC] multislot class 0 - UL: 11...... DL: 11...... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -833,7 +1233,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 5 for multislot tests... [ACC] multislot class 0 - UL: 11...... DL: 111..... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -865,7 +1281,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 4 for multislot tests... [ACC] multislot class 0 - UL: .1...... DL: 1111.... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -897,7 +1329,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 3 for multislot tests... [ACC] multislot class 0 - UL: ..1..... DL: .1111... [0] [ACC] multislot class 1 - UL: ..1..... DL: ..1..... [0] @@ -929,7 +1377,23 @@ [ACC] multislot class 27 - UL: ..1..... DL: ..1..... [0] [ACC] multislot class 28 - UL: ..1..... DL: ..1..... [0] [ACC] multislot class 29 - UL: ..1..... DL: ..1..... [0] - [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [-22] + [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 31 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 32 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 33 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 34 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 35 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 36 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 37 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 38 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 39 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 40 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 41 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 42 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 43 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 44 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 45 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 46 - UL: ..1..... DL: ..1..... [-22] Enabled PDCH 2 for multislot tests... [ACC] multislot class 0 - UL: ...1.... DL: ..1111.. [0] [ACC] multislot class 1 - UL: ...1.... DL: ...1.... [0] @@ -961,7 +1425,23 @@ [ACC] multislot class 27 - UL: ...1.... DL: ...1.... [0] [ACC] multislot class 28 - UL: ...1.... DL: ...1.... [0] [ACC] multislot class 29 - UL: ...1.... DL: ...1.... [0] - [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [-22] + [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 31 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 32 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 33 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 34 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 35 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 36 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 37 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 38 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 39 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 40 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 41 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 42 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 43 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 44 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 45 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 46 - UL: ...1.... DL: ...1.... [-22] Enabled PDCH 1 for multislot tests... [ACC] multislot class 0 - UL: ....1... DL: ...1111. [0] [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -993,7 +1473,23 @@ [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] - [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 31 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 32 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 33 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 34 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 35 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 36 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 37 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 38 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 39 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 40 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 41 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 42 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 43 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 44 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 45 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 46 - UL: ....1... DL: ....1... [-22] Enabled PDCH 0 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1025,7 +1521,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] test_multislot_middle(): sequential [SEQ] multislot class 0 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -1057,7 +1569,23 @@ [SEQ] multislot class 27 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 28 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 29 - UL: ...11... DL: ...111.. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 31 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 32 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 33 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 34 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 36 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 37 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 38 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 39 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 40 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 41 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 42 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 43 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 44 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 45 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_middle(): accumulative [ACC] multislot class 0 - UL: ...11... DL: ...111.. [0] [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -1089,7 +1617,23 @@ [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] - [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 31 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 32 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 33 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 34 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 35 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 36 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 37 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 38 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 39 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 40 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 41 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 42 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 43 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 44 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 45 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 46 - UL: ....1... DL: ....1... [-22] test_multislot_ends(): sequential [SEQ] multislot class 0 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1121,7 +1665,23 @@ [SEQ] multislot class 27 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 28 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 29 - UL: 1......1 DL: 1......1 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 31 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 32 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 33 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 34 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 36 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 37 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 38 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 39 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 41 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 42 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 43 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 44 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 45 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_ends(): accumulative [ACC] multislot class 0 - UL: 1......1 DL: 1......1 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1153,4 +1713,20 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 18:51:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 18:51:30 +0000 Subject: [PATCH] osmo-pcu[master]: Remove unused parameter Message-ID: Review at https://gerrit.osmocom.org/4634 Remove unused parameter Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/4634/1 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 2b08cf6..dac9e63 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -489,8 +489,7 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_bts *bts, - struct gprs_rlcmac_trx *trx, +static int find_multi_slots(struct gprs_rlcmac_trx *trx, const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots) { const struct gprs_ms_multislot_class *ms_class; @@ -859,7 +858,7 @@ trx = &bts->trx[trx_no]; if (!dl_slots || !ul_slots) { - rc = find_multi_slots(bts, trx, ms, &ul_slots, &dl_slots); + rc = find_multi_slots(trx, ms, &ul_slots, &dl_slots); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 18:51:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 18:51:30 +0000 Subject: [PATCH] osmo-pcu[master]: Move multislot table to separate file Message-ID: Review at https://gerrit.osmocom.org/4635 Move multislot table to separate file To facilitate testing and addition of support for new multislot classes, hide multislot class struct internals: * introduce mslot_class_get_*() functions * use those functions instead of direct access to array of structs * use ms_class as a parameter to find_multi_slot() instead of entire object Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 --- M src/Makefile.am M src/gprs_rlcmac_ts_alloc.cpp A src/mslot_class.c A src/mslot_class.h 4 files changed, 221 insertions(+), 109 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/35/4635/1 diff --git a/src/Makefile.am b/src/Makefile.am index 1543851..a6e98e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,6 +49,7 @@ pcu_l1_if.cpp \ pcu_vty.c \ pcu_vty_functions.cpp \ + mslot_class.c \ tbf.cpp \ tbf_ul.cpp \ tbf_dl.cpp \ @@ -81,6 +82,7 @@ gsm_timer.h \ pcu_vty.h \ pcu_vty_functions.h \ + mslot_class.h \ tbf.h \ bts.h \ poll_controller.h \ diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index dac9e63..5e670d7 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -29,58 +29,12 @@ #include #include +extern "C" { +#include "mslot_class.h" +} + /* Consider a PDCH as idle if has at most this number of TBFs assigned to it */ #define PDCH_IDLE_TBF_THRESH 1 - -/* 3GPP TS 05.02 Annex B.1 */ - -#define MS_NA 255 /* N/A */ -#define MS_A 254 /* 1 with hopping, 0 without */ -#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ -#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ - -struct gprs_ms_multislot_class { - uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ - uint8_t ta, tb, ra, rb; /* Minimum Number of Slots */ - uint8_t type; /* Type of Mobile */ -}; - -static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { - /* M-S Class | Max # of slots | Min # of slots | Type */ - /* | Rx Tx Sum | Tta Ttb Tra Trb | */ - /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, - /* 1 */ { 1, 1, 2, 3, 2, 4, 2, 1 }, - /* 2 */ { 2, 1, 3, 3, 2, 3, 1, 1 }, - /* 3 */ { 2, 2, 3, 3, 2, 3, 1, 1 }, - /* 4 */ { 3, 1, 4, 3, 1, 3, 1, 1 }, - /* 5 */ { 2, 2, 4, 3, 1, 3, 1, 1 }, - /* 6 */ { 3, 2, 4, 3, 1, 3, 1, 1 }, - /* 7 */ { 3, 3, 4, 3, 1, 3, 1, 1 }, - /* 8 */ { 4, 1, 5, 3, 1, 2, 1, 1 }, - /* 9 */ { 3, 2, 5, 3, 1, 2, 1, 1 }, - /* 10 */ { 4, 2, 5, 3, 1, 2, 1, 1 }, - /* 11 */ { 4, 3, 5, 3, 1, 2, 1, 1 }, - /* 12 */ { 4, 4, 5, 2, 1, 2, 1, 1 }, - /* 13 */ { 3, 3, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 14 */ { 4, 4, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 15 */ { 5, 5, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 16 */ { 6, 6, MS_NA, MS_NA, MS_A, 2, MS_A, 2 }, - /* 17 */ { 7, 7, MS_NA, MS_NA, MS_A, 1, 0, 2 }, - /* 18 */ { 8, 8, MS_NA, MS_NA, 0, 0, 0, 2 }, - /* 19 */ { 6, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 20 */ { 6, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 21 */ { 6, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 22 */ { 6, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 23 */ { 6, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 24 */ { 8, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 25 */ { 8, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 26 */ { 8, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -}; static char *set_flag_chars(char *buf, uint8_t val, char set_char, char unset_char = 0) { @@ -489,10 +443,8 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_trx *trx, - const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots) +static int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) { - const struct gprs_ms_multislot_class *ms_class; uint8_t Tx, Sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ uint8_t Tta, Ttb, Tra, Trb; /* Minimum Number of Slots */ uint8_t Type; /* Type of Mobile */ @@ -509,57 +461,30 @@ enum {MASK_TT, MASK_TR}; unsigned mask_sel; - if (ms->ms_class() >= 32) { - LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %d out of range.\n", - ms->ms_class()); + if (mslot_class) + LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for class %d\n", + mslot_class); + + Tx = mslot_class_get_tx(mslot_class); + Sum = mslot_class_get_sum(mslot_class); + Tta = mslot_class_get_ta(mslot_class); + Ttb = mslot_class_get_tb(mslot_class); + Tra = mslot_class_get_ra(mslot_class); + Trb = mslot_class_get_rb(mslot_class); + Type = mslot_class_get_type(mslot_class); + + if (Tx == MS_NA) { + LOGP(DRLCMAC, LOGL_NOTICE, "Multislot class %d not applicable.\n", + mslot_class); return -EINVAL; } - - if (ms->ms_class()) { - ms_class = &gprs_ms_multislot_class[ms->ms_class()]; - LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " - "class %d\n", ms->ms_class()); - } else { - ms_class = &gprs_ms_multislot_class[12]; - LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " - "unknown class (assuming 12)\n"); - } - - if (ms_class->tx == MS_NA) { - LOGP(DRLCMAC, LOGL_NOTICE, "Multislot class %d not " - "applicable.\n", ms->ms_class()); - return -EINVAL; - } - - Tx = ms_class->tx; - Sum = ms_class->sum; - Tta = ms_class->ta; - Ttb = ms_class->tb; - Tra = ms_class->ra; - Trb = ms_class->rb; - Type = ms_class->type; - - /* MS_A maps to 0 if frequency hopping is disabled */ - /* TODO: Set it to 1 if FH is implemented and enabled */ - if (Ttb == MS_A) - Ttb = 0; - if (Trb == MS_A) - Trb = 0; - - /* MS_A and MS_B are 0 iff FH is disabled and there is no Tx/Rx change. - * This is never the case with the current implementation, so 1 will - * always be used. */ - if (Ttb == MS_B) - Ttb = 1; - if (Trb == MS_C) - Trb = 1; LOGP(DRLCMAC, LOGL_DEBUG, "- Rx=%d Tx=%d Sum Rx+Tx=%s Tta=%s Ttb=%d " - " Tra=%d Trb=%d Type=%d\n", ms_class->rx, Tx, + " Tra=%d Trb=%d Type=%d\n", mslot_class_get_rx(mslot_class), Tx, (Sum == MS_NA) ? "N/A" : digit[Sum], (Tta == MS_NA) ? "N/A" : digit[Tta], Ttb, Tra, Trb, Type); - max_slots = OSMO_MAX(ms_class->rx, ms_class->tx); + max_slots = OSMO_MAX(mslot_class_get_rx(mslot_class), Tx); if (*dl_slots == 0) *dl_slots = 0xff; @@ -585,11 +510,11 @@ max_dl_slots = 0; /* Iterate through possible numbers of TX slots */ - for (num_tx = 1; num_tx <= ms_class->tx; num_tx += 1) { + for (num_tx = 1; num_tx <= mslot_class_get_tx(mslot_class); num_tx += 1) { uint16_t tx_valid_win = (1 << num_tx) - 1; uint8_t rx_mask[MASK_TR+1]; - if (ms_class->type == 1) { + if (Type == 1) { rx_mask[MASK_TT] = (0x100 >> OSMO_MAX(Ttb, Tta)) - 1; rx_mask[MASK_TT] &= ~((1 << (Trb + num_tx)) - 1); rx_mask[MASK_TR] = (0x100 >> Ttb) - 1; @@ -629,7 +554,7 @@ tx_slot_count = pcu_bitcount(tx_window); - max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); + max_rx = OSMO_MIN(mslot_class_get_rx(mslot_class), Sum - num_tx); rx_valid_win = (1 << max_rx) - 1; /* Rotate group of RX slots: DDD-----, -DDD----, ..., DD-----D */ @@ -671,7 +596,7 @@ /* Whether to skip this round doesn not only depend on the bit * sets but also on mask_sel. Therefore this check must be done * before doing the test_and_set_bit shortcut. */ - if (ms_class->type == 1) { + if (Type == 1) { unsigned slot_sum = rx_slot_count + tx_slot_count; /* Assume down+up/dynamic. * TODO: For ext-dynamic, down only, up only add more @@ -723,7 +648,7 @@ /* Check number of common slots according to TS 54.002, 6.4.2.2 */ common_slot_count = pcu_bitcount(tx_window & rx_window); req_common_slots = OSMO_MIN(tx_slot_count, rx_slot_count); - if (ms_class->type == 1) + if (Type == 1) req_common_slots = OSMO_MIN(req_common_slots, 2); if (req_common_slots != common_slot_count) { @@ -858,7 +783,7 @@ trx = &bts->trx[trx_no]; if (!dl_slots || !ul_slots) { - rc = find_multi_slots(trx, ms, &ul_slots, &dl_slots); + rc = find_multi_slots(trx, ms->ms_class(), &ul_slots, &dl_slots); if (rc < 0) return rc; @@ -1063,12 +988,7 @@ int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts, uint8_t ms_class) { - int rx; - - if (ms_class >= ARRAY_SIZE(gprs_ms_multislot_class)) - ms_class = 0; - - rx = gprs_ms_multislot_class[ms_class].rx; + int rx = mslot_class_get_rx(ms_class); if (rx == MS_NA) rx = 4; diff --git a/src/mslot_class.c b/src/mslot_class.c new file mode 100644 index 0000000..6d7c09d --- /dev/null +++ b/src/mslot_class.c @@ -0,0 +1,144 @@ +/* mslot_class.c + * + * Copyright (C) 2012 Ivan Klyuchnikov + * Copyright (C) 2012 Andreas Eversberg + * Copyright (C) 2013 by Holger Hans Peter Freyther + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#include +#include + +#include + +/* 3GPP TS 05.02 Annex B.1 */ + +struct gprs_ms_multislot_class { + uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ + uint8_t ta, tb, ra, rb; /* Minimum Number of Slots */ + uint8_t type; /* Type of Mobile */ +}; + +static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { + /* M-S Class | Max # of slots | Min # of slots | Type */ + /* | Rx Tx Sum | Tta Ttb Tra Trb | */ + /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, + /* 1 */ { 1, 1, 2, 3, 2, 4, 2, 1 }, + /* 2 */ { 2, 1, 3, 3, 2, 3, 1, 1 }, + /* 3 */ { 2, 2, 3, 3, 2, 3, 1, 1 }, + /* 4 */ { 3, 1, 4, 3, 1, 3, 1, 1 }, + /* 5 */ { 2, 2, 4, 3, 1, 3, 1, 1 }, + /* 6 */ { 3, 2, 4, 3, 1, 3, 1, 1 }, + /* 7 */ { 3, 3, 4, 3, 1, 3, 1, 1 }, + /* 8 */ { 4, 1, 5, 3, 1, 2, 1, 1 }, + /* 9 */ { 3, 2, 5, 3, 1, 2, 1, 1 }, + /* 10 */ { 4, 2, 5, 3, 1, 2, 1, 1 }, + /* 11 */ { 4, 3, 5, 3, 1, 2, 1, 1 }, + /* 12 */ { 4, 4, 5, 2, 1, 2, 1, 1 }, + /* 13 */ { 3, 3, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 14 */ { 4, 4, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 15 */ { 5, 5, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 16 */ { 6, 6, MS_NA, MS_NA, MS_A, 2, MS_A, 2 }, + /* 17 */ { 7, 7, MS_NA, MS_NA, MS_A, 1, 0, 2 }, + /* 18 */ { 8, 8, MS_NA, MS_NA, 0, 0, 0, 2 }, + /* 19 */ { 6, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 20 */ { 6, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 21 */ { 6, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 22 */ { 6, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 23 */ { 6, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 24 */ { 8, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 25 */ { 8, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 26 */ { 8, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, +/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, +/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, +}; + +static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl) +{ + uint8_t index = ms_cl ? ms_cl : DEFAULT_MSLOT_CLASS; + + if (ms_cl >= ARRAY_SIZE(gprs_ms_multislot_class)) + index = 0; + + return &gprs_ms_multislot_class[index]; +} + +uint8_t mslot_class_get_ta(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->ta; +} + +/* TODO: Set it to 1 if FH is implemented and enabled + * MS_A and MS_B are 0 iff FH is disabled and there is no Tx/Rx change. + * This is never the case with the current implementation, so 1 will always be used. */ +uint8_t mslot_class_get_tb(uint8_t ms_cl) +{ + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->tb) { + case MS_A: + return 0; + case MS_B: + return 1; + default: + return t->tb; + } +} + +uint8_t mslot_class_get_ra(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->ra; +} + +uint8_t mslot_class_get_rb(uint8_t ms_cl) +{ + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->rb) { + case MS_A: + return 0; + case MS_C: + return 1; + default: + return t->rb; + } +} + +uint8_t mslot_class_get_tx(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->tx; +} + +uint8_t mslot_class_get_rx(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->rx; +} + +uint8_t mslot_class_get_sum(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->sum; +} + +uint8_t mslot_class_get_type(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->type; +} diff --git a/src/mslot_class.h b/src/mslot_class.h new file mode 100644 index 0000000..f26bd64 --- /dev/null +++ b/src/mslot_class.h @@ -0,0 +1,46 @@ +/* mslot_class.h + * + * Copyright (C) 2012 Ivan Klyuchnikov + * Copyright (C) 2012 Andreas Eversberg + * Copyright (C) 2013 by Holger Hans Peter Freyther + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#pragma once + +#include +#include +#include + +/* 3GPP TS 05.02 Annex B.1 */ + +#define MS_NA 255 /* N/A */// +#define MS_A 254 /* 1 with hopping, 0 without */ +#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ +#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ + +#define DEFAULT_MSLOT_CLASS 12 + +/* multislot class selection routines */ +uint8_t mslot_class_get_ta(uint8_t ms_cl); +uint8_t mslot_class_get_tb(uint8_t ms_cl); +uint8_t mslot_class_get_ra(uint8_t ms_cl); +uint8_t mslot_class_get_rb(uint8_t ms_cl); +uint8_t mslot_class_get_tx(uint8_t ms_cl); +uint8_t mslot_class_get_rx(uint8_t ms_cl); +uint8_t mslot_class_get_sum(uint8_t ms_cl); +uint8_t mslot_class_get_type(uint8_t ms_cl); -- To view, visit https://gerrit.osmocom.org/4635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 1 18:51:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 1 Nov 2017 18:51:31 +0000 Subject: [PATCH] osmo-pcu[master]: Add tests for find_multi_slots() Message-ID: Review at https://gerrit.osmocom.org/4636 Add tests for find_multi_slots() * make function public * add tests Change-Id: I4174703808335c19341cd5b5f4422496d958967f --- M src/gprs_rlcmac.h M src/gprs_rlcmac_ts_alloc.cpp M tests/Makefile.am A tests/alloc/MslotTest.cpp A tests/alloc/MslotTest.ok M tests/testsuite.at 6 files changed, 1,343 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/4636/1 diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index be1e686..ed366cf 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -63,6 +63,9 @@ uint8_t block_payload; }; +/* TS allocation internal functions */ +int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots); + int gprs_rlcmac_received_lost(struct gprs_rlcmac_dl_tbf *tbf, uint16_t received, uint16_t lost); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 5e670d7..471b601 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -443,7 +443,7 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) +int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) { uint8_t Tx, Sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ uint8_t Tta, Ttb, Tra, Trb; /* Minimum Number of Slots */ diff --git a/tests/Makefile.am b/tests/Makefile.am index 04136f5..1595a07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ -I$(top_srcdir)/include/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest fn/FnTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest alloc/MslotTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest fn/FnTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -12,6 +12,14 @@ alloc_AllocTest_SOURCES = alloc/AllocTest.cpp alloc_AllocTest_LDADD = \ + $(top_builddir)/src/libgprs.la \ + $(LIBOSMOGB_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +alloc_MslotTest_SOURCES = alloc/MslotTest.cpp +alloc_MslotTest_LDADD = \ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ @@ -124,7 +132,7 @@ tbf/TbfTest.ok tbf/TbfTest.err \ bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ - ms/MsTest.ok ms/MsTest.err \ + ms/MsTest.ok ms/MsTest.err alloc/MslotTest.ok \ llc/LlcTest.ok llc/LlcTest.err \ llist/LListTest.ok llist/LListTest.err \ codel/codel_test.ok \ diff --git a/tests/alloc/MslotTest.cpp b/tests/alloc/MslotTest.cpp new file mode 100644 index 0000000..fb682db --- /dev/null +++ b/tests/alloc/MslotTest.cpp @@ -0,0 +1,167 @@ +/* MslotTest.cpp + * + * Copyright (C) 2013 by Holger Hans Peter Freyther + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "gprs_rlcmac.h" +#include "gprs_debug.h" +#include "tbf.h" +#include "bts.h" + +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +/* globals used by the code */ +void *tall_pcu_ctx; +int16_t spoof_mnc = 0, spoof_mcc = 0; + +static inline void test_all_classes(struct gprs_rlcmac_trx *trx, bool clear_masks) +{ + int i, rc; + uint8_t dl_slots = 0, ul_slots = 0; + + for (i = 0; i < 64; i++) { + rc = find_multi_slots(trx, i, &ul_slots, &dl_slots); + + printf(" [%s] multislot class %3u - UL: " OSMO_BIT_SPEC " DL: " OSMO_BIT_SPEC " [%d]\n", + clear_masks ? "SEQ" : "ACC", i, OSMO_BIT_PRINT(ul_slots), OSMO_BIT_PRINT(dl_slots), rc); + + if (rc == -EINVAL) + return; + + if (clear_masks) { + dl_slots = 0; + ul_slots = 0; + } + } +} + +static inline void test_multislot_total_ascending(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + int i; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + for (i = 0; i < 8; i++) { + printf(" Enabled PDCH %u for multislot tests...\n", i); + trx->pdch[i].enable(); + + test_all_classes(trx, seq); + } +} + +static inline void test_multislot_total_descending(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + int i; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + for (i = 7; i >= 0; i--) { + printf(" Enabled PDCH %u for multislot tests...\n", i); + trx->pdch[i].enable(); + + test_all_classes(trx, seq); + } +} + +static inline void test_multislot_middle(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + trx->pdch[2].enable(); + trx->pdch[3].enable(); + trx->pdch[4].enable(); + + test_all_classes(trx, seq); +} + +static inline void test_multislot_ends(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + trx->pdch[0].enable(); + trx->pdch[7].enable(); + + test_all_classes(trx, seq); +} + + +int main(int argc, char **argv) +{ + tall_pcu_ctx = talloc_named_const(NULL, 1, "MslotTest context"); + if (!tall_pcu_ctx) + abort(); + + msgb_talloc_ctx_init(tall_pcu_ctx, 0); + + osmo_init_logging(&gprs_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + + test_multislot_total_ascending(true); + test_multislot_total_ascending(false); + + test_multislot_total_descending(true); + test_multislot_total_descending(false); + + test_multislot_middle(true); + test_multislot_middle(false); + + test_multislot_ends(true); + test_multislot_ends(false); + + return EXIT_SUCCESS; +} diff --git a/tests/alloc/MslotTest.ok b/tests/alloc/MslotTest.ok new file mode 100644 index 0000000..0cd50c8 --- /dev/null +++ b/tests/alloc/MslotTest.ok @@ -0,0 +1,1156 @@ +test_multislot_total_ascending(): sequential + Enabled PDCH 0 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 5 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 6 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 7 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 8 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 9 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 10 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 11 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 12 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 13 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 14 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 15 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 16 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 17 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 18 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 19 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 20 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 21 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 22 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 23 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 24 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 25 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 26 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 27 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 28 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 29 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 1 for multislot tests... + [SEQ] multislot class 0 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 7 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 10 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 11 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 12 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 13 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 14 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 15 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 16 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 17 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 18 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 19 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 20 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 21 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 22 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 23 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 24 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 25 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 26 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 27 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 28 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 29 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 2 for multislot tests... + [SEQ] multislot class 0 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 11 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 12 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 15 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 16 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 17 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 18 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 19 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 20 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 21 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 22 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 23 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 24 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 25 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 26 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 27 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 28 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 29 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 3 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 16 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 17 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 18 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 4 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 17 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 18 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 5 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 18 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 6 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 7 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 7 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: 1.....11 [0] + [SEQ] multislot class 10 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 11 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 12 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: 11111111 DL: 11111111 [0] + [SEQ] multislot class 19 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 20 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 21 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 22 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 23 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 24 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 25 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 26 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_total_ascending(): accumulative + Enabled PDCH 0 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + Enabled PDCH 1 for multislot tests... + [ACC] multislot class 0 - UL: ......11 DL: ......11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + Enabled PDCH 2 for multislot tests... + [ACC] multislot class 0 - UL: .....11. DL: .....111 [0] + [ACC] multislot class 1 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 2 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 3 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 4 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 5 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 6 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 7 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 8 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 9 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 10 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 11 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 12 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 13 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 14 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 15 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 16 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 17 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 18 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 19 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 20 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 21 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 22 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 23 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 24 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 25 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 26 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 27 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 28 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 29 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 30 - UL: ......1. DL: ......1. [-22] + Enabled PDCH 3 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 4 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 5 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 6 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 7 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] +test_multislot_total_descending(): sequential + Enabled PDCH 7 for multislot tests... + [SEQ] multislot class 0 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 1 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 2 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 3 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 4 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 5 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 6 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 7 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 8 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 9 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 10 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 11 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 12 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 13 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 14 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 15 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 16 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 17 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 18 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 19 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 20 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 21 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 22 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 23 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 24 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 25 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 26 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 27 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 28 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 29 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 6 for multislot tests... + [SEQ] multislot class 0 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 1 - UL: .1...... DL: .1...... [0] + [SEQ] multislot class 2 - UL: 1....... DL: 11...... [0] + [SEQ] multislot class 3 - UL: 1....... DL: 11...... [0] + [SEQ] multislot class 4 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 5 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 6 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 7 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 9 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 10 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 11 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 12 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 13 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 14 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 15 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 16 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 17 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 18 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 19 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 20 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 21 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 22 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 23 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 24 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 25 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 26 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 27 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 28 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 29 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 5 for multislot tests... + [SEQ] multislot class 0 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 1 - UL: ..1..... DL: ..1..... [0] + [SEQ] multislot class 2 - UL: .1...... DL: .11..... [0] + [SEQ] multislot class 3 - UL: .1...... DL: .11..... [0] + [SEQ] multislot class 4 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 5 - UL: .11..... DL: .11..... [0] + [SEQ] multislot class 6 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 7 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 9 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 10 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 11 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 12 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 13 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 14 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 15 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 16 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 17 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 18 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 19 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 20 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 21 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 22 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 23 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 24 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 25 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 26 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 27 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 28 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 29 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 4 for multislot tests... + [SEQ] multislot class 0 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 1 - UL: ...1.... DL: ...1.... [0] + [SEQ] multislot class 2 - UL: ..1..... DL: ..11.... [0] + [SEQ] multislot class 3 - UL: ..1..... DL: ..11.... [0] + [SEQ] multislot class 4 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 5 - UL: ..11.... DL: ..11.... [0] + [SEQ] multislot class 6 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 7 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 9 - UL: .11..... DL: .111.... [0] + [SEQ] multislot class 10 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 11 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 12 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 13 - UL: .111.... DL: .111.... [0] + [SEQ] multislot class 14 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 15 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 16 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 17 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 18 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 19 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 20 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 21 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 22 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 23 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 24 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 25 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 26 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 27 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 28 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 29 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 3 for multislot tests... + [SEQ] multislot class 0 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 1 - UL: ....1... DL: ....1... [0] + [SEQ] multislot class 2 - UL: ...1.... DL: ...11... [0] + [SEQ] multislot class 3 - UL: ...1.... DL: ...11... [0] + [SEQ] multislot class 4 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 5 - UL: ...11... DL: ...11... [0] + [SEQ] multislot class 6 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 7 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 8 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 9 - UL: ..11.... DL: ..111... [0] + [SEQ] multislot class 10 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 11 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 12 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 13 - UL: ..111... DL: ..111... [0] + [SEQ] multislot class 14 - UL: .1111... DL: .1111... [0] + [SEQ] multislot class 15 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 16 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 17 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 18 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 19 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 20 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 21 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 22 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 23 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 24 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 25 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 26 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 27 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 28 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 29 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 2 for multislot tests... + [SEQ] multislot class 0 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [SEQ] multislot class 2 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 3 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 4 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 5 - UL: ....11.. DL: ....11.. [0] + [SEQ] multislot class 6 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 7 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 8 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 9 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 10 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 11 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 12 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 13 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 14 - UL: ..1111.. DL: ..1111.. [0] + [SEQ] multislot class 15 - UL: .11111.. DL: .11111.. [0] + [SEQ] multislot class 16 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 17 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 18 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 19 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 20 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 21 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 22 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 23 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 24 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 25 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 26 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 27 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 28 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 29 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 1 for multislot tests... + [SEQ] multislot class 0 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 1 - UL: ......1. DL: ......1. [0] + [SEQ] multislot class 2 - UL: .....1.. DL: .....11. [0] + [SEQ] multislot class 3 - UL: .....1.. DL: .....11. [0] + [SEQ] multislot class 4 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 5 - UL: .....11. DL: .....11. [0] + [SEQ] multislot class 6 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 7 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 8 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 9 - UL: ....11.. DL: ....111. [0] + [SEQ] multislot class 10 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 11 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 12 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 13 - UL: ....111. DL: ....111. [0] + [SEQ] multislot class 14 - UL: ...1111. DL: ...1111. [0] + [SEQ] multislot class 15 - UL: ..11111. DL: ..11111. [0] + [SEQ] multislot class 16 - UL: .111111. DL: .111111. [0] + [SEQ] multislot class 17 - UL: 1111111. DL: 1111111. [0] + [SEQ] multislot class 18 - UL: 1111111. DL: 1111111. [0] + [SEQ] multislot class 19 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 20 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 21 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 22 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 23 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 24 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 25 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 26 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 27 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 28 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 29 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 0 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 7 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: 1.....11 [0] + [SEQ] multislot class 10 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 11 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 12 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: 11111111 DL: 11111111 [0] + [SEQ] multislot class 19 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 20 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 21 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 22 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 23 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 24 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 25 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 26 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_total_descending(): accumulative + Enabled PDCH 7 for multislot tests... + [ACC] multislot class 0 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 1 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 2 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 3 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 4 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 5 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 6 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 7 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 8 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 9 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 10 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 11 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 12 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 13 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 14 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 15 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 16 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 17 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 18 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 19 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 20 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 21 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 22 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 23 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 24 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 25 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 26 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 27 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 28 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 29 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 30 - UL: 1....... DL: 1....... [-22] + Enabled PDCH 6 for multislot tests... + [ACC] multislot class 0 - UL: 11...... DL: 11...... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 5 for multislot tests... + [ACC] multislot class 0 - UL: 11...... DL: 111..... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 4 for multislot tests... + [ACC] multislot class 0 - UL: .1...... DL: 1111.... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 3 for multislot tests... + [ACC] multislot class 0 - UL: ..1..... DL: .1111... [0] + [ACC] multislot class 1 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 2 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 3 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 4 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 5 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 6 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 7 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 8 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 9 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 10 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 11 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 12 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 13 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 14 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 15 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 16 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 17 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 18 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 19 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 20 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 21 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 22 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 23 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 24 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 25 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 26 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 27 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 28 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 29 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [-22] + Enabled PDCH 2 for multislot tests... + [ACC] multislot class 0 - UL: ...1.... DL: ..1111.. [0] + [ACC] multislot class 1 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 2 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 3 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 4 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 5 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 6 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 7 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 8 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 9 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 10 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 11 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 12 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 13 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 14 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 15 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 16 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 17 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 18 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 19 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 20 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 21 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 22 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 23 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 24 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 25 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 26 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 27 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 28 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 29 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [-22] + Enabled PDCH 1 for multislot tests... + [ACC] multislot class 0 - UL: ....1... DL: ...1111. [0] + [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 2 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 3 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 4 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 5 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 6 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 7 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 8 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 9 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 10 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 11 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 12 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 13 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 14 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 15 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 16 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 17 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 18 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 19 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 20 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 21 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 22 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 23 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 24 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 25 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 26 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + Enabled PDCH 0 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] +test_multislot_middle(): sequential + [SEQ] multislot class 0 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [SEQ] multislot class 2 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 3 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 4 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 5 - UL: ....11.. DL: ....11.. [0] + [SEQ] multislot class 6 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 7 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 8 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 9 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 10 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 11 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 12 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 13 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 14 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 15 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 16 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 17 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 18 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 19 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 20 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 21 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 22 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 23 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 24 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 25 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 26 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 27 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 28 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 29 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_middle(): accumulative + [ACC] multislot class 0 - UL: ...11... DL: ...111.. [0] + [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 2 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 3 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 4 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 5 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 6 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 7 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 8 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 9 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 10 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 11 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 12 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 13 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 14 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 15 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 16 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 17 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 18 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 19 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 20 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 21 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 22 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 23 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 24 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 25 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 26 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] +test_multislot_ends(): sequential + [SEQ] multislot class 0 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 5 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 6 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 7 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 9 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 10 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 11 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 12 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 13 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 14 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 15 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 16 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 17 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 18 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 19 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 20 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 21 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 22 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 23 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 24 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 25 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 26 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 27 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 28 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 29 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_ends(): accumulative + [ACC] multislot class 0 - UL: 1......1 DL: 1......1 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] diff --git a/tests/testsuite.at b/tests/testsuite.at index d8f8f9a..86f45a8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -9,6 +9,12 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([multi_slot]) +AT_KEYWORDS([multi_slot]) +cat $abs_srcdir/alloc/MslotTest.ok > expout +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/alloc/MslotTest], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([ts_alloc]) AT_KEYWORDS([ts_alloc]) cat $abs_srcdir/alloc/AllocTest.ok > expout -- To view, visit https://gerrit.osmocom.org/4636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4174703808335c19341cd5b5f4422496d958967f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From admin at opensuse.org Wed Nov 1 19:55:41 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 01 Nov 2017 19:55:41 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/i586 In-Reply-To: References: Message-ID: <59fa26d81f1cd_7cda6aef784985cc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 269s] | [ 269s] | This file was extended by libosmocore config.status 0.10.1.20171101, which was [ 269s] | generated by GNU Autoconf 2.69. Invocation command line was [ 269s] | [ 269s] | CONFIG_FILES = [ 269s] | CONFIG_HEADERS = [ 269s] | CONFIG_LINKS = [ 269s] | CONFIG_COMMANDS = [ 269s] | $ ./config.status Doxyfile.core [ 269s] | [ 269s] | on build32 [ 269s] | [ 269s] | config.status:1174: creating Doxyfile.core [ 269s] [ 269s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 269s] make[1]: *** [override_dh_auto_test] Error 1 [ 269s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 269s] debian/rules:15: recipe for target 'build' failed [ 269s] make: *** [build] Error 2 [ 269s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 269s] [ 269s] build32 failed "build libosmocore_0.10.1.20171101.dsc" at Wed Nov 1 19:55:23 UTC 2017. [ 269s] [ 269s] ### VM INTERACTION START ### [ 272s] [ 262.079508] reboot: Power down [ 273s] ### VM INTERACTION END ### [ 273s] [ 273s] build32 failed "build libosmocore_0.10.1.20171101.dsc" at Wed Nov 1 19:55:28 UTC 2017. [ 273s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 1 19:55:41 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 01 Nov 2017 19:55:41 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <59fa26d8e8833_7cda6aef7849866e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 247s] | [ 247s] | This file was extended by libosmocore config.status 0.10.1.20171101, which was [ 247s] | generated by GNU Autoconf 2.69. Invocation command line was [ 247s] | [ 247s] | CONFIG_FILES = [ 247s] | CONFIG_HEADERS = [ 247s] | CONFIG_LINKS = [ 247s] | CONFIG_COMMANDS = [ 247s] | $ ./config.status Doxyfile.core [ 247s] | [ 247s] | on build36 [ 247s] | [ 247s] | config.status:1174: creating Doxyfile.core [ 247s] [ 247s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 247s] make[1]: *** [override_dh_auto_test] Error 1 [ 247s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 247s] debian/rules:15: recipe for target 'build' failed [ 247s] make: *** [build] Error 2 [ 247s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 247s] [ 247s] build36 failed "build libosmocore_0.10.1.20171101.dsc" at Wed Nov 1 19:55:27 UTC 2017. [ 247s] [ 247s] ### VM INTERACTION START ### [ 250s] [ 239.888123] reboot: Power down [ 251s] ### VM INTERACTION END ### [ 251s] [ 251s] build36 failed "build libosmocore_0.10.1.20171101.dsc" at Wed Nov 1 19:55:31 UTC 2017. [ 251s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 1 22:35:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 22:35:37 +0000 Subject: [PATCH] libosmocore[master]: Revert "vty: Fix bad use of vector_slot()" Message-ID: Review at https://gerrit.osmocom.org/4637 Revert "vty: Fix bad use of vector_slot()" The patch seemed sensible, but introduces a segfault when hitting tab on the interactive VTY. Reproduction example: osmo-msc telnet 127.0.0.1 4254 OsmoMSC> enable So we need to understand what that line of code actually intends to do. Until then, revert this to avoid the segfault. This reverts commit e9e9e427b78271941a25a63567fc2ec2bb9e4433. Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e --- M src/vty/command.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/4637/1 diff --git a/src/vty/command.c b/src/vty/command.c index 355fb5d..21b26b4 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1950,7 +1950,7 @@ /* In case of 'command \t' pattern. Do you need '?' command at the end of the line. */ - if (*(char *)vector_slot(vline, index) == '\0') + if (vector_slot(vline, index) == '\0') *status = CMD_ERR_NOTHING_TODO; else *status = CMD_ERR_NO_MATCH; -- To view, visit https://gerrit.osmocom.org/4637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 22:35:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 22:35:37 +0000 Subject: libosmocore[master]: Revert "vty: Fix bad use of vector_slot()" In-Reply-To: References: Message-ID: Neels Hofmeyr has reverted this change. Change subject: Revert "vty: Fix bad use of vector_slot()" ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/4637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 1 22:38:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 22:38:18 +0000 Subject: [PATCH] libosmocore[master]: Revert "vty: Fix bad use of vector_slot()" In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4637 to look at the new patch set (#2). Revert "vty: Fix bad use of vector_slot()" The patch seemed sensible, but introduces a segfault when hitting tab on the interactive VTY. Reproduction example: osmo-msc telnet 127.0.0.1 4254 OsmoMSC> enable So we need to understand what that line of code actually intends to do. Until then, revert this to avoid the segfault. The segfault happens at: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7bc0894 in cmd_complete_command_real (vline=0x5555558d59e0, vty=0x5555558d57b0, status=0x7fffffffe024) at ../../../../src/libosmocore/src/vty/command.c:1953 1953 if (*(char *)vector_slot(vline, index) == '\0') This reverts commit e9e9e427b78271941a25a63567fc2ec2bb9e4433. Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e --- M src/vty/command.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/4637/2 diff --git a/src/vty/command.c b/src/vty/command.c index 355fb5d..21b26b4 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1950,7 +1950,7 @@ /* In case of 'command \t' pattern. Do you need '?' command at the end of the line. */ - if (*(char *)vector_slot(vline, index) == '\0') + if (vector_slot(vline, index) == '\0') *status = CMD_ERR_NOTHING_TODO; else *status = CMD_ERR_NO_MATCH; -- To view, visit https://gerrit.osmocom.org/4637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 1 22:40:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 22:40:56 +0000 Subject: libosmocore[master]: Revert "vty: Fix bad use of vector_slot()" In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 1 22:40:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 1 Nov 2017 22:40:58 +0000 Subject: [MERGED] libosmocore[master]: Revert "vty: Fix bad use of vector_slot()" In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Revert "vty: Fix bad use of vector_slot()" ...................................................................... Revert "vty: Fix bad use of vector_slot()" The patch seemed sensible, but introduces a segfault when hitting tab on the interactive VTY. Reproduction example: osmo-msc telnet 127.0.0.1 4254 OsmoMSC> enable So we need to understand what that line of code actually intends to do. Until then, revert this to avoid the segfault. The segfault happens at: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7bc0894 in cmd_complete_command_real (vline=0x5555558d59e0, vty=0x5555558d57b0, status=0x7fffffffe024) at ../../../../src/libosmocore/src/vty/command.c:1953 1953 if (*(char *)vector_slot(vline, index) == '\0') This reverts commit e9e9e427b78271941a25a63567fc2ec2bb9e4433. Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e --- M src/vty/command.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 355fb5d..21b26b4 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1950,7 +1950,7 @@ /* In case of 'command \t' pattern. Do you need '?' command at the end of the line. */ - if (*(char *)vector_slot(vline, index) == '\0') + if (vector_slot(vline, index) == '\0') *status = CMD_ERR_NOTHING_TODO; else *status = CMD_ERR_NO_MATCH; -- To view, visit https://gerrit.osmocom.org/4637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 09:11:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 09:11:35 +0000 Subject: [PATCH] osmo-pcu[master]: Simplify TS alloc: use defines for constants In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3920 to look at the new patch set (#7). Simplify TS alloc: use defines for constants * define and use constant for occupied TFI instead copying the same magic number all over the place * use libosmocore's define for bit pretty-printer Change-Id: I2699ceebf0cbec01652a02fa68ccc9e9419d0293 Related: OS#2282 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_ts_alloc.cpp M tests/alloc/AllocTest.cpp 4 files changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/20/3920/7 diff --git a/src/bts.cpp b/src/bts.cpp index e41b1fa..c36c5ee 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -469,7 +469,7 @@ for (trx = trx_from; trx <= trx_to; trx++) { bool trx_has_pdch = false; - free_tfis = 0xffffffff; + free_tfis = NO_FREE_TFI; for (ts = 0; ts < 8; ts++) { pdch = &m_bts.trx[trx].pdch[ts]; diff --git a/src/bts.h b/src/bts.h index d65cd2f..26aaa21 100644 --- a/src/bts.h +++ b/src/bts.h @@ -44,6 +44,7 @@ #define LLC_CODEL_DISABLE 0 #define LLC_CODEL_USE_DEFAULT (-1) #define MAX_GPRS_CS 9 +#define NO_FREE_TFI 0xffffffffUL /* see bts->gsmtap_categ_mask */ enum pcu_gsmtap_category { diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 2b08cf6..5a53267 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -129,7 +129,7 @@ int8_t tfi; tfi_map = pdch->assigned_tfi(dir); - if (tfi_map == 0xffffffffUL) + if (tfi_map == NO_FREE_TFI) return -1; /* look for USF, don't use USF=7 */ @@ -210,7 +210,7 @@ pdch->num_tbfs(GPRS_RLCMAC_UL_TBF) + compute_usage_by_reservation(pdch, dir); - if (pdch->assigned_tfi(reverse(dir)) == 0xffffffff) + if (pdch->assigned_tfi(reverse(dir)) == NO_FREE_TFI) /* No TFI in the opposite direction, avoid it */ usage += 32; @@ -341,10 +341,10 @@ if (!pdch->is_enabled()) continue; - if (pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) == 0xffffffff) + if (pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) == NO_FREE_TFI) continue; - if (pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) == 0xffffffff) + if (pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) == NO_FREE_TFI) continue; return trx_no; diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index a88f477..9bff38a 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -613,17 +613,17 @@ continue; if (ul_tbf && - pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) != 0xffffffff) + pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) != NO_FREE_TFI) continue; if (dl_tbf && - pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) != 0xffffffff) + pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) != NO_FREE_TFI) continue; busy_slots |= 1 << i; } - printf(" TBF[%d] class %d reserves %c%c%c%c%c%c%c%c\n", + printf(" TBF[%d] class %d reserves " OSMO_BIT_SPEC "\n", tfi, ms_class, get_dir_char(0x01, ul_slots, dl_slots, busy_slots), get_dir_char(0x02, ul_slots, dl_slots, busy_slots), -- To view, visit https://gerrit.osmocom.org/3920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2699ceebf0cbec01652a02fa68ccc9e9419d0293 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/vty_interface.c: add missing 'vty/misc.h' header Message-ID: Review at https://gerrit.osmocom.org/4638 mobile/vty_interface.c: add missing 'vty/misc.h' header This header contains declaration of the osmo_talloc_vty_add_cmds(). Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/38/4638/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 2ad95d0..b3777dc 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -41,6 +41,7 @@ #include #include #include +#include void *l23_ctx; -- To view, visit https://gerrit.osmocom.org/4638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() Message-ID: Review at https://gerrit.osmocom.org/4639 mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() The usage of msgb_set_talloc_ctx() was deprecated many days ago, so it's time to use the proper replacement. Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca --- M src/host/layer23/src/mobile/main.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/39/4639/1 diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index bc66557..997e2d5 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -220,7 +220,8 @@ log_set_all_filter(stderr_target, 1); l23_ctx = talloc_named_const(NULL, 1, "layer2 context"); - msgb_set_talloc_ctx(l23_ctx); + /* TODO: measure and choose a proper pool size */ + msgb_talloc_ctx_init(l23_ctx, 0); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/4639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/vty_interface.c: fix incompatible pointer type warning Message-ID: Review at https://gerrit.osmocom.org/4640 mobile/vty_interface.c: fix incompatible pointer type warning According to the vty_app_info struct definition, the go_parent_cb() should return an integer, but not enum. So, this change fixes the following compiler warning: > warning: initialization from incompatible pointer type > .go_parent_cb = ms_vty_go_parent, Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/40/4640/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 1f1341b..3bec113 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -12,7 +12,7 @@ SUPPORT_NODE, }; -enum node_type ms_vty_go_parent(struct vty *vty); +int ms_vty_go_parent(struct vty *vty); int ms_vty_init(void); extern void vty_notify(struct osmocom_ms *ms, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index b3777dc..0f27194 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2757,7 +2757,7 @@ return CMD_SUCCESS; } -enum node_type ms_vty_go_parent(struct vty *vty) +int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { case MS_NODE: -- To view, visit https://gerrit.osmocom.org/4640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:36 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:36 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd Message-ID: Review at https://gerrit.osmocom.org/4641 mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' suffix in names, it's better to use the updated functions. Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 --- M src/host/layer23/src/mobile/gsm480_ss.c 1 file changed, 14 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/4641/1 diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index 8d025e9..6f06cf7 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -193,20 +193,23 @@ { 0, NULL } }; -static int gsm480_ss_result(struct osmocom_ms *ms, const char *response, +static int gsm480_ss_result(struct osmocom_ms *ms, char *response, uint8_t error) { vty_notify(ms, NULL); if (response) { - char text[256], *t = text, *s; + char *line; + int i; - strncpy(text, response, sizeof(text) - 1); - text[sizeof(text) - 1] = '\0'; - while ((s = strchr(text, '\r'))) - *s = '\n'; - while ((s = strsep(&t, "\n"))) { - vty_notify(ms, "Service response: %s\n", s); - } + for (i = 0; response[i]; i++) + if (response[i] == '\r') + response[i] = '\n'; + + if (response[0] && response[strlen(response) - 1] == '\n') + response[strlen(response) - 1] = '\0'; + + while ((line = strsep(&response, "\n"))) + vty_notify(ms, "Service response: %s\n", line); } else if (error) vty_notify(ms, "Service request failed: %s\n", get_value_string(gsm480_err_names, error)); @@ -532,7 +535,7 @@ } /* Encode service request */ - length = gsm_7bit_encode(msg->data, text); + gsm_7bit_encode_n_ussd(msg->data, msgb_tailroom(msg), text, &length); msgb_put(msg, length); /* Then wrap it as an Octet String */ @@ -730,7 +733,6 @@ { int num_chars; char text[256]; - int i; const uint8_t *tag_data; int tag_len; @@ -772,19 +774,7 @@ return -EINVAL; } num_chars = tag_len * 8 / 7; - /* Prevent a mobile-originated buffer-overrun! */ - if (num_chars > sizeof(text) - 1) - num_chars = sizeof(text) - 1; - text[sizeof(text) - 1] = '\0'; - gsm_7bit_decode(text, tag_data, num_chars); - - for (i = 0; text[i]; i++) { - if (text[i] == '\r') - text[i] = '\n'; - } - /* remove last CR, if exists */ - if (text[0] && text[strlen(text) - 1] == '\n') - text[strlen(text) - 1] = '\0'; + gsm_7bit_decode_n_ussd(text, sizeof(text), tag_data, num_chars); gsm480_ss_result(trans->ms, text, 0); return 0; -- To view, visit https://gerrit.osmocom.org/4641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:36 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:36 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm48_mm.c: use secure gsm_7bit_decode_n Message-ID: Review at https://gerrit.osmocom.org/4642 mobile/gsm48_mm.c: use secure gsm_7bit_decode_n Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' postfix in names, it's better to use the updated functions. Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd --- M src/host/layer23/src/mobile/gsm48_mm.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/42/4642/1 diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 100129b..360f9b3 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -264,10 +264,7 @@ length = ((in_len - 1) * 8 - padding) / 7; if (length <= 0) return 0; - if (length >= name_len) - length = name_len - 1; - gsm_7bit_decode(name, lv + 2, length); - name[length] = '\0'; + gsm_7bit_decode_n(name, name_len, lv + 2, length); return length; } -- To view, visit https://gerrit.osmocom.org/4642 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:36 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:36 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n Message-ID: Review at https://gerrit.osmocom.org/4643 mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' postfix in names, it's better to use the updated functions. Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/43/4643/1 diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 655fe53..f56262e 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -113,7 +113,8 @@ sms->data_coding_scheme = dcs; strncpy(sms->address, receiver, sizeof(sms->address)-1); /* Generate user_data */ - sms->user_data_len = gsm_7bit_encode(sms->user_data, sms->text); + sms->user_data_len = gsm_7bit_encode_n(sms->user_data, + sizeof(sms->user_data), sms->text, NULL); return sms; } @@ -282,7 +283,8 @@ switch (sms_alphabet) { case DCS_7BIT_DEFAULT: - gsm_7bit_decode(gsms->text, smsp, gsms->user_data_len); + gsm_7bit_decode_n(gsms->text, sizeof(gsms->text), + smsp, gsms->user_data_len); break; case DCS_8BIT_DATA: case DCS_UCS2: -- To view, visit https://gerrit.osmocom.org/4643 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:37 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:37 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: get rid of unused variables / functions Message-ID: Review at https://gerrit.osmocom.org/4644 mobile: get rid of unused variables / functions Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 --- M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/gsm48_rr.c 3 files changed, 19 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/44/4644/1 diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index f56262e..22db859 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -226,7 +226,7 @@ uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; unsigned int sms_alphabet; - uint8_t sms_mti, sms_mms; + uint8_t sms_mti; uint8_t oa_len_bytes; uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */ int rc = 0; @@ -235,7 +235,7 @@ /* invert those fields where 0 means active/present */ sms_mti = *smsp & 0x03; - sms_mms = !!(*smsp & 0x04); + /* uint8_t sms_mms = !!(*smsp & 0x04); */ gsms->status_rep_req = (*smsp & 0x20); gsms->ud_hdr_ind = (*smsp & 0x40); gsms->reply_path_req = (*smsp & 0x80); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 360f9b3..4b1db1e 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -3244,7 +3244,6 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn, *conn_found = NULL; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* the first and only pending connection is the recent requested */ llist_for_each_entry(conn, &mm->mm_conn, list) { @@ -3293,7 +3292,7 @@ } if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + gsm48_mmxx_upmsg(ms, nmsg); return 0; @@ -3325,7 +3324,6 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* stop MM connection timer */ stop_mm_t3230(mm); @@ -3342,7 +3340,7 @@ } if (!nmsg) continue; /* skip if not of CC type */ - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + /* copy L3 message */ nmsg->l3h = msgb_put(nmsg, msgb_l3len(msg)); memcpy(nmsg->l3h, msg->l3h, msgb_l3len(msg)); @@ -3595,15 +3593,12 @@ llist_for_each_entry(conn, &mm->mm_conn, list) { if (conn->sapi == sapi && conn->state == GSM48_MMXX_ST_DEDICATED) { - struct gsm48_mmxx_hdr *nmmh; struct msgb *nmsg; - nmsg = gsm48_mmxx_msgb_alloc( GSM48_MMSMS_EST_CNF, conn->ref, conn->transaction_id, conn->sapi); if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; gsm48_mmxx_upmsg(ms, nmsg); } } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index b821457..ac27214 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -743,11 +743,6 @@ LOGP(DRR, LOGL_INFO, "timer T3122 has fired\n"); } -static void timeout_rr_t3124(void *arg) -{ - LOGP(DRR, LOGL_INFO, "timer T3124 has fired\n"); -} - static void timeout_rr_t3126(void *arg) { struct gsm48_rrlayer *rr = arg; @@ -810,15 +805,6 @@ rr->t3122.cb = timeout_rr_t3122; rr->t3122.data = rr; osmo_timer_schedule(&rr->t3122, sec, micro); -} - -static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) -{ - LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, - micro / 1000); - rr->t3124.cb = timeout_rr_t3124; - rr->t3124.data = rr; - osmo_timer_schedule(&rr->t3124, sec, micro); } static void start_rr_t3126(struct gsm48_rrlayer *rr, int sec, int micro) @@ -2735,7 +2721,7 @@ uint8_t serv_rxlev_full = 0, serv_rxlev_sub = 0, serv_rxqual_full = 0, serv_rxqual_sub = 0; uint8_t ta, tx_power; - uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0, multi_rep = 0; + uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0; uint8_t n = 0, rxlev_nc[6], bsic_nc[6], bcch_f_nc[6]; /* just in case! */ @@ -2770,12 +2756,13 @@ uint8_t ncc; int i, index; - /* multiband reporting, if not: 0 = normal reporting */ - if (s->si5ter) - multi_rep = s->nb_multi_rep_si5ter; +#if 0 + /* FIXME: multi-band reporting, if not: 0 = normal reporting */ + uint8_t multi_rep = s->si5ter ? + s->nb_multi_rep_si5ter : 0; +#endif /* get 6 strongest measurements */ - // FIXME: multiband report strongest = 127; /* infinite */ for (n = 0; n < 6; n++) { current = -128; /* -infinite */ @@ -5579,6 +5566,15 @@ todo } +static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) +{ + LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, + micro / 1000); + rr->t3124.cb = timeout_rr_t3124; + rr->t3124.data = rr; + osmo_timer_schedule(&rr->t3124, sec, micro); +} + /* send HANDOVER ACCESS burst (9.1.14) */ static int gsm48_rr_tx_hando_access(struct osmocom_ms *ms) { -- To view, visit https://gerrit.osmocom.org/4644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 10:54:37 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 Nov 2017 10:54:37 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent calling memset with n <= 0 Message-ID: Review at https://gerrit.osmocom.org/4645 mobile/gsm322.c: prevent calling memset with n <= 0 Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/45/4645/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..4b39924 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,7 +322,9 @@ else value -= min; - memset(bar, '=', value); + if (value >= 0) + memset(bar, '=', value); + bar[value] = '\0'; return bar; -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:14:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:14:00 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: add missing 'vty/misc.h' header In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:14:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:14:55 +0000 Subject: osmocom-bb[master]: mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:19:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:19:20 +0000 Subject: osmocom-bb[master]: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4641/1/src/host/layer23/src/mobile/gsm480_ss.c File src/host/layer23/src/mobile/gsm480_ss.c: Line 205: if (response[i] == '\r') That doesn't seem to be related to change to secure functions. And it also forces you to drop 'const' from response. Please clarify why this is necessary. -- To view, visit https://gerrit.osmocom.org/4641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:19:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:19:42 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: fix incompatible pointer type warning In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:30:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:30:28 +0000 Subject: osmocom-bb[master]: mobile: get rid of unused variables / functions In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4644/1/src/host/layer23/src/mobile/gsm411_sms.c File src/host/layer23/src/mobile/gsm411_sms.c: Line 238: /* uint8_t sms_mms = !!(*smsp & 0x04); */ Why keeping it? If it's not used anywhere than it should be simply removed. -- To view, visit https://gerrit.osmocom.org/4644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:36:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 11:36:20 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent calling memset with n <= 0 In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) If I interpret the code correctly it's impossible for 'value' to be negative at this point. So it's just to get rid of compile warning? If so than you could, perhaps, use size_t instead of int for 'value' type: that's what memset expects anyway. https://gerrit.osmocom.org/#/c/4645/1/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 328: bar[value] = '\0'; That cannot possibly be right. If 'value' is negative in here than 'bar[value]' will almost certainly point where it shouldn't. -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:37:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:37:51 +0000 Subject: osmocom-bb[master]: mobile/gsm48_mm.c: use secure gsm_7bit_decode_n In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4642 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:38:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:38:00 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: add missing 'vty/misc.h' header In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:38:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:38:09 +0000 Subject: osmocom-bb[master]: mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:38:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:38:26 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: fix incompatible pointer type warning In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:38:55 +0000 Subject: osmocom-bb[master]: mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4643 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:39:22 +0000 Subject: osmocom-bb[master]: mobile: get rid of unused variables / functions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:39:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:39:39 +0000 Subject: osmo-gsm-tester[master]: Change example config to use only 1 TRX for osmo-bts-octphy ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2c415deb85187feb42fb6d24cc86273eb722936 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:40:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:40:41 +0000 Subject: osmo-bts[master]: octphy: override firmware version check In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4446/3/src/osmo-bts-octphy/main.c File src/osmo-bts-octphy/main.c: Line 58: return 0; I think if you introduce bts-specific command line options, you should also document them in the --help output. -- To view, visit https://gerrit.osmocom.org/4446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 2 11:42:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 11:42:03 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 (1 comment) I'm happy to merge it, but my original review comments about using a static variable to cache whether the syscall works has not been implemented. Please follow up with that in a later patch (or create a ticket as a reminder for this optimization) https://gerrit.osmocom.org/#/c/4593/8/src/gsm/gsm_utils.c File src/gsm/gsm_utils.c: Line 437: #endif whitespace -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 2 12:13:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 12:13:37 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Fix build with default paths Message-ID: Review at https://gerrit.osmocom.org/4646 Fix build with default paths If LIBOSMO_DIR is not set explicitly than ~/source/gsm/libosmocore is used which is base for MERGE_DOC which is used by vty_reference_combine.sh as it is. If the shell used by vty_reference_combine.sh does not expand ~ than the build will fail. Let's be nice and use realpath on MERGE_DOC before giving it to vty_reference_combine.sh to make sure complete path is used. Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 --- M build/Makefile.vty-reference.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/46/4646/1 diff --git a/build/Makefile.vty-reference.inc b/build/Makefile.vty-reference.inc index baf9cf5..6607ae5 100644 --- a/build/Makefile.vty-reference.inc +++ b/build/Makefile.vty-reference.inc @@ -26,7 +26,7 @@ include $(TOPDIR)/build/Makefile.docbook.inc LIBOSMO_DIR ?= ~/source/gsm/libosmocore -MERGE_DOC = $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl +MERGE_DOC = $(shell realpath $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl) CLEAN_FILES += generated -- To view, visit https://gerrit.osmocom.org/4646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 12:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 12:22:37 +0000 Subject: [PATCH] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#9). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 36 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/4593/9 diff --git a/configure.ac b/configure.ac index d9390cf..a8c1d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,12 +242,15 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..134b475 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -106,6 +106,12 @@ #endif #endif +#if (USE_GNUTLS) +#pragma message ("including GnuTLS for getrandom fallback.") +#include +#include +#endif + /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet * Greek symbols at hex positions 0x10 and 0x12-0x1a * left out as they can't be handled with a char and @@ -409,7 +415,7 @@ */ int osmo_get_rand_id(uint8_t *out, size_t len) { - int rc; + int rc = -ENOTSUP; /* this function is intended for generating short identifiers only, not arbitrary-length random data */ if (len > OSMO_MAX_RAND_ID_LEN) @@ -421,13 +427,16 @@ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); -#else -#pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") - return -ENOTSUP; #endif + /* getrandom() failed entirely: */ - if (rc < 0) + if (rc < 0) { +#if (USE_GNUTLS) +#pragma message ("Secure random failed: using GnuTLS fallback.") + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#endif return -errno; + } /* getrandom() failed partially due to signal interruption: this should never happen (according to getrandom(2)) as long as OSMO_MAX_RAND_ID_LEN < 256 -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 12:31:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 12:31:24 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 9: OS#2610 is created to track optimization suggestion. -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 13:13:05 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 2 Nov 2017 13:13:05 +0000 Subject: [PATCH] osmo-mgw[master]: sdp: refactoring sdp parser/generator In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4006 to look at the new patch set (#16). sdp: refactoring sdp parser/generator move SDP generator function write_response_sdp() from mgcp_protocol.c to mgcp_sdp.c and use msgb_printf() instead of snprintf() move prototypes for mgcp_parse_sdp_data() and mgcp_set_audio_info() to mgcp_sdp.h change parameter list of mgcp_parse_sdp_data() so that it takes the rtp conn directly, rather than struct mgcp_rtp_end. add doxygen comments to all public functions Change-Id: I9f88c93872ff913bc211f560b26901267f577324 --- M include/osmocom/mgcp/Makefile.am M include/osmocom/mgcp/mgcp_internal.h A include/osmocom/mgcp/mgcp_sdp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c 5 files changed, 158 insertions(+), 100 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4006/16 diff --git a/include/osmocom/mgcp/Makefile.am b/include/osmocom/mgcp/Makefile.am index 646b887..cd8f599 100644 --- a/include/osmocom/mgcp/Makefile.am +++ b/include/osmocom/mgcp/Makefile.am @@ -4,4 +4,5 @@ mgcp_conn.h \ mgcp_stat.h \ mgcp_ep.h \ + mgcp_sdp.h \ $(NULL) diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 751aba5..d4c8dc9 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -317,9 +317,6 @@ #define DEFAULT_RTP_AUDIO_DEFAULT_CHANNELS 1 #define PTYPE_UNDEFINED (-1) -int mgcp_parse_sdp_data(struct mgcp_endpoint *endp, struct mgcp_rtp_end *rtp, struct mgcp_parse_data *p); -int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, - int payload_type, const char *audio_name); /*! get the ip-address where the mgw application is bound on. * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters diff --git a/include/osmocom/mgcp/mgcp_sdp.h b/include/osmocom/mgcp/mgcp_sdp.h new file mode 100644 index 0000000..da23cba --- /dev/null +++ b/include/osmocom/mgcp/mgcp_sdp.h @@ -0,0 +1,35 @@ +/* + * SDP generation and parsing + * + * (C) 2009-2015 by Holger Hans Peter Freyther + * (C) 2009-2014 by On-Waves + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once +#include + +int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, + struct mgcp_conn_rtp *conn, + struct mgcp_parse_data *p); + +int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, + int payload_type, const char *audio_name); + +int mgcp_write_response_sdp(const struct mgcp_endpoint *endp, + const struct mgcp_conn_rtp *conn, struct msgb *sdp, + const char *addr); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index c00cdc6..6c611f7 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -39,6 +39,7 @@ #include #include #include +#include struct mgcp_request { char *name; @@ -191,80 +192,6 @@ return create_resp(endp, code, " FAIL", msg, trans, NULL, NULL); } -static int write_response_sdp(struct mgcp_endpoint *endp, - struct mgcp_conn_rtp *conn, - char *sdp_record, size_t size, const char *addr) -{ - const char *fmtp_extra; - const char *audio_name; - int payload_type; - int len; - int nchars; - - if (!conn) - return -1; - - endp->cfg->get_net_downlink_format_cb(endp, &payload_type, - &audio_name, &fmtp_extra, conn); - - len = snprintf(sdp_record, size, - "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" - "s=-\r\n" - "c=IN IP4 %s\r\n" - "t=0 0\r\n", conn->conn->id, addr, addr); - - if (len < 0 || len >= size) - goto buffer_too_small; - - if (payload_type >= 0) { - nchars = snprintf(sdp_record + len, size - len, - "m=audio %d RTP/AVP %d\r\n", - conn->end.local_port, payload_type); - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - - if (audio_name && endp->tcfg->audio_send_name) { - nchars = snprintf(sdp_record + len, size - len, - "a=rtpmap:%d %s\r\n", - payload_type, audio_name); - - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - - if (fmtp_extra) { - nchars = snprintf(sdp_record + len, size - len, - "%s\r\n", fmtp_extra); - - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - } - if (conn->end.packet_duration_ms > 0 && endp->tcfg->audio_send_ptime) { - nchars = snprintf(sdp_record + len, size - len, - "a=ptime:%u\r\n", - conn->end.packet_duration_ms); - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - - return len; - -buffer_too_small: - LOGP(DLMGCP, LOGL_ERROR, "SDP buffer too small: %zu (needed %d)\n", - size, len); - return -1; -} - /* Format MGCP response string (with SDP attached) */ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, @@ -272,10 +199,14 @@ const char *trans_id) { const char *addr = endp->cfg->local_ip; - char sdp_record[4096]; - int len; - int nchars; + struct msgb *sdp; + int rc; + struct msgb *result; char osmux_extension[strlen("\nX-Osmux: 255") + 1]; + + sdp = msgb_alloc_headroom(4096, 128, "sdp record"); + if (!sdp) + return NULL; if (!addr) addr = mgcp_net_src_addr(endp); @@ -287,21 +218,19 @@ osmux_extension[0] = '\0'; } - len = snprintf(sdp_record, sizeof(sdp_record), - "I: %u%s\n\n", conn->conn->id, osmux_extension); - if (len < 0) - return NULL; + rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + if (rc < 0) + goto error; - nchars = write_response_sdp(endp, conn, sdp_record + len, - sizeof(sdp_record) - len - 1, addr); - if (nchars < 0) - return NULL; - - len += nchars; - - sdp_record[sizeof(sdp_record) - 1] = '\0'; - - return create_resp(endp, 200, " OK", msg, trans_id, NULL, sdp_record); + rc = mgcp_write_response_sdp(endp, conn, sdp, addr); + if (rc < 0) + goto error; + result = create_resp(endp, 200, " OK", msg, trans_id, NULL, (char*) sdp->data); + msgb_free(sdp); + return result; +error: + msgb_free(sdp); + return NULL; } /* Send out dummy packet to keep the connection open, if the connection is an @@ -689,7 +618,7 @@ /* set up RTP media parameters */ if (have_sdp) - mgcp_parse_sdp_data(endp, &conn->end, p); + mgcp_parse_sdp_data(endp, conn, p); else if (endp->local_options.codec) mgcp_set_audio_info(p->cfg, &conn->end.codec, PTYPE_UNDEFINED, endp->local_options.codec); @@ -836,7 +765,7 @@ conn->conn->mode = conn->conn->mode_orig; if (have_sdp) - mgcp_parse_sdp_data(endp, &conn->end, p); + mgcp_parse_sdp_data(endp, conn, p); set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 7568351..e6bf9c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -38,6 +39,12 @@ int channels; }; +/*! Set codec configuration depending on payload type and codec name. + * \param[in] ctx talloc context. + * \param[out] codec configuration (caller provided memory). + * \param[in] payload_type codec type id (e.g. 3 for GSM, -1 when undefined). + * \param[in] audio_name audio codec name (e.g. "GSM/8000/1"). + * \returns 0 on success, -1 on failure. */ int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, int payload_type, const char *audio_name) { @@ -107,7 +114,7 @@ return 0; } -void codecs_initialize(void *ctx, struct sdp_rtp_map *codecs, int used) +static void codecs_initialize(void *ctx, struct sdp_rtp_map *codecs, int used) { int i; @@ -137,7 +144,8 @@ } } -void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, int payload, char *audio_name) +static void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, + int payload, const char *audio_name) { int i; @@ -163,7 +171,9 @@ LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload, audio_name); } -int is_codec_compatible(struct mgcp_endpoint *endp, struct sdp_rtp_map *codec) +/* Check if the codec matches what is set up in the trunk config */ +static int is_codec_compatible(const struct mgcp_endpoint *endp, + const struct sdp_rtp_map *codec) { char *bts_codec; char audio_codec[64]; @@ -182,7 +192,17 @@ return strcasecmp(audio_codec, codec->codec_name) == 0; } -int mgcp_parse_sdp_data(struct mgcp_endpoint *endp, struct mgcp_rtp_end *rtp, struct mgcp_parse_data *p) +/*! Analyze SDP input string. + * \param[in] endp trunk endpoint. + * \param[out] conn associated rtp connection. + * \param[out] caller provided memory to store the parsing results. + * \returns 0 on success, -1 on failure. + * + * Note: In conn (conn->end) the function returns the packet duration, + * the rtp port and the rtcp port */ +int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, + struct mgcp_conn_rtp *conn, + struct mgcp_parse_data *p) { struct sdp_rtp_map codecs[10]; int codecs_used = 0; @@ -191,7 +211,13 @@ int i; int codecs_assigned = 0; void *tmp_ctx = talloc_new(NULL); + struct mgcp_rtp_end *rtp; + OSMO_ASSERT(endp); + OSMO_ASSERT(conn); + OSMO_ASSERT(p); + + rtp = &conn->end; memset(&codecs, 0, sizeof(codecs)); for_each_line(line, p->save) { @@ -304,3 +330,73 @@ return codecs_assigned > 0; } +/*! Generate SDP response string. + * \param[in] endp trunk endpoint. + * \param[in] conn associated rtp connection. + * \param[out] sdp msg buffer to append resulting SDP string data. + * \param[in] addr IPV4 address string (e.g. 192.168.100.1). + * \returns 0 on success, -1 on failure. */ +int mgcp_write_response_sdp(const struct mgcp_endpoint *endp, + const struct mgcp_conn_rtp *conn, struct msgb *sdp, + const char *addr) +{ + const char *fmtp_extra; + const char *audio_name; + int payload_type; + int rc; + + OSMO_ASSERT(endp); + OSMO_ASSERT(conn); + OSMO_ASSERT(sdp); + OSMO_ASSERT(addr); + + /* FIXME: constify endp and conn args in get_net_donwlink_format_cb() */ + endp->cfg->get_net_downlink_format_cb((struct mgcp_endpoint *)endp, + &payload_type, &audio_name, + &fmtp_extra, + (struct mgcp_conn_rtp *)conn); + + rc = msgb_printf(sdp, + "v=0\r\n" + "o=- %u 23 IN IP4 %s\r\n" + "s=-\r\n" + "c=IN IP4 %s\r\n" + "t=0 0\r\n", conn->conn->id, addr, addr); + + if (rc < 0) + goto buffer_too_small; + + if (payload_type >= 0) { + rc = msgb_printf(sdp, "m=audio %d RTP/AVP %d\r\n", + conn->end.local_port, payload_type); + if (rc < 0) + goto buffer_too_small; + + if (audio_name && endp->tcfg->audio_send_name) { + rc = msgb_printf(sdp, "a=rtpmap:%d %s\r\n", + payload_type, audio_name); + + if (rc < 0) + goto buffer_too_small; + } + + if (fmtp_extra) { + rc = msgb_printf(sdp, "%s\r\n", fmtp_extra); + + if (rc < 0) + goto buffer_too_small; + } + } + if (conn->end.packet_duration_ms > 0 && endp->tcfg->audio_send_ptime) { + rc = msgb_printf(sdp, "a=ptime:%u\r\n", + conn->end.packet_duration_ms); + if (rc < 0) + goto buffer_too_small; + } + + return 0; + +buffer_too_small: + LOGP(DLMGCP, LOGL_ERROR, "SDP messagebuffer too small\n"); + return -1; +} -- To view, visit https://gerrit.osmocom.org/4006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9f88c93872ff913bc211f560b26901267f577324 Gerrit-PatchSet: 16 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 2 13:13:05 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 2 Nov 2017 13:13:05 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: make dummy packet handling more explicit In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4617 to look at the new patch set (#3). cosmetic: make dummy packet handling more explicit The way how osmo-mgw decides when to send a dummy packet and when not is not very obvious. use more explicit if statements, and define constants. Also add comments that explain how it works. Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 37 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/17/4617/3 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 83505a2..59147f0 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -98,7 +98,17 @@ int last_port; }; +/* There are up to three modes in which the keep-alive dummy packet can be + * sent. The beviour is controlled viw the keepalive_interval member of the + * trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy- + * packet is sent at all and the timer that sends regular dummy packets + * is no longer scheduled. If the keepalive_interval is set to -1, only + * one dummy packet is sent when an CRCX or an MDCX is performed. No timer + * is scheduled. For all vales greater 0, the a timer is scheduled and the + * value is used as interval. See also mgcp_keepalive_timer_cb(), + * handle_modify_con(), and handle_create_con() */ #define MGCP_KEEPALIVE_ONCE (-1) +#define MGCP_KEEPALIVE_NEVER 0 struct mgcp_trunk_config { struct llist_head entry; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9c92c65..4826790 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -666,10 +666,11 @@ if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); + /* Send dummy packet, see also comments in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); if (conn->conn->mode & MGCP_CONN_RECV_ONLY - && tcfg->keepalive_interval != 0) { + && tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) send_dummy(endp, conn); - } LOGP(DLMGCP, LOGL_NOTICE, "CRCX: endpoint:%x connection successfully created\n", @@ -815,8 +816,10 @@ p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_MDCX); - if (conn->conn->mode & MGCP_CONN_RECV_ONLY && - endp->tcfg->keepalive_interval != 0) + /* Send dummy packet, see also comments in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(endp->tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); + if (conn->conn->mode & MGCP_CONN_RECV_ONLY + && endp->tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) send_dummy(endp, conn); if (silent) @@ -1051,10 +1054,25 @@ struct mgcp_conn *conn; int i; - LOGP(DLMGCP, LOGL_DEBUG, "Triggered trunk %d keepalive timer.\n", + LOGP(DLMGCP, LOGL_DEBUG, "triggered trunk %d keepalive timer\n", tcfg->trunk_nr); - if (tcfg->keepalive_interval <= 0) + /* Do not accept invalid configuration values + * valid is MGCP_KEEPALIVE_NEVER, MGCP_KEEPALIVE_ONCE and + * values greater 0 */ + OSMO_ASSERT(tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); + + /* The dummy packet functionality has been disabled, we will exit + * immediately, no further timer is scheduled, which means we will no + * longer send dummy packets even when we did before */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_NEVER) + return; + + /* In cases where only one dummy packet is sent, we do not need + * the timer since the functions that handle the CRCX and MDCX are + * triggering the sending of the dummy packet. So we behave like in + * the MGCP_KEEPALIVE_NEVER case */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_ONCE) return; /* Send walk over all endpoints and send out dummy packets through @@ -1067,7 +1085,8 @@ } } - LOGP(DLMGCP, LOGL_DEBUG, "Rescheduling trunk %d keepalive timer.\n", + /* Schedule the keepalive timer for the next round */ + LOGP(DLMGCP, LOGL_DEBUG, "rescheduling trunk %d keepalive timer\n", tcfg->trunk_nr); osmo_timer_schedule(&tcfg->keepalive_timer, tcfg->keepalive_interval, 0); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index e8ad818..7107bcc 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -569,7 +569,7 @@ cfg_mgcp_no_rtp_keepalive_cmd, "no rtp keep-alive", NO_STR RTP_STR RTP_KEEPALIVE_STR) { - mgcp_trunk_set_keepalive(&g_cfg->trunk, 0); + mgcp_trunk_set_keepalive(&g_cfg->trunk, MGCP_KEEPALIVE_NEVER); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 13:52:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 13:52:25 +0000 Subject: [PATCH] libosmo-sccp[master]: Fix typo in .deb dependency Message-ID: Review at https://gerrit.osmocom.org/4647 Fix typo in .deb dependency Change-Id: Ie6b8770febebcd280e86725dffb5cb86046baeb5 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/47/4647/1 diff --git a/debian/control b/debian/control index 1184664..3d47abe 100644 --- a/debian/control +++ b/debian/control @@ -68,7 +68,7 @@ Section: doc Depends: ${misc:Depends}, libosmo-sigtran0 (= ${binary:Version}), - libjs-query + libjs-jquery Description: Documentation for the Osmocom SIGTRAN library libosmo-sigtran is a shared library containing SS7/SIGTRAN related functionality, including connection-less and connection-oriented SCCP as per ITU-T Q.71x, -- To view, visit https://gerrit.osmocom.org/4647 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6b8770febebcd280e86725dffb5cb86046baeb5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:11:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 14:11:27 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC: update CTRL docs Message-ID: Review at https://gerrit.osmocom.org/4648 OsmoBSC: update CTRL docs * use proper naming scheme for BTS-specific CTRL commands * add/update oml-* commands Change-Id: I5b2cd940b4d84c140fce871f236aeab091b27360 Related: OS#2486 --- M OsmoBSC/chapters/control.adoc 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/48/4648/1 diff --git a/OsmoBSC/chapters/control.adoc b/OsmoBSC/chapters/control.adoc index a1d6b43..327e5b4 100644 --- a/OsmoBSC/chapters/control.adoc +++ b/OsmoBSC/chapters/control.adoc @@ -4,10 +4,10 @@ The actual protocol is described in <>, the variables common to all programs using it are described in <>. Here we describe variables specific to OsmoBSC. The commands starting with prefix -"net.btsN." are specific to a certain BTS so N have to be replaced with BTS -number when issuing command e. g. "net.bts1.channel-load". Similarly the +"bts.N." are specific to a certain BTS so N have to be replaced with BTS +number when issuing command e. g. "bts.1.channel-load". Similarly the TRX-specific commands are additionally prefixed with TRX number e. g. -"net.bts1.trx2.arfcn". +"bts.1.trx.2.arfcn". .Variables available over control interface [options="header",width="100%",cols="20%,5%,5%,50%,20%"] @@ -28,16 +28,17 @@ |ussd-notify-v1|WO|No|",,"| See <> for details. |rf_locked|RW|No|"0","1"|See <> for details. |number-of-bts|RO|No|""|Get number of configured BTS. -|net.btsN.location-area-code|RW|No|""|Set/Get LAC (value between (0, 65535)). -|net.btsN.cell-identity|RW|No|""|Set/Get Cell Identity (value between (0, 65535)). -|net.btsN.apply-configuration|WO|No|Ignored|Restart BTS via OML. -|net.btsN.send-new-system-informations|WO|No|Ignored|Regenerate System Information messages for given BTS. -|net.btsN.channel-load|RO|No|",,"|See <> for details. -|net.btsN.oml-connection-state|RO|No|"connected", "disconnected"|Indicate the status of OML connection of BTS. -|net.btsN.gprs-mode|RW|No|""|See <> for details. -|net.btsN.rf_state|RO|No|",,"|See <> for details. -|net.btsN.trxM.arfcn|RW|No|""|Set/Get ARFCN (value between (0, 1023)). -|net.btsN.trxM.max-power-reduction|RW|No|""|See <> for details. +|bts.N.location-area-code|RW|No|""|Set/Get LAC (value between (0, 65535)). +|bts.N.cell-identity|RW|No|""|Set/Get Cell Identity (value between (0, 65535)). +|bts.N.apply-configuration|WO|No|Ignored|Restart BTS via OML. +|bts.N.send-new-system-informations|WO|No|Ignored|Regenerate System Information messages for given BTS. +|bts.N.channel-load|RO|No|",,"|See <> for details. +|bts.N.oml-connection-state|RO|No|"connected", "disconnected", "degraded"|Indicate the status of OML connection of BTS. +|bts.N.oml-uptime|RO|No||Return OML link uptime in seconds. +|bts.N.gprs-mode|RW|No|""|See <> for details. +|bts.N.rf_state|RO|No|",,"|See <> for details. +|bts.N.trx.M.arfcn|RW|No|""|Set/Get ARFCN (value between (0, 1023)). +|bts.N.trx.M.max-power-reduction|RW|No|""|See <> for details. |=== [[notif]] -- To view, visit https://gerrit.osmocom.org/4648 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b2cd940b4d84c140fce871f236aeab091b27360 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:17:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:17:44 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: update CTRL docs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4648 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b2cd940b4d84c140fce871f236aeab091b27360 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:18:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:18:07 +0000 Subject: osmo-gsm-manuals[master]: Fix build with default paths In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:18:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:18:14 +0000 Subject: libosmo-sccp[master]: Fix typo in .deb dependency In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4647 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6b8770febebcd280e86725dffb5cb86046baeb5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:18:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:18:15 +0000 Subject: [MERGED] libosmo-sccp[master]: Fix typo in .deb dependency In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix typo in .deb dependency ...................................................................... Fix typo in .deb dependency Change-Id: Ie6b8770febebcd280e86725dffb5cb86046baeb5 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 1184664..3d47abe 100644 --- a/debian/control +++ b/debian/control @@ -68,7 +68,7 @@ Section: doc Depends: ${misc:Depends}, libosmo-sigtran0 (= ${binary:Version}), - libjs-query + libjs-jquery Description: Documentation for the Osmocom SIGTRAN library libosmo-sigtran is a shared library containing SS7/SIGTRAN related functionality, including connection-less and connection-oriented SCCP as per ITU-T Q.71x, -- To view, visit https://gerrit.osmocom.org/4647 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6b8770febebcd280e86725dffb5cb86046baeb5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:40 +0000 Subject: osmo-mgw[master]: sdp: refactoring sdp parser/generator In-Reply-To: References: Message-ID: Patch Set 16: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f88c93872ff913bc211f560b26901267f577324 Gerrit-PatchSet: 16 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:58 +0000 Subject: [MERGED] osmo-mgw[master]: sdp: refactoring sdp parser/generator In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sdp: refactoring sdp parser/generator ...................................................................... sdp: refactoring sdp parser/generator move SDP generator function write_response_sdp() from mgcp_protocol.c to mgcp_sdp.c and use msgb_printf() instead of snprintf() move prototypes for mgcp_parse_sdp_data() and mgcp_set_audio_info() to mgcp_sdp.h change parameter list of mgcp_parse_sdp_data() so that it takes the rtp conn directly, rather than struct mgcp_rtp_end. add doxygen comments to all public functions Change-Id: I9f88c93872ff913bc211f560b26901267f577324 --- M include/osmocom/mgcp/Makefile.am M include/osmocom/mgcp/mgcp_internal.h A include/osmocom/mgcp/mgcp_sdp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c 5 files changed, 158 insertions(+), 100 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/Makefile.am b/include/osmocom/mgcp/Makefile.am index 646b887..cd8f599 100644 --- a/include/osmocom/mgcp/Makefile.am +++ b/include/osmocom/mgcp/Makefile.am @@ -4,4 +4,5 @@ mgcp_conn.h \ mgcp_stat.h \ mgcp_ep.h \ + mgcp_sdp.h \ $(NULL) diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 751aba5..d4c8dc9 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -317,9 +317,6 @@ #define DEFAULT_RTP_AUDIO_DEFAULT_CHANNELS 1 #define PTYPE_UNDEFINED (-1) -int mgcp_parse_sdp_data(struct mgcp_endpoint *endp, struct mgcp_rtp_end *rtp, struct mgcp_parse_data *p); -int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, - int payload_type, const char *audio_name); /*! get the ip-address where the mgw application is bound on. * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters diff --git a/include/osmocom/mgcp/mgcp_sdp.h b/include/osmocom/mgcp/mgcp_sdp.h new file mode 100644 index 0000000..da23cba --- /dev/null +++ b/include/osmocom/mgcp/mgcp_sdp.h @@ -0,0 +1,35 @@ +/* + * SDP generation and parsing + * + * (C) 2009-2015 by Holger Hans Peter Freyther + * (C) 2009-2014 by On-Waves + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once +#include + +int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, + struct mgcp_conn_rtp *conn, + struct mgcp_parse_data *p); + +int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, + int payload_type, const char *audio_name); + +int mgcp_write_response_sdp(const struct mgcp_endpoint *endp, + const struct mgcp_conn_rtp *conn, struct msgb *sdp, + const char *addr); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index c00cdc6..6c611f7 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -39,6 +39,7 @@ #include #include #include +#include struct mgcp_request { char *name; @@ -191,80 +192,6 @@ return create_resp(endp, code, " FAIL", msg, trans, NULL, NULL); } -static int write_response_sdp(struct mgcp_endpoint *endp, - struct mgcp_conn_rtp *conn, - char *sdp_record, size_t size, const char *addr) -{ - const char *fmtp_extra; - const char *audio_name; - int payload_type; - int len; - int nchars; - - if (!conn) - return -1; - - endp->cfg->get_net_downlink_format_cb(endp, &payload_type, - &audio_name, &fmtp_extra, conn); - - len = snprintf(sdp_record, size, - "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" - "s=-\r\n" - "c=IN IP4 %s\r\n" - "t=0 0\r\n", conn->conn->id, addr, addr); - - if (len < 0 || len >= size) - goto buffer_too_small; - - if (payload_type >= 0) { - nchars = snprintf(sdp_record + len, size - len, - "m=audio %d RTP/AVP %d\r\n", - conn->end.local_port, payload_type); - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - - if (audio_name && endp->tcfg->audio_send_name) { - nchars = snprintf(sdp_record + len, size - len, - "a=rtpmap:%d %s\r\n", - payload_type, audio_name); - - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - - if (fmtp_extra) { - nchars = snprintf(sdp_record + len, size - len, - "%s\r\n", fmtp_extra); - - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - } - if (conn->end.packet_duration_ms > 0 && endp->tcfg->audio_send_ptime) { - nchars = snprintf(sdp_record + len, size - len, - "a=ptime:%u\r\n", - conn->end.packet_duration_ms); - if (nchars < 0 || nchars >= size - len) - goto buffer_too_small; - - len += nchars; - } - - return len; - -buffer_too_small: - LOGP(DLMGCP, LOGL_ERROR, "SDP buffer too small: %zu (needed %d)\n", - size, len); - return -1; -} - /* Format MGCP response string (with SDP attached) */ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, @@ -272,10 +199,14 @@ const char *trans_id) { const char *addr = endp->cfg->local_ip; - char sdp_record[4096]; - int len; - int nchars; + struct msgb *sdp; + int rc; + struct msgb *result; char osmux_extension[strlen("\nX-Osmux: 255") + 1]; + + sdp = msgb_alloc_headroom(4096, 128, "sdp record"); + if (!sdp) + return NULL; if (!addr) addr = mgcp_net_src_addr(endp); @@ -287,21 +218,19 @@ osmux_extension[0] = '\0'; } - len = snprintf(sdp_record, sizeof(sdp_record), - "I: %u%s\n\n", conn->conn->id, osmux_extension); - if (len < 0) - return NULL; + rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + if (rc < 0) + goto error; - nchars = write_response_sdp(endp, conn, sdp_record + len, - sizeof(sdp_record) - len - 1, addr); - if (nchars < 0) - return NULL; - - len += nchars; - - sdp_record[sizeof(sdp_record) - 1] = '\0'; - - return create_resp(endp, 200, " OK", msg, trans_id, NULL, sdp_record); + rc = mgcp_write_response_sdp(endp, conn, sdp, addr); + if (rc < 0) + goto error; + result = create_resp(endp, 200, " OK", msg, trans_id, NULL, (char*) sdp->data); + msgb_free(sdp); + return result; +error: + msgb_free(sdp); + return NULL; } /* Send out dummy packet to keep the connection open, if the connection is an @@ -689,7 +618,7 @@ /* set up RTP media parameters */ if (have_sdp) - mgcp_parse_sdp_data(endp, &conn->end, p); + mgcp_parse_sdp_data(endp, conn, p); else if (endp->local_options.codec) mgcp_set_audio_info(p->cfg, &conn->end.codec, PTYPE_UNDEFINED, endp->local_options.codec); @@ -836,7 +765,7 @@ conn->conn->mode = conn->conn->mode_orig; if (have_sdp) - mgcp_parse_sdp_data(endp, &conn->end, p); + mgcp_parse_sdp_data(endp, conn, p); set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 7568351..e6bf9c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -38,6 +39,12 @@ int channels; }; +/*! Set codec configuration depending on payload type and codec name. + * \param[in] ctx talloc context. + * \param[out] codec configuration (caller provided memory). + * \param[in] payload_type codec type id (e.g. 3 for GSM, -1 when undefined). + * \param[in] audio_name audio codec name (e.g. "GSM/8000/1"). + * \returns 0 on success, -1 on failure. */ int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, int payload_type, const char *audio_name) { @@ -107,7 +114,7 @@ return 0; } -void codecs_initialize(void *ctx, struct sdp_rtp_map *codecs, int used) +static void codecs_initialize(void *ctx, struct sdp_rtp_map *codecs, int used) { int i; @@ -137,7 +144,8 @@ } } -void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, int payload, char *audio_name) +static void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, + int payload, const char *audio_name) { int i; @@ -163,7 +171,9 @@ LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload, audio_name); } -int is_codec_compatible(struct mgcp_endpoint *endp, struct sdp_rtp_map *codec) +/* Check if the codec matches what is set up in the trunk config */ +static int is_codec_compatible(const struct mgcp_endpoint *endp, + const struct sdp_rtp_map *codec) { char *bts_codec; char audio_codec[64]; @@ -182,7 +192,17 @@ return strcasecmp(audio_codec, codec->codec_name) == 0; } -int mgcp_parse_sdp_data(struct mgcp_endpoint *endp, struct mgcp_rtp_end *rtp, struct mgcp_parse_data *p) +/*! Analyze SDP input string. + * \param[in] endp trunk endpoint. + * \param[out] conn associated rtp connection. + * \param[out] caller provided memory to store the parsing results. + * \returns 0 on success, -1 on failure. + * + * Note: In conn (conn->end) the function returns the packet duration, + * the rtp port and the rtcp port */ +int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, + struct mgcp_conn_rtp *conn, + struct mgcp_parse_data *p) { struct sdp_rtp_map codecs[10]; int codecs_used = 0; @@ -191,7 +211,13 @@ int i; int codecs_assigned = 0; void *tmp_ctx = talloc_new(NULL); + struct mgcp_rtp_end *rtp; + OSMO_ASSERT(endp); + OSMO_ASSERT(conn); + OSMO_ASSERT(p); + + rtp = &conn->end; memset(&codecs, 0, sizeof(codecs)); for_each_line(line, p->save) { @@ -304,3 +330,73 @@ return codecs_assigned > 0; } +/*! Generate SDP response string. + * \param[in] endp trunk endpoint. + * \param[in] conn associated rtp connection. + * \param[out] sdp msg buffer to append resulting SDP string data. + * \param[in] addr IPV4 address string (e.g. 192.168.100.1). + * \returns 0 on success, -1 on failure. */ +int mgcp_write_response_sdp(const struct mgcp_endpoint *endp, + const struct mgcp_conn_rtp *conn, struct msgb *sdp, + const char *addr) +{ + const char *fmtp_extra; + const char *audio_name; + int payload_type; + int rc; + + OSMO_ASSERT(endp); + OSMO_ASSERT(conn); + OSMO_ASSERT(sdp); + OSMO_ASSERT(addr); + + /* FIXME: constify endp and conn args in get_net_donwlink_format_cb() */ + endp->cfg->get_net_downlink_format_cb((struct mgcp_endpoint *)endp, + &payload_type, &audio_name, + &fmtp_extra, + (struct mgcp_conn_rtp *)conn); + + rc = msgb_printf(sdp, + "v=0\r\n" + "o=- %u 23 IN IP4 %s\r\n" + "s=-\r\n" + "c=IN IP4 %s\r\n" + "t=0 0\r\n", conn->conn->id, addr, addr); + + if (rc < 0) + goto buffer_too_small; + + if (payload_type >= 0) { + rc = msgb_printf(sdp, "m=audio %d RTP/AVP %d\r\n", + conn->end.local_port, payload_type); + if (rc < 0) + goto buffer_too_small; + + if (audio_name && endp->tcfg->audio_send_name) { + rc = msgb_printf(sdp, "a=rtpmap:%d %s\r\n", + payload_type, audio_name); + + if (rc < 0) + goto buffer_too_small; + } + + if (fmtp_extra) { + rc = msgb_printf(sdp, "%s\r\n", fmtp_extra); + + if (rc < 0) + goto buffer_too_small; + } + } + if (conn->end.packet_duration_ms > 0 && endp->tcfg->audio_send_ptime) { + rc = msgb_printf(sdp, "a=ptime:%u\r\n", + conn->end.packet_duration_ms); + if (rc < 0) + goto buffer_too_small; + } + + return 0; + +buffer_too_small: + LOGP(DLMGCP, LOGL_ERROR, "SDP messagebuffer too small\n"); + return -1; +} -- To view, visit https://gerrit.osmocom.org/4006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f88c93872ff913bc211f560b26901267f577324 Gerrit-PatchSet: 16 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:59 +0000 Subject: [MERGED] osmo-mgw[master]: client: add unified function to generate MGCP messages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: client: add unified function to generate MGCP messages ...................................................................... client: add unified function to generate MGCP messages currently the only way to generate MGCP messages is to use mgcp_msg_crcx(), mgcp_msg_mdcx() and mgcp_msg_dlcx(). All three function take a fixed set of parameters via their parameter list. There is no way to add or leave away optional parameters. add function mgcp_msg_gen(), this function takes a unified message struct. The struct features a presence bitmask which allows to enable and disable parameters as needed. It is also possible to add new parameters in the future without breaking the API. Depends: libosmocore I15e1af68616309555d0ed9ac5da027c9833d42e3 Change-Id: I29c5e2fb972896faeb771ba040f015592487fcbe --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.err M tests/mgcp_client/mgcp_client_test.ok 5 files changed, 249 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index efc1f76..21717e3 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -37,6 +38,36 @@ uint16_t audio_port; }; +enum mgcp_verb { + MGCP_VERB_CRCX, + MGCP_VERB_MDCX, + MGCP_VERB_DLCX, + MGCP_VERB_AUEP, + MGCP_VERB_RSIP, +}; + +#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001 +#define MGCP_MSG_PRESENCE_CALL_ID 0x0002 +#define MGCP_MSG_PRESENCE_CONN_ID 0x0004 +#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008 +#define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010 +#define MGCP_MSG_PRESENCE_CONN_MODE 0x0020 + +/* See also RFC3435 section 3.2.1.3 */ +#define MGCP_ENDPOINT_MAXLEN (255*2+1+1) + +struct mgcp_msg { + enum mgcp_verb verb; + /* See MGCP_MSG_PRESENCE_* constants */ + uint32_t presence; + char endpoint[MGCP_ENDPOINT_MAXLEN]; + unsigned int call_id; + uint32_t conn_id; + uint16_t audio_port; + char *audio_ip; + enum mgcp_connection_mode conn_mode; +}; + void mgcp_client_conf_init(struct mgcp_client_conf *conf); void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf *conf); int mgcp_client_config_write(struct vty *vty, const char *indent); @@ -65,14 +96,19 @@ struct msgb *mgcp_msg_crcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, unsigned int call_id, - enum mgcp_connection_mode mode); + enum mgcp_connection_mode mode) +OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); struct msgb *mgcp_msg_mdcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, const char *rtp_conn_addr, - uint16_t rtp_port, enum mgcp_connection_mode mode); + uint16_t rtp_port, enum mgcp_connection_mode mode) +OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, - unsigned int call_id); + unsigned int call_id) +OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); + +struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); extern const struct value_string mgcp_client_connection_mode_strs[]; static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode) diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 1cd37be..c7cc989 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -614,6 +615,109 @@ "C: %x\r\n", trans_id, rtp_endpoint, call_id); } +#define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ + MGCP_MSG_PRESENCE_CALL_ID | \ + MGCP_MSG_PRESENCE_CONN_ID | \ + MGCP_MSG_PRESENCE_CONN_MODE) +#define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ + MGCP_MSG_PRESENCE_CONN_ID) +#define MGCP_DLCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT) +#define MGCP_AUEP_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT) +#define MGCP_RSIP_MANDATORY 0 /* none */ + +struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg) +{ + mgcp_trans_id_t trans_id = mgcp_client_next_trans_id(mgcp); + uint32_t mandatory_mask; + struct msgb *msg = msgb_alloc_headroom(4096, 128, "MGCP tx"); + int rc = 0; + + msg->l2h = msg->data; + msg->cb[MSGB_CB_MGCP_TRANS_ID] = trans_id; + + /* Add command verb */ + switch (mgcp_msg->verb) { + case MGCP_VERB_CRCX: + mandatory_mask = MGCP_CRCX_MANDATORY; + rc += msgb_printf(msg, "CRCX %u", trans_id); + break; + case MGCP_VERB_MDCX: + mandatory_mask = MGCP_MDCX_MANDATORY; + rc += msgb_printf(msg, "MDCX %u", trans_id); + break; + case MGCP_VERB_DLCX: + mandatory_mask = MGCP_DLCX_MANDATORY; + rc += msgb_printf(msg, "DLCX %u", trans_id); + break; + case MGCP_VERB_AUEP: + mandatory_mask = MGCP_AUEP_MANDATORY; + rc += msgb_printf(msg, "AUEP %u", trans_id); + break; + case MGCP_VERB_RSIP: + mandatory_mask = MGCP_RSIP_MANDATORY; + rc += msgb_printf(msg, "RSIP %u", trans_id); + break; + default: + LOGP(DLMGCP, LOGL_ERROR, + "Invalid command verb, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } + + /* Check if mandatory fields are missing */ + if (!((mgcp_msg->presence & mandatory_mask) == mandatory_mask)) { + LOGP(DLMGCP, LOGL_ERROR, + "One or more missing mandatory fields, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } + + /* Add endpoint name */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_ENDPOINT) + rc += msgb_printf(msg, " %s", mgcp_msg->endpoint); + + /* Add protocol version */ + rc += msgb_printf(msg, " MGCP 1.0\r\n"); + + /* Add call id */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CALL_ID) + rc += msgb_printf(msg, "C: %x\r\n", mgcp_msg->call_id); + + /* Add connection id */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) + rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + + /* Add local connection options */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID + && mgcp_msg->verb == MGCP_VERB_CRCX) + rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); + + /* Add mode */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_MODE) + rc += + msgb_printf(msg, "M: %s\r\n", + mgcp_client_cmode_name(mgcp_msg->conn_mode)); + + /* Add RTP address and port (SDP) */ + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_IP + && mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) { + rc += msgb_printf(msg, "\r\n"); + rc += msgb_printf(msg, "c=IN IP4 %s\r\n", mgcp_msg->audio_ip); + rc += + msgb_printf(msg, "m=audio %u RTP/AVP 255\r\n", + mgcp_msg->audio_port); + } + + if (rc != 0) { + LOGP(DLMGCP, LOGL_ERROR, + "message buffer to small, can not generate MGCP message\n"); + msgb_free(msg); + msg = NULL; + } + + return msg; +} + struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp) { return &mgcp->actual; diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 69e1810..7977a6a 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -149,6 +149,80 @@ "a=ptime:20\r\n"); } +void test_mgcp_msg(void) +{ + struct msgb *msg; + char audio_ip_overflow[5000]; + + /* A message struct prefilled with some arbitary values */ + struct mgcp_msg mgcp_msg = { + .audio_ip = "192.168.100.23", + .endpoint = "23 at mgw", + .audio_port = 1234, + .call_id = 47, + .conn_id = 11, + .conn_mode = MGCP_CONN_RECV_SEND + }; + + if (mgcp) + talloc_free(mgcp); + mgcp = mgcp_client_init(ctx, &conf); + + printf("\n"); + + printf("Generated CRCX message:\n"); + mgcp_msg.verb = MGCP_VERB_CRCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Generated MDCX message:\n"); + mgcp_msg.verb = MGCP_VERB_MDCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Generated DLCX message:\n"); + mgcp_msg.verb = MGCP_VERB_DLCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Generated AUEP message:\n"); + mgcp_msg.verb = MGCP_VERB_AUEP; + mgcp_msg.presence = (MGCP_MSG_PRESENCE_ENDPOINT); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", msg->data); + + printf("Generated RSIP message:\n"); + mgcp_msg.verb = MGCP_VERB_RSIP; + mgcp_msg.presence = (MGCP_MSG_PRESENCE_ENDPOINT); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Overfolow test:\n"); + mgcp_msg.verb = MGCP_VERB_MDCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT); + memset(audio_ip_overflow, 'X', sizeof(audio_ip_overflow)); + audio_ip_overflow[sizeof(audio_ip_overflow) - 1] = '\0'; + mgcp_msg.audio_ip = audio_ip_overflow; + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg == NULL); + + printf("\n"); + msgb_free(msg); +} + static const struct log_info_cat log_categories[] = { }; @@ -171,6 +245,7 @@ mgcp_client_conf_init(&conf); test_crcx(); + test_mgcp_msg(); printf("Done\n"); fprintf(stderr, "Done\n"); diff --git a/tests/mgcp_client/mgcp_client_test.err b/tests/mgcp_client/mgcp_client_test.err index a965a70..24151ee 100644 --- a/tests/mgcp_client/mgcp_client_test.err +++ b/tests/mgcp_client/mgcp_client_test.err @@ -1 +1,2 @@ +DLMGCP message buffer to small, can not generate MGCP message Done diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index d35f2d6..e3b6113 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -28,4 +28,34 @@ head.trans_id = 1 head.comment = OK audio_port = 16002 + +Generated CRCX message: +CRCX 1 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:AMR, nt:IN +M: sendrecv + +Generated MDCX message: +MDCX 2 23 at mgw MGCP 1.0 +C: 2f +I: 11 +M: sendrecv + +c=IN IP4 192.168.100.23 +m=audio 1234 RTP/AVP 255 + +Generated DLCX message: +DLCX 3 23 at mgw MGCP 1.0 +C: 2f +I: 11 + +Generated AUEP message: +AUEP 4 23 at mgw MGCP 1.0 + +Generated RSIP message: +RSIP 5 23 at mgw MGCP 1.0 + +Overfolow test: + Done -- To view, visit https://gerrit.osmocom.org/4146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29c5e2fb972896faeb771ba040f015592487fcbe Gerrit-PatchSet: 15 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:59 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp: remove port/timeslot calculator functions from mgcp.h In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: remove port/timeslot calculator functions from mgcp.h ...................................................................... mgcp: remove port/timeslot calculator functions from mgcp.h the functions rtp_calculate_port(), mgcp_timeslot_to_endpoint(), mgcp_endpoint_to_timeslot() were a hack to map CIC addresses to endpoints and ports. This is no longer needed. Remove the affected functions. Change-Id: I9ef14396dc9f97e570d9bcfb4d9b4a94e650ad46 --- M include/osmocom/mgcp/mgcp.h 1 file changed, 0 insertions(+), 41 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 7307f3c..83505a2 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -37,31 +37,6 @@ #define RTP_PORT_DEFAULT_RANGE_START 16002 #define RTP_PORT_DEFAULT_RANGE_END RTP_PORT_DEFAULT_RANGE_START + 64 -/** - * Calculate the RTP audio port for the given multiplex - * and the direction. This allows a semi static endpoint - * to port calculation removing the need for the BSC - * and the MediaGateway to communicate. - * - * Port usage explained: - * base + (multiplex * 2) + 0 == local port to wait for network packets - * base + (multiplex * 2) + 1 == local port for rtcp - * - * The above port will receive packets from the BTS that need - * to be patched and forwarded to the network. - * The above port will receive packets from the network that - * need to be patched and forwarded to the BTS. - * - * We assume to have a static BTS IP address so we can differentiate - * network and BTS. - * - */ -static inline int rtp_calculate_port(int multiplex, int base) -{ - return base + (multiplex * 2); -} - - /* * Handling of MGCP Endpoints and the MGCP Config */ @@ -236,22 +211,6 @@ */ struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg); -/* adc helper */ -static inline int mgcp_timeslot_to_endpoint(int multiplex, int timeslot) -{ - if (timeslot == 0) { - LOGP(DLMGCP, LOGL_ERROR, "Timeslot should not be 0\n"); - timeslot = 255; - } - - return timeslot + (32 * multiplex); -} - -static inline void mgcp_endpoint_to_timeslot(int endpoint, int *multiplex, int *timeslot) -{ - *multiplex = endpoint / 32; - *timeslot = endpoint % 32; -} int mgcp_send_reset_ep(struct mgcp_endpoint *endp, int endpoint); int mgcp_send_reset_all(struct mgcp_config *cfg); -- To view, visit https://gerrit.osmocom.org/4391 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ef14396dc9f97e570d9bcfb4d9b4a94e650ad46 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:59 +0000 Subject: [MERGED] osmo-mgw[master]: network: add separate log category In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: network: add separate log category ...................................................................... network: add separate log category the network (mgcp_network.c) part and the protocol part (mgcp_protoocl.c) share a single loglevel DLMGCP. This makes debuging hard because when debugging the protocol we also get the log output from the RTP packets. assign the network part a private loglevel and keep DLMGCP for the directly MGCP related code Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 --- M include/osmocom/mgcp/Makefile.am A include/osmocom/mgcp/debug.h M src/libosmo-mgcp/mgcp_network.c M src/osmo-mgw/mgw_main.c 4 files changed, 108 insertions(+), 64 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/Makefile.am b/include/osmocom/mgcp/Makefile.am index cd8f599..d706807 100644 --- a/include/osmocom/mgcp/Makefile.am +++ b/include/osmocom/mgcp/Makefile.am @@ -5,4 +5,5 @@ mgcp_stat.h \ mgcp_ep.h \ mgcp_sdp.h \ + debug.h \ $(NULL) diff --git a/include/osmocom/mgcp/debug.h b/include/osmocom/mgcp/debug.h new file mode 100644 index 0000000..ddeb0dc --- /dev/null +++ b/include/osmocom/mgcp/debug.h @@ -0,0 +1,35 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +#define DEBUG +#include + +/* Debug Areas of the code */ +enum { + DRTP, + Debug_LastEntry, +}; + +extern const struct log_info log_info; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index dac1698..3d52d07 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -40,6 +40,7 @@ #include #include #include +#include #define RTP_SEQ_MOD (1 << 16) #define RTP_MAX_DROPOUT 3000 @@ -64,7 +65,7 @@ memset(&tp, 0, sizeof(tp)); if (clock_gettime(CLOCK_MONOTONIC, &tp) != 0) - LOGP(DLMGCP, LOGL_NOTICE, "Getting the clock failed.\n"); + LOGP(DRTP, LOGL_NOTICE, "Getting the clock failed.\n"); /* convert it to 1/unit seconds */ ret = tp.tv_sec; @@ -85,7 +86,7 @@ { struct sockaddr_in out; - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "sending %i bytes length packet to %s:%u ...\n", len, inet_ntoa(*addr), ntohs(port)); @@ -109,9 +110,9 @@ OSMO_ASSERT(endp); OSMO_ASSERT(conn); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr, @@ -131,7 +132,7 @@ return rc; failed: - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x Failed to send dummy %s packet.\n", ENDPOINT_NUMBER(endp), was_rtcp ? "RTCP" : "RTP"); @@ -172,7 +173,7 @@ if (seq == sstate->last_seq) { if (timestamp != sstate->last_timestamp) { sstate->err_ts_counter += 1; - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "The %s timestamp delta is != 0 but the sequence " "number %d is the same, " "TS offset: %d, SeqNo offset: %d " @@ -192,7 +193,7 @@ if (tsdelta == 0) { /* Don't update *tsdelta_out */ - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "The %s timestamp delta is %d " "on 0x%x SSRC: %u timestamp: %u " "from %s:%d\n", @@ -205,7 +206,7 @@ if (sstate->last_tsdelta != tsdelta) { if (sstate->last_tsdelta) { - LOGP(DLMGCP, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "The %s timestamp delta changes from %d to %d " "on 0x%x SSRC: %u timestamp: %u from %s:%d\n", text, sstate->last_tsdelta, tsdelta, @@ -222,7 +223,7 @@ if (timestamp_error) { sstate->err_ts_counter += 1; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "The %s timestamp has an alignment error of %d " "on 0x%x SSRC: %u " "SeqNo delta: %d, TS delta: %d, dTS/dSeq: %d " @@ -252,7 +253,7 @@ if (tsdelta == 0) { tsdelta = state->out_stream.last_tsdelta; if (tsdelta != 0) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "A fixed packet duration is not available on 0x%x, " "using last output timestamp delta instead: %d " "from %s:%d\n", @@ -260,7 +261,7 @@ inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } else { tsdelta = rtp_end->codec.rate * 20 / 1000; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Fixed packet duration and last timestamp delta " "are not available on 0x%x, " "using fixed 20ms instead: %d " @@ -276,7 +277,7 @@ if (state->timestamp_offset != timestamp_offset) { state->timestamp_offset = timestamp_offset; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Timestamp offset change on 0x%x SSRC: %u " "SeqNo delta: %d, TS offset: %d, " "from %s:%d\n", @@ -308,7 +309,7 @@ if (ts_error) { state->timestamp_offset += ptime - ts_error; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "Corrected timestamp alignment error of %d on 0x%x SSRC: %u " "new TS offset: %d, " "from %s:%d\n", @@ -341,7 +342,7 @@ struct mgcp_rtp_end *dst_end, char *data, int *len, int buf_size) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -355,7 +356,7 @@ struct mgcp_rtp_end *dst_end, struct mgcp_rtp_end *src_end) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -366,7 +367,7 @@ const char **fmtp_extra, struct mgcp_conn_rtp *conn) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s using format defaults\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); @@ -405,7 +406,7 @@ if (seq < state->stats_max_seq) state->stats_cycles += RTP_SEQ_MOD; } else if (udelta <= RTP_SEQ_MOD - RTP_MAX_MISORDER) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "RTP seqno made a very large jump on 0x%x delta: %u\n", ENDPOINT_NUMBER(endp), udelta); } @@ -463,7 +464,7 @@ state->out_stream = state->in_stream; state->out_stream.last_timestamp = timestamp; state->out_stream.ssrc = ssrc - 1; /* force output SSRC change */ - LOGP(DLMGCP, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "endpoint:%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, @@ -472,14 +473,14 @@ if (state->packet_duration == 0) { state->packet_duration = rtp_end->codec.rate * 20 / 1000; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x fixed packet duration is not available, " "using fixed 20ms instead: %d from %s:%d\n", ENDPOINT_NUMBER(endp), state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } } else if (state->in_stream.ssrc != ssrc) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x SSRC changed: %u -> %u " "from %s:%d\n", ENDPOINT_NUMBER(endp), @@ -508,7 +509,7 @@ if (rtp_end->force_constant_ssrc != -1) rtp_end->force_constant_ssrc -= 1; - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x SSRC patching enabled, SSRC: %u " "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", @@ -566,7 +567,7 @@ return; #if 0 - DEBUGP(DLMGCP, + DEBUGP(DRTP, "endpoint:%x payload hdr payload %u -> endp payload %u\n", ENDPOINT_NUMBER(endp), rtp_hdr->payload_type, payload); rtp_hdr->payload_type = payload; @@ -611,22 +612,22 @@ OSMO_ASSERT(conn_dst); if (is_rtp) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x delivering RTP packet...\n", ENDPOINT_NUMBER(endp)); } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x delivering RTCP packet...\n", ENDPOINT_NUMBER(endp)); } - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x loop:%d, mode:%d ", ENDPOINT_NUMBER(endp), tcfg->audio_loop, conn_src->conn->mode); if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) - LOGPC(DLMGCP, LOGL_DEBUG, "(loopback)\n"); + LOGPC(DRTP, LOGL_DEBUG, "(loopback)\n"); else - LOGPC(DLMGCP, LOGL_DEBUG, "\n"); + LOGPC(DRTP, LOGL_DEBUG, "\n"); /* Note: In case of loopback configuration, both, the source and the * destination will point to the same connection. */ @@ -636,7 +637,7 @@ if (!rtp_end->output_enabled) { rtp_end->dropped_packets += 1; - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), @@ -659,7 +660,7 @@ if (addr) mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, buflen); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x process/send to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -698,7 +699,7 @@ } while (buflen > 0); return nbytes; } else if (!tcfg->omit_rtcp) { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x send to %s %s rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -740,19 +741,19 @@ rc = recvfrom(fd, buf, bufsize, 0, (struct sockaddr *)addr, &slen); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "receiving %u bytes length packet from %s:%u ...\n", rc, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); if (rc < 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to receive packet, errno: %d/%s\n", ENDPOINT_NUMBER(endp), errno, strerror(errno)); return -1; } if (tossed) { - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); } @@ -771,12 +772,12 @@ * which we send our outgoing RTP traffic. */ if (memcmp(&addr->sin_addr, &conn->end.addr, sizeof(addr->sin_addr)) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x data from wrong address: %s, ", ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); - LOGPC(DLMGCP, LOGL_ERROR, "expected: %s\n", + LOGPC(DRTP, LOGL_ERROR, "expected: %s\n", inet_ntoa(conn->end.addr)); - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -787,13 +788,13 @@ * plausibility. */ if (conn->end.rtp_port != addr->sin_port && conn->end.rtcp_port != addr->sin_port) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x data from wrong source port: %d, ", ENDPOINT_NUMBER(endp), ntohs(addr->sin_port)); - LOGPC(DLMGCP, LOGL_ERROR, + LOGPC(DRTP, LOGL_ERROR, "expected: %d for RTP or %d for RTCP\n", ntohs(conn->end.rtp_port), ntohs(conn->end.rtcp_port)); - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -809,14 +810,14 @@ endp = conn->conn->endp; if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x destination IP-address is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } if (conn->end.rtp_port == 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x destination rtp port is invalid\n", ENDPOINT_NUMBER(endp)); return -1; @@ -839,7 +840,7 @@ endp = conn->conn->endp; tcfg = endp->tcfg; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", ENDPOINT_NUMBER(endp)); rc = receive_from(endp, fd->fd, addr, buf, buf_size); @@ -847,11 +848,11 @@ return -1; *proto = fd == &conn->end.rtp ? MGCP_PROTO_RTP : MGCP_PROTO_RTCP; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); - LOGPC(DLMGCP, LOGL_DEBUG, "receiveing from %s %s %d\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); + LOGPC(DRTP, LOGL_DEBUG, "receiveing from %s %s %d\n", conn->conn->name, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); /* Check if the origin of the RTP packet seems plausible */ @@ -862,10 +863,10 @@ /* Filter out dummy message */ if (rc == 1 && buf[0] == MGCP_DUMMY_LOAD) { - LOGP(DLMGCP, LOGL_NOTICE, + LOGP(DRTP, LOGL_NOTICE, "endpoint:%x dummy message received\n", ENDPOINT_NUMBER(endp)); - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -890,7 +891,7 @@ struct mgcp_endpoint *endp; endp = conn_src->conn->endp; - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_dst->conn)); /* Before we try to deliver the packet, we check if the destination @@ -903,7 +904,7 @@ * destination connection. */ switch (conn_dst->type) { case MGCP_RTP_DEFAULT: - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x endpoint type is MGCP_RTP_DEFAULT, " "using mgcp_send() to forward data directly\n", ENDPOINT_NUMBER(endp)); @@ -911,7 +912,7 @@ addr, buf, buf_size, conn_src, conn_dst); case MGCP_OSMUX_BSC_NAT: case MGCP_OSMUX_BSC: - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x endpoint type is MGCP_OSMUX_BSC_NAT, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n", ENDPOINT_NUMBER(endp)); @@ -921,7 +922,7 @@ /* If the data has not been handled/forwarded until here, it will * be discarded, this should not happen, normally the MGCP type * should be properly set */ - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x bad MGCP type -- data discarded!\n", ENDPOINT_NUMBER(endp)); @@ -966,7 +967,7 @@ /* There is no destination conn, stop here */ if (!conn_dst) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x unable to find destination conn\n", ENDPOINT_NUMBER(endp)); return -1; @@ -974,7 +975,7 @@ /* The destination conn is not an RTP connection */ if (conn_dst->type != MGCP_CONN_TYPE_RTP) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x unable to find suitable destination conn\n", ENDPOINT_NUMBER(endp)); return -1; @@ -1009,7 +1010,7 @@ endp = conn_src->conn->endp; OSMO_ASSERT(endp); - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ @@ -1056,16 +1057,16 @@ fd->fd = socket(AF_INET, SOCK_DGRAM, 0); if (fd->fd < 0) { - LOGP(DLMGCP, LOGL_ERROR, "failed to create UDP port (%s:%i).\n", + LOGP(DRTP, LOGL_ERROR, "failed to create UDP port (%s:%i).\n", source_addr, port); return -1; } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "created UDP port (%s:%i).\n", source_addr, port); } if (setsockopt(fd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "failed to set socket options (%s:%i).\n", source_addr, port); return -1; @@ -1079,11 +1080,11 @@ if (bind(fd->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { close(fd->fd); fd->fd = -1; - LOGP(DLMGCP, LOGL_ERROR, "failed to bind UDP port (%s:%i).\n", + LOGP(DRTP, LOGL_ERROR, "failed to bind UDP port (%s:%i).\n", source_addr, port); return -1; } else { - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DRTP, LOGL_DEBUG, "bound UDP port (%s:%i).\n", source_addr, port); } @@ -1099,7 +1100,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtp, rtp_end->local_port) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to create RTP port: %s:%d\n", endpno, source_addr, rtp_end->local_port); goto cleanup0; @@ -1107,7 +1108,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtcp, rtp_end->local_port + 1) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to create RTCP port: %s:%d\n", endpno, source_addr, rtp_end->local_port + 1); goto cleanup1; @@ -1119,7 +1120,7 @@ rtp_end->rtp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to register RTP port %d\n", endpno, rtp_end->local_port); goto cleanup2; @@ -1127,7 +1128,7 @@ rtp_end->rtcp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x failed to register RTCP port %d\n", endpno, rtp_end->local_port + 1); goto cleanup3; @@ -1162,7 +1163,7 @@ end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "endpoint:%x %u was already bound on conn:%s\n", ENDPOINT_NUMBER(endp), rtp_port, mgcp_conn_dump(conn->conn)); diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index aef99ae..ab54e62 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -233,6 +234,12 @@ static const struct log_info_cat log_categories[] = { /* DLMGCP is provided by the MGCP library */ + [DRTP] = { + .name = "DRTP", + .description = "RTP stream handling", + .color = "\033[1;30m", + .enabled = 1,.loglevel = LOGL_NOTICE, + }, }; const struct log_info log_info = { -- To view, visit https://gerrit.osmocom.org/4443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55a2711798d1d1c2c9ef2f3b7ebb8fdd78bd6ea2 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:59 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: rename bts_codec to codec_str In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: rename bts_codec to codec_str ...................................................................... cosmetic: rename bts_codec to codec_str make variable name more meaningful e enter the commit message for your changes. Lines starting Change-Id: I4d4d5af8925d032155ca1ef8c7d7d2e496a60fb6 --- M src/libosmo-mgcp/mgcp_sdp.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index e6bf9c2..423153c 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -175,7 +175,7 @@ static int is_codec_compatible(const struct mgcp_endpoint *endp, const struct sdp_rtp_map *codec) { - char *bts_codec; + char *codec_str; char audio_codec[64]; if (!codec->codec_name) @@ -185,8 +185,8 @@ * GSM, GSM/8000 and GSM/8000/1 should all be compatible.. let's go * by name first. */ - bts_codec = endp->tcfg->audio_name; - if (sscanf(bts_codec, "%63[^/]/%*d/%*d", audio_codec) < 1) + codec_str = endp->tcfg->audio_name; + if (sscanf(codec_str, "%63[^/]/%*d/%*d", audio_codec) < 1) return 0; return strcasecmp(audio_codec, codec->codec_name) == 0; -- To view, visit https://gerrit.osmocom.org/4326 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d4d5af8925d032155ca1ef8c7d7d2e496a60fb6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:19:59 +0000 Subject: [MERGED] osmo-mgw[master]: protocol: allow wildcarded DLCX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: protocol: allow wildcarded DLCX ...................................................................... protocol: allow wildcarded DLCX In many cases it is simpler to instruct the mgcp-gw to drop all connections at once instead of removing each connection individually. drop all connections and release the endpoint in when no connection id is supplied with the DLCX command. Change-Id: Ib5fcc72775bf72b489ff79ade36fb345d8d20736 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 19 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 6c611f7..9c92c65 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -910,14 +910,31 @@ } } - /* find the connection */ + /* When no connection id is supplied, we will interpret this as a + * wildcarded DLCX and drop all connections at once. (See also + * RFC3435 Section F.7) */ + if (!ci) { + LOGP(DLMGCP, LOGL_NOTICE, + "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", + ENDPOINT_NUMBER(endp)); + + mgcp_release_endp(endp); + + /* Note: In this case we do not return any statistics, + * as we assume that the client is not interested in + * this case. */ + return create_ok_response(endp, 200, "DLCX", p->trans); + } + + /* Parse the connection id */ if (mgcp_parse_ci(&conn_id, ci)) { LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", + "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "DLCX", p->trans); } + /* Find the connection */ conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) goto error3; -- To view, visit https://gerrit.osmocom.org/4227 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Gerrit-PatchSet: 11 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:00 +0000 Subject: [MERGED] osmo-mgw[master]: client: add ip address parsing to the client In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: client: add ip address parsing to the client ...................................................................... client: add ip address parsing to the client Some MGCP messages (CRCX, MDCX) return IP-Addresses. Make use of this information. Change-Id: I44b338b09de45e1675cedf9737fa72dde72e979a --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 4 files changed, 42 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 21717e3..e91b190 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -36,6 +36,7 @@ char *body; struct mgcp_response_head head; uint16_t audio_port; + char audio_ip[INET_ADDRSTRLEN]; }; enum mgcp_verb { diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index c7cc989..f8c55ac 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -174,7 +174,7 @@ } /* Parse a line like "m=audio 16002 RTP/AVP 98" */ -static int mgcp_parse_audio(struct mgcp_response *r, const char *line) +static int mgcp_parse_audio_port(struct mgcp_response *r, const char *line) { if (sscanf(line, "m=audio %hu", &r->audio_port) != 1) @@ -184,7 +184,35 @@ response_parse_failure: LOGP(DLMGCP, LOGL_ERROR, - "Failed to parse MGCP response header\n"); + "Failed to parse MGCP response header (audio port)\n"); + return -EINVAL; +} + +/* Parse a line like "c=IN IP4 10.11.12.13" */ +static int mgcp_parse_audio_ip(struct mgcp_response *r, const char *line) +{ + struct in_addr ip_test; + + if (strlen(line) < 16) + goto response_parse_failure; + + /* The current implementation strictly supports IPV4 only ! */ + if (memcmp("c=IN IP4 ", line, 9) != 0) + goto response_parse_failure; + + /* Extract IP-Address */ + strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); + r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + + /* Check IP-Address */ + if (inet_aton(r->audio_ip, &ip_test) == 0) + goto response_parse_failure; + + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response header (audio ip)\n"); return -EINVAL; } @@ -213,7 +241,12 @@ switch (line[0]) { case 'm': - rc = mgcp_parse_audio(r, line); + rc = mgcp_parse_audio_port(r, line); + if (rc) + return rc; + break; + case 'c': + rc = mgcp_parse_audio_ip(r, line); if (rc) return rc; break; diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 7977a6a..513f345 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -99,11 +99,13 @@ " head.response_code = %d\n" " head.trans_id = %u\n" " head.comment = %s\n" - " audio_port = %u\n", + " audio_port = %u\n" + " audio_ip = %s\n", response->head.response_code, response->head.trans_id, response->head.comment, - response->audio_port + response->audio_port, + response->audio_ip ); } diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index e3b6113..d4efee4 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -28,6 +28,7 @@ head.trans_id = 1 head.comment = OK audio_port = 16002 + audio_ip = 10.9.1.120 Generated CRCX message: CRCX 1 23 at mgw MGCP 1.0 -- To view, visit https://gerrit.osmocom.org/4147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44b338b09de45e1675cedf9737fa72dde72e979a Gerrit-PatchSet: 16 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:00 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: fix coding style for mgcp_parse_sdp_data() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: fix coding style for mgcp_parse_sdp_data() ...................................................................... cosmetic: fix coding style for mgcp_parse_sdp_data() move variable declaration to the top remove brackets in case statement correct whitespaces Change-Id: I6dcf53ef8d3af5885b8b1f258d963949fa3ee93a --- M src/libosmo-mgcp/mgcp_sdp.c 1 file changed, 38 insertions(+), 39 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 423153c..8575e86 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -213,6 +213,12 @@ void *tmp_ctx = talloc_new(NULL); struct mgcp_rtp_end *rtp; + int payload; + int ptime, ptime2 = 0; + char audio_name[64]; + int port, rc; + char ipv4[16]; + OSMO_ASSERT(endp); OSMO_ASSERT(conn); OSMO_ASSERT(p); @@ -228,41 +234,36 @@ case 'v': /* skip these SDP attributes */ break; - case 'a': { - int payload; - int ptime, ptime2 = 0; - char audio_name[64]; - - + case 'a': if (sscanf(line, "a=rtpmap:%d %63s", &payload, audio_name) == 2) { - codecs_update(tmp_ctx, codecs, codecs_used, payload, audio_name); - } else if (sscanf(line, "a=ptime:%d-%d", - &ptime, &ptime2) >= 1) { + codecs_update(tmp_ctx, codecs, + codecs_used, payload, audio_name); + } else + if (sscanf + (line, "a=ptime:%d-%d", &ptime, &ptime2) >= 1) { if (ptime2 > 0 && ptime2 != ptime) rtp->packet_duration_ms = 0; else rtp->packet_duration_ms = ptime; - } else if (sscanf(line, "a=maxptime:%d", &ptime2) == 1) { + } else if (sscanf(line, "a=maxptime:%d", &ptime2) + == 1) { maxptime = ptime2; } break; - } - case 'm': { - int port, rc; - - rc = sscanf(line, "m=audio %d RTP/AVP %d %d %d %d %d %d %d %d %d %d", - &port, - &codecs[0].payload_type, - &codecs[1].payload_type, - &codecs[2].payload_type, - &codecs[3].payload_type, - &codecs[4].payload_type, - &codecs[5].payload_type, - &codecs[6].payload_type, - &codecs[7].payload_type, - &codecs[8].payload_type, - &codecs[9].payload_type); + case 'm': + rc = sscanf(line, + "m=audio %d RTP/AVP %d %d %d %d %d %d %d %d %d %d", + &port, &codecs[0].payload_type, + &codecs[1].payload_type, + &codecs[2].payload_type, + &codecs[3].payload_type, + &codecs[4].payload_type, + &codecs[5].payload_type, + &codecs[6].payload_type, + &codecs[7].payload_type, + &codecs[8].payload_type, + &codecs[9].payload_type); if (rc >= 2) { rtp->rtp_port = htons(port); rtp->rtcp_port = htons(port + 1); @@ -270,20 +271,18 @@ codecs_initialize(tmp_ctx, codecs, codecs_used); } break; - } - case 'c': { - char ipv4[16]; + case 'c': if (sscanf(line, "c=IN IP4 %15s", ipv4) == 1) { inet_aton(ipv4, &rtp->addr); } break; - } default: if (p->endp) LOGP(DLMGCP, LOGL_NOTICE, "Unhandled SDP option: '%c'/%d on 0x%x\n", - line[0], line[0], ENDPOINT_NUMBER(p->endp)); + line[0], line[0], + ENDPOINT_NUMBER(p->endp)); else LOGP(DLMGCP, LOGL_NOTICE, "Unhandled SDP option: '%c'/%d\n", @@ -295,25 +294,24 @@ /* Now select the primary and alt_codec */ for (i = 0; i < codecs_used && codecs_assigned < 2; ++i) { struct mgcp_rtp_codec *codec = codecs_assigned == 0 ? - &rtp->codec : &rtp->alt_codec; + &rtp->codec : &rtp->alt_codec; if (endp->tcfg->no_audio_transcoding && - !is_codec_compatible(endp, &codecs[i])) { + !is_codec_compatible(endp, &codecs[i])) { LOGP(DLMGCP, LOGL_NOTICE, "Skipping codec %s\n", - codecs[i].codec_name); + codecs[i].codec_name); continue; } mgcp_set_audio_info(p->cfg, codec, - codecs[i].payload_type, - codecs[i].map_line); + codecs[i].payload_type, codecs[i].map_line); codecs_assigned += 1; } if (codecs_assigned > 0) { /* TODO/XXX: Store this per codec and derive it on use */ if (maxptime >= 0 && maxptime * rtp->codec.frame_duration_den > - rtp->codec.frame_duration_num * 1500) { + rtp->codec.frame_duration_num * 1500) { /* more than 1 frame */ rtp->packet_duration_ms = 0; } @@ -322,8 +320,9 @@ "Got media info via SDP: port %d, payload %d (%s), " "duration %d, addr %s\n", ntohs(rtp->rtp_port), rtp->codec.payload_type, - rtp->codec.subtype_name ? rtp->codec.subtype_name : "unknown", - rtp->packet_duration_ms, inet_ntoa(rtp->addr)); + rtp->codec.subtype_name ? rtp-> + codec.subtype_name : "unknown", rtp->packet_duration_ms, + inet_ntoa(rtp->addr)); } talloc_free(tmp_ctx); -- To view, visit https://gerrit.osmocom.org/4327 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6dcf53ef8d3af5885b8b1f258d963949fa3ee93a Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:00 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: correct whitespaces In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: correct whitespaces ...................................................................... cosmetic: correct whitespaces Change-Id: I22302ae8a48a2c776025a60267f5ef5af706e576 --- M src/libosmo-mgcp/mgcp_sdp.c 1 file changed, 21 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 314ba3e..f45d6e7 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -62,15 +62,23 @@ if (!audio_name) { switch (payload_type) { - case 0: audio_name = "PCMU/8000/1"; break; - case 3: audio_name = "GSM/8000/1"; break; - case 8: audio_name = "PCMA/8000/1"; break; - case 18: audio_name = "G729/8000/1"; break; + case 0: + audio_name = "PCMU/8000/1"; + break; + case 3: + audio_name = "GSM/8000/1"; + break; + case 8: + audio_name = "PCMA/8000/1"; + break; + case 18: + audio_name = "G729/8000/1"; + break; default: - /* Payload type is unknown, don't change rate and - * channels. */ - /* TODO: return value? */ - return 0; + /* Payload type is unknown, don't change rate and + * channels. */ + /* TODO: return value? */ + return 0; } } @@ -156,8 +164,9 @@ if (codecs[i].payload_type != payload) continue; if (sscanf(audio_name, "%63[^/]/%d/%d", - audio_codec, &rate, &channels) < 1) { - LOGP(DLMGCP, LOGL_ERROR, "Failed to parse '%s'\n", audio_name); + audio_codec, &rate, &channels) < 1) { + LOGP(DLMGCP, LOGL_ERROR, "Failed to parse '%s'\n", + audio_name); continue; } @@ -168,7 +177,8 @@ return; } - LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload, audio_name); + LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload, + audio_name); } /* Check if the codec matches what is set up in the trunk config */ -- To view, visit https://gerrit.osmocom.org/4329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22302ae8a48a2c776025a60267f5ef5af706e576 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:00 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: fix commenting style In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: fix commenting style ...................................................................... cosmetic: fix commenting style Change-Id: Ib717d9dd3b17250ef4d6c67be0463a407cb83fbe --- M src/libosmo-mgcp/mgcp_sdp.c 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 8575e86..314ba3e 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -181,10 +181,8 @@ if (!codec->codec_name) return 0; - /* - * GSM, GSM/8000 and GSM/8000/1 should all be compatible.. let's go - * by name first. - */ + /* GSM, GSM/8000 and GSM/8000/1 should all be compatible... + * let's go by name first. */ codec_str = endp->tcfg->audio_name; if (sscanf(codec_str, "%63[^/]/%*d/%*d", audio_codec) < 1) return 0; -- To view, visit https://gerrit.osmocom.org/4328 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib717d9dd3b17250ef4d6c67be0463a407cb83fbe Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:01 +0000 Subject: [MERGED] osmo-mgw[master]: client: fix stderror logging in unit-test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: client: fix stderror logging in unit-test ...................................................................... client: fix stderror logging in unit-test When testing the file name and the line numbers are output to stderr, this causes the test to fail when change moves the lines. Disable line numbers in the stderror log when testing, also disable timestamps and colors. Make sure the log category is print. Change-Id: I7f1bd9454188f0ca869dada1fcc2877b789cc0ac --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index f2f0e0f..69e1810 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -163,6 +163,10 @@ ctx = talloc_named_const(NULL, 1, "mgcp_client_test"); msgb_talloc_ctx_init(ctx, 0); osmo_init_logging(&log_info); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); mgcp_client_conf_init(&conf); -- To view, visit https://gerrit.osmocom.org/4412 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f1bd9454188f0ca869dada1fcc2877b789cc0ac Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:20:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:20:43 +0000 Subject: osmo-mgw[master]: cosmetic: make dummy packet handling more explicit In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() ...................................................................... mobile/main.c: fix deprecated call to msgb_set_talloc_ctx() The usage of msgb_set_talloc_ctx() was deprecated many days ago, so it's time to use the proper replacement. Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca --- M src/host/layer23/src/mobile/main.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index bc66557..997e2d5 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -220,7 +220,8 @@ log_set_all_filter(stderr_target, 1); l23_ctx = talloc_named_const(NULL, 1, "layer2 context"); - msgb_set_talloc_ctx(l23_ctx); + /* TODO: measure and choose a proper pool size */ + msgb_talloc_ctx_init(l23_ctx, 0); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/4639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56440d8e2152c4bb2e5ad677f88c61742d2ad9ca Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/vty_interface.c: add missing 'vty/misc.h' header In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/vty_interface.c: add missing 'vty/misc.h' header ...................................................................... mobile/vty_interface.c: add missing 'vty/misc.h' header This header contains declaration of the osmo_talloc_vty_add_cmds(). Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 2ad95d0..b3777dc 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -41,6 +41,7 @@ #include #include #include +#include void *l23_ctx; -- To view, visit https://gerrit.osmocom.org/4638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icdafb22758897cfb67e249f37991f4af4213a5fa Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 14:22:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 14:22:07 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBSC: update CTRL docs In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: OsmoBSC: update CTRL docs ...................................................................... OsmoBSC: update CTRL docs * use proper naming scheme for BTS-specific CTRL commands * add/update oml-* commands Change-Id: I5b2cd940b4d84c140fce871f236aeab091b27360 Related: OS#2486 --- M OsmoBSC/chapters/control.adoc 1 file changed, 14 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/chapters/control.adoc b/OsmoBSC/chapters/control.adoc index a1d6b43..327e5b4 100644 --- a/OsmoBSC/chapters/control.adoc +++ b/OsmoBSC/chapters/control.adoc @@ -4,10 +4,10 @@ The actual protocol is described in <>, the variables common to all programs using it are described in <>. Here we describe variables specific to OsmoBSC. The commands starting with prefix -"net.btsN." are specific to a certain BTS so N have to be replaced with BTS -number when issuing command e. g. "net.bts1.channel-load". Similarly the +"bts.N." are specific to a certain BTS so N have to be replaced with BTS +number when issuing command e. g. "bts.1.channel-load". Similarly the TRX-specific commands are additionally prefixed with TRX number e. g. -"net.bts1.trx2.arfcn". +"bts.1.trx.2.arfcn". .Variables available over control interface [options="header",width="100%",cols="20%,5%,5%,50%,20%"] @@ -28,16 +28,17 @@ |ussd-notify-v1|WO|No|",,"| See <> for details. |rf_locked|RW|No|"0","1"|See <> for details. |number-of-bts|RO|No|""|Get number of configured BTS. -|net.btsN.location-area-code|RW|No|""|Set/Get LAC (value between (0, 65535)). -|net.btsN.cell-identity|RW|No|""|Set/Get Cell Identity (value between (0, 65535)). -|net.btsN.apply-configuration|WO|No|Ignored|Restart BTS via OML. -|net.btsN.send-new-system-informations|WO|No|Ignored|Regenerate System Information messages for given BTS. -|net.btsN.channel-load|RO|No|",,"|See <> for details. -|net.btsN.oml-connection-state|RO|No|"connected", "disconnected"|Indicate the status of OML connection of BTS. -|net.btsN.gprs-mode|RW|No|""|See <> for details. -|net.btsN.rf_state|RO|No|",,"|See <> for details. -|net.btsN.trxM.arfcn|RW|No|""|Set/Get ARFCN (value between (0, 1023)). -|net.btsN.trxM.max-power-reduction|RW|No|""|See <> for details. +|bts.N.location-area-code|RW|No|""|Set/Get LAC (value between (0, 65535)). +|bts.N.cell-identity|RW|No|""|Set/Get Cell Identity (value between (0, 65535)). +|bts.N.apply-configuration|WO|No|Ignored|Restart BTS via OML. +|bts.N.send-new-system-informations|WO|No|Ignored|Regenerate System Information messages for given BTS. +|bts.N.channel-load|RO|No|",,"|See <> for details. +|bts.N.oml-connection-state|RO|No|"connected", "disconnected", "degraded"|Indicate the status of OML connection of BTS. +|bts.N.oml-uptime|RO|No||Return OML link uptime in seconds. +|bts.N.gprs-mode|RW|No|""|See <> for details. +|bts.N.rf_state|RO|No|",,"|See <> for details. +|bts.N.trx.M.arfcn|RW|No|""|Set/Get ARFCN (value between (0, 1023)). +|bts.N.trx.M.max-power-reduction|RW|No|""|See <> for details. |=== [[notif]] -- To view, visit https://gerrit.osmocom.org/4648 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b2cd940b4d84c140fce871f236aeab091b27360 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 15:00:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 15:00:32 +0000 Subject: [PATCH] osmo-bsc[master]: Check OML state per-BTS Message-ID: Review at https://gerrit.osmocom.org/4649 Check OML state per-BTS To properly decide if a given OML link is degraded we have to use BTS-specific information about MO state. * move check function into BTS-specific part * add generic wrapper Related: OS#2486 Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2 --- M include/osmocom/bsc/abis_nm.h M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_nm.c M src/libbsc/bts_ipaccess_nanobts.c 4 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/4649/1 diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index 34f16a9..e25cb4f 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -162,6 +162,7 @@ const char *ipacc_testres_name(uint8_t res); /* Functions calling into other code parts */ +bool all_trx_rsl_connected(const struct gsm_bts *bts); int nm_is_running(struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 51b2c98..74298b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -654,7 +654,6 @@ extern const struct value_string bts_type_names[_NUM_GSM_BTS_TYPE+1]; extern const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1]; -char *get_oml_status(const struct gsm_bts *bts); char *get_model_oml_status(const struct gsm_bts *bts); unsigned long long bts_uptime(const struct gsm_bts *bts); diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index f0dfe9e..b7391a1 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -683,7 +683,7 @@ return 0; } -static inline bool all_trx_rsl_connected(const struct gsm_bts *bts) +bool all_trx_rsl_connected(const struct gsm_bts *bts) { const struct gsm_bts_trx *trx; @@ -693,14 +693,6 @@ } return true; -} - -char *get_oml_status(const struct gsm_bts *bts) -{ - if (bts->oml_link) - return all_trx_rsl_connected(bts) ? "connected" : "degraded"; - - return "disconnected"; } char *get_model_oml_status(const struct gsm_bts *bts) diff --git a/src/libbsc/bts_ipaccess_nanobts.c b/src/libbsc/bts_ipaccess_nanobts.c index dbb0e4f..9e273f5 100644 --- a/src/libbsc/bts_ipaccess_nanobts.c +++ b/src/libbsc/bts_ipaccess_nanobts.c @@ -47,6 +47,14 @@ static int bts_model_nanobts_start(struct gsm_network *net); static void bts_model_nanobts_e1line_bind_ops(struct e1inp_line *line); +static char *get_oml_status(const struct gsm_bts *bts) +{ + if (bts->oml_link) + return all_trx_rsl_connected(bts) ? "connected" : "degraded"; + + return "disconnected"; +} + struct gsm_bts_model bts_model_nanobts = { .type = GSM_BTS_TYPE_NANOBTS, .name = "nanobts", -- To view, visit https://gerrit.osmocom.org/4649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 16:25:35 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 2 Nov 2017 16:25:35 +0000 Subject: [PATCH] osmo-mgw[master]: network: autdetect rtp bind ip-address Message-ID: Review at https://gerrit.osmocom.org/4650 network: autdetect rtp bind ip-address Currently there are two ways to set the rtp bind ip-address (local ip address where the rtp streams are bound to). It is possible to set no set an rtp bind ip, if none no address is configured, then the ip address where the mgcp service is bound to is used. On a system with multiple network interfaces it is likely that there are the remote end is not reachable through the interface that has been configured. In this case rtp ip-probing can be enabled via vty option in order to automatically detect the ip address of the interface that points towards the remote end. The autodetection can only work if the ip-address is known when a CRCX is performed. For this the remote entity must include the remote ip address in the sdp trailer. Implement probing to determine te right local ip address Add debug log to display which ip address is actually used Add a VTY option for the probing functionality. Change-Id: Ia57cf7dab8421fd3ab6e1515727db0080373485e --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c 5 files changed, 97 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/4650/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 59147f0..42a91d8 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -96,6 +96,12 @@ int range_start; int range_end; int last_port; + + /* set to true to enable automatic probing + * of the local bind IP-Address, bind_addr + * (or its fall back) is used when automatic + * probing fails */ + bool bind_addr_probe; }; /* There are up to three modes in which the keep-alive dummy packet can be diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index d4c8dc9..b9c1731 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -318,12 +318,4 @@ #define PTYPE_UNDEFINED (-1) -/*! get the ip-address where the mgw application is bound on. - * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters - * \returns pointer to a string that contains the source ip-address */ -static inline const char *mgcp_net_src_addr(struct mgcp_endpoint *endp) -{ - if (endp->cfg->net_ports.bind_addr) - return endp->cfg->net_ports.bind_addr; - return endp->cfg->source_addr; -} +void mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 3d52d07..7876b33 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -51,6 +52,56 @@ MGCP_PROTO_RTP, MGCP_PROTO_RTCP, }; + +/*! Determine the local rtp bind IP-address. + * \param[out] addr caller provided memory to store the resulting IP-Address + * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters + * + * The local bind IP-address is automatically selected by probing the + * IP-Address of the interface that is pointing towards the remote IP-Address, + * if no remote IP-Address is known yet, the statically configured + * IP-Addresses are used as fallback. */ +void mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn) +{ + + struct mgcp_endpoint *endp; + int rc; + endp = conn->conn->endp; + + /* Try probing the local IP-Address */ + if (endp->cfg->net_ports.bind_addr_probe && conn->end.addr.s_addr != 0) { + rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, + "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + ENDPOINT_NUMBER(endp), conn->conn->id); + else { + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr, + inet_ntoa(conn->end.addr)); + return; + } + } + + /* Select from preconfigured IP-Addresses */ + if (endp->cfg->net_ports.bind_addr) { + /* Check there is a bind IP for the RTP traffic configured, + * if so, use that IP-Address */ + strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr); + } else { + /* No specific bind IP is configured for the RTP traffic, so + * assume the IP where we listen for incoming MGCP messages + * as bind IP */ + strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr); + } +} /* This does not need to be a precision timestamp and * is allowed to wrap quite fast. The returned value is @@ -1158,6 +1209,7 @@ { char name[512]; struct mgcp_rtp_end *end; + char local_ip_addr[INET_ADDRSTRLEN]; snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); end = &conn->end; @@ -1182,7 +1234,9 @@ end->rtcp.data = conn; end->rtcp.cb = rtp_data_net; - return bind_rtp(endp->cfg, mgcp_net_src_addr(endp), end, + mgcp_get_local_addr(local_ip_addr, conn); + + return bind_rtp(endp->cfg, local_ip_addr, end, ENDPOINT_NUMBER(endp)); } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 4826790..8c6bd6e 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -203,13 +203,16 @@ int rc; struct msgb *result; char osmux_extension[strlen("\nX-Osmux: 255") + 1]; + char local_ip_addr[INET_ADDRSTRLEN]; sdp = msgb_alloc_headroom(4096, 128, "sdp record"); if (!sdp) return NULL; - if (!addr) - addr = mgcp_net_src_addr(endp); + if (!addr) { + mgcp_get_local_addr(local_ip_addr, conn); + addr = local_ip_addr; + } if (conn->osmux.state == OSMUX_STATE_NEGOTIATING) { sprintf(osmux_extension, "\nX-Osmux: %u", conn->osmux.cid); @@ -597,12 +600,6 @@ goto error2; } - mgcp_rtp_end_config(endp, 0, &conn->end); - - if (allocate_port(endp, conn) != 0) { - goto error2; - } - /* Annotate Osmux circuit ID and set it to negotiating state until this * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; @@ -630,6 +627,12 @@ conn->end.force_output_ptime = 1; } + mgcp_rtp_end_config(endp, 0, &conn->end); + + if (allocate_port(endp, conn) != 0) { + goto error2; + } + if (setup_rtp_processing(endp, conn) != 0) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x could not start RTP processing!\n", diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7107bcc..7ff1fdd 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -70,11 +70,13 @@ vty_out(vty, " rtp net-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); - if (g_cfg->net_ports.bind_addr) vty_out(vty, " rtp net-bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); - + if (g_cfg->net_ports.bind_addr_probe) + vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); + else + vty_out(vty, " no rtp ip-probing%s", VTY_NEWLINE); vty_out(vty, " rtp ip-dscp %d%s", g_cfg->endp_dscp, VTY_NEWLINE); if (g_cfg->trunk.keepalive_interval == MGCP_KEEPALIVE_ONCE) vty_out(vty, " rtp keep-alive once%s", VTY_NEWLINE); @@ -317,6 +319,24 @@ { talloc_free(g_cfg->net_ports.bind_addr); g_cfg->net_ports.bind_addr = NULL; + return CMD_SUCCESS; +} + +DEFUN(cfg_mgcp_rtp_net_bind_ip_probing, + cfg_mgcp_rtp_net_bind_ip_probing_cmd, + "rtp ip-probing", + RTP_STR "automatic rtp bind ip selection\n") +{ + g_cfg->net_ports.bind_addr_probe = true; + return CMD_SUCCESS; +} + +DEFUN(cfg_mgcp_rtp_no_net_bind_ip_probing, + cfg_mgcp_rtp_no_net_bind_ip_probing_cmd, + "no rtp ip-probing", + NO_STR RTP_STR "no automatic rtp bind ip selection\n") +{ + g_cfg->net_ports.bind_addr_probe = false; return CMD_SUCCESS; } @@ -1163,6 +1183,8 @@ install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_tos_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_force_ptime_cmd); -- To view, visit https://gerrit.osmocom.org/4650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia57cf7dab8421fd3ab6e1515727db0080373485e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 2 16:31:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 16:31:13 +0000 Subject: osmo-mgw[master]: network: autdetect rtp bind ip-address In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia57cf7dab8421fd3ab6e1515727db0080373485e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 16:31:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 16:31:37 +0000 Subject: osmo-bsc[master]: Check OML state per-BTS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 16:34:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 2 Nov 2017 16:34:31 +0000 Subject: [MERGED] osmo-bsc[master]: Check OML state per-BTS In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Check OML state per-BTS ...................................................................... Check OML state per-BTS To properly decide if a given OML link is degraded we have to use BTS-specific information about MO state. * move check function into BTS-specific part * add generic wrapper Related: OS#2486 Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2 --- M include/osmocom/bsc/abis_nm.h M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_nm.c M src/libbsc/bts_ipaccess_nanobts.c 4 files changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index 34f16a9..e25cb4f 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -162,6 +162,7 @@ const char *ipacc_testres_name(uint8_t res); /* Functions calling into other code parts */ +bool all_trx_rsl_connected(const struct gsm_bts *bts); int nm_is_running(struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 51b2c98..74298b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -654,7 +654,6 @@ extern const struct value_string bts_type_names[_NUM_GSM_BTS_TYPE+1]; extern const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1]; -char *get_oml_status(const struct gsm_bts *bts); char *get_model_oml_status(const struct gsm_bts *bts); unsigned long long bts_uptime(const struct gsm_bts *bts); diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index f0dfe9e..b7391a1 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -683,7 +683,7 @@ return 0; } -static inline bool all_trx_rsl_connected(const struct gsm_bts *bts) +bool all_trx_rsl_connected(const struct gsm_bts *bts) { const struct gsm_bts_trx *trx; @@ -693,14 +693,6 @@ } return true; -} - -char *get_oml_status(const struct gsm_bts *bts) -{ - if (bts->oml_link) - return all_trx_rsl_connected(bts) ? "connected" : "degraded"; - - return "disconnected"; } char *get_model_oml_status(const struct gsm_bts *bts) diff --git a/src/libbsc/bts_ipaccess_nanobts.c b/src/libbsc/bts_ipaccess_nanobts.c index dbb0e4f..9e273f5 100644 --- a/src/libbsc/bts_ipaccess_nanobts.c +++ b/src/libbsc/bts_ipaccess_nanobts.c @@ -47,6 +47,14 @@ static int bts_model_nanobts_start(struct gsm_network *net); static void bts_model_nanobts_e1line_bind_ops(struct e1inp_line *line); +static char *get_oml_status(const struct gsm_bts *bts) +{ + if (bts->oml_link) + return all_trx_rsl_connected(bts) ? "connected" : "degraded"; + + return "disconnected"; +} + struct gsm_bts_model bts_model_nanobts = { .type = GSM_BTS_TYPE_NANOBTS, .name = "nanobts", -- To view, visit https://gerrit.osmocom.org/4649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:02 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Improve setup graph Message-ID: Review at https://gerrit.osmocom.org/4651 OsmoGSMTester: Improve setup graph * Add sysmocell5000 * Remove 1 modem, showing 2 of them is enough * Split osmo-bts-trx from osmo-trx node as sysmocell500 doesn't use the later. * Update OsmoNITB node to show we also support split openbsc.git components. Change-Id: I893beb114d47edd3f67183dd9ea5acc19462496c --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 12 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/51/4651/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 50b6dff..557c2f3 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -37,14 +37,14 @@ modem0 [shape=box label="Modems..."] modem1 [shape=box label="Modems..."] - modem2 [shape=box label="Modems..."] osmo_bts_sysmo [label="sysmocom sysmoBTS\nrunning osmo-bts-sysmo" shape=box] B200 [label="Ettus B200" shape=box] + sysmoCell5K [label="sysmocom sysmoCell5000" shape=box] octphy [label="Octasic octphy BTS" shape=box] nanoBTS [label="ip.access nanoBTS" shape=box] rf_distribution [label="RF distribution"] - {modem0 modem1 modem2 osmo_bts_sysmo B200 octphy nanoBTS}->rf_distribution [dir=both arrowhead="curve" arrowtail="curve"] + {modem0 modem1 osmo_bts_sysmo B200 octphy nanoBTS sysmoCell5K}->rf_distribution [dir=both arrowhead="curve" arrowtail="curve"] } subgraph cluster_main_unit { label = "Main Unit" @@ -52,22 +52,24 @@ subgraph { rank=same ofono [label="ofono daemon"] - OsmoNITB - osmo_bts_trx [label="osmo-bts-trx\n+ osmo-trx"] + osmo_trx [label="osmo-trx"] + osmo_bts_trx [label="osmo-bts-trx"] osmo_bts_octphy [label="osmo-bts-octphy"] + OsmoNITB [label="BSC + Core Network\n(Osmo{NITB,MSC,BSC,HLR,...})"] } } jenkins->osmo_gsm_tester [label="trial\n(binaries)"] osmo_gsm_tester->jenkins [label="results"] - ofono->{modem0 modem1 modem2} [label="USB"] - osmo_gsm_tester-> {OsmoNITB osmo_bts_trx osmo_bts_octphy} - osmo_gsm_tester-> osmo_bts_sysmo [taillabel="SSH"] - osmo_gsm_tester-> ofono [taillabel="DBus"] - osmo_bts_trx->B200 [label="USB"] + ofono->{modem0 modem1} [label="USB"] + osmo_gsm_tester->{OsmoNITB osmo_bts_trx osmo_bts_octphy} + osmo_gsm_tester->osmo_bts_sysmo [taillabel="SSH"] + osmo_gsm_tester->ofono [taillabel="DBus"] + osmo_trx->B200 [label="USB"] + osmo_bts_trx->{osmo_trx sysmoCell5K} [dir=both label="UDP"] osmo_bts_octphy->octphy [label="raw eth"] - {osmo_bts_sysmo nanoBTS}->OsmoNITB [label="eth"] + {osmo_bts_sysmo nanoBTS}->OsmoNITB [label="IP"] {B200 octphy}->OsmoNITB [label="eth" style=invis] {osmo_bts_trx osmo_bts_octphy}->OsmoNITB } -- To view, visit https://gerrit.osmocom.org/4651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I893beb114d47edd3f67183dd9ea5acc19462496c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:03 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update trial graph with current data Message-ID: Review at https://gerrit.osmocom.org/4652 OsmoGSMTester: Update trial graph with current data The osmo-bts-trx tgz doesn't exist anymore and it does not contain osmo-trx, which comes in its own tgz. Change-Id: Id803eca3791137b04bc24d195119d5c511fcfc49 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/52/4652/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 557c2f3..cc37e88 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -146,7 +146,7 @@ subgraph cluster_trial { label = "Trial (binaries)" sysmo [label="osmo-bts-sysmo.build-23.tgz\n(osmo-bts-sysmo\n+ deps\ncompiled for sysmoBTS)"] - trx [label="osmo-bts-trx.build-5.tgz\n(osmo-trx + osmo-bts-trx\n+ deps\ncompiled for main unit)"] + trx [label="osmo-bts.build-5.tgz\n(osmo-bts-octphy + osmo-bts-trx\n+ deps\ncompiled for main unit)"] nitb [label="osmo-nitb.build-42.tgz\n(osmo-nitb\n+ deps\ncompiled for main unit)"] checksums [label="checksums.md5"] -- To view, visit https://gerrit.osmocom.org/4652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id803eca3791137b04bc24d195119d5c511fcfc49 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:03 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update sample test script with an AoIP example Message-ID: Review at https://gerrit.osmocom.org/4653 OsmoGSMTester: Update sample test script with an AoIP example Change-Id: I7978c7e96c8f1d43837271c94dd64893649974e0 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 23 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/53/4653/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index cc37e88..b405e1f 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -163,26 +163,38 @@ #!/usr/bin/env python3 from osmo_gsm_tester.test import * -nitb = suite.nitb() +hlr = suite.hlr() bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() -print('start nitb and bts...') -nitb.bts_add(bts) -nitb.start() +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + bts.start() -nitb.subscriber_add(ms_mo) -nitb.subscriber_add(ms_mt) +hlr.subscriber_add(ms_mo) +hlr.subscriber_add(ms_mt) -ms_mo.connect(nitb.mcc_mnc()) -ms_mt.connect(nitb.mcc_mnc()) +ms_mo.connect(msc.mcc_mnc()) +ms_mt.connect(msc.mcc_mnc()) + +ms_mo.log_info() +ms_mt.log_info() print('waiting for modems to attach...') -wait(ms_mo.is_connected, nitb.mcc_mnc()) -wait(ms_mt.is_connected, nitb.mcc_mnc()) -wait(nitb.subscriber_attached, ms_mo, ms_mt) +wait(ms_mo.is_connected, msc.mcc_mnc()) +wait(ms_mt.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms_mo, ms_mt) sms = ms_mo.sms_send(ms_mt) wait(ms_mt.sms_was_received, sms) -- To view, visit https://gerrit.osmocom.org/4653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7978c7e96c8f1d43837271c94dd64893649974e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:04 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Resource Resolution section content Message-ID: Review at https://gerrit.osmocom.org/4654 OsmoGSMTester: Improve Resource Resolution section content Change-Id: Ice37093dc9f8e03a2a9f5e3f7df79d1b589b6991 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/54/4654/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index b405e1f..e2156df 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -202,12 +202,12 @@ === Resource Resolution -- A global configuration defines which hardware is connected to the +- A global configuration 'resources.conf' defines which hardware is connected to the osmo-gsm-tester main unit. - Each suite contains a number of test scripts. The amount of resources a test may use is defined by the test suite's 'suite.conf'. - Which specific modems, BTS models, NITB IP addresses etc. are made available - to a test run is typically determined by a combination of scenario + to a test run is typically determined by 'suite.conf' and a combination of scenario configurations -- or picked automatically if not. [[resources_conf_example]] -- To view, visit https://gerrit.osmocom.org/4654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice37093dc9f8e03a2a9f5e3f7df79d1b589b6991 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:04 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Use a more up-to-date resources.conf example Message-ID: Review at https://gerrit.osmocom.org/4655 OsmoGSMTester: Use a more up-to-date resources.conf example It showcases new features such as osmo-trx support, cipher support, modem features support, etc. Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 59 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/55/4655/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index e2156df..8c106b7 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -218,62 +218,89 @@ ---- ip_address: -- addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 +- addr: 10.42.42.4 +- addr: 10.42.42.5 +- addr: 10.42.42.6 bts: - label: sysmoBTS 1002 type: osmo-bts-sysmo + ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + ciphers: + - a5_0 + - a5_1 + - a5_3 -- label: octBTS 3000 - type: osmo-bts-octphy - addr: 10.42.42.115 - band: GSM-1800 - trx_list: - - hw_addr: 00:0c:90:32:b5:8a - net_device: eth0.2342 - -- label: Ettus B210 +- label: Ettus B200 type: osmo-bts-trx - addr: 10.42.42.116 + ipa_unit_id: 6 + addr: 10.42.42.50 band: GSM-1800 + launch_trx: true + ciphers: + - a5_0 + - a5_1 -- label: nanoBTS 1900 - type: nanobts - addr: 10.42.42.190 - band: GSM-1900 +- label: sysmoCell 5000 + type: osmo-bts-trx + ipa_unit_id: 7 + addr: 10.42.42.51 + band: GSM-1800 + trx_remote_ip: 10.42.42.112 + ciphers: + - a5_0 + - a5_1 + +- label: OCTBTS 3500 + type: osmo-bts-octphy + ipa_unit_id: 8 + addr: 10.42.42.52 + band: GSM-1800 trx_list: - - hw_addr: 00:02:95:00:41:b3 + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 arfcn: - arfcn: 512 band: GSM-1800 - arfcn: 514 band: GSM-1800 - - - arfcn: 540 + - arfcn: 516 + band: GSM-1800 + - arfcn: 546 band: GSM-1900 - - arfcn: 542 + - arfcn: 548 band: GSM-1900 modem: -- label: m7801 - path: '/wavecom_0' - imsi: 901700000007801 - ki: D620F48487B1B782DA55DF6717F08FF9 +- label: sierra_1 + path: '/sierra_1' + imsi: '901700000009031' + ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' + auth_algo: 'xor' + ciphers: + - a5_0 + - a5_1 + features: + - 'sms' + - 'voice' -- label: m7802 - path: '/wavecom_1' - imsi: 901700000007802 - ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 - -- label: m7803 - path: '/wavecom_2' - imsi: 901700000007803 - ki: ABBED4C91417DF710F60675B6EE2C8D2 +- label: gobi_0 + path: '/gobi_0' + imsi: '901700000009030' + ki: 'BB70807226393CDBAC8DD3439FF54252' + auth_algo: 'xor' + ciphers: + - a5_0 + - a5_1 + features: + - 'sms' ---- === Typical 'suites/*/suite.conf' -- To view, visit https://gerrit.osmocom.org/4655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:04 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update suite.conf example Message-ID: Review at https://gerrit.osmocom.org/4656 OsmoGSMTester: Update suite.conf example This is the one we are usig nowadays in suite.conf, which explicitly asks to be run with modems supporting sms features. Change-Id: If5dbc3b4689b282db6fae4668e2838be59e88da8 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/56/4656/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 8c106b7..6e377da 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -316,6 +316,8 @@ - times: 1 modem: - times: 2 + features: + - sms ---- It may also request e.g. specific BTS models, but this is typically left to -- To view, visit https://gerrit.osmocom.org/4656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5dbc3b4689b282db6fae4668e2838be59e88da8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:04 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Explain patchelf is used sometimes to modify ... Message-ID: Review at https://gerrit.osmocom.org/4657 OsmoGSMTester: Explain patchelf is used sometimes to modify RPATH Change-Id: I7bb811bc984c8d576984b038b391cf8130cc465e --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/57/4657/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 6e377da..55f1a5e 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -385,7 +385,11 @@ Also, the binaries from a trial are never installed system-wide, but are run with a specific 'LD_LIBRARY_PATH' pointing at the trial's 'inst', so that -several trials can run consecutively without conflicting binary versions. +several trials can run consecutively without conflicting binary versions. For +some specific binaries which require extra permissions (such as osmo-bts-octphy +requiring 'CAP_NET_RAW'), 'patchelf' program is used to modify the binary +'RPATH' field instead because the OS dynamic linker skips 'LD_LIBRARY_PATH' for +binaries with special permissions. Once a test suite run is complete, all its reserved resources are torn down (if the test scripts have not done so already), and the reservations are released -- To view, visit https://gerrit.osmocom.org/4657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bb811bc984c8d576984b038b391cf8130cc465e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:05 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OSmoGsmTester: Specify group in Main unit intro Message-ID: Review at https://gerrit.osmocom.org/4658 OSmoGsmTester: Specify group in Main unit intro Change-Id: I132bf7681a1a435c161c4048e41c28dc75c1fa28 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/58/4658/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 6eef2fa..8397459 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -4,9 +4,10 @@ runs the core network components, controls the modems and so on. This can be anything from a dedicated production rack unit to your laptop at home. -This manual will assume that tests are run from a jenkins build slave, by a -user named 'jenkins'. The user configuration for manual test runs and/or a -different user name is identical, simply replace the user name. +This manual will assume that tests are run from a jenkins build slave, by a user +named 'jenkins' that belong to group 'osmo-gsm-tester'. The user configuration +for manual test runs and/or a different user name is identical, simply replace +the user name or group. === Dependencies -- To view, visit https://gerrit.osmocom.org/4658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I132bf7681a1a435c161c4048e41c28dc75c1fa28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:05 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add deps required for osmo-bts-octphy support Message-ID: Review at https://gerrit.osmocom.org/4659 OsmoGSMTester: Add deps required for osmo-bts-octphy support Change-Id: I384ec8cd55cfaa68ee1f461de99ceac78c5d8414 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/59/4659/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 8397459..112d4f9 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -24,6 +24,9 @@ python3-mako \ python3-gi \ ofono \ + patchelf \ + sudo \ + libcap2-bin \ python3-pip pip3 install pydbus pip3 install git+git://github.com/podshumok/python-smpplib.git -- To view, visit https://gerrit.osmocom.org/4659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I384ec8cd55cfaa68ee1f461de99ceac78c5d8414 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:05 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Installation: change some confusing terminology Message-ID: Review at https://gerrit.osmocom.org/4660 OsmoGSMTester: Installation: change some confusing terminology It's difficult to understand when it referrs to jenkins job in general and when it talks about specific jenkins jobs that builds binaries required for osmo-gsm-tester and the ones which run osmo-gsm-tester. As a result, it's difficult to understand which sections apply to each host in case more than one host is used. Change-Id: I5c882e77b469629028b8d773053783e18f3d1737 --- M OsmoGSMTester/chapters/install.adoc M OsmoGSMTester/chapters/trial.adoc 2 files changed, 12 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/60/4660/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 112d4f9..5f6f1bc 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -9,7 +9,7 @@ for manual test runs and/or a different user name is identical, simply replace the user name or group. -=== Dependencies +=== Osmo-gsm-tester Dependencies On a Debian/Ubuntu based system, these commands install the packages needed to run the osmo-gsm-tester.py code, i.e. install these on your main unit: @@ -46,7 +46,7 @@ ---- [[jenkins_deps]] -==== Jenkins Build Dependencies +==== Osmocom Build Dependencies Each of the jenkins builds requires individual dependencies. This is generally the same as for building the software outside of osmo-gsm-tester and will not @@ -57,8 +57,8 @@ should match the installed sysmoBTS firmware. -[[configure_build_slave]] -=== Jenkins Build Slave +[[configure_jenkins_slave]] +=== Jenkins Build and Run Slave ==== Create 'jenkins' User on Main Unit @@ -140,8 +140,8 @@ exit ---- -[[install_add_build_slave]] -==== Add Build Slave +[[install_add_jenkins_slave]] +==== Add Jenkins Slave In the jenkins web UI, add a new build slave for the osmo-gsm-tester: @@ -253,10 +253,10 @@ ==== Add Run Job -This is the build job that actually runs the tests on the GSM hardware: +This is the jenkins job that runs the tests on the GSM hardware: -* It sources the artifacts from the build jobs. -* It runs on the osmo-gsm-tester main unit's build slave. +* It sources the artifacts from jenkins' build jobs. +* It runs on the osmo-gsm-tester main unit. Here is the configuration for the run job: @@ -265,7 +265,7 @@ Configure this to taste, for example: ** 'Max # of build to keep': "20" * 'Restrict where this project can be run': "osmo-gsm-tester" + - (to match the 'Label' configured in <>). + (to match the 'Label' configured in <>). * 'Source Code Management': ** 'Git' *** 'Repository URL': "git://git.osmocom.org/osmo-gsm-tester" @@ -332,7 +332,7 @@ === Install osmo-gsm-tester on Main Unit -This assumes you have already created the jenkins user (see <>). +This assumes you have already created the jenkins user (see <>). ==== User Permissions diff --git a/OsmoGSMTester/chapters/trial.adoc b/OsmoGSMTester/chapters/trial.adoc index 928ee28..86bf12b 100644 --- a/OsmoGSMTester/chapters/trial.adoc +++ b/OsmoGSMTester/chapters/trial.adoc @@ -3,7 +3,7 @@ A trial is a set of pre-built binaries to be tested. They are typically built by jenkins using the build scripts found in osmo-gsm-tester's source in the -'contrib/' dir, see <>. +'contrib/' dir, see <>. A trial comes in the form of a directory containing a number of '*.tgz' tar archives as well as a 'checksums.md5' file to verify the tar archives' @@ -20,4 +20,3 @@ * stdout and stderr outputs of the binaries * a test log * *TODO*: jenkins parsable XML reports - -- To view, visit https://gerrit.osmocom.org/4660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c882e77b469629028b8d773053783e18f3d1737 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:05 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Move TODO comment to a redmine task Message-ID: Review at https://gerrit.osmocom.org/4661 OsmoGSMTester: Move TODO comment to a redmine task Following task has been created: OS#2612 Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/61/4661/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 5f6f1bc..aaf4d39 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -444,8 +444,6 @@ your terminal is in turn is picked up in the tcpdump trace, and so forth. When testing 'tcpdump' access, make sure to have proper filter expressions in place. -TODO: allow skipping pcaps by configuration if access to tcpdump is not wanted - ==== Allow Core Files In case a binary run for the test crashes, a core file of the crash should be -- To view, visit https://gerrit.osmocom.org/4661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:05 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Document how to setup main unit to set CAP_NE... Message-ID: Review at https://gerrit.osmocom.org/4662 OsmoGSMTester: Document how to setup main unit to set CAP_NET_RAW as non-root Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/62/4662/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index aaf4d39..146dae1 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -486,6 +486,36 @@ gpasswd -a jenkins usrp ---- +==== Allow CAP_NET_RAW capability + +Certain binaries require 'CAP_NET_RAW' to be set, like 'osmo-bts-octphy' as it +uses a 'AF_PACKET' socket. + +To be able to set the following capability without being root, osmo-gsm-tester +uses sudo to gain permissions to set the capability. + +This is the script that osmo-gsm-tester expects on the main unit: + +---- +echo /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh < /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw +chmod 0440 /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw +---- + +The script file name 'osmo-gsm-tester_setcap_net_raw.sh' is important, as +osmo-gsm-tester expects to find a script with this name in '$PATH' at run time. + + ==== Log Rotation To avoid clogging up /var/log, it makes sense to choose a sane maximum log size: -- To view, visit https://gerrit.osmocom.org/4662 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:06 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update resources cfg documentation Message-ID: Review at https://gerrit.osmocom.org/4663 OsmoGSMTester: Update resources cfg documentation Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 38 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/63/4663/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 7c06392..335a603 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -92,9 +92,11 @@ - 'osmo-bts-trx' - 'osmo-bts-octphy' - 'ipa-nanobts' + 'ipa_unit_id'::: + ip.access unit id to be used by the BTS, written into BTS and BSC config. 'addr'::: - remote IP address of the BTS, used to start the BTS and tell it where - to find the OsmoNITB. + Remote IP address of the BTS for BTS like sysmoBTS, and local IP address + to bind to for locally run BTS such as osmo-bts-trx. 'band'::: GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of: - 'GSM-1800' @@ -109,8 +111,11 @@ only used for osmo-bts-octphy. (*TODO*: and nanobts??) 'net_device':::: Local network device to reach the TRX's 'hw_addr' at, only used for - osmo-bts-octphy. - + osmo-bts-octphy. Example: 'eth0'. + 'nominal_power':::: + Nominal power to be used by the TRX. + 'max_power_red':::: + Max power reduction to apply to the nominal power of the TRX. 'arfcn':: List of ARFCNs to use for running BTSes, which defines the actual RF frequency bands used. @@ -118,24 +123,46 @@ ARFCN number, see e.g. https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number (note that the resource type 'arfcn' contains an item trait also named - 'arfcn') + 'arfcn'). 'band'::: GSM band name to use this ARFCN for, same as for 'bts:band' above. 'modem':: List of modems reachable via ofono and information on the inserted SIM - card. (Note: the MSISDN is allocated dynamically in test scripts) + card. (Note: the MSISDN is allocated dynamically in test scripts). 'label'::: - human readable label for your own reference + Human readable label for your own reference, which also appears in logs. 'path'::: - ofono's path for this modem, like '/modemkind_99' + Ofono's path for this modem, like '/modemkind_99'. 'imsi'::: - IMSI of the inserted SIM card, like '"123456789012345"' + IMSI of the inserted SIM card, like '"123456789012345"'. 'ki'::: 16 byte authentication/encryption KI of the inserted SIM card, in hexadecimal notation (32 characters) like + - '"00112233445566778899aabbccddeeff"' (*TODO*: authentication algorithm, - currently always comp128v1) + '"00112233445566778899aabbccddeeff"'. + 'auth_algo'::: + Authentication algorithm to be used with the SIM card. One of: + - 'none' + - 'xor' + - 'comp128v1' + 'ciphers'::: + List of ciphers that this modem supports, used to match + requirements in suites or scenarios. Any combination of: + - 'a5_0' + - 'a5_1' + - 'a5_2' + - 'a5_3' + - 'a5_4' + - 'a5_5' + - 'a5_6' + - 'a5_7' + 'features'::: + List of features that this modem supports, used to match requirements in + suites or scenarios. Any combination of: + - 'sms' + - 'gprs' + - 'voice' + - 'ussd' Side note: at first sight it might make sense to the reader to rather structure e.g. the 'ip_address' or 'arfcn' configuration as + -- To view, visit https://gerrit.osmocom.org/4663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:06 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO Message-ID: Review at https://gerrit.osmocom.org/4664 OsmoGSMTester: Remove resolved TODO Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/64/4664/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 335a603..8176b45 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -205,8 +205,6 @@ - voice:trx+dyn_ts ---- -*TODO*: voice is not actually implemented yet - === 'defaults.conf' (optional) Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo', -- To view, visit https://gerrit.osmocom.org/4664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:06 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update defaults.conf example Message-ID: Review at https://gerrit.osmocom.org/4665 OsmoGSMTester: Update defaults.conf example Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 31 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/65/4665/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 8176b45..3f8cb44 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -217,31 +217,50 @@ channel combinations are in fact not resources (only the nitb's interface address is). These additional settings may be provided by the scenario configurations, but in case the provided scenarios leave some values unset, -they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a -similar setting always has precedence over the values given in a -'defaults.conf'). - -*TODO* better match this format with 'resources.conf'? +they are taken from this 'defaults.conf'. (A 'scenario.conf' or a +'resources.conf' providing a similar setting always has precedence over the +values given in a 'defaults.conf'). Example of a 'defaults.conf': ---- nitb: net: - mcc: 1 - mnc: 868 - short_name: osmo-gsm-tester - long_name: osmo-gsm-tester + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-nitb + long_name: osmo-gsm-tester-nitb auth_policy: closed - encryption: a5 0 + encryption: a5_0 -nitb_bts: +bsc: + net: + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-msc + long_name: osmo-gsm-tester-msc + auth_policy: closed + encryption: a5_0 + authentication: optional + +msc: + net: + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-msc + long_name: osmo-gsm-tester-msc + auth_policy: closed + encryption: a5_0 + authentication: optional + +bsc_bts: location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts trx_list: - - max_power_red: 22 + - nominal_power: 23 + max_power_red: 0 arfcn: 868 timeslot_list: - phys_chan_config: CCCH+SDCCH4 @@ -253,5 +272,3 @@ - phys_chan_config: TCH/F_TCH/H_PDCH - phys_chan_config: TCH/F_TCH/H_PDCH ---- - -*TODO*: detailed descriptions -- To view, visit https://gerrit.osmocom.org/4665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:06 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content Message-ID: Review at https://gerrit.osmocom.org/4666 OsmoGSMTester: Improve Trial section content Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc --- M OsmoGSMTester/chapters/trial.adoc 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/66/4666/1 diff --git a/OsmoGSMTester/chapters/trial.adoc b/OsmoGSMTester/chapters/trial.adoc index 86bf12b..b41b72f 100644 --- a/OsmoGSMTester/chapters/trial.adoc +++ b/OsmoGSMTester/chapters/trial.adoc @@ -18,5 +18,12 @@ * the rendered configuration files used to run the binaries * stdout and stderr outputs of the binaries +* pcap files for processes doing relevant network communication * a test log -* *TODO*: jenkins parsable XML reports +* jenkins parsable XML (Junit) reports + +The script in 'contrib/jenkins-run.sh' will take care of related tasks such as +creating the dir structure and md5 file from the several tar.gz containing the +software builts before running osmo-gsm-tester. After running it, it clean up +the extracted files and save extra logs such as journalctl output from ofonod, +and generate a new .tar.gz file with all the output. -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:07 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section Message-ID: Review at https://gerrit.osmocom.org/4667 OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/67/4667/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..a6a6c16 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,40 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +Scenarios define contrains that match one-to-one with the resources specified +in a 'suite.conf' for a specific type of resource after the list is expanded +taking the 'times' attribute into account. This means, for instance, that given +'suite.conf' requests 2 BTS and that we want to enforce both to be of type +'osmo-bts-sysmo', we then need to provide an scenario like the one below: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that next +resources have no restrictions to be taken into consideration. If the user wants +to apply no restrictions to the first resource but wants to do so for any of the +other ones, the first element can be listed but left empty in the scenario file. + +Any number of such scenario configurations can be combined in the form +':++...', e.g. 'my_suite:sysmo+tch_f+amr'. + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:07 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add suites_dir section Message-ID: Review at https://gerrit.osmocom.org/4668 OsmoGSMTester: Add suites_dir section Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424 --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/68/4668/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index a6a6c16..7aec344 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,16 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[suites_dir]] +==== 'suites_dir' + +Suites contain a set of tests which are designed to be run together to test a +set of features given a specific set of resources. As a result, resources are +allocated per suite and not per test. + +Tests for a given suite are located in the form of '.py' python scripts in the +same directory where the 'suite.conf' lays. + [[scenarios_dir]] ==== 'scenarios_dir' -- To view, visit https://gerrit.osmocom.org/4668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:07 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section Message-ID: Review at https://gerrit.osmocom.org/4669 OsmoGSMTester: Add state_dir section Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/69/4669/1 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 7aec344..6274a20 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -54,10 +54,32 @@ scenarios_dir: './scenarios' ---- +[[state_dir]] +==== 'state_dir' + +It contains global or system-wide state for osmo-gsm-tester. In a typical state +dir you can find the following files: + +'last_used_msisdn.state':: + Contains last used msisdn number, which is automatically increased every + time osmo-gsm-tester needs to assign a new subscriber in a test. +'lock':: + Lock file used to implement a mutual exclusion zone around the + 'reserved_resources.state' file. +'reserved_resources.state':: + File containing a set reserved resources by some osmo-gsm-tester + instance. Each osmo-gsm-tester instance is responsible to clear its + resources from the list once it is done using them and are no longer + reserved. + If you would like to set up several separate configurations (not typical), note that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +This way, several concurrent users of osmo-gsm-tester (ie. several +osmo-gsm-tester processes running in parallel) can run without interfering each +other (e.g. using same ARFCN, same IP or same ofono modem path). + [[suites_dir]] ==== 'suites_dir' -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:19:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 17:19:08 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGsmTester: Put several permission categories under cat U... Message-ID: Review at https://gerrit.osmocom.org/4670 OsmoGsmTester: Put several permission categories under cat User Permission Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/70/4670/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 146dae1..d19f909 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -444,7 +444,7 @@ your terminal is in turn is picked up in the tcpdump trace, and so forth. When testing 'tcpdump' access, make sure to have proper filter expressions in place. -==== Allow Core Files +===== Allow Core Files In case a binary run for the test crashes, a core file of the crash should be written. This requires a limit rule. Create a file with the required rule: @@ -464,7 +464,7 @@ sysctl -w kernel.core_pattern=core ---- -==== Allow Realtime Priority +===== Allow Realtime Priority Certain binaries should be run with real-time priority, like 'osmo-bts-trx'. Add this permission on the main unit: @@ -477,7 +477,7 @@ Re-login the user to make these changes take effect. [[user_config_uhd]] -==== UHD +===== UHD Grant permission to use the UHD driver to run USRP devices for osmo-bts-trx, by adding the jenkins user to the 'usrp' group: @@ -486,7 +486,7 @@ gpasswd -a jenkins usrp ---- -==== Allow CAP_NET_RAW capability +===== Allow CAP_NET_RAW capability Certain binaries require 'CAP_NET_RAW' to be set, like 'osmo-bts-octphy' as it uses a 'AF_PACKET' socket. -- To view, visit https://gerrit.osmocom.org/4670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:56:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 17:56:17 +0000 Subject: =?UTF-8?Q?=5BPATCH=5D_libosmocore=5Bmaster=5D=3A_Bump_version=3A_0=2E10=2E1_=E2=86=92_0=2E10=2E2?= Message-ID: Review at https://gerrit.osmocom.org/4671 Bump version: 0.10.1 ? 0.10.2 Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/4671/1 diff --git a/debian/changelog b/debian/changelog index 6e81256..a50e30b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libosmocore (0.10.2) unstable; urgency=medium + + * Revert "vty: Fix bad use of vector_slot()" + * New upstream release of libosmocore + + -- Harald Welte Thu, 02 Nov 2017 18:51:02 +0100 + libosmocore (0.10.1) unstable; urgency=medium * New upstream release of libosmocore -- To view, visit https://gerrit.osmocom.org/4671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 2 17:57:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 17:57:05 +0000 Subject: =?UTF-8?Q?libosmocore=5Bmaster=5D=3A_Bump_version=3A_0=2E10=2E1_=E2=86=92_0=2E10=2E2?= In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:00:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:00:29 +0000 Subject: =?UTF-8?Q?=5BMERGED=5D_libosmocore=5Bmaster=5D=3A_Bump_version=3A_0=2E10=2E1_=E2=86=92_0=2E10=2E2?= In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Bump version: 0.10.1 ? 0.10.2 ...................................................................... Bump version: 0.10.1 ? 0.10.2 Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/changelog b/debian/changelog index 6e81256..a50e30b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libosmocore (0.10.2) unstable; urgency=medium + + * Revert "vty: Fix bad use of vector_slot()" + * New upstream release of libosmocore + + -- Harald Welte Thu, 02 Nov 2017 18:51:02 +0100 + libosmocore (0.10.1) unstable; urgency=medium * New upstream release of libosmocore -- To view, visit https://gerrit.osmocom.org/4671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:03:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:03:14 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Improve Resource Resolution section content In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice37093dc9f8e03a2a9f5e3f7df79d1b589b6991 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:03:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:03:53 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Improve setup graph In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I893beb114d47edd3f67183dd9ea5acc19462496c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:04:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:04:07 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update trial graph with current data In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id803eca3791137b04bc24d195119d5c511fcfc49 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:04:23 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update sample test script with an AoIP example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7978c7e96c8f1d43837271c94dd64893649974e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:05:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:05:08 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Use a more up-to-date resources.conf example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:05:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:05:14 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update suite.conf example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5dbc3b4689b282db6fae4668e2838be59e88da8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:05:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:05:22 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Explain patchelf is used sometimes to modify ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7bb811bc984c8d576984b038b391cf8130cc465e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:05:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:05:30 +0000 Subject: osmo-gsm-manuals[master]: OSmoGsmTester: Specify group in Main unit intro In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I132bf7681a1a435c161c4048e41c28dc75c1fa28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:05:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:05:37 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add deps required for osmo-bts-octphy support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I384ec8cd55cfaa68ee1f461de99ceac78c5d8414 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:06:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:06:25 +0000 Subject: libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:06:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:06:27 +0000 Subject: [MERGED] libosmocore[master]: Enable GnuTLS fallback In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable GnuTLS fallback ...................................................................... Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return failure due to missing getrandom() syscall. To support such systems, let's add fallback code which uses GnuTLS library. It can be disabled explicitly via '--disable-gnutls' option at compile-time, otherwise ./configure will fail if both getrandom() and GnuTLS are not available. When building with '--enable-embedded' the fallback is disabled automatically. Related: OS#1694 Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b --- M configure.ac M src/gsm/Makefile.am M src/gsm/gsm_utils.c 3 files changed, 36 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d9390cf..a8c1d2e 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,20 @@ AM_CONDITIONAL(ENABLE_PCSC, test "x$ENABLE_PCSC" = "xyes") AC_SUBST(ENABLE_PCSC) +AC_ARG_ENABLE([gnutls], [AS_HELP_STRING([--disable-gnutls], [Do not use GnuTLS fallback for missing getrandom()])], + [ENABLE_GNUTLS=$enableval], [ENABLE_GNUTLS="yes"]) +AM_CONDITIONAL(ENABLE_GNUTLS, test x"$ENABLE_GNUTLS" = x"yes") +AS_IF([test "x$ENABLE_GNUTLS" = "xyes"], [ + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0]) +]) +AC_SUBST(ENABLE_GNUTLS) +if test x"$ENABLE_GNUTLS" = x"yes" +then + AC_SUBST([LIBGNUTLS_CFLAGS]) + AC_SUBST([LIBGNUTLS_LIBS]) + AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()]) +fi + AC_ARG_ENABLE(plugin, [AS_HELP_STRING( [--disable-plugin], @@ -228,12 +242,15 @@ AM_CONDITIONAL(ENABLE_PLUGIN, false) AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_VTY, false) AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_GNUTLS, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) + AC_DEFINE([USE_GNUTLS], [0]) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4476971..12f56db 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -38,6 +38,11 @@ libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined libosmogsm_la_LIBADD = libgsmint.la $(TALLOC_LIBS) +if ENABLE_GNUTLS +AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS) +libosmogsm_la_LIBADD += $(LIBGNUTLS_LIBS) +endif + EXTRA_DIST = libosmogsm.map # Convolutional codes generation diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index e3f792e..134b475 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -106,6 +106,12 @@ #endif #endif +#if (USE_GNUTLS) +#pragma message ("including GnuTLS for getrandom fallback.") +#include +#include +#endif + /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet * Greek symbols at hex positions 0x10 and 0x12-0x1a * left out as they can't be handled with a char and @@ -409,7 +415,7 @@ */ int osmo_get_rand_id(uint8_t *out, size_t len) { - int rc; + int rc = -ENOTSUP; /* this function is intended for generating short identifiers only, not arbitrary-length random data */ if (len > OSMO_MAX_RAND_ID_LEN) @@ -421,13 +427,16 @@ #pragma message ("Using direct syscall access for getrandom(): consider upgrading to glibc >= 2.25") /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ rc = syscall(SYS_getrandom, out, len, GRND_NONBLOCK); -#else -#pragma message ("Secure random unavailable: calls to osmo_get_rand_id() will always fail!") - return -ENOTSUP; #endif + /* getrandom() failed entirely: */ - if (rc < 0) + if (rc < 0) { +#if (USE_GNUTLS) +#pragma message ("Secure random failed: using GnuTLS fallback.") + return gnutls_rnd(GNUTLS_RND_RANDOM, out, len); +#endif return -errno; + } /* getrandom() failed partially due to signal interruption: this should never happen (according to getrandom(2)) as long as OSMO_MAX_RAND_ID_LEN < 256 -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:06:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:06:57 +0000 Subject: [MERGED] osmo-mgw[master]: network: autdetect rtp bind ip-address In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: network: autdetect rtp bind ip-address ...................................................................... network: autdetect rtp bind ip-address Currently there are two ways to set the rtp bind ip-address (local ip address where the rtp streams are bound to). It is possible to set no set an rtp bind ip, if none no address is configured, then the ip address where the mgcp service is bound to is used. On a system with multiple network interfaces it is likely that there are the remote end is not reachable through the interface that has been configured. In this case rtp ip-probing can be enabled via vty option in order to automatically detect the ip address of the interface that points towards the remote end. The autodetection can only work if the ip-address is known when a CRCX is performed. For this the remote entity must include the remote ip address in the sdp trailer. Implement probing to determine te right local ip address Add debug log to display which ip address is actually used Add a VTY option for the probing functionality. Change-Id: Ia57cf7dab8421fd3ab6e1515727db0080373485e --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c 5 files changed, 97 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 59147f0..42a91d8 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -96,6 +96,12 @@ int range_start; int range_end; int last_port; + + /* set to true to enable automatic probing + * of the local bind IP-Address, bind_addr + * (or its fall back) is used when automatic + * probing fails */ + bool bind_addr_probe; }; /* There are up to three modes in which the keep-alive dummy packet can be diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index d4c8dc9..b9c1731 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -318,12 +318,4 @@ #define PTYPE_UNDEFINED (-1) -/*! get the ip-address where the mgw application is bound on. - * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters - * \returns pointer to a string that contains the source ip-address */ -static inline const char *mgcp_net_src_addr(struct mgcp_endpoint *endp) -{ - if (endp->cfg->net_ports.bind_addr) - return endp->cfg->net_ports.bind_addr; - return endp->cfg->source_addr; -} +void mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 3d52d07..7876b33 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -51,6 +52,56 @@ MGCP_PROTO_RTP, MGCP_PROTO_RTCP, }; + +/*! Determine the local rtp bind IP-address. + * \param[out] addr caller provided memory to store the resulting IP-Address + * \param[in] endp mgcp endpoint, that holds a copy of the VTY parameters + * + * The local bind IP-address is automatically selected by probing the + * IP-Address of the interface that is pointing towards the remote IP-Address, + * if no remote IP-Address is known yet, the statically configured + * IP-Addresses are used as fallback. */ +void mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn) +{ + + struct mgcp_endpoint *endp; + int rc; + endp = conn->conn->endp; + + /* Try probing the local IP-Address */ + if (endp->cfg->net_ports.bind_addr_probe && conn->end.addr.s_addr != 0) { + rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, + "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + ENDPOINT_NUMBER(endp), conn->conn->id); + else { + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr, + inet_ntoa(conn->end.addr)); + return; + } + } + + /* Select from preconfigured IP-Addresses */ + if (endp->cfg->net_ports.bind_addr) { + /* Check there is a bind IP for the RTP traffic configured, + * if so, use that IP-Address */ + strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr); + } else { + /* No specific bind IP is configured for the RTP traffic, so + * assume the IP where we listen for incoming MGCP messages + * as bind IP */ + strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); + LOGP(DRTP, LOGL_DEBUG, + "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + ENDPOINT_NUMBER(endp), conn->conn->id, addr); + } +} /* This does not need to be a precision timestamp and * is allowed to wrap quite fast. The returned value is @@ -1158,6 +1209,7 @@ { char name[512]; struct mgcp_rtp_end *end; + char local_ip_addr[INET_ADDRSTRLEN]; snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); end = &conn->end; @@ -1182,7 +1234,9 @@ end->rtcp.data = conn; end->rtcp.cb = rtp_data_net; - return bind_rtp(endp->cfg, mgcp_net_src_addr(endp), end, + mgcp_get_local_addr(local_ip_addr, conn); + + return bind_rtp(endp->cfg, local_ip_addr, end, ENDPOINT_NUMBER(endp)); } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 4826790..8c6bd6e 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -203,13 +203,16 @@ int rc; struct msgb *result; char osmux_extension[strlen("\nX-Osmux: 255") + 1]; + char local_ip_addr[INET_ADDRSTRLEN]; sdp = msgb_alloc_headroom(4096, 128, "sdp record"); if (!sdp) return NULL; - if (!addr) - addr = mgcp_net_src_addr(endp); + if (!addr) { + mgcp_get_local_addr(local_ip_addr, conn); + addr = local_ip_addr; + } if (conn->osmux.state == OSMUX_STATE_NEGOTIATING) { sprintf(osmux_extension, "\nX-Osmux: %u", conn->osmux.cid); @@ -597,12 +600,6 @@ goto error2; } - mgcp_rtp_end_config(endp, 0, &conn->end); - - if (allocate_port(endp, conn) != 0) { - goto error2; - } - /* Annotate Osmux circuit ID and set it to negotiating state until this * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; @@ -630,6 +627,12 @@ conn->end.force_output_ptime = 1; } + mgcp_rtp_end_config(endp, 0, &conn->end); + + if (allocate_port(endp, conn) != 0) { + goto error2; + } + if (setup_rtp_processing(endp, conn) != 0) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x could not start RTP processing!\n", diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7107bcc..7ff1fdd 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -70,11 +70,13 @@ vty_out(vty, " rtp net-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); - if (g_cfg->net_ports.bind_addr) vty_out(vty, " rtp net-bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); - + if (g_cfg->net_ports.bind_addr_probe) + vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); + else + vty_out(vty, " no rtp ip-probing%s", VTY_NEWLINE); vty_out(vty, " rtp ip-dscp %d%s", g_cfg->endp_dscp, VTY_NEWLINE); if (g_cfg->trunk.keepalive_interval == MGCP_KEEPALIVE_ONCE) vty_out(vty, " rtp keep-alive once%s", VTY_NEWLINE); @@ -317,6 +319,24 @@ { talloc_free(g_cfg->net_ports.bind_addr); g_cfg->net_ports.bind_addr = NULL; + return CMD_SUCCESS; +} + +DEFUN(cfg_mgcp_rtp_net_bind_ip_probing, + cfg_mgcp_rtp_net_bind_ip_probing_cmd, + "rtp ip-probing", + RTP_STR "automatic rtp bind ip selection\n") +{ + g_cfg->net_ports.bind_addr_probe = true; + return CMD_SUCCESS; +} + +DEFUN(cfg_mgcp_rtp_no_net_bind_ip_probing, + cfg_mgcp_rtp_no_net_bind_ip_probing_cmd, + "no rtp ip-probing", + NO_STR RTP_STR "no automatic rtp bind ip selection\n") +{ + g_cfg->net_ports.bind_addr_probe = false; return CMD_SUCCESS; } @@ -1163,6 +1183,8 @@ install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_tos_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_force_ptime_cmd); -- To view, visit https://gerrit.osmocom.org/4650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia57cf7dab8421fd3ab6e1515727db0080373485e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:06:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:06:57 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: make dummy packet handling more explicit In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: make dummy packet handling more explicit ...................................................................... cosmetic: make dummy packet handling more explicit The way how osmo-mgw decides when to send a dummy packet and when not is not very obvious. use more explicit if statements, and define constants. Also add comments that explain how it works. Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 37 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 83505a2..59147f0 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -98,7 +98,17 @@ int last_port; }; +/* There are up to three modes in which the keep-alive dummy packet can be + * sent. The beviour is controlled viw the keepalive_interval member of the + * trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy- + * packet is sent at all and the timer that sends regular dummy packets + * is no longer scheduled. If the keepalive_interval is set to -1, only + * one dummy packet is sent when an CRCX or an MDCX is performed. No timer + * is scheduled. For all vales greater 0, the a timer is scheduled and the + * value is used as interval. See also mgcp_keepalive_timer_cb(), + * handle_modify_con(), and handle_create_con() */ #define MGCP_KEEPALIVE_ONCE (-1) +#define MGCP_KEEPALIVE_NEVER 0 struct mgcp_trunk_config { struct llist_head entry; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9c92c65..4826790 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -666,10 +666,11 @@ if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); + /* Send dummy packet, see also comments in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); if (conn->conn->mode & MGCP_CONN_RECV_ONLY - && tcfg->keepalive_interval != 0) { + && tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) send_dummy(endp, conn); - } LOGP(DLMGCP, LOGL_NOTICE, "CRCX: endpoint:%x connection successfully created\n", @@ -815,8 +816,10 @@ p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_MDCX); - if (conn->conn->mode & MGCP_CONN_RECV_ONLY && - endp->tcfg->keepalive_interval != 0) + /* Send dummy packet, see also comments in mgcp_keepalive_timer_cb() */ + OSMO_ASSERT(endp->tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); + if (conn->conn->mode & MGCP_CONN_RECV_ONLY + && endp->tcfg->keepalive_interval != MGCP_KEEPALIVE_NEVER) send_dummy(endp, conn); if (silent) @@ -1051,10 +1054,25 @@ struct mgcp_conn *conn; int i; - LOGP(DLMGCP, LOGL_DEBUG, "Triggered trunk %d keepalive timer.\n", + LOGP(DLMGCP, LOGL_DEBUG, "triggered trunk %d keepalive timer\n", tcfg->trunk_nr); - if (tcfg->keepalive_interval <= 0) + /* Do not accept invalid configuration values + * valid is MGCP_KEEPALIVE_NEVER, MGCP_KEEPALIVE_ONCE and + * values greater 0 */ + OSMO_ASSERT(tcfg->keepalive_interval >= MGCP_KEEPALIVE_ONCE); + + /* The dummy packet functionality has been disabled, we will exit + * immediately, no further timer is scheduled, which means we will no + * longer send dummy packets even when we did before */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_NEVER) + return; + + /* In cases where only one dummy packet is sent, we do not need + * the timer since the functions that handle the CRCX and MDCX are + * triggering the sending of the dummy packet. So we behave like in + * the MGCP_KEEPALIVE_NEVER case */ + if (tcfg->keepalive_interval == MGCP_KEEPALIVE_ONCE) return; /* Send walk over all endpoints and send out dummy packets through @@ -1067,7 +1085,8 @@ } } - LOGP(DLMGCP, LOGL_DEBUG, "Rescheduling trunk %d keepalive timer.\n", + /* Schedule the keepalive timer for the next round */ + LOGP(DLMGCP, LOGL_DEBUG, "rescheduling trunk %d keepalive timer\n", tcfg->trunk_nr); osmo_timer_schedule(&tcfg->keepalive_timer, tcfg->keepalive_interval, 0); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index e8ad818..7107bcc 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -569,7 +569,7 @@ cfg_mgcp_no_rtp_keepalive_cmd, "no rtp keep-alive", NO_STR RTP_STR RTP_KEEPALIVE_STR) { - mgcp_trunk_set_keepalive(&g_cfg->trunk, 0); + mgcp_trunk_set_keepalive(&g_cfg->trunk, MGCP_KEEPALIVE_NEVER); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7ee9409baec50a09fb357d655b5253434fae924 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:09:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 Nov 2017 18:09:12 +0000 Subject: osmo-mgw[master]: mgcp client: vty: tweak doc strings In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1a408f9e651c5fb3424a84ceaaa603e20ad595c Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 2 18:23:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 Nov 2017 18:23:31 +0000 Subject: [PATCH] libosmocore[master]: vty: Fix bad use of vector_slot() Message-ID: Review at https://gerrit.osmocom.org/4672 vty: Fix bad use of vector_slot() Commit in e9e9e427b78271941a25a63567fc2ec2bb9e4433 attempted to fix a compilation warning but introduced a regression documented in OS#2613. The commit was reverted in 4aa0258269296f078e685e21fb08b115567e814. After closer lookup and testing, it seems vector_slot(vline, index) is expected to be NULL in this case as set by vty_complete_command: /* In case of 'help \t'. */ if (isspace((int)vty->buf[vty->length - 1])) vector_set(vline, NULL); As a result, the correct fix for the compilation warning is to test against NULL instead of testing for empty string. Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a --- M src/vty/command.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/4672/1 diff --git a/src/vty/command.c b/src/vty/command.c index 21b26b4..98d86d2 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1950,7 +1950,7 @@ /* In case of 'command \t' pattern. Do you need '?' command at the end of the line. */ - if (vector_slot(vline, index) == '\0') + if (vector_slot(vline, index) == NULL) *status = CMD_ERR_NOTHING_TODO; else *status = CMD_ERR_NO_MATCH; -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From admin at opensuse.org Thu Nov 2 19:52:41 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:52:41 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/i586 In-Reply-To: References: Message-ID: <59fb7797dc141_e0854af88262865@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 84s] #define HAVE_SYS_SELECT_H 1 [ 84s] #define HAVE_SYS_SOCKET_H 1 [ 84s] #define HAVE_SYSLOG_H 1 [ 84s] #define HAVE_CTYPE_H 1 [ 84s] #define HAVE_NETINET_TCP_H 1 [ 84s] #define HAVE_ALLOCA_H 1 [ 84s] #define HAVE_ALLOCA 1 [ 84s] #define HAVE_DECL_SYS_GETRANDOM 0 [ 84s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 84s] [ 84s] configure: exit 1 [ 84s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386[ 78.116015] serial8250: too much work for irq4 [ 84s] -linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 84s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 84s] make[1]: *** [override_dh_auto_configure] Error 255 [ 84s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 84s] debian/rules:15: recipe for target 'build' failed [ 84s] make: *** [build] Error 2 [ 84s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 84s] [ 84s] build70 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:52:25 UTC 2017. [ 84s] [ 84s] ### VM INTERACTION START ### [ 85s] Powering off. [ 85s] [ 79.184040] reboot: Power down [ 85s] ### VM INTERACTION END ### [ 85s] [ 85s] build70 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:52:27 UTC 2017. [ 85s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:52:58 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:52:58 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/i586 In-Reply-To: References: Message-ID: <59fb77af73c04_e0854af8826292a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 104s] #define STDC_HEADERS 1 [ 104s] #define HAVE_EXECINFO_H 1 [ 104s] #define HAVE_SYS_SELECT_H 1 [ 104s] #define HAVE_SYS_SOCKET_H 1 [ 104s] #define HAVE_SYSLOG_H 1 [ 104s] #define HAVE_CTYPE_H 1 [ 104s] #define HAVE_NETINET_TCP_H 1 [ 104s] #define HAVE_ALLOCA_H 1 [ 104s] #define HAVE_ALLOCA 1 [ 104s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 104s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 104s] [ 104s] configure: exit 1 [ 104s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 104s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 104s] make[1]: *** [override_dh_auto_configure] Error 2 [ 104s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 104s] debian/rules:15: recipe for target 'build' failed [ 104s] make: *** [build] Error 2 [ 104s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 104s] [ 104s] lamb10 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:52:47 UTC 2017. [ 104s] [ 104s] ### VM INTERACTION START ### [ 107s] [ 99.851838] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] lamb10 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:52:50 UTC 2017. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:53:16 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:53:16 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <59fb77b0959d7_e0854af882630b9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 103s] #define STDC_HEADERS 1 [ 103s] #define HAVE_EXECINFO_H 1 [ 103s] #define HAVE_SYS_SELECT_H 1 [ 103s] #define HAVE_SYS_SOCKET_H 1 [ 103s] #define HAVE_SYSLOG_H 1 [ 103s] #define HAVE_CTYPE_H 1 [ 103s] #define HAVE_NETINET_TCP_H 1 [ 103s] #define HAVE_ALLOCA_H 1 [ 103s] #define HAVE_ALLOCA 1 [ 103s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 103s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 103s] [ 103s] configure: exit 1 [ 103s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 103s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 103s] make[1]: *** [override_dh_auto_configure] Error 2 [ 103s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 103s] debian/rules:15: recipe for target 'build' failed [ 103s] make: *** [build] Error 2 [ 103s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 103s] [ 103s] lamb21 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:10 UTC 2017. [ 103s] [ 103s] ### VM INTERACTION START ### [ 107s] [ 99.447941] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] lamb21 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:14 UTC 2017. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:53:34 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:53:34 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <59fb77cbd9445_e0854af88263326@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 123s] #define STDC_HEADERS 1 [ 123s] #define HAVE_EXECINFO_H 1 [ 123s] #define HAVE_SYS_SELECT_H 1 [ 123s] #define HAVE_SYS_SOCKET_H 1 [ 123s] #define HAVE_SYSLOG_H 1 [ 123s] #define HAVE_CTYPE_H 1 [ 123s] #define HAVE_NETINET_TCP_H 1 [ 123s] #define HAVE_ALLOCA_H 1 [ 123s] #define HAVE_ALLOCA 1 [ 123s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 123s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 123s] [ 123s] configure: exit 1 [ 123s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 123s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 123s] make[1]: *** [override_dh_auto_configure] Error 2 [ 123s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 123s] debian/rules:15: recipe for target 'build' failed [ 123s] make: *** [build] Error 2 [ 123s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 123s] [ 123s] cloud115 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:25 UTC 2017. [ 123s] [ 123s] ### VM INTERACTION START ### [ 126s] [ 105.341658] reboot: Power down [ 128s] ### VM INTERACTION END ### [ 128s] [ 128s] cloud115 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:31 UTC 2017. [ 128s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:53:34 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:53:34 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <59fb77cb92ab5_e0854af88263256@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 144s] #define HAVE_EXECINFO_H 1 [ 144s] #define HAVE_SYS_SELECT_H 1 [ 144s] #define HAVE_SYS_SOCKET_H 1 [ 144s] #define HAVE_SYSLOG_H 1 [ 144s] #define HAVE_CTYPE_H 1 [ 144s] #define HAVE_NETINET_TCP_H 1 [ 144s] #define HAVE_ALLOCA_H 1 [ 144s] #define HAVE_ALLOCA 1 [ 144s] #define HAVE_DECL_SYS_GETRANDOM 0 [ 144s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 144s] [ 144s] configure: exit 1 [ 144s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 144s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 144s] make[1]: *** [override_dh_auto_configure] Error 255 [ 144s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 144s] debian/rules:15: recipe for target 'build' failed [ 144s] make: *** [build] Error 2 [ 144s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 144s] [ 144s] build36 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:27 UTC 2017. [ 144s] [ 144s] ### VM INTERACTION START ### [ 145s] Powering off. [ 145s] [ 135.553223] reboot: Power down [ 146s] ### VM INTERACTION END ### [ 146s] [ 146s] build36 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:30 UTC 2017. [ 146s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:53:50 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:53:50 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <59fb77ea8c6b7_e0854af8826366@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.04/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 128s] #define STDC_HEADERS 1 [ 128s] #define HAVE_EXECINFO_H 1 [ 128s] #define HAVE_SYS_SELECT_H 1 [ 128s] #define HAVE_SYS_SOCKET_H 1 [ 128s] #define HAVE_SYSLOG_H 1 [ 128s] #define HAVE_CTYPE_H 1 [ 128s] #define HAVE_NETINET_TCP_H 1 [ 128s] #define HAVE_ALLOCA_H 1 [ 128s] #define HAVE_ALLOCA 1 [ 128s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 128s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 128s] [ 128s] configure: exit 1 [ 128s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 128s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 128s] make[1]: *** [override_dh_auto_configure] Error 2 [ 128s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 128s] debian/rules:15: recipe for target 'build' failed [ 128s] make: *** [build] Error 2 [ 128s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 128s] [ 128s] cloud112 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:37 UTC 2017. [ 128s] [ 128s] ### VM INTERACTION START ### [ 131s] [ 114.264753] reboot: Power down [ 133s] ### VM INTERACTION END ### [ 133s] [ 133s] cloud112 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:42 UTC 2017. [ 133s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:53:50 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:53:50 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <59fb77ebea8f8_e0854af882637f5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 133s] #define STDC_HEADERS 1 [ 133s] #define HAVE_EXECINFO_H 1 [ 133s] #define HAVE_SYS_SELECT_H 1 [ 133s] #define HAVE_SYS_SOCKET_H 1 [ 133s] #define HAVE_SYSLOG_H 1 [ 133s] #define HAVE_CTYPE_H 1 [ 133s] #define HAVE_NETINET_TCP_H 1 [ 133s] #define HAVE_ALLOCA_H 1 [ 133s] #define HAVE_ALLOCA 1 [ 133s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 133s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 133s] [ 133s] configure: exit 1 [ 133s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 133s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 133s] make[1]: *** [override_dh_auto_configure] Error 2 [ 133s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 133s] debian/rules:15: recipe for target 'build' failed [ 133s] make: *** [build] Error 2 [ 133s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 133s] [ 133s] lamb06 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:35 UTC 2017. [ 133s] [ 133s] ### VM INTERACTION START ### [ 136s] [ 127.151418] reboot: Power down [ 136s] ### VM INTERACTION END ### [ 136s] [ 136s] lamb06 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:39 UTC 2017. [ 136s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:54:07 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:54:07 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <59fb77eebc7a5_e0854af8826412e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 158s] #define HAVE_EXECINFO_H 1 [ 158s] #define HAVE_SYS_SELECT_H 1 [ 158s] #define HAVE_SYS_SOCKET_H 1 [ 158s] #define HAVE_SYSLOG_H 1 [ 158s] #define HAVE_CTYPE_H 1 [ 158s] #define HAVE_NETINET_TCP_H 1 [ 158s] #define HAVE_ALLOCA_H 1 [ 158s] #define HAVE_ALLOCA 1 [ 158s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 158s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 158s] [ 158s] configure: exit 1 [ 158s] [ 136.668112] serial8250: too much work for irq4 [ 158s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 158s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 158s] make[1]: *** [override_dh_auto_configure] Error 2 [ 158s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 158s] debian/rules:15: recipe for target 'build' failed [ 158s] make: *** [build] Error 2 [ 158s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 158s] [ 158s] cloud127 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:53:59 UTC 2017. [ 158s] [ 158s] ### VM INTERACTION START ### [ 161s] [ 139.820878] reboot: Power down [ 162s] ### VM INTERACTION END ### [ 163s] [ 163s] cloud127 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:05 UTC 2017. [ 163s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:54:24 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:54:24 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <59fb780df0a6b_e0854af882644a0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 166s] #define HAVE_CTYPE_H 1 [ 166s] #define HAVE_NETINET_TCP_H 1 [ 166s] #define HAVE_ALLOCA_H 1 [ 166s] #define HAVE_ALLOCA 1 [ 166s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 166s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 166s] [ 166s] configure: exit 1 [ 166s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 166s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 166s] make[1]: *** [override_dh_auto_configure] Error 255 [ 166s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 166s] debian/rules:15: recipe for target 'build' failed [ 166s] make: *** [build] Error 2 [ 166s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 166s] [ 166s] cloud101 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:05 UTC 2017. [ 166s] [ 166s] ### VM INTERACTION START ### [ 166s] [ 146.124034] serial8250: too much work for irq4 [ 166s] [ 146.189039] serial8250: too much work for irq4 [ 166s] [ 146.252107] serial8250: too much work for irq4 [ 166s] [ 146.316016] serial8250: too much work for irq4 [ 166s] [ 146.380092] serial8250: too much work for irq4 [ 169s] [ 149.449510] reboot: Power down [ 170s] ### VM INTERACTION END ### [ 171s] [ 171s] cloud101 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:10 UTC 2017. [ 171s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:54:24 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:54:24 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <59fb780ec558b_e0854af8826457@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.10/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 183s] #define STDC_HEADERS 1 [ 183s] #define HAVE_EXECINFO_H 1 [ 183s] #define HAVE_SYS_SELECT_H 1 [ 183s] #define HAVE_SYS_SOCKET_H 1 [ 183s] #define HAVE_SYSLOG_H 1 [ 183s] #define HAVE_CTYPE_H 1 [ 183s] #define HAVE_NETINET_TCP_H 1 [ 183s] #define HAVE_ALLOCA_H 1 [ 183s] #define HAVE_ALLOCA 1 [ 183s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 183s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 183s] [ 183s] configure: exit 1 [ 183s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 183s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 183s] make[1]: *** [override_dh_auto_configure] Error 2 [ 183s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 183s] debian/rules:15: recipe for target 'build' failed [ 183s] make: *** [build] Error 2 [ 183s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 183s] [ 183s] lamb27 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:15 UTC 2017. [ 183s] [ 183s] ### VM INTERACTION START ### [ 186s] [ 163.178858] reboot: Power down [ 186s] ### VM INTERACTION END ### [ 186s] [ 186s] lamb27 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:19 UTC 2017. [ 186s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:55:16 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:55:16 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <59fb7845a5d79_e0854af882650dc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 217s] #define HAVE_SYS_SELECT_H 1 [ 217s] #define HAVE_SYS_SOCKET_H 1 [ 217s] #define HAVE_SYSLOG_H 1 [ 217s] #define HAVE_CTYPE_H 1 [ 217s] #define HAVE_NETINET_TCP_H 1 [ 217s] #define HAVE_ALLOCA_H 1 [ 217s] #define HAVE_ALLOCA 1 [ 217s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 217s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 217s] [ 217s] configure: exit 1 [ 217s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 217s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 217s] make[1]: *** [override_dh_auto_configure] Error 255 [ 217s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 217s] debian/rules:15: recipe for target 'build' failed [ 217s] make: *** [build] Error 2 [ 217s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 217s] [ 217s] lamb76 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:54:57 UTC 2017. [ 217s] [ 217s] ### VM INTERACTION START ### [ 217s] [ 192.816718] serial8250: too much work for irq4 [ 217s] [ 192.973321] serial8250: too much work for irq4 [ 220s] [ 196.188146] reboot: Power down [ 220s] ### VM INTERACTION END ### [ 220s] [ 220s] lamb76 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:55:01 UTC 2017. [ 220s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 19:56:58 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 19:56:58 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <59fb789d3ef5a_e0854af88265363@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/aarch64 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 344s] #define HAVE_EXECINFO_H 1 [ 344s] #define HAVE_SYS_SELECT_H 1 [ 344s] #define HAVE_SYS_SOCKET_H 1 [ 344s] #define HAVE_SYSLOG_H 1 [ 344s] #define HAVE_CTYPE_H 1 [ 344s] #define HAVE_NETINET_TCP_H 1 [ 344s] #define HAVE_ALLOCA_H 1 [ 344s] #define HAVE_ALLOCA 1 [ 344s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 344s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 344s] [ 344s] configure: exit 1 [ 344s] dh_auto_configure: ./configure --build=aarch64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/aarch64-linux-gnu --libexecdir=${prefix}/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 344s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 344s] make[1]: *** [override_dh_auto_configure] Error 2 [ 344s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 344s] debian/rules:15: recipe for target 'build' failed [ 344s] make: *** [build] Error 2 [ 344s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 344s] [ 344s] obs-arm-4 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:56:45 UTC 2017. [ 344s] [ 344s] ### VM INTERACTION START ### [ 346s] [ 318.422678] sysrq: SysRq : Power Off [ 346s] [ 318.430679] reboot: Power down [ 346s] ### VM INTERACTION END ### [ 346s] [ 346s] obs-arm-4 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 19:56:49 UTC 2017. [ 346s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 2 20:11:33 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 02 Nov 2017 20:11:33 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <59fb7c0458a86_e0854af88269683@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/armv7l Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 206s] #define HAVE_EXECINFO_H 1 [ 206s] #define HAVE_SYS_SELECT_H 1 [ 206s] #define HAVE_SYS_SOCKET_H 1 [ 206s] #define HAVE_SYSLOG_H 1 [ 206s] #define HAVE_CTYPE_H 1 [ 206s] #define HAVE_NETINET_TCP_H 1 [ 206s] #define HAVE_ALLOCA_H 1 [ 206s] #define HAVE_ALLOCA 1 [ 206s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 206s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 206s] [ 206s] configure: exit 1 [ 206s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 206s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 206s] make[1]: *** [override_dh_auto_configure] Error 2 [ 206s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 206s] debian/rules:15: recipe for target 'build' failed [ 206s] make: *** [build] Error 2 [ 206s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 206s] [ 206s] armbuild01 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 20:11:13 UTC 2017. [ 206s] [ 206s] ### VM INTERACTION START ### [ 209s] [ 189.429454] SysRq : Power Off [ 209s] [ 189.449752] reboot: Power down [ 209s] ### VM INTERACTION END ### [ 209s] [ 209s] armbuild01 failed "build libosmocore_0.10.2.20171102.dsc" at Thu Nov 2 20:11:16 UTC 2017. [ 209s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 01:00:34 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 01:00:34 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <59fbbfc791ea5_53db6d4f8410943c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_16.04/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 223s] - [ 223s] -[+] Testing: ??? (non-recursive, direct truncation, not punctured) [ 223s] -[.] Input length : ret = 224 exp = 224 -> OK [ 223s] -[.] Output length : ret = 448 exp = 448 -> OK [ 223s] -[.] Pre computed vector checks: [ 223s] -[..] Encoding: OK [ 223s] -[..] Decoding: OK [ 223s] -[.] Random vector checks: [ 223s] -[..] Encoding / Decoding cycle : OK [ 223s] -[..] Encoding / Decoding cycle : OK [ 223s] -[..] Encoding / Decoding cycle : OK [ 223s] - [ 223s] ./testsuite.at:57: exit code was 132, expected 0 [ 223s] 9. testsuite.at:54: 9. conv (testsuite.at:54): FAILED (testsuite.at:57) [ 223s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 223s] make[1]: *** [override_dh_auto_test] Error 1 [ 223s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 223s] debian/rules:15: recipe for target 'build' failed [ 223s] make: *** [build] Error 2 [ 223s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 223s] [ 223s] build35 failed "build libosmocore_0.10.2.dsc" at Fri Nov 3 01:00:16 UTC 2017. [ 223s] [ 223s] ### VM INTERACTION START ### [ 226s] [ 218.021060] reboot: Power down [ 227s] ### VM INTERACTION END ### [ 227s] [ 227s] build35 failed "build libosmocore_0.10.2.dsc" at Fri Nov 3 01:00:20 UTC 2017. [ 227s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 3 03:48:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 3 Nov 2017 03:48:50 +0000 Subject: osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 The Alloctest change still seems to require an update... As I said on the mailinglist. I want to get this patch in first. So it is blocking everything else. -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 08:53:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 08:53:13 +0000 Subject: [PATCH] meta-telephony[laforge/nightly]: libosmocore: depend on gnutls for compilation now Message-ID: Review at https://gerrit.osmocom.org/4673 libosmocore: depend on gnutls for compilation now Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 --- M recipes-osmocom/libosmocore/libosmocore_git.bb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/73/4673/1 diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 3629074..d240a71 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -4,9 +4,9 @@ SRCREV = "${AUTOREV}" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.10.2+gitr${SRCPV}" -PR = "r0" +PR = "r1" -DEPENDS += "libtalloc" +DEPENDS += "libtalloc gnutls" PACKAGES =+ "libosmoctrl libosmocodec libosmogb libosmogsm libosmovty osmo-arfcn osmo-auc-gen" FILES_libosmoctrl = "${libdir}/libosmoctrl${SOLIBS}" -- To view, visit https://gerrit.osmocom.org/4673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 08:53:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 08:53:44 +0000 Subject: meta-telephony[laforge/nightly]: libosmocore: depend on gnutls for compilation now In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 08:53:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 08:53:46 +0000 Subject: [MERGED] meta-telephony[laforge/nightly]: libosmocore: depend on gnutls for compilation now In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libosmocore: depend on gnutls for compilation now ...................................................................... libosmocore: depend on gnutls for compilation now Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 --- M recipes-osmocom/libosmocore/libosmocore_git.bb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 3629074..d240a71 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -4,9 +4,9 @@ SRCREV = "${AUTOREV}" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.10.2+gitr${SRCPV}" -PR = "r0" +PR = "r1" -DEPENDS += "libtalloc" +DEPENDS += "libtalloc gnutls" PACKAGES =+ "libosmoctrl libosmocodec libosmogb libosmogsm libosmovty osmo-arfcn osmo-auc-gen" FILES_libosmoctrl = "${libdir}/libosmoctrl${SOLIBS}" -- To view, visit https://gerrit.osmocom.org/4673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 11:34:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 Nov 2017 11:34:13 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add support for osmo-bts-octphy In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4425 to look at the new patch set (#2). Add support for osmo-bts-octphy Specific parts for this class: - Runs osmo-bts-octphy binary, that requires CAP_NET_RAW capability because it uses an AF_PACKET socket. - As a consequence, it must use the previously added APIs to set the capability and modify the RPATH of the binary before launching it. These APIs require extra host setup and installed dependencies that will be documented soon in osmo-gsm-tester manual. - A num_trx() helper method is added because the binary requires that parameter. - A allocate_phy_instances() is added to help build/fill the conf dictionary to be used in the tmpl to be able to easily set up trx, phy and insances. A config to use a osmo-bts-octphy at full power is used (4 trx) is added in this commit to show how can it be configured. However our current license only has support to use 1 TRX, and so next commit drops most configurations to simplify the setup to use only 1 TRX. Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 --- M example/defaults.conf M example/resources.conf A src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl 5 files changed, 273 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/25/4425/2 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..7711297 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -45,3 +45,43 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F + +osmo_bts_octphy: + trx_list: + - {} + - nominal_power: 23 + max_power_red: 0 + arfcn: 869 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 870 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 871 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F diff --git a/example/resources.conf b/example/resources.conf index 70c1c35..0237d7c 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -31,6 +31,21 @@ trx_remote_ip: 10.42.42.112 ciphers: [a5_0, a5_1] +- label: OCTBTS 3500 + type: osmo-bts-octphy + ipa_unit_id: 8 + addr: 10.42.42.52 + band: GSM-1800 + trx_list: + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + arfcn: - arfcn: 512 band: GSM-1800 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py new file mode 100644 index 0000000..5014f40 --- /dev/null +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -0,0 +1,168 @@ +# osmo_gsm_tester: specifics for running an osmo-bts-octphy +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoBtsOctphy(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + env = None + pcu_sk_tmp_dir = None + values = None + + BIN_BTS_OCTPHY = 'osmo-bts-octphy' + + CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' + + def __init__(self, suite_run, conf): + super().__init__(log.C_RUN, OsmoBtsOctphy.BIN_BTS_OCTPHY) + self.suite_run = suite_run + self.conf = conf + self.env = {} + self.values = {} + self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') + if len(self.pcu_socket_path().encode()) > 107: + raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + + def cleanup(self): + if self.pcu_sk_tmp_dir: + try: + os.remove(self.pcu_socket_path()) + except OSError: + pass + os.rmdir(self.pcu_sk_tmp_dir) + + def pcu_socket_path(self): + return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') + + def remote_addr(self): + return self.conf.get('addr') + + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib)) + # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: + self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.setcap_net_raw(btsoct_path) + + self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr(), '-t', str(self.num_trx())) + #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1') + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def num_trx(self): + return len(self.values['osmo_bts_octphy'].get('trx_list', [])) + + def allocate_phy_instances(self, c): + ''' + Generate match trx Z <-> phy X inst Y to use in vty config + + We create a new phy for each trx found with a new hwaddr. If hwaddr is + already there, increase num_instances and give last instance index to + the current trx. + ''' + phy_list = [] + for trx in c.get('trx_list', []): + hwaddr = trx.get('hw_addr', None) + netdev = trx.get('net_device', None) + if hwaddr is None: + raise log.Error('Expected hw-addr value not found!') + found = False + phy_idx = 0 + for phy in phy_list: + if phy['hw_addr'] == hwaddr: + phy['num_instances'] += 1 + found = True + break + phy_idx += 1 + if not found: + phy_list.append({'hw_addr': hwaddr, 'net_device': netdev, 'num_instances': 1}) + trx['phy_idx'] = phy_idx + trx['instance_idx'] = phy_list[phy_idx]['num_instances'] - 1 + c['phy_list'] = phy_list + + def configure(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') + self.config_file = self.run_dir.new_file(OsmoBtsOctphy.CONF_BTS_OCTPHY) + self.dbg(config_file=self.config_file) + + values = dict(osmo_bts_octphy=config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_bts_octphy': { + 'oml_remote_ip': self.bsc.addr(), + 'pcu_socket_path': self.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_bts_octphy': self.conf }) + + self.allocate_phy_instances(values['osmo_bts_octphy']) + + self.dbg('OSMO-BTS-OCTPHY CONFIG:\n' + pprint.pformat(values)) + self.values = values + with open(self.config_file, 'w') as f: + r = template.render(OsmoBtsOctphy.CONF_BTS_OCTPHY, values) + self.dbg(r) + f.write(r) + + def conf_for_bsc(self): + values = config.get_defaults('bsc_bts') + config.overlay(values, config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.conf) + self.dbg(conf=values) + return values + + def set_bsc(self, bsc): + self.bsc = bsc + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 7e55129..25bb00f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -29,7 +29,7 @@ from . import schema from . import ofono_client from . import osmo_nitb -from . import bts_sysmo, bts_osmotrx +from . import bts_sysmo, bts_osmotrx, bts_octphy from .util import is_dict, is_list @@ -83,6 +83,7 @@ KNOWN_BTS_TYPES = { 'osmo-bts-sysmo': bts_sysmo.SysmoBts, 'osmo-bts-trx': bts_osmotrx.OsmoBtsTrx, + 'osmo-bts-octphy': bts_octphy.OsmoBtsOctphy, } def register_bts_type(name, clazz): diff --git a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl new file mode 100644 index 0000000..13cdb1d --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl @@ -0,0 +1,48 @@ +! Configuration rendered by osmo-gsm-tester +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level abis debug + logging level oml debug + logging level pag debug + logging level rll debug + logging level rr debug + logging level rsl debug +! + +%for phy in osmo_bts_octphy.phy_list: +phy ${loop.index} + octphy hw-addr ${phy.hw_addr} + octphy net-device ${phy.net_device} + octphy rx-gain 70 + %for inst in range(phy.num_instances): + instance ${loop.index} + %endfor +%endfor +bts 0 + band ${osmo_bts_octphy.band} + ipa unit-id ${osmo_bts_octphy.ipa_unit_id} 0 + oml remote-ip ${osmo_bts_octphy.oml_remote_ip} + pcu-socket ${osmo_bts_octphy.pcu_socket_path} + gsmtap-sapi bcch + gsmtap-sapi ccch + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi tch/f + gsmtap-sapi tch/h + gsmtap-sapi pacch + gsmtap-sapi pdtch + gsmtap-sapi ptcch + gsmtap-sapi cbch + gsmtap-sapi sacch +%for trx in osmo_bts_octphy.trx_list: + trx ${loop.index} + power-ramp max-initial 23000 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy ${trx.phy_idx} instance ${trx.instance_idx} +%endfor -- To view, visit https://gerrit.osmocom.org/4425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 3 11:34:14 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 Nov 2017 11:34:14 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Enable 2nd TRX Message-ID: Review at https://gerrit.osmocom.org/4674 Enable 2nd TRX Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee --- M example/defaults.conf M example/resources.conf 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/74/4674/1 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..cb3c99f 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -45,3 +45,19 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F + +osmo_bts_octphy: + trx_list: + - {} + - nominal_power: 23 + max_power_red: 0 + arfcn: 869 + timeslot_list: + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F diff --git a/example/resources.conf b/example/resources.conf index 2d90523..4f9bc84 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -39,6 +39,8 @@ trx_list: - hw_addr: 00:0c:90:2e:80:1e net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 arfcn: - arfcn: 512 -- To view, visit https://gerrit.osmocom.org/4674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:04:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:04:37 +0000 Subject: [PATCH] libosmocore[master]: gsm0503_coding.c: Fix tch_efr_unreorder() of one bit Message-ID: Review at https://gerrit.osmocom.org/4675 gsm0503_coding.c: Fix tch_efr_unreorder() of one bit There's an error in tch_efr_unreorder() function in gsm0503_coding.c that results in increased RBER. One of the indices used by repetition bit recombining in this function doesn't match 3GPP TS 45.003 section 3.1.1.3, specifically "w(k) = s(223) for k = 231 and 232". This bug resulted in RBER even under ideal conditions, with no fading or AWGN present. Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 --- M src/coding/gsm0503_coding.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/4675/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5213dc5..c4bdb81 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1751,7 +1751,7 @@ sum = s[172] + w[178] + w[179]; s[172] = (sum > 2); memcpy(s + 174, w + 180, 50); - sum = s[220] + w[230] + w[231]; + sum = s[222] + w[230] + w[231]; s[222] = (sum > 2); memcpy(s + 224, w + 232, 20); memcpy(p, w + 252, 8); -- To view, visit https://gerrit.osmocom.org/4675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:04:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:04:38 +0000 Subject: [PATCH] libosmocore[master]: gsm0503_coding.c: Use majority vote in tch_efr_unreorder() Message-ID: Review at https://gerrit.osmocom.org/4676 gsm0503_coding.c: Use majority vote in tch_efr_unreorder() The EFR coding contains some repeated bits. In case there are transmission errors, some bits may of course get corrupted. It looks like there's an improvement can be made by taking a majority vote on those "repetition bits", i.e. if 2 out of 3 bits are the same, then use that instead of expecting to match all 3 bits. See 3GPP TS 45.003 Section 3.1.1.3 for reference. Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858 --- M src/coding/gsm0503_coding.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/4676/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index c4bdb81..639d2df 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1743,16 +1743,16 @@ memcpy(s, w, 71); sum = s[69] + w[71] + w[72]; - s[69] = (sum > 2); + s[69] = (sum >= 2); memcpy(s + 71, w + 73, 50); sum = s[119] + w[123] + w[124]; - s[119] = (sum > 2); + s[119] = (sum >= 2); memcpy(s + 121, w + 125, 53); sum = s[172] + w[178] + w[179]; s[172] = (sum > 2); memcpy(s + 174, w + 180, 50); sum = s[222] + w[230] + w[231]; - s[222] = (sum > 2); + s[222] = (sum >= 2); memcpy(s + 224, w + 232, 20); memcpy(p, w + 252, 8); } -- To view, visit https://gerrit.osmocom.org/4676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:05:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:05:21 +0000 Subject: libosmocore[master]: gsm0503_coding.c: Fix tch_efr_unreorder() of one bit In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:05:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:05:28 +0000 Subject: libosmocore[master]: gsm0503_coding.c: Use majority vote in tch_efr_unreorder() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:23:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:23:48 +0000 Subject: [MERGED] libosmocore[master]: gsm0503_coding.c: Use majority vote in tch_efr_unreorder() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0503_coding.c: Use majority vote in tch_efr_unreorder() ...................................................................... gsm0503_coding.c: Use majority vote in tch_efr_unreorder() The EFR coding contains some repeated bits. In case there are transmission errors, some bits may of course get corrupted. It looks like there's an improvement can be made by taking a majority vote on those "repetition bits", i.e. if 2 out of 3 bits are the same, then use that instead of expecting to match all 3 bits. See 3GPP TS 45.003 Section 3.1.1.3 for reference. Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858 --- M src/coding/gsm0503_coding.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index c4bdb81..639d2df 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1743,16 +1743,16 @@ memcpy(s, w, 71); sum = s[69] + w[71] + w[72]; - s[69] = (sum > 2); + s[69] = (sum >= 2); memcpy(s + 71, w + 73, 50); sum = s[119] + w[123] + w[124]; - s[119] = (sum > 2); + s[119] = (sum >= 2); memcpy(s + 121, w + 125, 53); sum = s[172] + w[178] + w[179]; s[172] = (sum > 2); memcpy(s + 174, w + 180, 50); sum = s[222] + w[230] + w[231]; - s[222] = (sum > 2); + s[222] = (sum >= 2); memcpy(s + 224, w + 232, 20); memcpy(p, w + 252, 8); } -- To view, visit https://gerrit.osmocom.org/4676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:23:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 12:23:49 +0000 Subject: [MERGED] libosmocore[master]: gsm0503_coding.c: Fix tch_efr_unreorder() of one bit In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0503_coding.c: Fix tch_efr_unreorder() of one bit ...................................................................... gsm0503_coding.c: Fix tch_efr_unreorder() of one bit There's an error in tch_efr_unreorder() function in gsm0503_coding.c that results in increased RBER. One of the indices used by repetition bit recombining in this function doesn't match 3GPP TS 45.003 section 3.1.1.3, specifically "w(k) = s(223) for k = 231 and 232". This bug resulted in RBER even under ideal conditions, with no fading or AWGN present. Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 --- M src/coding/gsm0503_coding.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5213dc5..c4bdb81 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1751,7 +1751,7 @@ sum = s[172] + w[178] + w[179]; s[172] = (sum > 2); memcpy(s + 174, w + 180, 50); - sum = s[220] + w[230] + w[231]; + sum = s[222] + w[230] + w[231]; s[222] = (sum > 2); memcpy(s + 224, w + 232, 20); memcpy(p, w + 252, 8); -- To view, visit https://gerrit.osmocom.org/4675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 3 12:41:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 3 Nov 2017 12:41:38 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#10). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. TODO: Handover will not work yet, because there is no functionality to update the connection with the port/ip of the new BTS. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,102 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/10 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..a3e13a4 --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,46 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..326703d 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -124,11 +87,9 @@ * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..d5aaab3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +441,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +545,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +754,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..dbdd3c1 --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,921 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_DLCX, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_DLCX, "ST_DLCX (delete all rtp connections)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_DLCX, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_BTS_RESP: + break; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_ASS_COMPLETE: + break; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_DLCX, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_DLCX: Remove connection for the BTS and NET side. */ +static void fsm_dlcx_all_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "removing connection for the BTS and NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. */ + [ST_DLCX] = { + .in_event_mask = (1 << EV_TEARDOWN), + .out_state_mask = (1 << ST_HALT), + .name = "ST_DLCX", + .action = fsm_dlcx_all_cb, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 10 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 3 14:31:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 14:31:18 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 14:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 14:31:21 +0000 Subject: osmo-iuh[master]: Link libosmo-ranap against libosmovty In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 14:31:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 14:31:26 +0000 Subject: [MERGED] osmo-iuh[master]: Link libosmo-ranap against libosmovty In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Link libosmo-ranap against libosmovty ...................................................................... Link libosmo-ranap against libosmovty This fixes the following dh-shlibdeps warnings: Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24 dpkg-shlibdeps: warning: symbol install_element used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol vty_out used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries --- M src/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index a45b70b..ebed2bf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,7 +51,7 @@ RANAP_LIBVERSION=1:0:0 lib_LTLIBRARIES = libosmo-ranap.la libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION) -libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOSIGTRAN_LIBS) \ +libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ ranap_common_cn.c iu_client.c iu_client_vty.c -- To view, visit https://gerrit.osmocom.org/4619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 3 14:31:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 14:31:26 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp ...................................................................... osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp This fixes the following dpkg-shlibeps warnings: Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libosmogsm.so.8 (it uses none of the library's symbols) dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libsctp.so.1 (it uses none of the library's symbols) --- M src/Makefile.am 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index d815394..a45b70b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,6 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -COMMON_LDADD = -lsctp # build the shared RANAP library # @@ -68,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) $(OSMOGSM_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) $(COMMON_LDADD) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 3 16:38:10 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 3 Nov 2017 16:38:10 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#11). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. TODO: Handover will not work yet, because there is no functionality to update the connection with the port/ip of the new BTS. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,126 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/11 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..a3e13a4 --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,46 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..326703d 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -124,11 +87,9 @@ * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..d5aaab3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +441,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +545,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +754,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..dfb0f9a --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,945 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_DLCX, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_DLCX, "ST_DLCX (delete all rtp connections)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_DLCX, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_BTS_RESP: + break; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_ASS_COMPLETE: + break; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "MDCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/NET: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_DLCX, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_DLCX: Remove connection for the BTS and NET side. */ +static void fsm_dlcx_all_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "removing connection for the BTS and NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_DLCX), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. */ + [ST_DLCX] = { + .in_event_mask = (1 << EV_TEARDOWN), + .out_state_mask = (1 << ST_HALT), + .name = "ST_DLCX", + .action = fsm_dlcx_all_cb, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 11 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 3 16:53:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 3 Nov 2017 16:53:33 +0000 Subject: [PATCH] osmo-bts[master]: octphy: override firmware version check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4446 to look at the new patch set (#4). octphy: override firmware version check When osmo-bts detects a mismatch between the firmware of the DSP and the header version which it was compile with, a hard exit is performed. In some cases this may hinder debugging/testing things. Implement a commandline option to intentinally override the check. Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 --- M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/main.c 2 files changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/4446/4 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index d1d5bf6..a1c384a 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -52,6 +52,8 @@ #include #include +bool no_fw_check = 0; + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -1161,11 +1163,23 @@ "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s', ver_hdr='%s')\n", air->szName, air->szDescription, air->szVersion, ver_hdr); - /* Bail if dsp firmware does not match up the header version info */ + /* Check if the firmware version of the DSP matches the header files + * that were used to compile osmo-bts */ if (strcmp(air->szVersion, ver_hdr) != 0) { LOGP(DL1C, LOGL_ERROR, - "Invalid header-file / dsp-firmware combination, exiting...\n"); - exit(1); + "Invalid header-file-version / dsp-firmware-version combination\n"); + LOGP(DL1C, LOGL_ERROR, + "Expected firmware version: %s\n", ver_hdr); + LOGP(DL1C, LOGL_ERROR, + "Actual firmware version: %s\n", air->szVersion); + + if (!no_fw_check) { + LOGP(DL1C, LOGL_ERROR, + "use option -I to override the check (not recommened)\n"); + LOGP(DL1C, LOGL_ERROR, + "exiting...\n"); + exit(1); + } } talloc_replace(fl1h->info.app.name, fl1h, air->szName); diff --git a/src/osmo-bts-octphy/main.c b/src/osmo-bts-octphy/main.c index 0f4d0dd..928a4c8 100644 --- a/src/osmo-bts-octphy/main.c +++ b/src/osmo-bts-octphy/main.c @@ -51,9 +51,11 @@ #define RF_LOCK_PATH "/var/lock/bts_rf_lock" extern int pcu_direct; +extern bool no_fw_check; int bts_model_print_help() { + printf(" -I --no-fw-check Override firmware version check\n"); return 0; } @@ -65,15 +67,19 @@ int option_idx = 0, c; static const struct option long_options[] = { /* specific to this hardware */ + { "no-fw-check", 0, 0, 'I' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "", + c = getopt_long(argc, argv, "I", long_options, &option_idx); if (c == -1) break; switch (c) { + case 'I': + no_fw_check = true; + break; default: num_errors++; break; -- To view, visit https://gerrit.osmocom.org/4446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 3 18:46:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 18:46:45 +0000 Subject: [PATCH] osmo-ci[master]: gerrit jenkins jobs: Remove comment-added-event Message-ID: Review at https://gerrit.osmocom.org/4677 gerrit jenkins jobs: Remove comment-added-event This trigger is responsible for triggering another build once the first build is complete and sets a +V Change-Id: I235e0211a01da0eb74d8e6a9581aa34b59073ca0 --- M jobs/gerrit-verifications.yml 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/77/4677/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index c70115c..3f6264b 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -233,9 +233,6 @@ - patchset-created-event: exclude-drafts: true exclude-no-code-change: true - - comment-added-event: - approval-category: 'Verified' - approval-value: 1 projects: - project-compare-type: 'PLAIN' project-pattern: '{repos}' -- To view, visit https://gerrit.osmocom.org/4677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I235e0211a01da0eb74d8e6a9581aa34b59073ca0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 19:09:01 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 3 Nov 2017 19:09:01 +0000 Subject: [PATCH] osmo-pcu[master]: LC15: Fix TA adjustment Message-ID: Review at https://gerrit.osmocom.org/4678 LC15: Fix TA adjustment Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/pcu_l1_if.h 4 files changed, 57 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/4678/1 diff --git a/src/bts.cpp b/src/bts.cpp index e41b1fa..7ffb132 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1619,20 +1619,48 @@ return rc; } -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta) +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta) { + int ta_final; + bool need_update = false; + struct gprs_rlcmac_ul_tbf *tbf = bts_main_data()->bts->ul_tbf_by_poll_fn(fn, trx_no, ts); if (!tbf) LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to " "unknown UL TBF on TRX = %d, TS = %d, FN = %d\n", p, ta, trx_no, ts, fn); - else if (tbf->ta() != ta) { - LOGP(DL1IF, LOGL_INFO, "[%s] Updating TA %u -> %u on " - "TRX = %d, TS = %d, FN = %d\n", - p, tbf->ta(), ta, trx_no, ts, fn); - tbf->set_ta(ta); + else { + /* we need to distinguish TA information provided by L1 + * from PH-DATA-IND and PHY-RA-IND so that we can properly + * update TA for given TBF + */ + if (!strcmp(p, "PH-DATA")) { + if (ta) { + /* adjust TA based on TA provided by PH-DATA-IND */ + ta_final = tbf->ta() + ta; + need_update = true; + } + } else if ((!strcmp(p, "PH-RA"))) { + if (tbf->ta() != ta) { + /* adjust TA based on TA provided by PH-RA-IND */ + ta_final = ta; + need_update = true; + } + } + + if (need_update) { + /* limit TA range is between 0 and 63 bits */ + if (ta_final < 0) + ta_final = 0; + else if (ta_final > 63) + ta_final = 63; + + LOGP(DL1IF, LOGL_INFO, "[%s] Updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + p, tbf->tlli(), tbf->ta(), ta_final, trx_no, ts, fn); + tbf->set_ta((uint8_t)ta_final); + } } } diff --git a/src/bts.h b/src/bts.h index d65cd2f..139aeae 100644 --- a/src/bts.h +++ b/src/bts.h @@ -162,8 +162,7 @@ #ifdef __cplusplus extern "C" { #endif -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta); +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta); #ifdef __cplusplus } #endif diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 37b7f78..628bd3d 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -203,7 +203,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto)); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -248,7 +248,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + sign_qta2ta(ra_ind->measParam.i16BurstTiming)); return 0; } diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 1618260..af51693 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -43,6 +43,25 @@ return qta >> 2; } +static inline int8_t sign_qta2ta(int16_t qta) +{ + int8_t ta_adj = 0; + + if (qta < -252) + qta = -252; + + if (qta > 252) + qta = 252; + + /* 1-bit TA adjustment if TA error reported by L1 is higher outside +/- 2 qbits */ + if (qta > 2) + ta_adj = 1; + if (qta < -2) + ta_adj = -1; + + return (qta >> 2) + ta_adj; +} + /* * L1 Measurement values */ -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Nov 3 19:09:02 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 3 Nov 2017 19:09:02 +0000 Subject: [PATCH] osmo-pcu[master]: PCU: display TA information in TBF stats Message-ID: Review at https://gerrit.osmocom.org/4679 PCU: display TA information in TBF stats Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 --- M src/pcu_vty_functions.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/79/4679/1 diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index ce79e05..4aa1068 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -44,8 +44,9 @@ gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf); gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf); - vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(), + vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) TA=%d DIR=%s IMSI=%s%s", tbf->tfi(), tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid", + tbf->ta(), tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL", tbf->imsi(), VTY_NEWLINE); vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d " -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen From admin at opensuse.org Fri Nov 3 19:54:14 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:54:14 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <59fcc987c21ab_53db6d4f84322393@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.10/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 135s] #define STDC_HEADERS 1 [ 135s] #define HAVE_EXECINFO_H 1 [ 135s] #define HAVE_SYS_SELECT_H 1 [ 135s] #define HAVE_SYS_SOCKET_H 1 [ 135s] #define HAVE_SYSLOG_H 1 [ 135s] #define HAVE_CTYPE_H 1 [ 135s] #define HAVE_NETINET_TCP_H 1 [ 135s] #define HAVE_ALLOCA_H 1 [ 135s] #define HAVE_ALLOCA 1 [ 135s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 135s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 135s] [ 135s] configure: exit 1 [ 135s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 135s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 135s] make[1]: *** [override_dh_auto_configure] Error 2 [ 135s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 135s] debian/rules:15: recipe for target 'build' failed [ 135s] make: *** [build] Error 2 [ 135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 135s] [ 135s] cloud129 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:07 UTC 2017. [ 135s] [ 135s] ### VM INTERACTION START ### [ 139s] [ 120.627288] reboot: Power down [ 140s] ### VM INTERACTION END ### [ 140s] [ 140s] cloud129 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:11 UTC 2017. [ 140s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:54:48 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:54:48 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <59fcc9a4b8191_53db6d4f8432245@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 84s] #define STDC_HEADERS 1 [ 84s] #define HAVE_EXECINFO_H 1 [ 84s] #define HAVE_SYS_SELECT_H 1 [ 84s] #define HAVE_SYS_SOCKET_H 1 [ 84s] #define HAVE_SYSLOG_H 1 [ 84s] #define HAVE_CTYPE_H 1 [ 84s] #define HAVE_NETINET_TCP_H 1 [ 84s] #define HAVE_ALLOCA_H 1 [ 84s] #define HAVE_ALLOCA 1 [ 84s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 84s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 84s] [ 84s] configure: exit 1 [ 84s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 84s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 84s] make[1]: *** [override_dh_auto_configure] Error 2 [ 84s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 84s] debian/rules:15: recipe for target 'build' failed [ 84s] make: *** [build] Error 2 [ 84s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 84s] [ 84s] lamb19 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:38 UTC 2017. [ 84s] [ 84s] ### VM INTERACTION START ### [ 87s] [ 80.665558] reboot: Power down [ 87s] ### VM INTERACTION END ### [ 87s] [ 87s] lamb19 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:41 UTC 2017. [ 87s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:54:48 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:54:48 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <59fcc9a586de8_53db6d4f843225cb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.04/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 150s] #define STDC_HEADERS 1 [ 150s] #define HAVE_EXECINFO_H 1 [ 150s] #define HAVE_SYS_SELECT_H 1 [ 150s] #define HAVE_SYS_SOCKET_H 1 [ 150s] #define HAVE_SYSLOG_H 1 [ 150s] #define HAVE_CTYPE_H 1 [ 150s] #define HAVE_NETINET_TCP_H 1 [ 150s] #define HAVE_ALLOCA_H 1 [ 150s] #define HAVE_ALLOCA 1 [ 150s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 150s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 150s] [ 150s] configure: exit 1 [ 150s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 150s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 150s] make[1]: *** [override_dh_auto_configure] Error 2 [ 150s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 150s] debian/rules:15: recipe for target 'build' failed [ 150s] make: *** [build] Error 2 [ 150s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 150s] [ 150s] cloud113 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:35 UTC 2017. [ 150s] [ 150s] ### VM INTERACTION START ### [ 154s] [ 131.050341] reboot: Power down [ 160s] ### VM INTERACTION END ### [ 160s] [ 160s] cloud113 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:45 UTC 2017. [ 160s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:54:48 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:54:48 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <59fcc9a6dd35f_53db6d4f84322797@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 171s] #define STDC_HEADERS 1 [ 171s] #define HAVE_EXECINFO_H 1 [ 171s] #define HAVE_SYS_SELECT_H 1 [ 171s] #define HAVE_SYS_SOCKET_H 1 [ 171s] #define HAVE_SYSLOG_H 1 [ 171s] #define HAVE_CTYPE_H 1 [ 171s] #define HAVE_NETINET_TCP_H 1 [ 171s] #define HAVE_ALLOCA_H 1 [ 171s] #define HAVE_ALLOCA 1 [ 171s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 171s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 171s] [ 171s] configure: exit 1 [ 171s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 171s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 171s] make[1]: *** [override_dh_auto_configure] Error 255 [ 171s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 171s] debian/rules:15: recipe for target 'build' failed [ 171s] make: *** [build] Error 2 [ 171s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 171s] [ 171s] cloud123 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:33 UTC 2017. [ 171s] [ 171s] ### VM INTERACTION START ### [ 174s] [ 158.225871] reboot: Power down [ 176s] ### VM INTERACTION END ### [ 176s] [ 176s] cloud123 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:38 UTC 2017. [ 176s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:54:48 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:54:48 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <59fcc9a75b28d_53db6d4f843228a9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 90s] #define STDC_HEADERS 1 [ 90s] #define HAVE_EXECINFO_H 1 [ 90s] #define HAVE_SYS_SELECT_H 1 [ 90s] #define HAVE_SYS_SOCKET_H 1 [ 90s] #define HAVE_SYSLOG_H 1 [ 90s] #define HAVE_CTYPE_H 1 [ 90s] #define HAVE_NETINET_TCP_H 1 [ 90s] #define HAVE_ALLOCA_H 1 [ 90s] #define HAVE_ALLOCA 1 [ 90s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 90s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 90s] [ 90s] configure: exit 1 [ 90s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 90s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 90s] make[1]: *** [override_dh_auto_configure] Error 2 [ 90s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 90s] debian/rules:15: recipe for target 'build' failed [ 90s] make: *** [build] Error 2 [ 90s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 90s] [ 90s] lamb53 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:36 UTC 2017. [ 90s] [ 90s] ### VM INTERACTION START ### [ 93s] [ 86.304886] reboot: Power down [ 93s] ### VM INTERACTION END ### [ 93s] [ 93s] lamb53 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:40 UTC 2017. [ 93s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:55:05 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:55:05 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <59fcc9a8b337c_53db6d4f8432296f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 119s] #define HAVE_EXECINFO_H 1 [ 119s] #define HAVE_SYS_SELECT_H 1 [ 119s] #define HAVE_SYS_SOCKET_H 1 [ 119s] #define HAVE_SYSLOG_H 1 [ 119s] #define HAVE_CTYPE_H 1 [ 119s] #define HAVE_NETINET_TCP_H 1 [ 119s] #define HAVE_ALLOCA_H 1 [ 119s] #define HAVE_ALLOCA 1 [ 119s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 119s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 119s] [ 119s] configure: exit 1 [ 119s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_6[ 111.312073] serial8250: too much work for irq4 [ 119s] 4-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 119s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 119s] make[1]: *** [override_dh_auto_configure] Error 2 [ 119s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 119s] debian/rules:15: recipe for target 'build' failed [ 119s] make: *** [build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 119s] [ 119s] lamb12 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:45 UTC 2017. [ 119s] [ 119s] ### VM INTERACTION START ### [ 122s] [ 114.510448] reboot: Power down [ 122s] ### VM INTERACTION END ### [ 122s] [ 122s] lamb12 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:54:49 UTC 2017. [ 122s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:55:39 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:55:39 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/i586 In-Reply-To: References: Message-ID: <59fcc9c532247_53db6d4f843231d3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 229s] #define HAVE_EXECINFO_H 1 [ 229s] #define HAVE_SYS_SELECT_H 1 [ 229s] #define HAVE_SYS_SOCKET_H 1 [ 229s] #define HAVE_SYSLOG_H 1 [ 229s] #define HAVE_CTYPE_H 1 [ 229s] #define HAVE_NETINET_TCP_H 1 [ 229s] #define HAVE_ALLOCA_H 1 [ 229s] #define HAVE_ALLOCA 1 [ 229s] #define HAVE_DECL_SYS_GETRANDOM 0 [ 229s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 229s] [ 229s] configure: exit 1 [ 229s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 229s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 229s] make[1]: *** [override_dh_auto_configure] Error 255 [ 229s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 229s] debian/rules:15: recipe for target 'build' failed [ 229s] make: *** [build] Error 2 [ 229s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 229s] [ 229s] lamb58 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:34 UTC 2017. [ 229s] [ 229s] ### VM INTERACTION START ### [ 230s] Powering off. [ 230s] [ 213.006518] reboot: Power down [ 230s] ### VM INTERACTION END ### [ 230s] [ 230s] lamb58 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:37 UTC 2017. [ 230s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:55:56 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:55:56 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/i586 In-Reply-To: References: Message-ID: <59fcc9e043b2c_53db6d4f84323228@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 235s] #define STDC_HEADERS 1 [ 235s] #define HAVE_EXECINFO_H 1 [ 235s] #define HAVE_SYS_SELECT_H 1 [ 235s] #define HAVE_SYS_SOCKET_H 1 [ 235s] #define HAVE_SYSLOG_H 1 [ 235s] #define HAVE_CTYPE_H 1 [ 235s] #define HAVE_NETINET_TCP_H 1 [ 235s] #define HAVE_ALLOCA_H 1 [ 235s] #define HAVE_ALLOCA 1 [ 235s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 235s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 235s] [ 235s] configure: exit 1 [ 235s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 235s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 235s] make[1]: *** [override_dh_auto_configure] Error 2 [ 235s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 235s] debian/rules:15: recipe for target 'build' failed [ 235s] make: *** [build] Error 2 [ 235s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 235s] [ 235s] lamb58 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:39 UTC 2017. [ 235s] [ 235s] ### VM INTERACTION START ### [ 238s] [ 221.590025] reboot: Power down [ 238s] ### VM INTERACTION END ### [ 238s] [ 238s] lamb58 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:43 UTC 2017. [ 238s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:55:56 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:55:56 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <59fcc9e0b342e_53db6d4f84323317@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 147s] #define HAVE_SYS_SELECT_H 1 [ 147s] #define HAVE_SYS_SOCKET_H 1 [ 147s] #define HAVE_SYSLOG_H 1 [ 147s] #define HAVE_CTYPE_H 1 [ 147s] #define HAVE_NETINET_TCP_H 1 [ 147s] #define HAVE_ALLOCA_H 1 [ 147s] #define HAVE_ALLOCA 1 [ 147s] #define HAVE_DECL_SYS_GETRANDOM 0 [ 147s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 147s] [ 147s] configure: exit 1 [ 147s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${pre[ 119.372048] serial8250: too much work for irq4 [ 147s] fix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 147s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 147s] make[1]: *** [override_dh_auto_configure] Error 255 [ 147s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 147s] debian/rules:15: recipe for target 'build' failed [ 147s] make: *** [build] Error 2 [ 147s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 147s] [ 147s] cloud115 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:45 UTC 2017. [ 147s] [ 147s] ### VM INTERACTION START ### [ 148s] Powering off. [ 148s] [ 120.502263] reboot: Power down [ 149s] ### VM INTERACTION END ### [ 149s] [ 149s] cloud115 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:48 UTC 2017. [ 149s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:56:14 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:56:14 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <59fcc9e17bff2_53db6d4f8432349e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 188s] #define STDC_HEADERS 1 [ 188s] #define HAVE_EXECINFO_H 1 [ 188s] #define HAVE_SYS_SELECT_H 1 [ 188s] #define HAVE_SYS_SOCKET_H 1 [ 188s] #define HAVE_SYSLOG_H 1 [ 188s] #define HAVE_CTYPE_H 1 [ 188s] #define HAVE_NETINET_TCP_H 1 [ 188s] #define HAVE_ALLOCA_H 1 [ 188s] #define HAVE_ALLOCA 1 [ 188s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 188s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 188s] [ 188s] configure: exit 1 [ 188s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 188s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 188s] make[1]: *** [override_dh_auto_configure] Error 2 [ 188s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 188s] debian/rules:15: recipe for target 'build' failed [ 188s] make: *** [build] Error 2 [ 188s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 188s] [ 188s] cloud112 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:56:07 UTC 2017. [ 188s] [ 188s] ### VM INTERACTION START ### [ 191s] [ 150.448592] reboot: Power down [ 193s] ### VM INTERACTION END ### [ 193s] [ 193s] cloud112 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:56:12 UTC 2017. [ 193s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:56:14 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:56:14 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <59fcc9e268058_53db6d4f8432355d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/armv7l Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 270s] #define HAVE_EXECINFO_H 1 [ 270s] #define HAVE_SYS_SELECT_H 1 [ 270s] #define HAVE_SYS_SOCKET_H 1 [ 270s] #define HAVE_SYSLOG_H 1 [ 270s] #define HAVE_CTYPE_H 1 [ 270s] #define HAVE_NETINET_TCP_H 1 [ 270s] #define HAVE_ALLOCA_H 1 [ 270s] #define HAVE_ALLOCA 1 [ 270s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 270s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 270s] [ 270s] configure: exit 1 [ 270s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 270s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 270s] make[1]: *** [override_dh_auto_configure] Error 2 [ 270s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 270s] debian/rules:15: recipe for target 'build' failed [ 270s] make: *** [build] Error 2 [ 270s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 270s] [ 270s] armbuild04 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:56 UTC 2017. [ 270s] [ 270s] ### VM INTERACTION START ### [ 272s] [ 231.252539] SysRq : Power Off [ 272s] [ 231.273723] reboot: Power down [ 272s] ### VM INTERACTION END ### [ 272s] [ 272s] armbuild04 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:59 UTC 2017. [ 272s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 19:56:14 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 19:56:14 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <59fcc9e2e35f8_53db6d4f84323649@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 168s] #define HAVE_CTYPE_H 1 [ 168s] #define HAVE_NETINET_TCP_H 1 [ 168s] #define HAVE_ALLOCA_H 1 [ 168s] #define HAVE_ALLOCA 1 [ 168s] #define HAVE_DECL_SYS_GETRANDOM 1 [ 168s] #define HAVE_TM_GMTOFF_IN_TM 1 [ 168s] [ 168s] configure: exit 1 [ 168s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-static returned exit code 1 [ 168s] debian/rules:33: recipe for target 'override_dh_auto_configure' failed [ 168s] make[1]: *** [override_dh_auto_configure] Error 255 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] debian/rules:15: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] cloud119 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:55:56 UTC 2017. [ 168s] [ 168s] ### VM INTERACTION START ### [ 168s] [ 153.116031] serial8250: too much work for irq4 [ 168s] [ 153.176030] serial8250: too much work for irq4 [ 168s] [ 153.240129] serial8250: too much work for irq4 [ 168s] [ 153.304149] serial8250: too much work for irq4 [ 168s] [ 153.368140] serial8250: too much work for irq4 [ 171s] [ 156.473415] reboot: Power down [ 175s] ### VM INTERACTION END ### [ 175s] [ 175s] cloud119 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 19:56:03 UTC 2017. [ 175s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 3 20:01:22 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 03 Nov 2017 20:01:22 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <59fccb2b1fca1_53db6d4f84324443@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/aarch64 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 590s] configure:12540: checking execinfo.h presence [ 590s] configure:12540: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 590s] configure:12540: $? = 0 [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking for execinfo.h [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking sys/select.h usability [ 590s] configure:12540: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 590s] configure:12540: $? = 0 [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking sys/select.h presence [ 590s] configure:12540: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 590s] configure:12540: $? = 0 [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking for sys/select.h [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking sys/socket.h usability [ 590s] configure:12540: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 590s] configure:12540: $? = 0 [ 590s] configure:12540: result: yes [ 590s] configure:12540: checking sys/socket.h presence [ 590s] configure:12540: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 590s] configure:12540: $? = 0 [ 591s] configur[ 533.719774] sysrq: SysRq : Power Off [ 591s] [ 533.742920] reboot: Power down [ 592s] ### VM INTERACTION END ### [ 592s] [ 592s] obs-arm-1 failed "build libosmocore_0.10.2.20171103.dsc" at Fri Nov 3 20:01:18 UTC 2017. [ 592s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 3 20:53:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 20:53:38 +0000 Subject: [PATCH] libosmocore[master]: debian: build now depends on libgnutls Message-ID: Review at https://gerrit.osmocom.org/4680 debian: build now depends on libgnutls In Change-Id Ic77866ce65acf524b768882c751a4f9c0635740b we introduced a gnutls fall-back for random number generation, and made this a default unless explicitly disabled at compile time. This means the debian package needs related build dependency. Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6 Related: OS#1694 --- M debian/control 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/4680/1 diff --git a/debian/control b/debian/control index 8ba5583..64c4870 100644 --- a/debian/control +++ b/debian/control @@ -10,6 +10,7 @@ dh-autoreconf, libdpkg-perl, git, + libgnutls28-dev, doxygen, libpcsclite-dev, pkg-config, -- To view, visit https://gerrit.osmocom.org/4680 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 3 20:56:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 20:56:36 +0000 Subject: libosmocore[master]: debian: build now depends on libgnutls In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4680 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 3 20:56:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 Nov 2017 20:56:38 +0000 Subject: [MERGED] libosmocore[master]: debian: build now depends on libgnutls In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: build now depends on libgnutls ...................................................................... debian: build now depends on libgnutls In Change-Id Ic77866ce65acf524b768882c751a4f9c0635740b we introduced a gnutls fall-back for random number generation, and made this a default unless explicitly disabled at compile time. This means the debian package needs related build dependency. Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6 Related: OS#1694 --- M debian/control 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 8ba5583..64c4870 100644 --- a/debian/control +++ b/debian/control @@ -10,6 +10,7 @@ dh-autoreconf, libdpkg-perl, git, + libgnutls28-dev, doxygen, libpcsclite-dev, pkg-config, -- To view, visit https://gerrit.osmocom.org/4680 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:33:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:33:58 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp-client vty: use name 'mgw' instead of 'mgcpgw' In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4597 to look at the new patch set (#2). mgcp-client vty: use name 'mgw' instead of 'mgcpgw' 'mgcpgw' was a working title for the osmo-mgw. Before this takes hold out there, let's rename the VTY commands to 'mgw'. I'd rather have some local fallout in our testing environments now than drag the stupid name along. Keep deprecated 'mgcpgw' commands for backwards compat. Change-Id: I1d43d42929dc9162e57640499526fb7cadbcfbe6 --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 54 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/97/4597/2 diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index c52803f..0a30436 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -1,4 +1,4 @@ -/* MGCPGW client interface to quagga VTY */ +/* MGCP client interface to quagga VTY */ /* (C) 2016 by sysmocom s.m.f.c. GmbH * Based on OpenBSC interface to quagga VTY (libmsc/vty_interface_layer3.c) * (C) 2009 by Harald Welte @@ -29,14 +29,14 @@ #include -#define MGCPGW_STR "MGCP gateway configuration for RTP streams\n" +#define MGW_STR "MGCP gateway configuration for RTP streams\n" void *global_mgcp_client_ctx = NULL; struct mgcp_client_conf *global_mgcp_client_conf = NULL; -DEFUN(cfg_mgcpgw_local_ip, cfg_mgcpgw_local_ip_cmd, - "mgcpgw local-ip A.B.C.D", - MGCPGW_STR "local bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd, + "mgw local-ip A.B.C.D", + MGW_STR "local bind to connect to MGCP gateway with\n" "local bind IP address\n") { if (!global_mgcp_client_conf) @@ -46,10 +46,14 @@ talloc_strdup(global_mgcp_client_ctx, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_local_ip, cfg_mgcpgw_local_ip_cmd, + "mgcpgw local-ip A.B.C.D", + MGW_STR "local bind to connect to MGCP gateway with\n" + "local bind IP address\n") -DEFUN(cfg_mgcpgw_local_port, cfg_mgcpgw_local_port_cmd, - "mgcpgw local-port <0-65535>", - MGCPGW_STR "local bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_local_port, cfg_mgw_local_port_cmd, + "mgw local-port <0-65535>", + MGW_STR "local bind to connect to MGCP gateway with\n" "local bind port\n") { if (!global_mgcp_client_conf) @@ -57,10 +61,14 @@ global_mgcp_client_conf->local_port = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_local_port, cfg_mgcpgw_local_port_cmd, + "mgcpgw local-port <0-65535>", + MGW_STR "local bind to connect to MGCP gateway with\n" + "local bind port\n") -DEFUN(cfg_mgcpgw_remote_ip, cfg_mgcpgw_remote_ip_cmd, - "mgcpgw remote-ip A.B.C.D", - MGCPGW_STR "remote bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_remote_ip, cfg_mgw_remote_ip_cmd, + "mgw remote-ip A.B.C.D", + MGW_STR "remote bind to connect to MGCP gateway with\n" "remote bind IP address\n") { if (!global_mgcp_client_conf) @@ -70,10 +78,14 @@ talloc_strdup(global_mgcp_client_ctx, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_remote_ip, cfg_mgcpgw_remote_ip_cmd, + "mgcpgw remote-ip A.B.C.D", + MGW_STR "remote bind to connect to MGCP gateway with\n" + "remote bind IP address\n") -DEFUN(cfg_mgcpgw_remote_port, cfg_mgcpgw_remote_port_cmd, - "mgcpgw remote-port <0-65535>", - MGCPGW_STR "remote bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_remote_port, cfg_mgw_remote_port_cmd, + "mgw remote-port <0-65535>", + MGW_STR "remote bind to connect to MGCP gateway with\n" "remote bind port\n") { if (!global_mgcp_client_conf) @@ -81,10 +93,14 @@ global_mgcp_client_conf->remote_port = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_remote_port, cfg_mgcpgw_remote_port_cmd, + "mgcpgw remote-port <0-65535>", + MGW_STR "remote bind to connect to MGCP gateway with\n" + "remote bind port\n") -DEFUN(cfg_mgcpgw_endpoint_range, cfg_mgcpgw_endpoint_range_cmd, - "mgcpgw endpoint-range <1-65534> <1-65534>", - MGCPGW_STR "usable range of endpoint identifiers\n" +DEFUN(cfg_mgw_endpoint_range, cfg_mgw_endpoint_range_cmd, + "mgw endpoint-range <1-65534> <1-65534>", + MGW_STR "usable range of endpoint identifiers\n" "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") { @@ -101,13 +117,18 @@ global_mgcp_client_conf->last_endpoint = last_endpoint; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_endpoint_range, cfg_mgcpgw_endpoint_range_cmd, + "mgcpgw endpoint-range <1-65534> <1-65534>", + MGW_STR "usable range of endpoint identifiers\n" + "set first useable endpoint identifier\n" + "set the last useable endpoint identifier\n") #define BTS_START_STR "First UDP port allocated for the BTS side\n" #define UDP_PORT_STR "UDP Port number\n" DEFUN(cfg_mgcp_rtp_bts_base_port, cfg_mgcp_rtp_bts_base_port_cmd, - "mgcpgw bts-base <0-65534>", - MGCPGW_STR + "mgw bts-base <0-65534>", + MGW_STR BTS_START_STR UDP_PORT_STR) { @@ -125,32 +146,32 @@ addr = global_mgcp_client_conf->local_addr; if (addr) - vty_out(vty, "%smgcpgw local-ip %s%s", indent, addr, + vty_out(vty, "%smgw local-ip %s%s", indent, addr, VTY_NEWLINE); port = global_mgcp_client_conf->local_port; if (port >= 0) - vty_out(vty, "%smgcpgw local-port %u%s", indent, + vty_out(vty, "%smgw local-port %u%s", indent, (uint16_t)port, VTY_NEWLINE); addr = global_mgcp_client_conf->remote_addr; if (addr) - vty_out(vty, "%smgcpgw remote-ip %s%s", indent, addr, + vty_out(vty, "%smgw remote-ip %s%s", indent, addr, VTY_NEWLINE); port = global_mgcp_client_conf->remote_port; if (port >= 0) - vty_out(vty, "%smgcpgw remote-port %u%s", indent, + vty_out(vty, "%smgw remote-port %u%s", indent, (uint16_t)port, VTY_NEWLINE); first_endpoint = global_mgcp_client_conf->first_endpoint; last_endpoint = global_mgcp_client_conf->last_endpoint; if (last_endpoint != 0) { - vty_out(vty, "%smgcpgw endpoint-range %u %u%s", indent, + vty_out(vty, "%smgw endpoint-range %u %u%s", indent, first_endpoint, last_endpoint, VTY_NEWLINE); } bts_base = global_mgcp_client_conf->bts_base; if (bts_base) { - vty_out(vty, "%smgcpgw bts-base %u%s", indent, + vty_out(vty, "%smgw bts-base %u%s", indent, bts_base, VTY_NEWLINE); } @@ -162,10 +183,18 @@ global_mgcp_client_ctx = talloc_ctx; global_mgcp_client_conf = conf; + install_element(node, &cfg_mgw_local_ip_cmd); + install_element(node, &cfg_mgw_local_port_cmd); + install_element(node, &cfg_mgw_remote_ip_cmd); + install_element(node, &cfg_mgw_remote_port_cmd); + install_element(node, &cfg_mgw_endpoint_range_cmd); + + /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); install_element(node, &cfg_mgcpgw_local_port_cmd); install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); + install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1d43d42929dc9162e57640499526fb7cadbcfbe6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:38:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:38:05 +0000 Subject: osmo-gsm-manuals[master]: Fix build with default paths In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:46:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:46:24 +0000 Subject: osmo-gsm-tester[master]: util: Add setcap_net_raw API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/4423/1/src/osmo_gsm_tester/util.py File src/osmo_gsm_tester/util.py: Line 55: proc = subprocess.Popen(['sudo', 'osmo-gsm-tester_setcap_net_raw.sh', binary], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) (would prefer to log the complete command line called like we do in process.py ... or if there's nothing blocking it best even use the Process class here?) Line 60: raise RuntimeError('setcap_net_raw subprocess finished with err code %d' % proc.returncode) (would prefer to name the script completely in the error message) -- To view, visit https://gerrit.osmocom.org/4423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:48:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:48:40 +0000 Subject: osmo-gsm-tester[master]: util: Add change_elf_rpath API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/4424/1/src/osmo_gsm_tester/util.py File src/osmo_gsm_tester/util.py: Line 45: proc = subprocess.Popen(['patchelf', '--set-rpath', paths, binary], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) (same as the other patch ... log commandline called or use Process class) Line 50: raise RuntimeError('change_elf_rpath finished with err code %d' % proc.returncode) (and log the command called in the error message) -- To view, visit https://gerrit.osmocom.org/4424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:50:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:50:05 +0000 Subject: osmo-gsm-tester[master]: config: Fix crash in overlay() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f8a191810e89a4081199edcb390fb3bb27ed42f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:51:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:51:17 +0000 Subject: osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/3676/2/contrib/jenkins.sh File contrib/jenkins.sh: Line 5: cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci) the || case lacks a 'cd ~/osmo-ci' -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:52:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:52:24 +0000 Subject: [PATCH] osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3676 to look at the new patch set (#3). jenkins: Follow the convention and create a jenkins.sh as well Instead of modifying the job on Jenkins, let's do it like in our other projects. Create the diretcory if it doesn't exist and use git pull origin for the Debian9 system. Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa --- A contrib/jenkins.sh 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/76/3676/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..eb079a2 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd osmo-ci) +git rev-parse HEAD +git status + +git fetch && git checkout -f -B master origin/master + +git rev-parse HEAD +git status -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:53:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:53:10 +0000 Subject: osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 4 13:56:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 4 Nov 2017 13:56:19 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4672/1/src/vty/command.c File src/vty/command.c: Line 1952: the end of the line. */ (does anyone understand what the comment is trying to say about '?' -- it's ... a non-question that confuses me) -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From admin at opensuse.org Sat Nov 4 19:55:28 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 04 Nov 2017 19:55:28 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <59fe1b4cc1ce_53db6d4f846007b6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 238s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 238s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 238s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 238s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 238s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 238s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 238s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 238s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 238s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 238s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 238s] -Success [ 238s] ./testsuite.at:69: exit code was 132, expected 0 [ 238s] 11. testsuite.at:66: 11. coding (testsuite.at:66): FAILED (testsuite.at:69) [ 238s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 238s] make[1]: *** [override_dh_auto_test] Error 1 [ 238s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 238s] debian/rules:15: recipe for target 'build' failed [ 238s] make: *** [build] Error 2 [ 238s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 238s] [ 238s] build33 failed "build libosmocore_0.10.2.20171104.dsc" at Sat Nov 4 19:55:17 UTC 2017. [ 238s] [ 238s] ### VM INTERACTION START ### [ 239s] Powering off. [ 239s] [ 228.526201] reboot: Power down [ 241s] ### VM INTERACTION END ### [ 241s] [ 241s] build33 failed "build libosmocore_0.10.2.20171104.dsc" at Sat Nov 4 19:55:21 UTC 2017. [ 241s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Nov 5 07:57:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 07:57:22 +0000 Subject: [PATCH] osmo-ci[master]: coverity: Don't use PARALLEL_MAKE for libsmpp34 Message-ID: Review at https://gerrit.osmocom.org/4681 coverity: Don't use PARALLEL_MAKE for libsmpp34 ... which apparently doesn't support this and every so often breaks the coverity upload build Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36 --- M coverity/build_Osmocom.sh 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/81/4681/1 diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 81a346d..9ccee28 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -64,6 +64,15 @@ popd } +build_libsmpp34() { + pushd libsmpp34 + PM=$PARALLEL_MAKE + PARALLEL_MAKE="" + do_build + PARALLEL_MAKE=$PM + popd +} + cd "$src_dir" rm -rf "$prefix" @@ -75,7 +84,7 @@ build_default libosmo-abis build_default libosmo-netif build_default libosmo-sccp -build_default libsmpp34 +build_libsmpp34 build_default osmo-ggsn #IU build_default osmo-iuh build_osmopcu -- To view, visit https://gerrit.osmocom.org/4681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 07:57:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 07:57:50 +0000 Subject: osmo-ci[master]: coverity: Don't use PARALLEL_MAKE for libsmpp34 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 07:58:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 07:58:01 +0000 Subject: osmo-ci[master]: gerrit jenkins jobs: Remove comment-added-event In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I235e0211a01da0eb74d8e6a9581aa34b59073ca0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 07:58:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 07:58:06 +0000 Subject: [MERGED] osmo-ci[master]: gerrit jenkins jobs: Remove comment-added-event In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gerrit jenkins jobs: Remove comment-added-event ...................................................................... gerrit jenkins jobs: Remove comment-added-event This trigger is responsible for triggering another build once the first build is complete and sets a +V Change-Id: I235e0211a01da0eb74d8e6a9581aa34b59073ca0 --- M jobs/gerrit-verifications.yml 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index c70115c..3f6264b 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -233,9 +233,6 @@ - patchset-created-event: exclude-drafts: true exclude-no-code-change: true - - comment-added-event: - approval-category: 'Verified' - approval-value: 1 projects: - project-compare-type: 'PLAIN' project-pattern: '{repos}' -- To view, visit https://gerrit.osmocom.org/4677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I235e0211a01da0eb74d8e6a9581aa34b59073ca0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 07:58:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 07:58:06 +0000 Subject: [MERGED] osmo-ci[master]: coverity: Don't use PARALLEL_MAKE for libsmpp34 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: coverity: Don't use PARALLEL_MAKE for libsmpp34 ...................................................................... coverity: Don't use PARALLEL_MAKE for libsmpp34 ... which apparently doesn't support this and every so often breaks the coverity upload build Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36 --- M coverity/build_Osmocom.sh 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 81a346d..9ccee28 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -64,6 +64,15 @@ popd } +build_libsmpp34() { + pushd libsmpp34 + PM=$PARALLEL_MAKE + PARALLEL_MAKE="" + do_build + PARALLEL_MAKE=$PM + popd +} + cd "$src_dir" rm -rf "$prefix" @@ -75,7 +84,7 @@ build_default libosmo-abis build_default libosmo-netif build_default libosmo-sccp -build_default libsmpp34 +build_libsmpp34 build_default osmo-ggsn #IU build_default osmo-iuh build_osmopcu -- To view, visit https://gerrit.osmocom.org/4681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 14:52:44 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 Nov 2017 14:52:44 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent calling memset with n <= 0 In-Reply-To: References: Message-ID: Patch Set 1: > (1 comment) > > If I interpret the code correctly it's impossible for 'value' to be > negative at this point. So it's just to get rid of compile warning? > If so than you could, perhaps, use size_t instead of int for > 'value' type: that's what memset expects anyway. Thank you, Max! I think it would be better to replace memset by a simple for-loop. This will also prevent possible buffer overruns in case of incorrect values are passed. -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 16:41:47 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 Nov 2017 16:41:47 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4641 to look at the new patch set (#2). mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' suffix in names, it's better to use the updated functions. Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 --- M src/host/layer23/src/mobile/gsm480_ss.c 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/4641/2 diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index 8d025e9..ff90faa 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -532,7 +532,7 @@ } /* Encode service request */ - length = gsm_7bit_encode(msg->data, text); + gsm_7bit_encode_n_ussd(msg->data, msgb_tailroom(msg), text, &length); msgb_put(msg, length); /* Then wrap it as an Octet String */ @@ -772,11 +772,7 @@ return -EINVAL; } num_chars = tag_len * 8 / 7; - /* Prevent a mobile-originated buffer-overrun! */ - if (num_chars > sizeof(text) - 1) - num_chars = sizeof(text) - 1; - text[sizeof(text) - 1] = '\0'; - gsm_7bit_decode(text, tag_data, num_chars); + gsm_7bit_decode_n_ussd(text, sizeof(text), tag_data, num_chars); for (i = 0; text[i]; i++) { if (text[i] == '\r') -- To view, visit https://gerrit.osmocom.org/4641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Nov 5 16:41:47 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 Nov 2017 16:41:47 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm322.c: replace memset() by simple for-loop In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4645 to look at the new patch set (#2). mobile/gsm322.c: replace memset() by simple for-loop This change prevents a possible buffer overrun in case of incorrect min / max values are passed and the compiler warning about possibility of calling memset() with constant zero length parameter. Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/45/4645/2 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..9fda91e 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -313,6 +313,7 @@ static char *bargraph(int value, int min, int max) { static char bar[128]; + int i; /* shift value to the range of min..max */ if (value < min) @@ -322,8 +323,9 @@ else value -= min; - memset(bar, '=', value); - bar[value] = '\0'; + for (i = 0; i < value && i < sizeof(bar) - 1; i++) + bar[i] = '='; + bar[i] = '\0'; return bar; } -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Nov 5 17:45:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 17:45:19 +0000 Subject: [PATCH] osmo-ggsn[master]: sgsnemu: Don't leak FILE handle in proc_read() Message-ID: Review at https://gerrit.osmocom.org/4682 sgsnemu: Don't leak FILE handle in proc_read() Change-Id: Ie22e6a9bc172427e867e7a4001b6c710477a232b Fixes: Coverity CID#178660 --- M ggsn/gtp-kernel.c M sgsnemu/sgsnemu.c 2 files changed, 10 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/82/4682/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index f98586d..916b92f 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -36,37 +37,15 @@ static void pdp_debug(struct pdp_t *pdp) { - int i; - uint64_t teid; + struct in46_addr ia46; + struct in_addr ia; - if (!debug) - return; + in46a_from_eua(&pdp->eua, &ia46); + gsna2in_addr(&ia, &pdp->gsnrc); - printf("version %u\n", pdp->version); - if (pdp->version == 0) { - teid = pdp_gettid(pdp->imsi, pdp->nsapi); - printf("flowid %u\n", pdp->flru); - } else { - teid = pdp->teid_gn; /* GTPIE_TEI_DI */ - } - - printf("teid %llx\n", teid); - printf("address (%u)\n", pdp->eua.l); - - /* Byte 0: 0xf1 == IETF */ - /* Byte 1: 0x21 == IPv4 */ - /* Byte 2-6: IPv4 address */ - - for (i = 0; i < 6; i++) - printf("%x ", pdp->eua.v[i] & 0xff); /* GTPIE_EUA */ - - printf("\n"); - printf("sgsn-addr (%u)\n", pdp->gsnrc.l); - - for (i = 0; i < 4; i++) - printf("%x ", pdp->gsnrc.v[i] & 0xff); /* GTPIE_GSN_ADDR */ - - printf("\n"); + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", pdp->version, + pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, + in46a_ntoa(&ia46), inet_ntoa(ia)); } static struct { @@ -101,11 +80,8 @@ "cannot lookup GTP genetlink ID\n"); return -1; } - if (debug) { - SYS_ERR(DGGSN, LOGL_NOTICE, 0, - "Using the GTP kernel mode (genl ID is %d)\n", - gtp_nl.genl_id); - } + SYS_ERR(DGGSN, LOGL_DEBUG, 0, + "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, GTP_DEVNAME); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 23cf208..b2927df 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -974,7 +974,6 @@ ret = NULL; goto out; } - return ret; out: fclose(f); -- To view, visit https://gerrit.osmocom.org/4682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie22e6a9bc172427e867e7a4001b6c710477a232b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 17:45:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 17:45:19 +0000 Subject: [PATCH] osmo-ggsn[master]: sgsnemu: Fix format string in printing tun-device name Message-ID: Review at https://gerrit.osmocom.org/4683 sgsnemu: Fix format string in printing tun-device name Change-Id: Ie05050a78a135a1a76473337a341fd723bbe4976 Fixes: Coverity CID#178654 --- M sgsnemu/sgsnemu.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/83/4683/1 diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index b2927df..c7ca494 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -349,7 +349,7 @@ printf("timelimit: %d\n", args_info.timelimit_arg); printf("createif: %d\n", args_info.createif_flag); if (args_info.tun_device_arg) - printf("tun-device: %d\n", args_info.tun_device_arg); + printf("tun-device: %s\n", args_info.tun_device_arg); if (args_info.ipup_arg) printf("ipup: %s\n", args_info.ipup_arg); if (args_info.ipdown_arg) -- To view, visit https://gerrit.osmocom.org/4683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie05050a78a135a1a76473337a341fd723bbe4976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:04:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:04:44 +0000 Subject: [PATCH] osmo-bts[master]: trx: Better be safe than sorry before calling strlen Message-ID: Review at https://gerrit.osmocom.org/4684 trx: Better be safe than sorry before calling strlen There's a lot of pointer arithmetic in trx_ctrl_read_cb which is not so nice. While I believe the current code is safe, Coverity raises "CID 178665: Insecure data handling (INTEGER_OVERFLOW)" regardin the use of rsp_len in the strcmp(). Let's put some OSMO_ASSERT() in front and hope that makes Coverity happy. Change-Id: I5a9b3307f83cdde7c8e9f66932446604f5623b05 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/84/4684/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index a41cf2c..5d8f6c4 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -391,6 +391,8 @@ "message '%s'\n", buf, tcm->cmd); goto rsp_error; } + OSMO_ASSERT(strlen(buf+4) >= rsp_len); + OSMO_ASSERT(strlen(tcm->cmd+4) >= rsp_len); if (!!strncmp(buf + 4, tcm->cmd + 4, rsp_len)) goto notmatch; -- To view, visit https://gerrit.osmocom.org/4684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a9b3307f83cdde7c8e9f66932446604f5623b05 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:04:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:04:51 +0000 Subject: [PATCH] osmo-bts[master]: trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() Message-ID: Review at https://gerrit.osmocom.org/4685 trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() We unconditionally pass "p+1" into sscanf() despite not knowing if 'p' is NULL or not. Change-Id: I40a49c3feb3b55ef577eebd7d567afdbcfe0d624 Fixes: Coverity CID#178661 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/4685/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 5d8f6c4..1332854 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -397,7 +397,9 @@ goto notmatch; /* check for response code */ - sscanf(p + 1, "%d", &resp); + resp = 0; + if (p) + sscanf(p + 1, "%d", &resp); if (resp) { LOGP(DTRX, (tcm->critical) ? LOGL_FATAL : LOGL_NOTICE, "transceiver (%s) rejected TRX command " -- To view, visit https://gerrit.osmocom.org/4685 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40a49c3feb3b55ef577eebd7d567afdbcfe0d624 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:04:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:04:51 +0000 Subject: [PATCH] osmo-bts[master]: trx: Don't call osmo_fr_check_sid with negative 'rc' Message-ID: Review at https://gerrit.osmocom.org/4686 trx: Don't call osmo_fr_check_sid with negative 'rc' In rx_tchf_fn(), if gsm0503_tch_fr_decode() returns a negative result, we cannot use that result as length argument to osmo_fr_check_sid() Change-Id: Ic4080b5bf6c865be3333f923f19a2340e1e272c8 Fixes: Coverity CID#178659 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/86/4686/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 967e3db..c849dd5 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1055,7 +1055,8 @@ : tch_mode) { case GSM48_CMODE_SPEECH_V1: /* FR */ rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total); - lchan_set_marker(osmo_fr_check_sid(tch_data, rc), lchan); /* DTXu */ + if (rc >= 0) + lchan_set_marker(osmo_fr_check_sid(tch_data, rc), lchan); /* DTXu */ break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 1, &n_errors, &n_bits_total); -- To view, visit https://gerrit.osmocom.org/4686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4080b5bf6c865be3333f923f19a2340e1e272c8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:04:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:04:51 +0000 Subject: [PATCH] osmo-bts[master]: trx: Don't assume phy_instance_by_num() returns non-NULL Message-ID: Review at https://gerrit.osmocom.org/4687 trx: Don't assume phy_instance_by_num() returns non-NULL In trx_clk_read_cb(), when calling phy_instance_by_num(), that function might in error cases return a NULL phy-instance. Let's put an OSMO_ASSERT() there as safeguard to avoid NULL dereference when dereferencing pinst->trx->bts. Fixes: Coverity CID#178657 Change-Id: If6b6b45380368e9ee9e03ca1eb7ac56c21e72b03 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/4687/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 1332854..7030e3c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -103,6 +103,8 @@ int len; uint32_t fn; + OSMO_ASSERT(pinst); + len = recv(ofd->fd, buf, sizeof(buf) - 1, 0); if (len <= 0) return len; -- To view, visit https://gerrit.osmocom.org/4687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6b6b45380368e9ee9e03ca1eb7ac56c21e72b03 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:06:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:06:23 +0000 Subject: osmo-ggsn[master]: sgsnemu: Don't leak FILE handle in proc_read() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie22e6a9bc172427e867e7a4001b6c710477a232b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:06:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:06:26 +0000 Subject: osmo-ggsn[master]: sgsnemu: Fix format string in printing tun-device name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie05050a78a135a1a76473337a341fd723bbe4976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:06:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:06:29 +0000 Subject: [MERGED] osmo-ggsn[master]: sgsnemu: Fix format string in printing tun-device name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sgsnemu: Fix format string in printing tun-device name ...................................................................... sgsnemu: Fix format string in printing tun-device name Change-Id: Ie05050a78a135a1a76473337a341fd723bbe4976 Fixes: Coverity CID#178654 --- M sgsnemu/sgsnemu.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index b2927df..c7ca494 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -349,7 +349,7 @@ printf("timelimit: %d\n", args_info.timelimit_arg); printf("createif: %d\n", args_info.createif_flag); if (args_info.tun_device_arg) - printf("tun-device: %d\n", args_info.tun_device_arg); + printf("tun-device: %s\n", args_info.tun_device_arg); if (args_info.ipup_arg) printf("ipup: %s\n", args_info.ipup_arg); if (args_info.ipdown_arg) -- To view, visit https://gerrit.osmocom.org/4683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie05050a78a135a1a76473337a341fd723bbe4976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:06:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:06:29 +0000 Subject: [MERGED] osmo-ggsn[master]: sgsnemu: Don't leak FILE handle in proc_read() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sgsnemu: Don't leak FILE handle in proc_read() ...................................................................... sgsnemu: Don't leak FILE handle in proc_read() Change-Id: Ie22e6a9bc172427e867e7a4001b6c710477a232b Fixes: Coverity CID#178660 --- M ggsn/gtp-kernel.c M sgsnemu/sgsnemu.c 2 files changed, 10 insertions(+), 35 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index f98586d..916b92f 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -36,37 +37,15 @@ static void pdp_debug(struct pdp_t *pdp) { - int i; - uint64_t teid; + struct in46_addr ia46; + struct in_addr ia; - if (!debug) - return; + in46a_from_eua(&pdp->eua, &ia46); + gsna2in_addr(&ia, &pdp->gsnrc); - printf("version %u\n", pdp->version); - if (pdp->version == 0) { - teid = pdp_gettid(pdp->imsi, pdp->nsapi); - printf("flowid %u\n", pdp->flru); - } else { - teid = pdp->teid_gn; /* GTPIE_TEI_DI */ - } - - printf("teid %llx\n", teid); - printf("address (%u)\n", pdp->eua.l); - - /* Byte 0: 0xf1 == IETF */ - /* Byte 1: 0x21 == IPv4 */ - /* Byte 2-6: IPv4 address */ - - for (i = 0; i < 6; i++) - printf("%x ", pdp->eua.v[i] & 0xff); /* GTPIE_EUA */ - - printf("\n"); - printf("sgsn-addr (%u)\n", pdp->gsnrc.l); - - for (i = 0; i < 4; i++) - printf("%x ", pdp->gsnrc.v[i] & 0xff); /* GTPIE_GSN_ADDR */ - - printf("\n"); + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", pdp->version, + pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, + in46a_ntoa(&ia46), inet_ntoa(ia)); } static struct { @@ -101,11 +80,8 @@ "cannot lookup GTP genetlink ID\n"); return -1; } - if (debug) { - SYS_ERR(DGGSN, LOGL_NOTICE, 0, - "Using the GTP kernel mode (genl ID is %d)\n", - gtp_nl.genl_id); - } + SYS_ERR(DGGSN, LOGL_DEBUG, 0, + "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, GTP_DEVNAME); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 23cf208..b2927df 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -974,7 +974,6 @@ ret = NULL; goto out; } - return ret; out: fclose(f); -- To view, visit https://gerrit.osmocom.org/4682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie22e6a9bc172427e867e7a4001b6c710477a232b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:34:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:34:43 +0000 Subject: [PATCH] osmo-ggsn[master]: sgsnemu: Make sure buffer has space for terminating-NUL Message-ID: Review at https://gerrit.osmocom.org/4688 sgsnemu: Make sure buffer has space for terminating-NUL In proc_ipv6_conf_read() we allocatea buffer on the stack but forgot the terminating NUL byte. Change-Id: I54126d8bc08c137859f2de4b47ef23fc0714fdd7 Fixes: Coverity CID#178641 --- M sgsnemu/sgsnemu.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/88/4688/1 diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c7ca494..0b0fba6 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -985,7 +985,7 @@ static char *proc_ipv6_conf_read(const char *dev, const char *file) { const char *fmt = "/proc/sys/net/ipv6/conf/%s/%s"; - char path[strlen(fmt) + strlen(dev) + strlen(file)]; + char path[strlen(fmt) + strlen(dev) + strlen(file)+1]; snprintf(path, sizeof(path), fmt, dev, file); return proc_read(path); } -- To view, visit https://gerrit.osmocom.org/4688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54126d8bc08c137859f2de4b47ef23fc0714fdd7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:34:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:34:44 +0000 Subject: [PATCH] osmo-ggsn[master]: sgsnemu: Free strings in error path Message-ID: Review at https://gerrit.osmocom.org/4689 sgsnemu: Free strings in error path In create_pdp_conf(), we have to free() any strings both in the success and in the error case. Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Fixes: Coverity CID#187636, CID#187633 --- M sgsnemu/sgsnemu.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/89/4689/1 diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 0b0fba6..c31f875 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1459,9 +1459,9 @@ "router advertisements; SLAAC will not suceed, please " "fix your setup!\n"); } - free(accept_ra); - free(forwarding); } + free(accept_ra); + free(forwarding); } ipset((struct iphash_t *)pdp->peer, &addr); -- To view, visit https://gerrit.osmocom.org/4689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:34:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:34:44 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp: Fix buffer overflow in imsi_gtp2str() Message-ID: Review at https://gerrit.osmocom.org/4690 gtp: Fix buffer overflow in imsi_gtp2str() The string buffer allocated for the IMSI must be sized for a length twice the number of input bytes (each byte has two nibbles) plus 1 byte for NUL. We missed the "twice" part :/ Change-Id: I1ecaa811815ae522af71feabc5d0c1ea8b4edde9 Fixes: Coverity CID#174336 --- M gtp/gtp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/90/4690/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 3051aaa..c798192 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -3301,7 +3301,7 @@ * _network byte order_ to contain BCD digits ?!? */ const char *imsi_gtp2str(const uint64_t *imsi) { - static char buf[sizeof(*imsi)+1]; + static char buf[sizeof(*imsi)*2+1]; const uint8_t *imsi8 = (const uint8_t *) imsi; unsigned int i, j = 0; -- To view, visit https://gerrit.osmocom.org/4690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ecaa811815ae522af71feabc5d0c1ea8b4edde9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:34:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:34:44 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp: Explicit OSMO_ASSERT to ensure pdp variable is set Message-ID: Review at https://gerrit.osmocom.org/4691 gtp: Explicit OSMO_ASSERT to ensure pdp variable is set Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Fixes: Coverity CID#174335 --- M gtp/gtp.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/91/4691/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index c798192..b36e0c6 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2635,6 +2635,12 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Received Error Indication\n"); + /* This is obvious from above code, given the semantics of the + * functions above, but Coverity doesn't figure this out, so + * let's make it clear. It's good style anyway in case above + * code should ever change. */ + OSMO_ASSERT(pdp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); pdp_freepdp(pdp); -- To view, visit https://gerrit.osmocom.org/4691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:34:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:34:44 +0000 Subject: [PATCH] osmo-ggsn[master]: tun: Don't copy 16byte IPv6 address to 'struct in_addr' Message-ID: Review at https://gerrit.osmocom.org/4692 tun: Don't copy 16byte IPv6 address to 'struct in_addr' The 'struct tun' curently only has an in_addr (v4-only) member to store the address of the tun device, so let's not attempt to store an IPv6 address in it. FIXME: This entire code needs an overhaul. The assumption that there's only one address, and only either v6 or v4 is broken to begin with. Change-Id: If0b626d688841d6e0a3867834f4cb1b70084050e Fixes: Coverity CID#174278 --- M lib/tun.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/92/4692/1 diff --git a/lib/tun.c b/lib/tun.c index 6bcc13b..3c293a2 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -396,7 +396,6 @@ #if defined(__linux__) if (addr) { - memcpy(&this->addr, addr, sizeof(*addr)); memcpy(&ifr.ifr6_addr, addr, sizeof(*addr)); if (ioctl(fd, SIOCSIFADDR, (void *) &ifr) < 0) { if (errno != EEXIST) { -- To view, visit https://gerrit.osmocom.org/4692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0b626d688841d6e0a3867834f4cb1b70084050e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:40:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:40:02 +0000 Subject: [PATCH] osmo-ggsn[master]: ippool: Correctly compute size of static pool Message-ID: Review at https://gerrit.osmocom.org/4693 ippool: Correctly compute size of static pool * we have to use stataddr, not addr (dynamic) * we have to multiply the length of the address by 8 to get its bit length * we can simplify the -1 +1 logic (like dynamic) Change-Id: I174102051bef95f7df34b7d7c480a00ae408be7d Fixes: Coverity CID#174189 --- M lib/ippool.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/93/4693/1 diff --git a/lib/ippool.c b/lib/ippool.c index 55a41d0..a9a64be 100644 --- a/lib/ippool.c +++ b/lib/ippool.c @@ -240,7 +240,7 @@ stataddr = stat->addr; stataddrprefixlen = stat->prefixlen; - statsize = (1 << (addr.len - stataddrprefixlen + 1)) -1; + statsize = (1 << (stataddr.len*8 - stataddrprefixlen)); if (statsize > IPPOOL_STATSIZE) statsize = IPPOOL_STATSIZE; } -- To view, visit https://gerrit.osmocom.org/4693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I174102051bef95f7df34b7d7c480a00ae408be7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:48:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:48:04 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: fix wrong return value of is_fill_frame() Message-ID: Review at https://gerrit.osmocom.org/4694 l1sap: fix wrong return value of is_fill_frame() When determining if a frame is a fill frame or not, the case statement only conditionally handled AGCH and PCH cases. In case a non-fill-frame was observed, the return value was uninitialized, resulting in some non-fill-frames to be missed from GMSTAP Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d Closes: Coverity CID#174175 --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/94/4694/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 763b355..ebcfd2f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -335,9 +335,9 @@ if (!memcmp(data, paging_fill, GSM_MACBLOCK_LEN)) return true; break; - default: - return false; + /* don't use 'default' case here as the above only conditionally return true */ } + return false; } static int to_gsmtap(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) -- To view, visit https://gerrit.osmocom.org/4694 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 18:58:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 18:58:15 +0000 Subject: [PATCH] osmo-hlr[master]: hlr.c: Avoid overflow of lu_operation.subscr.imsi Message-ID: Review at https://gerrit.osmocom.org/4695 hlr.c: Avoid overflow of lu_operation.subscr.imsi It appears that hlr_subscriber.imsi is 16 buffers in size: 15 chars for IMSI + 1 byte NUL. However, osmo_gsup_message.imsi is 17 bytes (for whatever reason), so we cannot simply do a strpy() as this might overflow the hlr_subscriber.imsi field! TODO: check if weactually ever receive a too-long IMSI in GSUP and reject that at an earlier time in the code flow. Fixes: Coverity CID#164746 Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048 --- M src/hlr.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/95/4695/1 diff --git a/src/hlr.c b/src/hlr.c index 6310526..78a7055 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -164,7 +164,7 @@ /* check if subscriber is known at all */ if (!lu_op_fill_subscr(luop, g_hlr->dbc, gsup->imsi)) { /* Send Error back: Subscriber Unknown in HLR */ - strcpy(luop->subscr.imsi, gsup->imsi); + osmo_strlcpy(luop->subscr.imsi, gsup->imsi, sizeof(luop->subscr.imsi)); lu_op_tx_error(luop, GMM_CAUSE_IMSI_UNKNOWN); return 0; } -- To view, visit https://gerrit.osmocom.org/4695 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:02:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:02:08 +0000 Subject: [PATCH] osmo-trx[master]: SocketsTest: Fix printing of non-nul-terminated string Message-ID: Review at https://gerrit.osmocom.org/4696 SocketsTest: Fix printing of non-nul-terminated string Change-Id: I33d0ddf851d84b81ab5252e3755422170cee54ee Fixes: Coverity CID#149363 --- M CommonLibs/SocketsTest.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/96/4696/1 diff --git a/CommonLibs/SocketsTest.cpp b/CommonLibs/SocketsTest.cpp index c2849e0..3198a5e 100644 --- a/CommonLibs/SocketsTest.cpp +++ b/CommonLibs/SocketsTest.cpp @@ -61,7 +61,8 @@ readSocket.nonblocking(); int rc = 0; while (rc0) { COUT("read: " << buf); -- To view, visit https://gerrit.osmocom.org/4696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33d0ddf851d84b81ab5252e3755422170cee54ee Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:04:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:04:55 +0000 Subject: [PATCH] osmo-sip-connector[master]: mncc.c: Ensure proper string buffer NUL termination Message-ID: Review at https://gerrit.osmocom.org/4697 mncc.c: Ensure proper string buffer NUL termination Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb Fixes: Coverity CID#92223 --- M src/mncc.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/97/4697/1 diff --git a/src/mncc.c b/src/mncc.c index 669a80c..45c062f 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -738,7 +738,7 @@ mncc.fields |= MNCC_F_CALLING; mncc.calling.plan = 1; mncc.calling.type = 0x0; - strncpy(mncc.calling.number, call->source, sizeof(mncc.calling.number)); + osmo_strlcpy(mncc.calling.number, call->source, sizeof(mncc.calling.number)); if (conn->app->use_imsi_as_id) { snprintf(mncc.imsi, 15, "%s", call->dest); @@ -746,7 +746,7 @@ mncc.fields |= MNCC_F_CALLED; mncc.called.plan = 1; mncc.called.type = 0x0; - strncpy(mncc.called.number, call->dest, sizeof(mncc.called.number)); + osmo_strlcpy(mncc.called.number, call->dest, sizeof(mncc.called.number)); } /* -- To view, visit https://gerrit.osmocom.org/4697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:18 +0000 Subject: osmo-bts[master]: trx: Better be safe than sorry before calling strlen In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a9b3307f83cdde7c8e9f66932446604f5623b05 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:27 +0000 Subject: osmo-bts[master]: trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4685 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a49c3feb3b55ef577eebd7d567afdbcfe0d624 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:31 +0000 Subject: osmo-bts[master]: trx: Don't call osmo_fr_check_sid with negative 'rc' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4080b5bf6c865be3333f923f19a2340e1e272c8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:34 +0000 Subject: osmo-bts[master]: trx: Don't assume phy_instance_by_num() returns non-NULL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6b6b45380368e9ee9e03ca1eb7ac56c21e72b03 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:37 +0000 Subject: osmo-bts[master]: l1sap: fix wrong return value of is_fill_frame() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4694 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:49 +0000 Subject: osmo-ggsn[master]: sgsnemu: Make sure buffer has space for terminating-NUL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54126d8bc08c137859f2de4b47ef23fc0714fdd7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:53 +0000 Subject: osmo-ggsn[master]: sgsnemu: Free strings in error path In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:07:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:07:56 +0000 Subject: osmo-ggsn[master]: gtp: Fix buffer overflow in imsi_gtp2str() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ecaa811815ae522af71feabc5d0c1ea8b4edde9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:01 +0000 Subject: osmo-ggsn[master]: gtp: Explicit OSMO_ASSERT to ensure pdp variable is set In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:05 +0000 Subject: osmo-ggsn[master]: tun: Don't copy 16byte IPv6 address to 'struct in_addr' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If0b626d688841d6e0a3867834f4cb1b70084050e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:08 +0000 Subject: osmo-ggsn[master]: ippool: Correctly compute size of static pool In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I174102051bef95f7df34b7d7c480a00ae408be7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:10 +0000 Subject: [MERGED] osmo-ggsn[master]: ippool: Correctly compute size of static pool In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ippool: Correctly compute size of static pool ...................................................................... ippool: Correctly compute size of static pool * we have to use stataddr, not addr (dynamic) * we have to multiply the length of the address by 8 to get its bit length * we can simplify the -1 +1 logic (like dynamic) Change-Id: I174102051bef95f7df34b7d7c480a00ae408be7d Fixes: Coverity CID#174189 --- M lib/ippool.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/ippool.c b/lib/ippool.c index 55a41d0..a9a64be 100644 --- a/lib/ippool.c +++ b/lib/ippool.c @@ -240,7 +240,7 @@ stataddr = stat->addr; stataddrprefixlen = stat->prefixlen; - statsize = (1 << (addr.len - stataddrprefixlen + 1)) -1; + statsize = (1 << (stataddr.len*8 - stataddrprefixlen)); if (statsize > IPPOOL_STATSIZE) statsize = IPPOOL_STATSIZE; } -- To view, visit https://gerrit.osmocom.org/4693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I174102051bef95f7df34b7d7c480a00ae408be7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:10 +0000 Subject: [MERGED] osmo-ggsn[master]: tun: Don't copy 16byte IPv6 address to 'struct in_addr' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: tun: Don't copy 16byte IPv6 address to 'struct in_addr' ...................................................................... tun: Don't copy 16byte IPv6 address to 'struct in_addr' The 'struct tun' curently only has an in_addr (v4-only) member to store the address of the tun device, so let's not attempt to store an IPv6 address in it. FIXME: This entire code needs an overhaul. The assumption that there's only one address, and only either v6 or v4 is broken to begin with. Change-Id: If0b626d688841d6e0a3867834f4cb1b70084050e Fixes: Coverity CID#174278 --- M lib/tun.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index 6bcc13b..3c293a2 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -396,7 +396,6 @@ #if defined(__linux__) if (addr) { - memcpy(&this->addr, addr, sizeof(*addr)); memcpy(&ifr.ifr6_addr, addr, sizeof(*addr)); if (ioctl(fd, SIOCSIFADDR, (void *) &ifr) < 0) { if (errno != EEXIST) { -- To view, visit https://gerrit.osmocom.org/4692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0b626d688841d6e0a3867834f4cb1b70084050e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:10 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp: Explicit OSMO_ASSERT to ensure pdp variable is set In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp: Explicit OSMO_ASSERT to ensure pdp variable is set ...................................................................... gtp: Explicit OSMO_ASSERT to ensure pdp variable is set Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Fixes: Coverity CID#174335 --- M gtp/gtp.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index c798192..b36e0c6 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2635,6 +2635,12 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Received Error Indication\n"); + /* This is obvious from above code, given the semantics of the + * functions above, but Coverity doesn't figure this out, so + * let's make it clear. It's good style anyway in case above + * code should ever change. */ + OSMO_ASSERT(pdp); + if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); pdp_freepdp(pdp); -- To view, visit https://gerrit.osmocom.org/4691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09e37e25fd118ac0a54ab788304d3f5083463050 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:11 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp: Fix buffer overflow in imsi_gtp2str() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp: Fix buffer overflow in imsi_gtp2str() ...................................................................... gtp: Fix buffer overflow in imsi_gtp2str() The string buffer allocated for the IMSI must be sized for a length twice the number of input bytes (each byte has two nibbles) plus 1 byte for NUL. We missed the "twice" part :/ Change-Id: I1ecaa811815ae522af71feabc5d0c1ea8b4edde9 Fixes: Coverity CID#174336 --- M gtp/gtp.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index 3051aaa..c798192 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -3301,7 +3301,7 @@ * _network byte order_ to contain BCD digits ?!? */ const char *imsi_gtp2str(const uint64_t *imsi) { - static char buf[sizeof(*imsi)+1]; + static char buf[sizeof(*imsi)*2+1]; const uint8_t *imsi8 = (const uint8_t *) imsi; unsigned int i, j = 0; -- To view, visit https://gerrit.osmocom.org/4690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ecaa811815ae522af71feabc5d0c1ea8b4edde9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:11 +0000 Subject: [MERGED] osmo-ggsn[master]: sgsnemu: Free strings in error path In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sgsnemu: Free strings in error path ...................................................................... sgsnemu: Free strings in error path In create_pdp_conf(), we have to free() any strings both in the success and in the error case. Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Fixes: Coverity CID#187636, CID#187633 --- M sgsnemu/sgsnemu.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 0b0fba6..c31f875 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1459,9 +1459,9 @@ "router advertisements; SLAAC will not suceed, please " "fix your setup!\n"); } - free(accept_ra); - free(forwarding); } + free(accept_ra); + free(forwarding); } ipset((struct iphash_t *)pdp->peer, &addr); -- To view, visit https://gerrit.osmocom.org/4689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:11 +0000 Subject: [MERGED] osmo-ggsn[master]: sgsnemu: Make sure buffer has space for terminating-NUL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sgsnemu: Make sure buffer has space for terminating-NUL ...................................................................... sgsnemu: Make sure buffer has space for terminating-NUL In proc_ipv6_conf_read() we allocatea buffer on the stack but forgot the terminating NUL byte. Change-Id: I54126d8bc08c137859f2de4b47ef23fc0714fdd7 Fixes: Coverity CID#178641 --- M sgsnemu/sgsnemu.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c7ca494..0b0fba6 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -985,7 +985,7 @@ static char *proc_ipv6_conf_read(const char *dev, const char *file) { const char *fmt = "/proc/sys/net/ipv6/conf/%s/%s"; - char path[strlen(fmt) + strlen(dev) + strlen(file)]; + char path[strlen(fmt) + strlen(dev) + strlen(file)+1]; snprintf(path, sizeof(path), fmt, dev, file); return proc_read(path); } -- To view, visit https://gerrit.osmocom.org/4688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54126d8bc08c137859f2de4b47ef23fc0714fdd7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:19 +0000 Subject: [MERGED] osmo-bts[master]: l1sap: fix wrong return value of is_fill_frame() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: l1sap: fix wrong return value of is_fill_frame() ...................................................................... l1sap: fix wrong return value of is_fill_frame() When determining if a frame is a fill frame or not, the case statement only conditionally handled AGCH and PCH cases. In case a non-fill-frame was observed, the return value was uninitialized, resulting in some non-fill-frames to be missed from GMSTAP Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d Closes: Coverity CID#174175 --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 763b355..ebcfd2f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -335,9 +335,9 @@ if (!memcmp(data, paging_fill, GSM_MACBLOCK_LEN)) return true; break; - default: - return false; + /* don't use 'default' case here as the above only conditionally return true */ } + return false; } static int to_gsmtap(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) -- To view, visit https://gerrit.osmocom.org/4694 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:20 +0000 Subject: [MERGED] osmo-bts[master]: trx: Don't assume phy_instance_by_num() returns non-NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: trx: Don't assume phy_instance_by_num() returns non-NULL ...................................................................... trx: Don't assume phy_instance_by_num() returns non-NULL In trx_clk_read_cb(), when calling phy_instance_by_num(), that function might in error cases return a NULL phy-instance. Let's put an OSMO_ASSERT() there as safeguard to avoid NULL dereference when dereferencing pinst->trx->bts. Fixes: Coverity CID#178657 Change-Id: If6b6b45380368e9ee9e03ca1eb7ac56c21e72b03 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 1332854..7030e3c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -103,6 +103,8 @@ int len; uint32_t fn; + OSMO_ASSERT(pinst); + len = recv(ofd->fd, buf, sizeof(buf) - 1, 0); if (len <= 0) return len; -- To view, visit https://gerrit.osmocom.org/4687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6b6b45380368e9ee9e03ca1eb7ac56c21e72b03 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:20 +0000 Subject: [MERGED] osmo-bts[master]: trx: Don't call osmo_fr_check_sid with negative 'rc' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: trx: Don't call osmo_fr_check_sid with negative 'rc' ...................................................................... trx: Don't call osmo_fr_check_sid with negative 'rc' In rx_tchf_fn(), if gsm0503_tch_fr_decode() returns a negative result, we cannot use that result as length argument to osmo_fr_check_sid() Change-Id: Ic4080b5bf6c865be3333f923f19a2340e1e272c8 Fixes: Coverity CID#178659 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 967e3db..c849dd5 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1055,7 +1055,8 @@ : tch_mode) { case GSM48_CMODE_SPEECH_V1: /* FR */ rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total); - lchan_set_marker(osmo_fr_check_sid(tch_data, rc), lchan); /* DTXu */ + if (rc >= 0) + lchan_set_marker(osmo_fr_check_sid(tch_data, rc), lchan); /* DTXu */ break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 1, &n_errors, &n_bits_total); -- To view, visit https://gerrit.osmocom.org/4686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4080b5bf6c865be3333f923f19a2340e1e272c8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:20 +0000 Subject: [MERGED] osmo-bts[master]: trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() ...................................................................... trx: Avoid NULL+1 dereference in trx_ctrl_read_cb() We unconditionally pass "p+1" into sscanf() despite not knowing if 'p' is NULL or not. Change-Id: I40a49c3feb3b55ef577eebd7d567afdbcfe0d624 Fixes: Coverity CID#178661 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 5d8f6c4..1332854 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -397,7 +397,9 @@ goto notmatch; /* check for response code */ - sscanf(p + 1, "%d", &resp); + resp = 0; + if (p) + sscanf(p + 1, "%d", &resp); if (resp) { LOGP(DTRX, (tcm->critical) ? LOGL_FATAL : LOGL_NOTICE, "transceiver (%s) rejected TRX command " -- To view, visit https://gerrit.osmocom.org/4685 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40a49c3feb3b55ef577eebd7d567afdbcfe0d624 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:08:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:08:20 +0000 Subject: [MERGED] osmo-bts[master]: trx: Better be safe than sorry before calling strlen In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: trx: Better be safe than sorry before calling strlen ...................................................................... trx: Better be safe than sorry before calling strlen There's a lot of pointer arithmetic in trx_ctrl_read_cb which is not so nice. While I believe the current code is safe, Coverity raises "CID 178665: Insecure data handling (INTEGER_OVERFLOW)" regardin the use of rsp_len in the strcmp(). Let's put some OSMO_ASSERT() in front and hope that makes Coverity happy. Change-Id: I5a9b3307f83cdde7c8e9f66932446604f5623b05 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index a41cf2c..5d8f6c4 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -391,6 +391,8 @@ "message '%s'\n", buf, tcm->cmd); goto rsp_error; } + OSMO_ASSERT(strlen(buf+4) >= rsp_len); + OSMO_ASSERT(strlen(tcm->cmd+4) >= rsp_len); if (!!strncmp(buf + 4, tcm->cmd + 4, rsp_len)) goto notmatch; -- To view, visit https://gerrit.osmocom.org/4684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a9b3307f83cdde7c8e9f66932446604f5623b05 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:30 +0000 Subject: osmocom-bb[master]: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:50 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd ...................................................................... mobile/gsm480_ss.c: use secure gsm_7bit_(en|de)code_n_ussd Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' suffix in names, it's better to use the updated functions. Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 --- M src/host/layer23/src/mobile/gsm480_ss.c 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index 8d025e9..ff90faa 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -532,7 +532,7 @@ } /* Encode service request */ - length = gsm_7bit_encode(msg->data, text); + gsm_7bit_encode_n_ussd(msg->data, msgb_tailroom(msg), text, &length); msgb_put(msg, length); /* Then wrap it as an Octet String */ @@ -772,11 +772,7 @@ return -EINVAL; } num_chars = tag_len * 8 / 7; - /* Prevent a mobile-originated buffer-overrun! */ - if (num_chars > sizeof(text) - 1) - num_chars = sizeof(text) - 1; - text[sizeof(text) - 1] = '\0'; - gsm_7bit_decode(text, tag_data, num_chars); + gsm_7bit_decode_n_ussd(text, sizeof(text), tag_data, num_chars); for (i = 0; text[i]; i++) { if (text[i] == '\r') -- To view, visit https://gerrit.osmocom.org/4641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8a1983592f5800e3981f29962eb333ac9473f40 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:51 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: get rid of unused variables / functions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile: get rid of unused variables / functions ...................................................................... mobile: get rid of unused variables / functions Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 --- M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/gsm48_rr.c 3 files changed, 19 insertions(+), 28 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index f56262e..22db859 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -226,7 +226,7 @@ uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; unsigned int sms_alphabet; - uint8_t sms_mti, sms_mms; + uint8_t sms_mti; uint8_t oa_len_bytes; uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */ int rc = 0; @@ -235,7 +235,7 @@ /* invert those fields where 0 means active/present */ sms_mti = *smsp & 0x03; - sms_mms = !!(*smsp & 0x04); + /* uint8_t sms_mms = !!(*smsp & 0x04); */ gsms->status_rep_req = (*smsp & 0x20); gsms->ud_hdr_ind = (*smsp & 0x40); gsms->reply_path_req = (*smsp & 0x80); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 360f9b3..4b1db1e 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -3244,7 +3244,6 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn, *conn_found = NULL; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* the first and only pending connection is the recent requested */ llist_for_each_entry(conn, &mm->mm_conn, list) { @@ -3293,7 +3292,7 @@ } if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + gsm48_mmxx_upmsg(ms, nmsg); return 0; @@ -3325,7 +3324,6 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn; struct msgb *nmsg; - struct gsm48_mmxx_hdr *nmmh; /* stop MM connection timer */ stop_mm_t3230(mm); @@ -3342,7 +3340,7 @@ } if (!nmsg) continue; /* skip if not of CC type */ - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; + /* copy L3 message */ nmsg->l3h = msgb_put(nmsg, msgb_l3len(msg)); memcpy(nmsg->l3h, msg->l3h, msgb_l3len(msg)); @@ -3595,15 +3593,12 @@ llist_for_each_entry(conn, &mm->mm_conn, list) { if (conn->sapi == sapi && conn->state == GSM48_MMXX_ST_DEDICATED) { - struct gsm48_mmxx_hdr *nmmh; struct msgb *nmsg; - nmsg = gsm48_mmxx_msgb_alloc( GSM48_MMSMS_EST_CNF, conn->ref, conn->transaction_id, conn->sapi); if (!nmsg) return -ENOMEM; - nmmh = (struct gsm48_mmxx_hdr *)nmsg->data; gsm48_mmxx_upmsg(ms, nmsg); } } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index b821457..ac27214 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -743,11 +743,6 @@ LOGP(DRR, LOGL_INFO, "timer T3122 has fired\n"); } -static void timeout_rr_t3124(void *arg) -{ - LOGP(DRR, LOGL_INFO, "timer T3124 has fired\n"); -} - static void timeout_rr_t3126(void *arg) { struct gsm48_rrlayer *rr = arg; @@ -810,15 +805,6 @@ rr->t3122.cb = timeout_rr_t3122; rr->t3122.data = rr; osmo_timer_schedule(&rr->t3122, sec, micro); -} - -static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) -{ - LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, - micro / 1000); - rr->t3124.cb = timeout_rr_t3124; - rr->t3124.data = rr; - osmo_timer_schedule(&rr->t3124, sec, micro); } static void start_rr_t3126(struct gsm48_rrlayer *rr, int sec, int micro) @@ -2735,7 +2721,7 @@ uint8_t serv_rxlev_full = 0, serv_rxlev_sub = 0, serv_rxqual_full = 0, serv_rxqual_sub = 0; uint8_t ta, tx_power; - uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0, multi_rep = 0; + uint8_t rep_ba = 0, rep_valid = 0, meas_valid = 0; uint8_t n = 0, rxlev_nc[6], bsic_nc[6], bcch_f_nc[6]; /* just in case! */ @@ -2770,12 +2756,13 @@ uint8_t ncc; int i, index; - /* multiband reporting, if not: 0 = normal reporting */ - if (s->si5ter) - multi_rep = s->nb_multi_rep_si5ter; +#if 0 + /* FIXME: multi-band reporting, if not: 0 = normal reporting */ + uint8_t multi_rep = s->si5ter ? + s->nb_multi_rep_si5ter : 0; +#endif /* get 6 strongest measurements */ - // FIXME: multiband report strongest = 127; /* infinite */ for (n = 0; n < 6; n++) { current = -128; /* -infinite */ @@ -5579,6 +5566,15 @@ todo } +static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro) +{ + LOGP(DRR, LOGL_INFO, "starting T3124 with %d.%03d seconds\n", sec, + micro / 1000); + rr->t3124.cb = timeout_rr_t3124; + rr->t3124.data = rr; + osmo_timer_schedule(&rr->t3124, sec, micro); +} + /* send HANDOVER ACCESS burst (9.1.14) */ static int gsm48_rr_tx_hando_access(struct osmocom_ms *ms) { -- To view, visit https://gerrit.osmocom.org/4644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:51 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n ...................................................................... mobile/gsm411_sms.c: use secure gsm_7bit_(en|de)code_n Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' postfix in names, it's better to use the updated functions. Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 655fe53..f56262e 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -113,7 +113,8 @@ sms->data_coding_scheme = dcs; strncpy(sms->address, receiver, sizeof(sms->address)-1); /* Generate user_data */ - sms->user_data_len = gsm_7bit_encode(sms->user_data, sms->text); + sms->user_data_len = gsm_7bit_encode_n(sms->user_data, + sizeof(sms->user_data), sms->text, NULL); return sms; } @@ -282,7 +283,8 @@ switch (sms_alphabet) { case DCS_7BIT_DEFAULT: - gsm_7bit_decode(gsms->text, smsp, gsms->user_data_len); + gsm_7bit_decode_n(gsms->text, sizeof(gsms->text), + smsp, gsms->user_data_len); break; case DCS_8BIT_DATA: case DCS_UCS2: -- To view, visit https://gerrit.osmocom.org/4643 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:51 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm48_mm.c: use secure gsm_7bit_decode_n In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm48_mm.c: use secure gsm_7bit_decode_n ...................................................................... mobile/gsm48_mm.c: use secure gsm_7bit_decode_n Since some 'gsm_7bit_*' functions were deprecated and replaced by more secure ones with the '_n_' postfix in names, it's better to use the updated functions. Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd --- M src/host/layer23/src/mobile/gsm48_mm.c 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 100129b..360f9b3 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -264,10 +264,7 @@ length = ((in_len - 1) * 8 - padding) / 7; if (length <= 0) return 0; - if (length >= name_len) - length = name_len - 1; - gsm_7bit_decode(name, lv + 2, length); - name[length] = '\0'; + gsm_7bit_decode_n(name, name_len, lv + 2, length); return length; } -- To view, visit https://gerrit.osmocom.org/4642 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4499b592a0dfea71462aed19fe641419d79b3cbd Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:30:51 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/vty_interface.c: fix incompatible pointer type warning In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/vty_interface.c: fix incompatible pointer type warning ...................................................................... mobile/vty_interface.c: fix incompatible pointer type warning According to the vty_app_info struct definition, the go_parent_cb() should return an integer, but not enum. So, this change fixes the following compiler warning: > warning: initialization from incompatible pointer type > .go_parent_cb = ms_vty_go_parent, Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 1f1341b..3bec113 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -12,7 +12,7 @@ SUPPORT_NODE, }; -enum node_type ms_vty_go_parent(struct vty *vty); +int ms_vty_go_parent(struct vty *vty); int ms_vty_init(void); extern void vty_notify(struct osmocom_ms *ms, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index b3777dc..0f27194 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2757,7 +2757,7 @@ return CMD_SUCCESS; } -enum node_type ms_vty_go_parent(struct vty *vty) +int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { case MS_NODE: -- To view, visit https://gerrit.osmocom.org/4640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib55e43eaaebdd9fe0d74a030b1057ae82804a77e Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:31:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:31:48 +0000 Subject: osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:32:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:32:43 +0000 Subject: osmo-mgw[master]: mgcp-client vty: use name 'mgw' instead of 'mgcpgw' In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4597/1/src/libosmo-mgcp-client/mgcp_client_vty.c File src/libosmo-mgcp-client/mgcp_client_vty.c: Line 1: /* MGCP client interface to quagga VTY */ it is to libosmocore vty. the fact that this code was originally inherited from quagga (and modified significantly ever since) is of no relevance to the reader here, and probably just serves confusion. -- To view, visit https://gerrit.osmocom.org/4597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d43d42929dc9162e57640499526fb7cadbcfbe6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:33:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:33:06 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp-client vty: use name 'mgw' instead of 'mgcpgw' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp-client vty: use name 'mgw' instead of 'mgcpgw' ...................................................................... mgcp-client vty: use name 'mgw' instead of 'mgcpgw' 'mgcpgw' was a working title for the osmo-mgw. Before this takes hold out there, let's rename the VTY commands to 'mgw'. I'd rather have some local fallout in our testing environments now than drag the stupid name along. Keep deprecated 'mgcpgw' commands for backwards compat. Change-Id: I1d43d42929dc9162e57640499526fb7cadbcfbe6 --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 54 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index c52803f..0a30436 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -1,4 +1,4 @@ -/* MGCPGW client interface to quagga VTY */ +/* MGCP client interface to quagga VTY */ /* (C) 2016 by sysmocom s.m.f.c. GmbH * Based on OpenBSC interface to quagga VTY (libmsc/vty_interface_layer3.c) * (C) 2009 by Harald Welte @@ -29,14 +29,14 @@ #include -#define MGCPGW_STR "MGCP gateway configuration for RTP streams\n" +#define MGW_STR "MGCP gateway configuration for RTP streams\n" void *global_mgcp_client_ctx = NULL; struct mgcp_client_conf *global_mgcp_client_conf = NULL; -DEFUN(cfg_mgcpgw_local_ip, cfg_mgcpgw_local_ip_cmd, - "mgcpgw local-ip A.B.C.D", - MGCPGW_STR "local bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd, + "mgw local-ip A.B.C.D", + MGW_STR "local bind to connect to MGCP gateway with\n" "local bind IP address\n") { if (!global_mgcp_client_conf) @@ -46,10 +46,14 @@ talloc_strdup(global_mgcp_client_ctx, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_local_ip, cfg_mgcpgw_local_ip_cmd, + "mgcpgw local-ip A.B.C.D", + MGW_STR "local bind to connect to MGCP gateway with\n" + "local bind IP address\n") -DEFUN(cfg_mgcpgw_local_port, cfg_mgcpgw_local_port_cmd, - "mgcpgw local-port <0-65535>", - MGCPGW_STR "local bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_local_port, cfg_mgw_local_port_cmd, + "mgw local-port <0-65535>", + MGW_STR "local bind to connect to MGCP gateway with\n" "local bind port\n") { if (!global_mgcp_client_conf) @@ -57,10 +61,14 @@ global_mgcp_client_conf->local_port = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_local_port, cfg_mgcpgw_local_port_cmd, + "mgcpgw local-port <0-65535>", + MGW_STR "local bind to connect to MGCP gateway with\n" + "local bind port\n") -DEFUN(cfg_mgcpgw_remote_ip, cfg_mgcpgw_remote_ip_cmd, - "mgcpgw remote-ip A.B.C.D", - MGCPGW_STR "remote bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_remote_ip, cfg_mgw_remote_ip_cmd, + "mgw remote-ip A.B.C.D", + MGW_STR "remote bind to connect to MGCP gateway with\n" "remote bind IP address\n") { if (!global_mgcp_client_conf) @@ -70,10 +78,14 @@ talloc_strdup(global_mgcp_client_ctx, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_remote_ip, cfg_mgcpgw_remote_ip_cmd, + "mgcpgw remote-ip A.B.C.D", + MGW_STR "remote bind to connect to MGCP gateway with\n" + "remote bind IP address\n") -DEFUN(cfg_mgcpgw_remote_port, cfg_mgcpgw_remote_port_cmd, - "mgcpgw remote-port <0-65535>", - MGCPGW_STR "remote bind to connect to MGCP gateway with\n" +DEFUN(cfg_mgw_remote_port, cfg_mgw_remote_port_cmd, + "mgw remote-port <0-65535>", + MGW_STR "remote bind to connect to MGCP gateway with\n" "remote bind port\n") { if (!global_mgcp_client_conf) @@ -81,10 +93,14 @@ global_mgcp_client_conf->remote_port = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_remote_port, cfg_mgcpgw_remote_port_cmd, + "mgcpgw remote-port <0-65535>", + MGW_STR "remote bind to connect to MGCP gateway with\n" + "remote bind port\n") -DEFUN(cfg_mgcpgw_endpoint_range, cfg_mgcpgw_endpoint_range_cmd, - "mgcpgw endpoint-range <1-65534> <1-65534>", - MGCPGW_STR "usable range of endpoint identifiers\n" +DEFUN(cfg_mgw_endpoint_range, cfg_mgw_endpoint_range_cmd, + "mgw endpoint-range <1-65534> <1-65534>", + MGW_STR "usable range of endpoint identifiers\n" "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") { @@ -101,13 +117,18 @@ global_mgcp_client_conf->last_endpoint = last_endpoint; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_endpoint_range, cfg_mgcpgw_endpoint_range_cmd, + "mgcpgw endpoint-range <1-65534> <1-65534>", + MGW_STR "usable range of endpoint identifiers\n" + "set first useable endpoint identifier\n" + "set the last useable endpoint identifier\n") #define BTS_START_STR "First UDP port allocated for the BTS side\n" #define UDP_PORT_STR "UDP Port number\n" DEFUN(cfg_mgcp_rtp_bts_base_port, cfg_mgcp_rtp_bts_base_port_cmd, - "mgcpgw bts-base <0-65534>", - MGCPGW_STR + "mgw bts-base <0-65534>", + MGW_STR BTS_START_STR UDP_PORT_STR) { @@ -125,32 +146,32 @@ addr = global_mgcp_client_conf->local_addr; if (addr) - vty_out(vty, "%smgcpgw local-ip %s%s", indent, addr, + vty_out(vty, "%smgw local-ip %s%s", indent, addr, VTY_NEWLINE); port = global_mgcp_client_conf->local_port; if (port >= 0) - vty_out(vty, "%smgcpgw local-port %u%s", indent, + vty_out(vty, "%smgw local-port %u%s", indent, (uint16_t)port, VTY_NEWLINE); addr = global_mgcp_client_conf->remote_addr; if (addr) - vty_out(vty, "%smgcpgw remote-ip %s%s", indent, addr, + vty_out(vty, "%smgw remote-ip %s%s", indent, addr, VTY_NEWLINE); port = global_mgcp_client_conf->remote_port; if (port >= 0) - vty_out(vty, "%smgcpgw remote-port %u%s", indent, + vty_out(vty, "%smgw remote-port %u%s", indent, (uint16_t)port, VTY_NEWLINE); first_endpoint = global_mgcp_client_conf->first_endpoint; last_endpoint = global_mgcp_client_conf->last_endpoint; if (last_endpoint != 0) { - vty_out(vty, "%smgcpgw endpoint-range %u %u%s", indent, + vty_out(vty, "%smgw endpoint-range %u %u%s", indent, first_endpoint, last_endpoint, VTY_NEWLINE); } bts_base = global_mgcp_client_conf->bts_base; if (bts_base) { - vty_out(vty, "%smgcpgw bts-base %u%s", indent, + vty_out(vty, "%smgw bts-base %u%s", indent, bts_base, VTY_NEWLINE); } @@ -162,10 +183,18 @@ global_mgcp_client_ctx = talloc_ctx; global_mgcp_client_conf = conf; + install_element(node, &cfg_mgw_local_ip_cmd); + install_element(node, &cfg_mgw_local_port_cmd); + install_element(node, &cfg_mgw_remote_ip_cmd); + install_element(node, &cfg_mgw_remote_port_cmd); + install_element(node, &cfg_mgw_endpoint_range_cmd); + + /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); install_element(node, &cfg_mgcpgw_local_port_cmd); install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); + install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d43d42929dc9162e57640499526fb7cadbcfbe6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:41:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:41:50 +0000 Subject: osmo-pcu[master]: LC15: Fix TA adjustment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/4678/1//COMMIT_MSG Commit Message: Line 8: Please kindly give the change log more context/description on what is fixed, why and how. Also, it is not a LC15 specific change, so let's drop this from the subject? Thanks! https://gerrit.osmocom.org/#/c/4678/1/src/bts.cpp File src/bts.cpp: Line 1638: if (!strcmp(p, "PH-DATA")) { i don't think it is very elegant to use string-compares on a string that is originally only intended to facilitate logging. We don't do this anywhere else. AFAICT. I would prefer a different solution, either passing a 'bool is_rach' argument to the function/method, or maybe even having one set_tbf_ra() (which appears to be the case for RACH) and one update_tbf_ra() for the relative/delta updates later? -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 5 19:43:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 Nov 2017 19:43:03 +0000 Subject: osmo-pcu[master]: PCU: display TA information in TBF stats In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4679/1/src/pcu_vty_functions.cpp File src/pcu_vty_functions.cpp: Line 49: tbf->ta(), ta() seems to return uint8_t, so %u would be more appropriate. -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From admin at opensuse.org Sun Nov 5 21:14:04 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 05 Nov 2017 21:14:04 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <59ff7f369fb32_53db6d4f849271b5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 24s] [58/70] preinstalling libuuid1... [ 24s] [59/70] preinstalling user-setup... [ 24s] [60/70] preinstalling login... [ 24s] [61/70] preinstalling base-files... [ 25s] [62/70] preinstalling libblkid1... [ 25s] [63/70] preinstalling libmount1... [ 25s] [64/70] preinstalling bash... [ 26s] [65/70] preinstalling mount... [ 26s] [66/70] preinstalling util-linux... [ 27s] [67/70] preinstalling sysvinit-utils... [ 27s] [68/70] preinstalling e2fsprogs... [ 27s] [69/70] preinstalling sysv-rc... [ 27s] [70/70] preinstalling initscripts... [ 27s] [ 29s] [1/1] preinstalling libdevmapper1.02.1... [ 30s] copying packages... [ 49s] reordering...cycle: libc6 -> libgcc1 [ 49s] breaking dependency libgcc1 -> libc6 [ 49s] cycle: debhelper -> dh-autoreconf [ 49s] breaking dependency debhelper -> dh-autoreconf [ 49s] cycle: dh-strip-nondeterminism -> debhelper [ 49s] breaking dependency debhelper -> dh-strip-nondeterminism [ 49s] done [ 50s] objdump: /boot/Image: File format not recognized [ 51s] booting kvm... [ 51s] ### VM INTERACTION START ### [ 51s] /var/run/obs/worker/32/build/build-vm-kvm: fork: Cannot allocate memory [ 51s] /var/run/obs/worker/32/build/build: fork: Cannot allocate memory [ 51s] /var/run/obs/worker/32/build/build-vm: fork: Cannot allocate memory -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 6 06:18:14 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 Nov 2017 06:18:14 +0000 Subject: [PATCH] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2668 to look at the new patch set (#5). host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/68/2668/5 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 9fda91e..81e8c3f 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -562,7 +560,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -907,7 +905,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2155,7 +2153,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2262,7 +2260,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2483,7 +2481,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return NULL; ba->mcc = s->mcc; @@ -2525,7 +2523,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(cs->ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; ba->mcc = s->mcc; @@ -4095,7 +4093,7 @@ time(&now); - nb = talloc_zero(l23_ctx, struct gsm322_neighbour); + nb = talloc_zero(cs->ms, struct gsm322_neighbour); if (!nb) return 0; @@ -4425,8 +4423,8 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, - struct gsm48_sysinfo); + cs->list[cs->arfci].sysinfo = talloc_zero(ms, + struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); cs->si = cs->list[cs->arfci].sysinfo; @@ -4597,7 +4595,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -5076,7 +5074,7 @@ "stored BA list becomes obsolete.\n"); } else while(!feof(fp)) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; rc = fread(buf, 4, 1, fp); diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 38dfab0..d398c76 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -38,8 +38,6 @@ #include #include -extern void *l23_ctx; - static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); static int gsm48_rel_null_free(struct gsm_trans *trans); int mncc_release_ind(struct osmocom_ms *ms, struct gsm_trans *trans, diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 1e23942..7315927 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -252,13 +252,13 @@ } -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx) +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name) { struct mncc_sock_state *state; struct osmo_fd *bfd; int rc; - state = talloc_zero(tall_ctx, struct mncc_sock_state); + state = talloc_zero(inst, struct mncc_sock_state); if (!state) return NULL; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index d364ca3..b8c2558 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -32,7 +32,6 @@ #include #include -void *l23_ctx; static uint32_t new_callref = 1; static LLIST_HEAD(call_list); @@ -287,7 +286,7 @@ if (!call) { if (llist_empty(&call_list)) first_call = 1; - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; @@ -551,7 +550,7 @@ } } - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 455db50..d332a07 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -36,8 +36,6 @@ * if list is changed, the result is not written back to SIM */ //#define TEST_EMPTY_FPLMN -void *l23_ctx; - static void subscr_sim_query_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_update_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_key_cb(struct osmocom_ms *ms, struct msgb *msg); @@ -400,7 +398,7 @@ break; /* add to list */ - plmn = talloc_zero(l23_ctx, struct gsm_sub_plmn_list); + plmn = talloc_zero(ms, struct gsm_sub_plmn_list); if (!plmn) return -ENOMEM; lai[0] = data[0]; @@ -504,7 +502,7 @@ break; /* add to list */ - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; lai[0] = data[0]; @@ -1119,7 +1117,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden PLMNs " "(mcc=%s, mnc=%s)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc)); - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(subscr->ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; na->mcc = mcc; diff --git a/src/host/layer23/src/mobile/transaction.c b/src/host/layer23/src/mobile/transaction.c index 45bf2b4..9824bd1 100644 --- a/src/host/layer23/src/mobile/transaction.c +++ b/src/host/layer23/src/mobile/transaction.c @@ -30,8 +30,6 @@ #include #include -extern void *l23_ctx; - void _gsm48_cc_trans_free(struct gsm_trans *trans); void _gsm480_ss_trans_free(struct gsm_trans *trans); void _gsm411_sms_trans_free(struct gsm_trans *trans); @@ -67,7 +65,7 @@ { struct gsm_trans *trans; - trans = talloc_zero(l23_ctx, struct gsm_trans); + trans = talloc_zero(ms, struct gsm_trans); if (!trans) return NULL; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 0f27194..06f66b5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -43,8 +43,6 @@ #include #include -void *l23_ctx; - int mncc_call(struct osmocom_ms *ms, char *number); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); @@ -2104,7 +2102,7 @@ if (vty_check_number(vty, argv[1])) return CMD_WARNING; - abbrev = talloc_zero(l23_ctx, struct gsm_settings_abbrev); + abbrev = talloc_zero(ms, struct gsm_settings_abbrev); if (!abbrev) { vty_out(vty, "No Memory!%s", VTY_NEWLINE); return CMD_WARNING; -- To view, visit https://gerrit.osmocom.org/2668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Nov 6 06:21:24 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 Nov 2017 06:21:24 +0000 Subject: osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Patch Set 5: Well, I was managed to avoid adding 'ms' as an argument. Let's merge it for now, while dynamic allocation of the ms->* would be implemented in a separate commit. -- To view, visit https://gerrit.osmocom.org/2668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 10:25:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 10:25:38 +0000 Subject: [PATCH] osmo-gsm-tester[master]: util: Add setcap_net_raw API In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4423 to look at the new patch set (#2). util: Add setcap_net_raw API Some binaries such as osmo-bts-ocpty require specific capabilities, and we need to provide them in case osmo-gsm-tester is not run as root. Process class from process module is imported inside the method after module initialization in order to avoid circular dependency of relative imports, which is only available since python 3.5. Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 --- M src/osmo_gsm_tester/util.py 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/23/4423/2 diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index c07bcf2..1ecbf41 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -49,6 +49,19 @@ pass return None +def setcap_net_raw(binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' + proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 'osmo-gsm-tester_setcap_net_raw.sh', binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, proc.result)) + class listdict(dict): 'a dict of lists { "a": [1, 2, 3], "b": [1, 2] }' -- To view, visit https://gerrit.osmocom.org/4423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 10:25:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 10:25:38 +0000 Subject: [PATCH] osmo-gsm-tester[master]: util: Add change_elf_rpath API In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4424 to look at the new patch set (#2). util: Add change_elf_rpath API Linux dynamic loader avoids loading shared libraries from env vars such as LD_LIBRALY_PATH for ELF binaries which have capabilitiy flags enabled for security reasons. For these binaries, we modify the RPATH of the ELF header to tell the loader where to find the libraries. Process class from process module is imported inside the method after module initialization in order to avoid circular dependency of relative imports, which is only available since python 3.5. Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff --- M src/osmo_gsm_tester/util.py 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/24/4424/2 diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index 1ecbf41..8fb6e19 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -38,6 +38,19 @@ return path return path + ':' + lp +def change_elf_rpath(binary, paths, run_dir): + ''' + Change RPATH field in ELF executable binary. + This feature can be used to tell the loaded to load the trial libraries, as + LD_LIBRARY_PATH is disabled for paths with modified capabilities. + ''' + from .process import Process + proc = Process('patchelf', run_dir, ['patchelf', '--set-rpath', paths, binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('patchelf finished with err code %d' % proc.result) + def ip_to_iface(ip): try: for iface in os.listdir('/sys/class/net'): -- To view, visit https://gerrit.osmocom.org/4424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 10:25:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 10:25:38 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add support for osmo-bts-octphy In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4425 to look at the new patch set (#3). Add support for osmo-bts-octphy Specific parts for this class: - Runs osmo-bts-octphy binary, that requires CAP_NET_RAW capability because it uses an AF_PACKET socket. - As a consequence, it must use the previously added APIs to set the capability and modify the RPATH of the binary before launching it. These APIs require extra host setup and installed dependencies that will be documented soon in osmo-gsm-tester manual. - A num_trx() helper method is added because the binary requires that parameter. - A allocate_phy_instances() is added to help build/fill the conf dictionary to be used in the tmpl to be able to easily set up trx, phy and insances. A config to use a osmo-bts-octphy at full power is used (4 trx) is added in this commit to show how can it be configured. However our current license only has support to use 1 TRX, and so next commit drops most configurations to simplify the setup to use only 1 TRX. Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 --- M example/defaults.conf M example/resources.conf A src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl 5 files changed, 273 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/25/4425/3 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..7711297 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -45,3 +45,43 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F + +osmo_bts_octphy: + trx_list: + - {} + - nominal_power: 23 + max_power_red: 0 + arfcn: 869 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 870 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 871 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F diff --git a/example/resources.conf b/example/resources.conf index 70c1c35..0237d7c 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -31,6 +31,21 @@ trx_remote_ip: 10.42.42.112 ciphers: [a5_0, a5_1] +- label: OCTBTS 3500 + type: osmo-bts-octphy + ipa_unit_id: 8 + addr: 10.42.42.52 + band: GSM-1800 + trx_list: + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + arfcn: - arfcn: 512 band: GSM-1800 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py new file mode 100644 index 0000000..ae2e249 --- /dev/null +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -0,0 +1,168 @@ +# osmo_gsm_tester: specifics for running an osmo-bts-octphy +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoBtsOctphy(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + env = None + pcu_sk_tmp_dir = None + values = None + + BIN_BTS_OCTPHY = 'osmo-bts-octphy' + + CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' + + def __init__(self, suite_run, conf): + super().__init__(log.C_RUN, OsmoBtsOctphy.BIN_BTS_OCTPHY) + self.suite_run = suite_run + self.conf = conf + self.env = {} + self.values = {} + self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') + if len(self.pcu_socket_path().encode()) > 107: + raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + + def cleanup(self): + if self.pcu_sk_tmp_dir: + try: + os.remove(self.pcu_socket_path()) + except OSError: + pass + os.rmdir(self.pcu_sk_tmp_dir) + + def pcu_socket_path(self): + return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') + + def remote_addr(self): + return self.conf.get('addr') + + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: + self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) + + self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr(), '-t', str(self.num_trx())) + #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1') + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def num_trx(self): + return len(self.values['osmo_bts_octphy'].get('trx_list', [])) + + def allocate_phy_instances(self, c): + ''' + Generate match trx Z <-> phy X inst Y to use in vty config + + We create a new phy for each trx found with a new hwaddr. If hwaddr is + already there, increase num_instances and give last instance index to + the current trx. + ''' + phy_list = [] + for trx in c.get('trx_list', []): + hwaddr = trx.get('hw_addr', None) + netdev = trx.get('net_device', None) + if hwaddr is None: + raise log.Error('Expected hw-addr value not found!') + found = False + phy_idx = 0 + for phy in phy_list: + if phy['hw_addr'] == hwaddr: + phy['num_instances'] += 1 + found = True + break + phy_idx += 1 + if not found: + phy_list.append({'hw_addr': hwaddr, 'net_device': netdev, 'num_instances': 1}) + trx['phy_idx'] = phy_idx + trx['instance_idx'] = phy_list[phy_idx]['num_instances'] - 1 + c['phy_list'] = phy_list + + def configure(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') + self.config_file = self.run_dir.new_file(OsmoBtsOctphy.CONF_BTS_OCTPHY) + self.dbg(config_file=self.config_file) + + values = dict(osmo_bts_octphy=config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_bts_octphy': { + 'oml_remote_ip': self.bsc.addr(), + 'pcu_socket_path': self.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_bts_octphy': self.conf }) + + self.allocate_phy_instances(values['osmo_bts_octphy']) + + self.dbg('OSMO-BTS-OCTPHY CONFIG:\n' + pprint.pformat(values)) + self.values = values + with open(self.config_file, 'w') as f: + r = template.render(OsmoBtsOctphy.CONF_BTS_OCTPHY, values) + self.dbg(r) + f.write(r) + + def conf_for_bsc(self): + values = config.get_defaults('bsc_bts') + config.overlay(values, config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.conf) + self.dbg(conf=values) + return values + + def set_bsc(self, bsc): + self.bsc = bsc + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 7e55129..25bb00f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -29,7 +29,7 @@ from . import schema from . import ofono_client from . import osmo_nitb -from . import bts_sysmo, bts_osmotrx +from . import bts_sysmo, bts_osmotrx, bts_octphy from .util import is_dict, is_list @@ -83,6 +83,7 @@ KNOWN_BTS_TYPES = { 'osmo-bts-sysmo': bts_sysmo.SysmoBts, 'osmo-bts-trx': bts_osmotrx.OsmoBtsTrx, + 'osmo-bts-octphy': bts_octphy.OsmoBtsOctphy, } def register_bts_type(name, clazz): diff --git a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl new file mode 100644 index 0000000..13cdb1d --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl @@ -0,0 +1,48 @@ +! Configuration rendered by osmo-gsm-tester +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level abis debug + logging level oml debug + logging level pag debug + logging level rll debug + logging level rr debug + logging level rsl debug +! + +%for phy in osmo_bts_octphy.phy_list: +phy ${loop.index} + octphy hw-addr ${phy.hw_addr} + octphy net-device ${phy.net_device} + octphy rx-gain 70 + %for inst in range(phy.num_instances): + instance ${loop.index} + %endfor +%endfor +bts 0 + band ${osmo_bts_octphy.band} + ipa unit-id ${osmo_bts_octphy.ipa_unit_id} 0 + oml remote-ip ${osmo_bts_octphy.oml_remote_ip} + pcu-socket ${osmo_bts_octphy.pcu_socket_path} + gsmtap-sapi bcch + gsmtap-sapi ccch + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi tch/f + gsmtap-sapi tch/h + gsmtap-sapi pacch + gsmtap-sapi pdtch + gsmtap-sapi ptcch + gsmtap-sapi cbch + gsmtap-sapi sacch +%for trx in osmo_bts_octphy.trx_list: + trx ${loop.index} + power-ramp max-initial 23000 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy ${trx.phy_idx} instance ${trx.instance_idx} +%endfor -- To view, visit https://gerrit.osmocom.org/4425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 13:05:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 13:05:42 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' Message-ID: Review at https://gerrit.osmocom.org/4698 mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' Commit 87203f2a3746d708f85ee75d978e2821bda58e6d renamed some cmds to use mgw instead of mgcpgw, and added deprecated alias for the old commands, but forgot to add one for 'mgcpgw bts-base'. This commit fixes backawards compatibility with old config files that mentioned commit introduced. Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/98/4698/1 diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index 0a30436..e1a892f 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -125,8 +125,8 @@ #define BTS_START_STR "First UDP port allocated for the BTS side\n" #define UDP_PORT_STR "UDP Port number\n" -DEFUN(cfg_mgcp_rtp_bts_base_port, - cfg_mgcp_rtp_bts_base_port_cmd, +DEFUN(cfg_mgw_rtp_bts_base_port, + cfg_mgw_rtp_bts_base_port_cmd, "mgw bts-base <0-65534>", MGW_STR BTS_START_STR @@ -135,6 +135,12 @@ global_mgcp_client_conf->bts_base = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, + cfg_mgcpgw_rtp_bts_base_port_cmd, + "mgcpgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) int mgcp_client_config_write(struct vty *vty, const char *indent) { @@ -188,6 +194,7 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); + install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -195,6 +202,5 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); - - install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd); + install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 13:20:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 13:20:12 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-msc: Use mgw instead of mgcpgw in cfg Message-ID: Review at https://gerrit.osmocom.org/4699 osmo-msc: Use mgw instead of mgcpgw in cfg As of osmo-mgw 87203f2a3746d708f85ee75d978e2821bda58e6d, mgcpw commands are deprectated. Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 --- M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/99/4699/1 diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index 93c3a7c..665c151 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -81,7 +81,7 @@ return self.ip_address.get('addr') def conf_for_msc(self): - return dict(mgcpgw=dict(ip_address=self.ip_address)) + return dict(mgw=dict(ip_address=self.ip_address)) def running(self): return not self.process.terminated() diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 6851ea9..9ac68b3 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -20,7 +20,7 @@ cs7 instance 0 point-code 0.0.1 msc - mgcpgw remote-ip ${mgcpgw.ip_address.addr} + mgw remote-ip ${mgw.ip_address.addr} assign-tmsi cs7-instance-iu 0 cs7-instance-a 0 -- To view, visit https://gerrit.osmocom.org/4699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 13:44:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 Nov 2017 13:44:41 +0000 Subject: osmo-mgw[master]: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 I want the bts-base command to be removed from mgcp-client ASAP, but if it helps solve interim breakage, I'd be fine to merge this temporarily -- To view, visit https://gerrit.osmocom.org/4698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 13:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 Nov 2017 13:45:03 +0000 Subject: osmo-mgw[master]: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 13:45:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 Nov 2017 13:45:04 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' ...................................................................... mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' Commit 87203f2a3746d708f85ee75d978e2821bda58e6d renamed some cmds to use mgw instead of mgcpgw, and added deprecated alias for the old commands, but forgot to add one for 'mgcpgw bts-base'. This commit fixes backawards compatibility with old config files that mentioned commit introduced. Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 10 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index 0a30436..e1a892f 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -125,8 +125,8 @@ #define BTS_START_STR "First UDP port allocated for the BTS side\n" #define UDP_PORT_STR "UDP Port number\n" -DEFUN(cfg_mgcp_rtp_bts_base_port, - cfg_mgcp_rtp_bts_base_port_cmd, +DEFUN(cfg_mgw_rtp_bts_base_port, + cfg_mgw_rtp_bts_base_port_cmd, "mgw bts-base <0-65534>", MGW_STR BTS_START_STR @@ -135,6 +135,12 @@ global_mgcp_client_conf->bts_base = atoi(argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, + cfg_mgcpgw_rtp_bts_base_port_cmd, + "mgcpgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) int mgcp_client_config_write(struct vty *vty, const char *indent) { @@ -188,6 +194,7 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); + install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -195,6 +202,5 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); - - install_element(node, &cfg_mgcp_rtp_bts_base_port_cmd); + install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1c58945f4203b05d79f367afb3082b9a6a2c4e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 14:50:36 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 14:50:36 +0000 Subject: [PATCH] osmo-gsm-tester[master]: contrib: Disable new dep gnutls in sysmocom SDK builds Message-ID: Review at https://gerrit.osmocom.org/4700 contrib: Disable new dep gnutls in sysmocom SDK builds Recently a new dependency on libgnutls was added to have a fallback for kernels prior to 3.17 in which getrandom syscall fails, see libosmocore ed029dfab959bca74bd43d86922727c2047eeb4d. Since sysmobts has a kernel newer than 3.7 for a long time now, but we are still running a 201310 image (and sdk) on them which doesn't contain gnutls, let's disable it at configure time to fix the build against the current SDK. Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/00/4700/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index e636893..59ba85d 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -16,7 +16,7 @@ # for gsm_data_shared.h have_repo openbsc -build_repo libosmocore --disable-pcsc --disable-doxygen +build_repo libosmocore --disable-pcsc --disable-doxygen --disable-gnutls build_repo libosmo-abis build_repo osmo-bts --enable-sysmocom-bts --with-openbsc=$base/openbsc/openbsc/include diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index c38bc33..7cd1142 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -13,7 +13,7 @@ prefix_real="$DESTDIR$prefix" . "$(dirname "$0")/jenkins-build-common.sh" -build_repo libosmocore --disable-pcsc --disable-doxygen +build_repo libosmocore --disable-pcsc --disable-doxygen --disable-gnutls build_repo osmo-pcu --enable-sysmocom-dsp create_bin_tgz osmo-pcu -- To view, visit https://gerrit.osmocom.org/4700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 15:14:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 15:14:11 +0000 Subject: osmo-gsm-tester[master]: contrib: Disable new dep gnutls in sysmocom SDK builds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 15:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 15:14:25 +0000 Subject: [MERGED] osmo-gsm-tester[master]: contrib: Disable new dep gnutls in sysmocom SDK builds In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: contrib: Disable new dep gnutls in sysmocom SDK builds ...................................................................... contrib: Disable new dep gnutls in sysmocom SDK builds Recently a new dependency on libgnutls was added to have a fallback for kernels prior to 3.17 in which getrandom syscall fails, see libosmocore ed029dfab959bca74bd43d86922727c2047eeb4d. Since sysmobts has a kernel newer than 3.7 for a long time now, but we are still running a 201310 image (and sdk) on them which doesn't contain gnutls, let's disable it at configure time to fix the build against the current SDK. Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index e636893..59ba85d 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -16,7 +16,7 @@ # for gsm_data_shared.h have_repo openbsc -build_repo libosmocore --disable-pcsc --disable-doxygen +build_repo libosmocore --disable-pcsc --disable-doxygen --disable-gnutls build_repo libosmo-abis build_repo osmo-bts --enable-sysmocom-bts --with-openbsc=$base/openbsc/openbsc/include diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index c38bc33..7cd1142 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -13,7 +13,7 @@ prefix_real="$DESTDIR$prefix" . "$(dirname "$0")/jenkins-build-common.sh" -build_repo libosmocore --disable-pcsc --disable-doxygen +build_repo libosmocore --disable-pcsc --disable-doxygen --disable-gnutls build_repo osmo-pcu --enable-sysmocom-dsp create_bin_tgz osmo-pcu -- To view, visit https://gerrit.osmocom.org/4700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 15:39:49 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Mon, 6 Nov 2017 15:39:49 +0000 Subject: osmo-pcu[master]: LC15: Fix TA adjustment In-Reply-To: References: Message-ID: Patch Set 1: > (2 comments) Thanks Harald. I will refactor the code in next batch. -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:19:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 16:19:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add minimal USSD support to test extension number In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3401 to look at the new patch set (#2). Add minimal USSD support to test extension number Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 --- M example/default-suites.conf M src/osmo_gsm_tester/ofono_client.py A suites/aoip_ussd/assert_extension.py A suites/aoip_ussd/suite.conf A suites/ussd/assert_extension.py A suites/ussd/suite.conf 6 files changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/3401/2 diff --git a/example/default-suites.conf b/example/default-suites.conf index 3fd1322..7bee164 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -10,3 +10,7 @@ - smpp - aoip_smpp - aoip_encryption +- ussd:sysmo +- aoip_ussd:sysmo +- ussd:trx +- aoip_ussd:trx diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py index 66c0a79..e8f57cc 100644 --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -39,6 +39,7 @@ I_SMS = 'org.ofono.MessageManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' +I_SS = 'org.ofono.SupplementaryServices' # See https://github.com/intgr/ofono/blob/master/doc/network-api.txt#L78 NETREG_ST_REGISTERED = 'registered' @@ -645,4 +646,9 @@ def log_info(self, *args, **kwargs): self.log(self.info(*args, **kwargs)) + def ussd_send(self, command): + ss = self.dbus.interface(I_SS) + service_type, response = ss.Initiate(command) + return response + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py new file mode 100755 index 0000000..da5dad3 --- /dev/null +++ b/suites/aoip_ussd/assert_extension.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() +ms = suite.modem() + +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf new file mode 100644 index 0000000..8e0a684 --- /dev/null +++ b/suites/aoip_ussd/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 5 # msc, bsc, hlr, stp, mgw + bts: + - times: 1 + modem: + - times: 1 diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py new file mode 100755 index 0000000..4e2e0e1 --- /dev/null +++ b/suites/ussd/assert_extension.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +nitb = suite.nitb() +bts = suite.bts() +ms = suite.modem() + +print('start nitb and bts...') +nitb.bts_add(bts) +nitb.start() +bts.start() + +nitb.subscriber_add(ms) + +ms.connect(nitb.mcc_mnc()) +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, nitb.mcc_mnc()) +wait(nitb.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/suite.conf b/suites/ussd/suite.conf new file mode 100644 index 0000000..eb59abb --- /dev/null +++ b/suites/ussd/suite.conf @@ -0,0 +1,10 @@ +resources: + ip_address: + - times: 1 + bts: + - times: 1 + modem: + - times: 1 + +defaults: + timeout: 60s -- To view, visit https://gerrit.osmocom.org/3401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:19:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 16:19:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: ussd: Workaround ofono issue to prevent test failure In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3402 to look at the new patch set (#2). ussd: Workaround ofono issue to prevent test failure Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5 --- M suites/aoip_ussd/assert_extension.py M suites/ussd/assert_extension.py 2 files changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/3402/2 diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index da5dad3..5e934db 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -31,6 +31,16 @@ wait(ms.is_connected, msc.mcc_mnc()) wait(msc.subscriber_attached, ms) +# ofono (qmi) currently changes state to 'registered' jut after sending +# 'Location Update Request', but before receiving 'Location Updating Accept'. +# Which means we can reach lines below and send USSD code while still not being +# attached, which will then fail. See OsmoGsmTester #2239 for more detailed +# information. +# Until we find an ofono fix or a better way to workaround this, let's just +# sleep for a while in order to receive the 'Location Updating Accept' message +# before attemting to send the USSD. +sleep(10) + print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 4e2e0e1..717c58d 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -21,6 +21,16 @@ wait(ms.is_connected, nitb.mcc_mnc()) wait(nitb.subscriber_attached, ms) +# ofono (qmi) currently changes state to 'registered' jut after sending +# 'Location Update Request', but before receiving 'Location Updating Accept'. +# Which means we can reach lines below and send USSD code while still not being +# attached, which will then fail. See OsmoGsmTester #2239 for more detailed +# information. +# Until we find an ofono fix or a better way to workaround this, let's just +# sleep for a while in order to receive the 'Location Updating Accept' message +# before attemting to send the USSD. +sleep(10) + print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) assert ' ' + ms.msisdn + '\r' in response -- To view, visit https://gerrit.osmocom.org/3402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:32:09 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 6 Nov 2017 16:32:09 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#12). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. TODO: Handover will not work yet, because there is no functionality to update the connection with the port/ip of the new BTS. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,324 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/12 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..ddcba0f --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,48 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct gsm_lchan *ho_lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..0c11b85 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -117,18 +80,19 @@ /* NOTE: When an ho_lchan exists, the MDCX is part of an * handover operation (intra-bsc). This means we will not * inform the MSC about the event, which means that no - * assignment complete message is transmitted */ - LOGP(DMSC, LOGL_INFO," RTP connection handover complete\n"); + * assignment complete message is transmitted, we just + * inform the logic that controls the MGW about the new + * connection info */ + LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); + mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..d5aaab3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +441,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +545,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +754,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..8cd5a70 --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,1136 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_CALL, + ST_MDCX_BTS_HO, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_CALL, "ST_CALL (call in progress)"}, + {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* External event: Handover event, this event notifies the FSM that a + * handover is required. The FSM will then perform an extra MDCX to + * configure the new connection data at the MGW. The only valid state + * where a Handover event can be received is ST_CALL. */ + EV_HANDOVER, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, + + /* Internal event: The mgcp_gw has responded to the (Handover-) + MDCX that has been send to update the BTS connection. */ + EV_MDCX_BTS_HO_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_ASS_COMPLETE: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "MDCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/NET: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv); + +/* Helper function to perform a connection teardown. This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_HALT when teardown is done. */ +static void handle_teardown(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Helper function to perform a handover (MDCX). This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_CALL when teardown is done. */ +static void handle_handover(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + struct gsm_lchan *ho_lchan; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + ho_lchan = mgcp_ctx->ho_lchan; + OSMO_ASSERT(ho_lchan); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), + ho_lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = ho_lchan->abis_ip.bound_port}; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_MDCX_BTS_HO, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for ST_CALL: Handle call teardown and Handover */ +static void fsm_active_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_TEARDOWN: + handle_teardown(mgcp_ctx); + break; + case EV_HANDOVER: + handle_handover(mgcp_ctx); + break; + } + +} + +/* Callback for MGCP-Client: handle response for BTS/Handover associated MDCX */ +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/BTS/HO: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS/HO: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_HO_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_BTS_HO: Complete updating the connection data after + * handoverin the call to another BTS */ +static void fsm_complete_handover(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_BTS_HO_RESP: + /* The response from the MGW arrived, the connection pointing + * towards the BTS is now updated, so we now change back to + * ST_CALL, where we will wait for the call-end (or another + * handover) */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + break; + case EV_HANDOVER: + /* This handles the rare, but possible situation where another + * handover is happening while we still wait for the the MGW to + * complete the current one. In this case we will stop waiting + * for the response and directly move on with that second + * handover */ + handle_handover(mgcp_ctx); + break; + case EV_TEARDOWN: + /* It may happen that the BSS wants to teardown all connections + * while we are still waiting for the MGW to respond. In this + * case we start to teard down the connection immediately */ + handle_teardown(mgcp_ctx); + break; + } +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * go for an extra MDCX to update the connection and land in + * this state again when done. */ + [ST_CALL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), + .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), + .name = "ST_CALL", + .action = fsm_active_call_cb, + }, + + /* A handover is in progress. When the response to the respective + * MDCX is received, then go back to ST_CALL and wait for the + * call end */ + [ST_MDCX_BTS_HO] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_MDCX_BTS_HO", + .action = fsm_complete_handover, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Notify that the call got handovered to another BTS, update the connection + * that is pointing to the BTS side with the connection data for the new bts. + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * ho_lchan: the lchan on the new BTS */ +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(ho_lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "handover attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->ho_lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating handover...\n"); + + mgcp_ctx->ho_lchan = ho_lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_HANDOVER, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 12 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:33:17 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 6 Nov 2017 16:33:17 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#13). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,324 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/13 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..ddcba0f --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,48 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct gsm_lchan *ho_lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..0c11b85 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -117,18 +80,19 @@ /* NOTE: When an ho_lchan exists, the MDCX is part of an * handover operation (intra-bsc). This means we will not * inform the MSC about the event, which means that no - * assignment complete message is transmitted */ - LOGP(DMSC, LOGL_INFO," RTP connection handover complete\n"); + * assignment complete message is transmitted, we just + * inform the logic that controls the MGW about the new + * connection info */ + LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); + mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..d5aaab3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +441,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +545,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +754,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..8cd5a70 --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,1136 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_CALL, + ST_MDCX_BTS_HO, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_CALL, "ST_CALL (call in progress)"}, + {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a. It is also issued in case of errors to teardown a half open + * connection. */ + EV_TEARDOWN, + + /* External event: Handover event, this event notifies the FSM that a + * handover is required. The FSM will then perform an extra MDCX to + * configure the new connection data at the MGW. The only valid state + * where a Handover event can be received is ST_CALL. */ + EV_HANDOVER, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, + + /* Internal event: The mgcp_gw has responded to the (Handover-) + MDCX that has been send to update the BTS connection. */ + EV_MDCX_BTS_HO_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine (send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_ASS_COMPLETE: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "MDCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/NET: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv); + +/* Helper function to perform a connection teardown. This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_HALT when teardown is done. */ +static void handle_teardown(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Helper function to perform a handover (MDCX). This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_CALL when teardown is done. */ +static void handle_handover(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + struct gsm_lchan *ho_lchan; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + ho_lchan = mgcp_ctx->ho_lchan; + OSMO_ASSERT(ho_lchan); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), + ho_lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = ho_lchan->abis_ip.bound_port}; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_MDCX_BTS_HO, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for ST_CALL: Handle call teardown and Handover */ +static void fsm_active_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_TEARDOWN: + handle_teardown(mgcp_ctx); + break; + case EV_HANDOVER: + handle_handover(mgcp_ctx); + break; + } + +} + +/* Callback for MGCP-Client: handle response for BTS/Handover associated MDCX */ +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/BTS/HO: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS/HO: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_HO_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_BTS_HO: Complete updating the connection data after + * handoverin the call to another BTS */ +static void fsm_complete_handover(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_BTS_HO_RESP: + /* The response from the MGW arrived, the connection pointing + * towards the BTS is now updated, so we now change back to + * ST_CALL, where we will wait for the call-end (or another + * handover) */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + break; + case EV_HANDOVER: + /* This handles the rare, but possible situation where another + * handover is happening while we still wait for the the MGW to + * complete the current one. In this case we will stop waiting + * for the response and directly move on with that second + * handover */ + handle_handover(mgcp_ctx); + break; + case EV_TEARDOWN: + /* It may happen that the BSS wants to teardown all connections + * while we are still waiting for the MGW to respond. In this + * case we start to teard down the connection immediately */ + handle_teardown(mgcp_ctx); + break; + } +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * go for an extra MDCX to update the connection and land in + * this state again when done. */ + [ST_CALL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), + .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), + .name = "ST_CALL", + .action = fsm_active_call_cb, + }, + + /* A handover is in progress. When the response to the respective + * MDCX is received, then go back to ST_CALL and wait for the + * call end */ + [ST_MDCX_BTS_HO] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_MDCX_BTS_HO", + .action = fsm_complete_handover, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Notify that the call got handovered to another BTS, update the connection + * that is pointing to the BTS side with the connection data for the new bts. + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * ho_lchan: the lchan on the new BTS */ +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(ho_lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "handover attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->ho_lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating handover...\n"); + + mgcp_ctx->ho_lchan = ho_lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_HANDOVER, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 13 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:35:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 Nov 2017 16:35:47 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp client: vty: tweak doc strings In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp client: vty: tweak doc strings ...................................................................... mgcp client: vty: tweak doc strings Fix errors like "remote bind address", mention 'MGW' instead of 'MGCP gateway', minor typos and wording tweaks. Change-Id: Ie1a408f9e651c5fb3424a84ceaaa603e20ad595c --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index e1a892f..f8129c0 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -29,14 +29,14 @@ #include -#define MGW_STR "MGCP gateway configuration for RTP streams\n" +#define MGW_STR "Configure MGCP connection to Media Gateway\n" void *global_mgcp_client_ctx = NULL; struct mgcp_client_conf *global_mgcp_client_conf = NULL; DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd, "mgw local-ip A.B.C.D", - MGW_STR "local bind to connect to MGCP gateway with\n" + MGW_STR "local bind to connect to MGW from\n" "local bind IP address\n") { if (!global_mgcp_client_conf) @@ -53,7 +53,7 @@ DEFUN(cfg_mgw_local_port, cfg_mgw_local_port_cmd, "mgw local-port <0-65535>", - MGW_STR "local bind to connect to MGCP gateway with\n" + MGW_STR "local port to connect to MGW from\n" "local bind port\n") { if (!global_mgcp_client_conf) @@ -68,8 +68,8 @@ DEFUN(cfg_mgw_remote_ip, cfg_mgw_remote_ip_cmd, "mgw remote-ip A.B.C.D", - MGW_STR "remote bind to connect to MGCP gateway with\n" - "remote bind IP address\n") + MGW_STR "remote IP address to reach the MGW at\n" + "remote IP address\n") { if (!global_mgcp_client_conf) return CMD_ERR_NOTHING_TODO; @@ -85,8 +85,8 @@ DEFUN(cfg_mgw_remote_port, cfg_mgw_remote_port_cmd, "mgw remote-port <0-65535>", - MGW_STR "remote bind to connect to MGCP gateway with\n" - "remote bind port\n") + MGW_STR "remote port to reach the MGW at\n" + "remote port\n") { if (!global_mgcp_client_conf) return CMD_ERR_NOTHING_TODO; @@ -101,8 +101,8 @@ DEFUN(cfg_mgw_endpoint_range, cfg_mgw_endpoint_range_cmd, "mgw endpoint-range <1-65534> <1-65534>", MGW_STR "usable range of endpoint identifiers\n" - "set first useable endpoint identifier\n" - "set the last useable endpoint identifier\n") + "set first usable endpoint identifier\n" + "set last usable endpoint identifier\n") { uint16_t first_endpoint = atoi(argv[0]); uint16_t last_endpoint = atoi(argv[1]); -- To view, visit https://gerrit.osmocom.org/4598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1a408f9e651c5fb3424a84ceaaa603e20ad595c Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:36:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 Nov 2017 16:36:18 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client: don't configure "bts base" Message-ID: Review at https://gerrit.osmocom.org/4701 mgcp_client: don't configure "bts base" There should not be any BTS base port to be configured at an MGCP client. Possibly this is related to the legacy behavior of libosmo-legacy-mgcp, and certainly has no place in libosmo-mgcp-client. Further changes may be needed to follow up on removal of the BTS base port concept, at least drop it from the VTY for now. Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 0 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/01/4701/1 diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index f8129c0..1d58bb5 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -123,32 +123,12 @@ "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") -#define BTS_START_STR "First UDP port allocated for the BTS side\n" -#define UDP_PORT_STR "UDP Port number\n" -DEFUN(cfg_mgw_rtp_bts_base_port, - cfg_mgw_rtp_bts_base_port_cmd, - "mgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) -{ - global_mgcp_client_conf->bts_base = atoi(argv[0]); - return CMD_SUCCESS; -} -ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, - cfg_mgcpgw_rtp_bts_base_port_cmd, - "mgcpgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) - int mgcp_client_config_write(struct vty *vty, const char *indent) { const char *addr; int port; uint16_t first_endpoint; uint16_t last_endpoint; - uint16_t bts_base; addr = global_mgcp_client_conf->local_addr; if (addr) @@ -175,12 +155,6 @@ first_endpoint, last_endpoint, VTY_NEWLINE); } - bts_base = global_mgcp_client_conf->bts_base; - if (bts_base) { - vty_out(vty, "%smgw bts-base %u%s", indent, - bts_base, VTY_NEWLINE); - } - return CMD_SUCCESS; } @@ -194,7 +168,6 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); - install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -202,5 +175,4 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); - install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:45:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 16:45:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add minimal USSD support to test extension number In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3401 to look at the new patch set (#3). Add minimal USSD support to test extension number Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 --- M example/default-suites.conf M example/resources.conf M src/osmo_gsm_tester/ofono_client.py A suites/aoip_ussd/assert_extension.py A suites/aoip_ussd/suite.conf A suites/ussd/assert_extension.py A suites/ussd/suite.conf 7 files changed, 98 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/3401/3 diff --git a/example/default-suites.conf b/example/default-suites.conf index 3fd1322..5cf19ef 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1,12 +1,18 @@ - sms:sysmo - aoip_sms:sysmo +- ussd:sysmo +- aoip_ussd:sysmo - voice:sysmo - sms:trx-b200 - aoip_sms:trx-b200 +- ussd:trx-b200 +- aoip_ussd:trx-b200 - voice:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 - voice:trx-sysmocell5000 +- ussd:trx-sysmocell5000 +- aoip_ussd:trx-sysmocell5000 - smpp - aoip_smpp - aoip_encryption diff --git a/example/resources.conf b/example/resources.conf index 70c1c35..bdf2347 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -60,7 +60,7 @@ ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice'] + features: ['sms', 'voice', 'ussd'] - label: sierra_2 path: '/sierra_2' @@ -68,7 +68,7 @@ ki: '00969E283349D354A8239E877F2E0866' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice'] + features: ['sms', 'voice', 'ussd'] - label: gobi_0 path: '/gobi_0' @@ -76,7 +76,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms'] + features: ['sms', 'ussd'] - label: gobi_3 path: '/gobi_3' diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py index 66c0a79..e8f57cc 100644 --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -39,6 +39,7 @@ I_SMS = 'org.ofono.MessageManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' +I_SS = 'org.ofono.SupplementaryServices' # See https://github.com/intgr/ofono/blob/master/doc/network-api.txt#L78 NETREG_ST_REGISTERED = 'registered' @@ -645,4 +646,9 @@ def log_info(self, *args, **kwargs): self.log(self.info(*args, **kwargs)) + def ussd_send(self, command): + ss = self.dbus.interface(I_SS) + service_type, response = ss.Initiate(command) + return response + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py new file mode 100755 index 0000000..da5dad3 --- /dev/null +++ b/suites/aoip_ussd/assert_extension.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() +ms = suite.modem() + +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf new file mode 100644 index 0000000..1da0cc5 --- /dev/null +++ b/suites/aoip_ussd/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 5 # msc, bsc, hlr, stp, mgw + bts: + - times: 1 + modem: + - times: 1 + features: + - ussd diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py new file mode 100755 index 0000000..4e2e0e1 --- /dev/null +++ b/suites/ussd/assert_extension.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +nitb = suite.nitb() +bts = suite.bts() +ms = suite.modem() + +print('start nitb and bts...') +nitb.bts_add(bts) +nitb.start() +bts.start() + +nitb.subscriber_add(ms) + +ms.connect(nitb.mcc_mnc()) +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, nitb.mcc_mnc()) +wait(nitb.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/suite.conf b/suites/ussd/suite.conf new file mode 100644 index 0000000..232a5d8 --- /dev/null +++ b/suites/ussd/suite.conf @@ -0,0 +1,12 @@ +resources: + ip_address: + - times: 1 + bts: + - times: 1 + modem: + - times: 1 + features: + - ussd + +defaults: + timeout: 60s -- To view, visit https://gerrit.osmocom.org/3401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 6 16:45:26 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 16:45:26 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: Add ussd support to interactive shell test Message-ID: Review at https://gerrit.osmocom.org/4702 suites: Add ussd support to interactive shell test Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578 --- M suites/aoip_debug/interactive.py M suites/debug/interactive.py 2 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/4702/1 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 819f207..f09732b 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -23,7 +23,7 @@ m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') cmd = cmd.strip().lower() if not cmd: @@ -103,5 +103,15 @@ print('hanging up %s %r' % (ms.name(), call_id)) ms.call_hangup(call_id) + elif cmd.startswith('ussd'): + if len(params) != 2: + print('wrong format') + continue + ussd_cmd = params[1] + for ms in modems: + print('modem %s: ussd %s' % (ms.name(), ussd_cmd)) + response = ms.ussd_send(ussd_cmd) + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 1b89a7d..d5f7615 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -16,7 +16,7 @@ m.connect(nitb.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') cmd = cmd.strip().lower() if not cmd: @@ -96,5 +96,15 @@ print('hanging up %s %r' % (ms.name(), call_id)) ms.call_hangup(call_id) + elif cmd.startswith('ussd'): + if len(params) != 2: + print('wrong format') + continue + ussd_cmd = params[1] + for ms in modems: + print('modem %s: ussd %s' % (ms.name(), ussd_cmd)) + response = ms.ussd_send(ussd_cmd) + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) -- To view, visit https://gerrit.osmocom.org/4702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:40:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:40:59 +0000 Subject: osmo-gsm-tester[master]: Add minimal USSD support to test extension number In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:02 +0000 Subject: osmo-gsm-tester[master]: ussd: Workaround ofono issue to prevent test failure In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:04 +0000 Subject: osmo-gsm-tester[master]: suites: Add ussd support to interactive shell test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:06 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suites: Add ussd support to interactive shell test In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suites: Add ussd support to interactive shell test ...................................................................... suites: Add ussd support to interactive shell test Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578 --- M suites/aoip_debug/interactive.py M suites/debug/interactive.py 2 files changed, 22 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 819f207..f09732b 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -23,7 +23,7 @@ m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') cmd = cmd.strip().lower() if not cmd: @@ -103,5 +103,15 @@ print('hanging up %s %r' % (ms.name(), call_id)) ms.call_hangup(call_id) + elif cmd.startswith('ussd'): + if len(params) != 2: + print('wrong format') + continue + ussd_cmd = params[1] + for ms in modems: + print('modem %s: ussd %s' % (ms.name(), ussd_cmd)) + response = ms.ussd_send(ussd_cmd) + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 1b89a7d..d5f7615 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -16,7 +16,7 @@ m.connect(nitb.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') cmd = cmd.strip().lower() if not cmd: @@ -96,5 +96,15 @@ print('hanging up %s %r' % (ms.name(), call_id)) ms.call_hangup(call_id) + elif cmd.startswith('ussd'): + if len(params) != 2: + print('wrong format') + continue + ussd_cmd = params[1] + for ms in modems: + print('modem %s: ussd %s' % (ms.name(), ussd_cmd)) + response = ms.ussd_send(ussd_cmd) + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) -- To view, visit https://gerrit.osmocom.org/4702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:06 +0000 Subject: [MERGED] osmo-gsm-tester[master]: ussd: Workaround ofono issue to prevent test failure In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: ussd: Workaround ofono issue to prevent test failure ...................................................................... ussd: Workaround ofono issue to prevent test failure Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5 --- M suites/aoip_ussd/assert_extension.py M suites/ussd/assert_extension.py 2 files changed, 20 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index da5dad3..5e934db 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -31,6 +31,16 @@ wait(ms.is_connected, msc.mcc_mnc()) wait(msc.subscriber_attached, ms) +# ofono (qmi) currently changes state to 'registered' jut after sending +# 'Location Update Request', but before receiving 'Location Updating Accept'. +# Which means we can reach lines below and send USSD code while still not being +# attached, which will then fail. See OsmoGsmTester #2239 for more detailed +# information. +# Until we find an ofono fix or a better way to workaround this, let's just +# sleep for a while in order to receive the 'Location Updating Accept' message +# before attemting to send the USSD. +sleep(10) + print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 4e2e0e1..717c58d 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -21,6 +21,16 @@ wait(ms.is_connected, nitb.mcc_mnc()) wait(nitb.subscriber_attached, ms) +# ofono (qmi) currently changes state to 'registered' jut after sending +# 'Location Update Request', but before receiving 'Location Updating Accept'. +# Which means we can reach lines below and send USSD code while still not being +# attached, which will then fail. See OsmoGsmTester #2239 for more detailed +# information. +# Until we find an ofono fix or a better way to workaround this, let's just +# sleep for a while in order to receive the 'Location Updating Accept' message +# before attemting to send the USSD. +sleep(10) + print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) assert ' ' + ms.msisdn + '\r' in response -- To view, visit https://gerrit.osmocom.org/3402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:06 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add minimal USSD support to test extension number In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add minimal USSD support to test extension number ...................................................................... Add minimal USSD support to test extension number Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 --- M example/default-suites.conf M example/resources.conf M src/osmo_gsm_tester/ofono_client.py A suites/aoip_ussd/assert_extension.py A suites/aoip_ussd/suite.conf A suites/ussd/assert_extension.py A suites/ussd/suite.conf 7 files changed, 98 insertions(+), 3 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/default-suites.conf b/example/default-suites.conf index 3fd1322..5cf19ef 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1,12 +1,18 @@ - sms:sysmo - aoip_sms:sysmo +- ussd:sysmo +- aoip_ussd:sysmo - voice:sysmo - sms:trx-b200 - aoip_sms:trx-b200 +- ussd:trx-b200 +- aoip_ussd:trx-b200 - voice:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 - voice:trx-sysmocell5000 +- ussd:trx-sysmocell5000 +- aoip_ussd:trx-sysmocell5000 - smpp - aoip_smpp - aoip_encryption diff --git a/example/resources.conf b/example/resources.conf index 70c1c35..bdf2347 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -60,7 +60,7 @@ ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice'] + features: ['sms', 'voice', 'ussd'] - label: sierra_2 path: '/sierra_2' @@ -68,7 +68,7 @@ ki: '00969E283349D354A8239E877F2E0866' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice'] + features: ['sms', 'voice', 'ussd'] - label: gobi_0 path: '/gobi_0' @@ -76,7 +76,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms'] + features: ['sms', 'ussd'] - label: gobi_3 path: '/gobi_3' diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py index 66c0a79..e8f57cc 100644 --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -39,6 +39,7 @@ I_SMS = 'org.ofono.MessageManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' +I_SS = 'org.ofono.SupplementaryServices' # See https://github.com/intgr/ofono/blob/master/doc/network-api.txt#L78 NETREG_ST_REGISTERED = 'registered' @@ -645,4 +646,9 @@ def log_info(self, *args, **kwargs): self.log(self.info(*args, **kwargs)) + def ussd_send(self, command): + ss = self.dbus.interface(I_SS) + service_type, response = ss.Initiate(command) + return response + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py new file mode 100755 index 0000000..da5dad3 --- /dev/null +++ b/suites/aoip_ussd/assert_extension.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() +ms = suite.modem() + +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf new file mode 100644 index 0000000..1da0cc5 --- /dev/null +++ b/suites/aoip_ussd/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 5 # msc, bsc, hlr, stp, mgw + bts: + - times: 1 + modem: + - times: 1 + features: + - ussd diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py new file mode 100755 index 0000000..4e2e0e1 --- /dev/null +++ b/suites/ussd/assert_extension.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +nitb = suite.nitb() +bts = suite.bts() +ms = suite.modem() + +print('start nitb and bts...') +nitb.bts_add(bts) +nitb.start() +bts.start() + +nitb.subscriber_add(ms) + +ms.connect(nitb.mcc_mnc()) +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, nitb.mcc_mnc()) +wait(nitb.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/suite.conf b/suites/ussd/suite.conf new file mode 100644 index 0000000..232a5d8 --- /dev/null +++ b/suites/ussd/suite.conf @@ -0,0 +1,12 @@ +resources: + ip_address: + - times: 1 + bts: + - times: 1 + modem: + - times: 1 + features: + - ussd + +defaults: + timeout: 60s -- To view, visit https://gerrit.osmocom.org/3401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:41 +0000 Subject: osmo-gsm-tester[master]: util: Add setcap_net_raw API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:41:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:41:44 +0000 Subject: osmo-gsm-tester[master]: util: Add change_elf_rpath API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:42:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:42:02 +0000 Subject: osmo-gsm-tester[master]: Add support for osmo-bts-octphy In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:43:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:43:01 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add support for osmo-bts-octphy In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add support for osmo-bts-octphy ...................................................................... Add support for osmo-bts-octphy Specific parts for this class: - Runs osmo-bts-octphy binary, that requires CAP_NET_RAW capability because it uses an AF_PACKET socket. - As a consequence, it must use the previously added APIs to set the capability and modify the RPATH of the binary before launching it. These APIs require extra host setup and installed dependencies that will be documented soon in osmo-gsm-tester manual. - A num_trx() helper method is added because the binary requires that parameter. - A allocate_phy_instances() is added to help build/fill the conf dictionary to be used in the tmpl to be able to easily set up trx, phy and insances. A config to use a osmo-bts-octphy at full power is used (4 trx) is added in this commit to show how can it be configured. However our current license only has support to use 1 TRX, and so next commit drops most configurations to simplify the setup to use only 1 TRX. Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 --- M example/defaults.conf M example/resources.conf A src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl 5 files changed, 273 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..7711297 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -45,3 +45,43 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F + +osmo_bts_octphy: + trx_list: + - {} + - nominal_power: 23 + max_power_red: 0 + arfcn: 869 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 870 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - nominal_power: 23 + max_power_red: 0 + arfcn: 871 + timeslot_list: + - phys_chan_config: CCCH+SDCCH4 + - phys_chan_config: SDCCH8 + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F + - phys_chan_config: TCH/F diff --git a/example/resources.conf b/example/resources.conf index bdf2347..b16ef1d 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -31,6 +31,21 @@ trx_remote_ip: 10.42.42.112 ciphers: [a5_0, a5_1] +- label: OCTBTS 3500 + type: osmo-bts-octphy + ipa_unit_id: 8 + addr: 10.42.42.52 + band: GSM-1800 + trx_list: + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 + arfcn: - arfcn: 512 band: GSM-1800 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py new file mode 100644 index 0000000..ae2e249 --- /dev/null +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -0,0 +1,168 @@ +# osmo_gsm_tester: specifics for running an osmo-bts-octphy +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoBtsOctphy(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + env = None + pcu_sk_tmp_dir = None + values = None + + BIN_BTS_OCTPHY = 'osmo-bts-octphy' + + CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' + + def __init__(self, suite_run, conf): + super().__init__(log.C_RUN, OsmoBtsOctphy.BIN_BTS_OCTPHY) + self.suite_run = suite_run + self.conf = conf + self.env = {} + self.values = {} + self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') + if len(self.pcu_socket_path().encode()) > 107: + raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + + def cleanup(self): + if self.pcu_sk_tmp_dir: + try: + os.remove(self.pcu_socket_path()) + except OSError: + pass + os.rmdir(self.pcu_sk_tmp_dir) + + def pcu_socket_path(self): + return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') + + def remote_addr(self): + return self.conf.get('addr') + + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: + self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) + + self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr(), '-t', str(self.num_trx())) + #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1') + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def num_trx(self): + return len(self.values['osmo_bts_octphy'].get('trx_list', [])) + + def allocate_phy_instances(self, c): + ''' + Generate match trx Z <-> phy X inst Y to use in vty config + + We create a new phy for each trx found with a new hwaddr. If hwaddr is + already there, increase num_instances and give last instance index to + the current trx. + ''' + phy_list = [] + for trx in c.get('trx_list', []): + hwaddr = trx.get('hw_addr', None) + netdev = trx.get('net_device', None) + if hwaddr is None: + raise log.Error('Expected hw-addr value not found!') + found = False + phy_idx = 0 + for phy in phy_list: + if phy['hw_addr'] == hwaddr: + phy['num_instances'] += 1 + found = True + break + phy_idx += 1 + if not found: + phy_list.append({'hw_addr': hwaddr, 'net_device': netdev, 'num_instances': 1}) + trx['phy_idx'] = phy_idx + trx['instance_idx'] = phy_list[phy_idx]['num_instances'] - 1 + c['phy_list'] = phy_list + + def configure(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') + self.config_file = self.run_dir.new_file(OsmoBtsOctphy.CONF_BTS_OCTPHY) + self.dbg(config_file=self.config_file) + + values = dict(osmo_bts_octphy=config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_bts_octphy': { + 'oml_remote_ip': self.bsc.addr(), + 'pcu_socket_path': self.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_bts_octphy': self.conf }) + + self.allocate_phy_instances(values['osmo_bts_octphy']) + + self.dbg('OSMO-BTS-OCTPHY CONFIG:\n' + pprint.pformat(values)) + self.values = values + with open(self.config_file, 'w') as f: + r = template.render(OsmoBtsOctphy.CONF_BTS_OCTPHY, values) + self.dbg(r) + f.write(r) + + def conf_for_bsc(self): + values = config.get_defaults('bsc_bts') + config.overlay(values, config.get_defaults('osmo_bts_octphy')) + config.overlay(values, self.conf) + self.dbg(conf=values) + return values + + def set_bsc(self, bsc): + self.bsc = bsc + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 7e55129..25bb00f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -29,7 +29,7 @@ from . import schema from . import ofono_client from . import osmo_nitb -from . import bts_sysmo, bts_osmotrx +from . import bts_sysmo, bts_osmotrx, bts_octphy from .util import is_dict, is_list @@ -83,6 +83,7 @@ KNOWN_BTS_TYPES = { 'osmo-bts-sysmo': bts_sysmo.SysmoBts, 'osmo-bts-trx': bts_osmotrx.OsmoBtsTrx, + 'osmo-bts-octphy': bts_octphy.OsmoBtsOctphy, } def register_bts_type(name, clazz): diff --git a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl new file mode 100644 index 0000000..13cdb1d --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl @@ -0,0 +1,48 @@ +! Configuration rendered by osmo-gsm-tester +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level abis debug + logging level oml debug + logging level pag debug + logging level rll debug + logging level rr debug + logging level rsl debug +! + +%for phy in osmo_bts_octphy.phy_list: +phy ${loop.index} + octphy hw-addr ${phy.hw_addr} + octphy net-device ${phy.net_device} + octphy rx-gain 70 + %for inst in range(phy.num_instances): + instance ${loop.index} + %endfor +%endfor +bts 0 + band ${osmo_bts_octphy.band} + ipa unit-id ${osmo_bts_octphy.ipa_unit_id} 0 + oml remote-ip ${osmo_bts_octphy.oml_remote_ip} + pcu-socket ${osmo_bts_octphy.pcu_socket_path} + gsmtap-sapi bcch + gsmtap-sapi ccch + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi tch/f + gsmtap-sapi tch/h + gsmtap-sapi pacch + gsmtap-sapi pdtch + gsmtap-sapi ptcch + gsmtap-sapi cbch + gsmtap-sapi sacch +%for trx in osmo_bts_octphy.trx_list: + trx ${loop.index} + power-ramp max-initial 23000 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy ${trx.phy_idx} instance ${trx.instance_idx} +%endfor -- To view, visit https://gerrit.osmocom.org/4425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:43:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:43:02 +0000 Subject: [MERGED] osmo-gsm-tester[master]: util: Add change_elf_rpath API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: util: Add change_elf_rpath API ...................................................................... util: Add change_elf_rpath API Linux dynamic loader avoids loading shared libraries from env vars such as LD_LIBRALY_PATH for ELF binaries which have capabilitiy flags enabled for security reasons. For these binaries, we modify the RPATH of the ELF header to tell the loader where to find the libraries. Process class from process module is imported inside the method after module initialization in order to avoid circular dependency of relative imports, which is only available since python 3.5. Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff --- M src/osmo_gsm_tester/util.py 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index 1ecbf41..8fb6e19 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -38,6 +38,19 @@ return path return path + ':' + lp +def change_elf_rpath(binary, paths, run_dir): + ''' + Change RPATH field in ELF executable binary. + This feature can be used to tell the loaded to load the trial libraries, as + LD_LIBRARY_PATH is disabled for paths with modified capabilities. + ''' + from .process import Process + proc = Process('patchelf', run_dir, ['patchelf', '--set-rpath', paths, binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('patchelf finished with err code %d' % proc.result) + def ip_to_iface(ip): try: for iface in os.listdir('/sys/class/net'): -- To view, visit https://gerrit.osmocom.org/4424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:43:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:43:02 +0000 Subject: [MERGED] osmo-gsm-tester[master]: util: Add setcap_net_raw API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: util: Add setcap_net_raw API ...................................................................... util: Add setcap_net_raw API Some binaries such as osmo-bts-ocpty require specific capabilities, and we need to provide them in case osmo-gsm-tester is not run as root. Process class from process module is imported inside the method after module initialization in order to avoid circular dependency of relative imports, which is only available since python 3.5. Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 --- M src/osmo_gsm_tester/util.py 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index c07bcf2..1ecbf41 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -49,6 +49,19 @@ pass return None +def setcap_net_raw(binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' + proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 'osmo-gsm-tester_setcap_net_raw.sh', binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, proc.result)) + class listdict(dict): 'a dict of lists { "a": [1, 2, 3], "b": [1, 2] }' -- To view, visit https://gerrit.osmocom.org/4423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:43:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:43:02 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Change example config to use only 1 TRX for osmo-bts-octphy ... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Change example config to use only 1 TRX for osmo-bts-octphy BTS. ...................................................................... Change example config to use only 1 TRX for osmo-bts-octphy BTS. Our current Octasic license has multi-trx support disabled and the board rejects the configuration. Change-Id: Id2c415deb85187feb42fb6d24cc86273eb722936 --- M example/defaults.conf M example/resources.conf 2 files changed, 0 insertions(+), 46 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index 7711297..e2921a4 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -45,43 +45,3 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F - -osmo_bts_octphy: - trx_list: - - {} - - nominal_power: 23 - max_power_red: 0 - arfcn: 869 - timeslot_list: - - phys_chan_config: CCCH+SDCCH4 - - phys_chan_config: SDCCH8 - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - nominal_power: 23 - max_power_red: 0 - arfcn: 870 - timeslot_list: - - phys_chan_config: CCCH+SDCCH4 - - phys_chan_config: SDCCH8 - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - nominal_power: 23 - max_power_red: 0 - arfcn: 871 - timeslot_list: - - phys_chan_config: CCCH+SDCCH4 - - phys_chan_config: SDCCH8 - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F diff --git a/example/resources.conf b/example/resources.conf index b16ef1d..c4c5e31 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -39,12 +39,6 @@ trx_list: - hw_addr: 00:0c:90:2e:80:1e net_device: eth1 - - hw_addr: 00:0c:90:2e:80:1e - net_device: eth1 - - hw_addr: 00:0c:90:2e:87:52 - net_device: eth1 - - hw_addr: 00:0c:90:2e:87:52 - net_device: eth1 arfcn: - arfcn: 512 -- To view, visit https://gerrit.osmocom.org/4426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2c415deb85187feb42fb6d24cc86273eb722936 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:43:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:43:02 +0000 Subject: [MERGED] osmo-gsm-tester[master]: config: Fix crash in overlay() In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: config: Fix crash in overlay() ...................................................................... config: Fix crash in overlay() if len(src) > len(dest), then we hit an out-of-bounds crash accessing dest[i]. It is totally valid to have src and dest with different lens, as you may want to override only part of the list. Change-Id: I4f8a191810e89a4081199edcb390fb3bb27ed42f --- M src/osmo_gsm_tester/config.py 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index 0721c30..7f1e52f 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -281,9 +281,12 @@ if is_list(dest): if not is_list(src): raise ValueError('cannot combine list with a value of type: %r' % type(src)) - for i in range(len(src)): + copy_len = min(len(src),len(dest)) + for i in range(copy_len): log.ctx(idx=i) dest[i] = overlay(dest[i], src[i]) + for i in range(copy_len, len(src)): + dest.append(src[i]) return dest return src -- To view, visit https://gerrit.osmocom.org/4422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f8a191810e89a4081199edcb390fb3bb27ed42f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:46:56 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:46:56 +0000 Subject: [PATCH] osmo-gsm-tester[master]: default-suites: Add test cases with octphy BTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4427 to look at the new patch set (#4). default-suites: Add test cases with octphy BTS Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb --- M example/default-suites.conf 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/27/4427/4 diff --git a/example/default-suites.conf b/example/default-suites.conf index 5cf19ef..039ead8 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -13,6 +13,11 @@ - voice:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 +- sms:octphy +- aoip_sms:octphy +- ussd:octphy +- aoip_ussd:octphy +- voice:octphy - smpp - aoip_smpp - aoip_encryption -- To view, visit https://gerrit.osmocom.org/4427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:52:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:52:12 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic Message-ID: Review at https://gerrit.osmocom.org/4703 resource: Refactor next_msisdn to be more generic The logic in next_msisdn can be later re-used for other purposes, such as getting different location areas for BTS. Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 --- M src/osmo_gsm_tester/resource.py 1 file changed, 18 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/4703/1 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 25bb00f..278fe4f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -38,7 +38,6 @@ USED_KEY = '_used' RESOURCES_CONF = 'resources.conf' -LAST_USED_MSISDN_FILE = 'last_used_msisdn.state' RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' @@ -189,24 +188,28 @@ if not self._remember_to_free: self.unregister_exit_handler() - def next_msisdn(self, origin): + def next_persistent_value(self, token, first_val, validate_func, inc_func, origin): origin_id = origin.origin_id() with self.state_dir.lock(origin_id): - msisdn_path = self.state_dir.child(LAST_USED_MSISDN_FILE) - log.ctx(msisdn_path) - last_msisdn = '1000' - if os.path.exists(msisdn_path): - if not os.path.isfile(msisdn_path): - raise RuntimeError('path should be a file but is not: %r' % msisdn_path) - with open(msisdn_path, 'r') as f: - last_msisdn = f.read().strip() - schema.msisdn(last_msisdn) + token_path = self.state_dir.child(token + '_last_used.state') + log.ctx(token_path) + last_value = first_val + if os.path.exists(token_path): + if not os.path.isfile(token_path): + raise RuntimeError('path should be a file but is not: %r' % token_path) + with open(token_path, 'r') as f: + last_value = f.read().strip() + validate_func(last_value) - next_msisdn = util.msisdn_inc(last_msisdn) - with open(msisdn_path, 'w') as f: - f.write(next_msisdn) - return next_msisdn + next_value = inc_func(last_value) + validate_func(next_value) + with open(token_path, 'w') as f: + f.write(next_value) + return next_value + + def next_msisdn(self, origin): + return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) class NoResourceExn(log.Error): -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 17:52:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 17:52:12 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC Message-ID: Review at https://gerrit.osmocom.org/4704 Use unique incrementing value for BTS LAC Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 --- M example/defaults.conf M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py 7 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/4704/1 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..d555ab0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -28,7 +28,6 @@ authentication: optional bsc_bts: - location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index ae2e249..7fa58a5 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -158,6 +158,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f53b8a3..3aa39b1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -136,6 +136,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e8ac7c2..69c5610 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -143,6 +143,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 278fe4f..3b65f09 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -22,6 +22,7 @@ import copy import atexit import pprint +import math from . import log from . import config @@ -211,6 +212,8 @@ def next_msisdn(self, origin): return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) + def next_lac(self, origin): + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(int((int(x)+1) % math.pow(2,16))), origin) class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 9b142d3..21193ed 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint16(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 65535: + raise ValueError('Value %d too big, max value is 65535' % n) + def times(val): n = int(val) if n < 1: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..3800d5e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -370,6 +370,11 @@ self.log('using MSISDN', msisdn) return msisdn + def lac(self): + lac = self.resources_pool.next_lac(self) + self.log('using LAC', lac) + return lac + def poll(self): if self._processes: for process in self._processes: -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 6 18:00:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 Nov 2017 18:00:30 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Use unique incrementing value for BTS LAC Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 --- M example/defaults.conf M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py 7 files changed, 23 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/4704/2 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..d555ab0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -28,7 +28,6 @@ authentication: optional bsc_bts: - location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index ae2e249..7fa58a5 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -158,6 +158,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f53b8a3..3aa39b1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -136,6 +136,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e8ac7c2..69c5610 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -143,6 +143,9 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + config.overlay(values, { + 'location_area_code': self.suite_run.lac(), + }) config.overlay(values, self.conf) self.dbg(conf=values) return values diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 278fe4f..b33ec29 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -211,6 +211,8 @@ def next_msisdn(self, origin): return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) + def next_lac(self, origin): + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 9b142d3..f74699f 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint16(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n >= pow(2,16): + raise ValueError('Value %d too big, max value is %d' % (n, pow(2,16)-1)) + def times(val): n = int(val) if n < 1: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..3800d5e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -370,6 +370,11 @@ self.log('using MSISDN', msisdn) return msisdn + def lac(self): + lac = self.resources_pool.next_lac(self) + self.log('using LAC', lac) + return lac + def poll(self): if self._processes: for process in self._processes: -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 6 18:51:53 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Mon, 6 Nov 2017 18:51:53 +0000 Subject: [PATCH] osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4678 to look at the new patch set (#2). PCU: Fix TA adjustment Promblem: TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to actual TA being used for given TBF. The current TA update algorithm in PCU simply applies the relative amount of TA to given TBF but does not take into account of current TA. As a result, the PCU will request wrong TA jump for given TBF if the MS is moving away from BTS more than 2 km. Related issue: http://osmocom.org/issues/2611 Fixes: - The PCU needs increase or decrease current TA of given TBF on receiving of relative amount of TA adjustment provided by PH-DATA-IND from L1 - The PCU needs to set absolute TA of given TBF on receiving absolute TA provided by PH-RA-IND from L1. Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.h 5 files changed, 84 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/4678/2 diff --git a/src/bts.cpp b/src/bts.cpp index e41b1fa..6bdbb85 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1619,8 +1619,45 @@ return rc; } -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta) +/* update TA based on TA provided by PH-DATA-IND */ +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta) +{ + int16_t ta_adj; + uint8_t ta_target; + + if (ta_delta) { + /* adjust TA based on TA provided by PH-DATA-IND */ + ta_adj = tbf->ta() + ta_delta; + + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta_adj); + + LOGP(DL1IF, LOGL_INFO, "PH-DATA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +/* set TA based on TA provided by PH-RA-IND */ +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta) +{ + uint8_t ta_target; + + if (tbf->ta() != ta) { + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta); + + LOGP(DL1IF, LOGL_INFO, "PH-RA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach) { struct gprs_rlcmac_ul_tbf *tbf = bts_main_data()->bts->ul_tbf_by_poll_fn(fn, trx_no, ts); @@ -1628,11 +1665,16 @@ LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to " "unknown UL TBF on TRX = %d, TS = %d, FN = %d\n", p, ta, trx_no, ts, fn); - else if (tbf->ta() != ta) { - LOGP(DL1IF, LOGL_INFO, "[%s] Updating TA %u -> %u on " - "TRX = %d, TS = %d, FN = %d\n", - p, tbf->ta(), ta, trx_no, ts, fn); - tbf->set_ta(ta); + else { + /* we need to distinguish TA information provided by L1 + * from PH-DATA-IND and PHY-RA-IND so that we can properly + * update TA for given TBF + */ + if (is_rach) + set_tbf_ta(tbf, (uint8_t)ta); + else + update_tbf_ta(tbf, ta); + } } diff --git a/src/bts.h b/src/bts.h index d65cd2f..aaf81cf 100644 --- a/src/bts.h +++ b/src/bts.h @@ -162,8 +162,9 @@ #ifdef __cplusplus extern "C" { #endif -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta); +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach); +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); #ifdef __cplusplus } #endif diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 37b7f78..ab8334f 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -203,7 +203,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -248,7 +248,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + sign_qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 1c5ecc9..51079b4 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -188,7 +188,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -237,7 +237,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + sign_qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 1618260..cb2a6df 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -43,6 +43,34 @@ return qta >> 2; } +static inline int8_t sign_qta2ta(int16_t qta) +{ + int8_t ta_adj = 0; + + if (qta < -252) + qta = -252; + + if (qta > 252) + qta = 252; + + /* 1-bit TA adjustment if TA error reported by L1 is outside +/- 2 qbits */ + if (qta > 2) + ta_adj = 1; + if (qta < -2) + ta_adj = -1; + + return (qta >> 2) + ta_adj; +} + +static inline uint8_t ta_limit(int16_t ta) +{ + if (ta < 0) + ta = 0; + if (ta > 63) + ta = 63; + return ta; +} + /* * L1 Measurement values */ -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Nov 6 18:51:53 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Mon, 6 Nov 2017 18:51:53 +0000 Subject: [PATCH] osmo-pcu[master]: PCU: display TA information in TBF stats In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4679 to look at the new patch set (#2). PCU: display TA information in TBF stats Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 --- M src/pcu_vty_functions.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/79/4679/2 diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index ce79e05..811801f 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -44,8 +44,9 @@ gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf); gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf); - vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(), + vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) TA=%u DIR=%s IMSI=%s%s", tbf->tfi(), tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid", + tbf->ta(), tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL", tbf->imsi(), VTY_NEWLINE); vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d " -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 7 00:01:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 00:01:48 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (5 comments) https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/bts_octphy.py File src/osmo_gsm_tester/bts_octphy.py: Line 162: 'location_area_code': self.suite_run.lac(), -1: see sysmo https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/bts_osmotrx.py File src/osmo_gsm_tester/bts_osmotrx.py: Line 140: 'location_area_code': self.suite_run.lac(), -1: see sysmo https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/bts_sysmo.py File src/osmo_gsm_tester/bts_sysmo.py: Line 147: 'location_area_code': self.suite_run.lac(), -1: Each BTS object must get a LAC *once*, conf_for_bsc() should be a "const" function. With this code, if a test case were to call conf_for_bsc() twice, then the same BTS object would exhibit mismatching LACs. I guess we should have a set_lac() function like we have set_msisdn() for the modems. We can call set_lac(suite_run.lac()) in bts_obj() in suite.py. Then overlay self.lac here. (either implement a set_lac() for each BTS class, or we could start having a BtsBase class which the others inherit from, so we have set_lac() implemented exactly once.) https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 215: return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) -1: What if x starts out as -23? maybe str(max(0, ... )); 0: two spaces before pow; 0: In C I'd use (int(x)+1) & 0xffff but in python, ok; 0: The magic number "pow(2,16)" is used a lot, Does it make sense to have a LAC_MAX constant defined once somewhere? Is this the only one outside of the uint16() function? https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/schema.py File src/osmo_gsm_tester/schema.py: Line 78: if n >= pow(2,16): 0: lol, why not just > 65535 ... python goes on to calculate 2 ** 16 every time. -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 00:07:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 00:07:02 +0000 Subject: osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (3 comments) very nice except for the changing filename https://gerrit.osmocom.org/#/c/4703/1//COMMIT_MSG Commit Message: Line 10: as getting different location areas for BTS. well, getting the codes yes, not the areas themselves ;) https://gerrit.osmocom.org/#/c/4703/1/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 195: token_path = self.state_dir.child(token + '_last_used.state') -1: let's rather make it 'last_used_%s.state' % token, then we will continue using the same state file instead of creating a new one on our tester instances. Line 206: validate_func(next_value) 0: do you not trust the inc_func? -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From admin at opensuse.org Tue Nov 7 01:00:42 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 07 Nov 2017 01:00:42 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a0105d92b62a_6ce51020f8416718b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_16.10/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 209s] | [ 209s] | This file was extended by libosmocore config.status 0.10.2, which was [ 209s] | generated by GNU Autoconf 2.69. Invocation command line was [ 209s] | [ 209s] | CONFIG_FILES = [ 209s] | CONFIG_HEADERS = [ 209s] | CONFIG_LINKS = [ 209s] | CONFIG_COMMANDS = [ 209s] | $ ./config.status Doxyfile.core [ 209s] | [ 209s] | on build35 [ 209s] | [ 209s] | config.status:1174: creating Doxyfile.core [ 209s] [ 209s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 209s] make[1]: *** [override_dh_auto_test] Error 1 [ 209s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 209s] debian/rules:15: recipe for target 'build' failed [ 209s] make: *** [build] Error 2 [ 209s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 209s] [ 209s] build35 failed "build libosmocore_0.10.2.dsc" at Tue Nov 7 01:00:26 UTC 2017. [ 209s] [ 209s] ### VM INTERACTION START ### [ 211s] [ 202.307122] reboot: Power down [ 212s] ### VM INTERACTION END ### [ 212s] [ 212s] build35 failed "build libosmocore_0.10.2.dsc" at Tue Nov 7 01:00:31 UTC 2017. [ 212s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 7 03:00:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 03:00:45 +0000 Subject: [PATCH] osmo-bsc[master]: bssap: paging: page entire BSS for unimplemented cell id list Message-ID: Review at https://gerrit.osmocom.org/4705 bssap: paging: page entire BSS for unimplemented cell id list 3GPP TS ? 08.08 defines various types of Cell Identifier List IEs, but we only implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List that we don't implement, it is best for interoperability to page the entire BSS and post a log message instead of rejecting the paging altogether. Apart from resource management, it is not harmful to page more than the MSC requested; if use of resources becomes an issue, the log message will guide towards the solution of providing an actually implemented Cell Identifier List IE. Upon IE length that is other than we expect, log the error, but also fall back to paging the entire BSS. Overall message length correctness has been checked earlier. The particular case observed is that a Huwaei MSC sends a LAI for Cell Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may want to add later. Improve logging: identify the subscriber that is being paged. Coding style: use a switch() statement to clarify flow and provide a place to add more implementations later. Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two implemented Cell Identifier List IEs as well as the unimplemented LAI identifier, verify the resulting paging LAC in wrapped function and stderr. Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 --- M configure.ac M src/osmo-bsc/osmo_bsc_bssap.c M tests/Makefile.am A tests/bssap/Makefile.am A tests/bssap/bssap_test.c A tests/bssap/bssap_test.err A tests/bssap/bssap_test.ok M tests/testsuite.at 8 files changed, 227 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/4705/1 diff --git a/configure.ac b/configure.ac index 79523d1..02a81c6 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile + tests/bssap/Makefile doc/Makefile doc/examples/Makefile contrib/Makefile diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..93e9274 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -233,10 +233,11 @@ struct tlv_parsed tp; char mi_string[GSM48_MI_SIZE]; uint32_t tmsi = GSM_RESERVED_TMSI; - unsigned int lac = GSM_LAC_RESERVED_ALL_BTS; + unsigned int lac; uint8_t data_length; const uint8_t *data; uint8_t chan_needed = RSL_CHANNEED_ANY; + uint8_t cell_ident; tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); @@ -265,21 +266,50 @@ TLVP_VAL(&tp, GSM0808_IE_IMSI), TLVP_LEN(&tp, GSM0808_IE_IMSI)); /* - * parse the cell identifier list + * There are various cell identifier list types defined at 3GPP TS ? 08.08, we don't support all + * of them yet. To not disrupt paging operation just because we're lacking some implementation, + * interpret any unknown cell identifier type as "page the entire BSS". */ data_length = TLVP_LEN(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); data = TLVP_VAL(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); - /* - * Support paging to all network or one BTS at one LAC - */ - if (data_length == 3 && data[0] == CELL_IDENT_LAC) { - lac = osmo_load16be(&data[1]); - } else if (data_length > 1 || (data[0] & 0x0f) != CELL_IDENT_BSS) { - LOGP(DMSC, LOGL_ERROR, "Unsupported Cell Identifier List: %s\n", osmo_hexdump(data, data_length)); + if (data_length < 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Zero length Cell Identifier List\n", + mi_string); return -1; } + cell_ident = data[0] & 0xf; + + /* Default fallback: page entire BSS */ + lac = GSM_LAC_RESERVED_ALL_BTS; + + switch (cell_ident) { + case CELL_IDENT_LAC: + if (data_length != 3) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for LAC (0x%x)" + " has invalid length: %u, paging entire BSS instead (%s)\n", + mi_string, CELL_IDENT_LAC, data_length, osmo_hexdump(data, data_length)); + break; + } + lac = osmo_load16be(&data[1]); + break; + + case CELL_IDENT_BSS: + if (data_length != 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for BSS (0x%x)" + " has invalid length: %u, paging entire BSS anyway (%s)\n", + mi_string, CELL_IDENT_BSS, data_length, osmo_hexdump(data, data_length)); + } + break; + + default: + LOGP(DMSC, LOGL_NOTICE, "Paging IMSI %s: unimplemented Cell Identifier List (0x%x)," + " paging entire BSS instead (%s)\n", + mi_string, cell_ident, osmo_hexdump(data, data_length)); + break; + } + if (TLVP_PRESENT(&tp, GSM0808_IE_CHANNEL_NEEDED) && TLVP_LEN(&tp, GSM0808_IE_CHANNEL_NEEDED) == 1) chan_needed = TLVP_VAL(&tp, GSM0808_IE_CHANNEL_NEEDED)[0] & 0x03; diff --git a/tests/Makefile.am b/tests/Makefile.am index aff05bb..474f821 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,6 +8,7 @@ nanobts_omlattr \ bsc-nat \ bsc-nat-trie \ + bssap \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am new file mode 100644 index 0000000..80d655f --- /dev/null +++ b/tests/bssap/Makefile.am @@ -0,0 +1,50 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSIGTRAN_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(NULL) + +EXTRA_DIST = \ + bssap_test.ok \ + bssap_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + bssap_test \ + $(NULL) + +bssap_test_SOURCES = \ + bssap_test.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_bssap.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_sigtran.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_grace.c \ + $(NULL) + +bssap_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + $(LIBOSMOSIGTRAN_LIBS) \ + $(NULL) + +bssap_test_LDFLAGS = \ + -Wl,--wrap=bsc_grace_paging_request \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/bssap_test >$(srcdir)/bssap_test.ok 2>$(srcdir)/bssap_test.err diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c new file mode 100644 index 0000000..95f8e04 --- /dev/null +++ b/tests/bssap/bssap_test.c @@ -0,0 +1,116 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) +{ + struct msgb *msg = msgb_alloc(size, label); + unsigned char *rc; + msg->l2h = msg->l3h = msg->head; + rc = msgb_put(msg, osmo_hexparse(hex, msg->head, msgb_tailroom(msg))); + OSMO_ASSERT(rc == msg->l2h); + return msg; +} + +uint16_t gl_expect_lac = 0; + +/* override, requires '-Wl,--wrap=bsc_grace_paging_request' */ +int __real_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc); +int __wrap_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc) +{ + if (subscr->lac == GSM_LAC_RESERVED_ALL_BTS) + fprintf(stderr, "BSC paging started on entire BSS (%u)\n", subscr->lac); + else + fprintf(stderr, "BSC paging started with LAC %u\n", subscr->lac); + OSMO_ASSERT(gl_expect_lac == subscr->lac); + return 0; +} + +struct { + const char *msg; + uint16_t expect_lac; + int expect_rc; +} cell_identifier_tests[] = { + { + "001652080859512069000743940904010844601a03050065", + /* ^^^^^^ Cell Identifier List: LAC */ + 0x65, 0 + }, + { + "001452080859512069000743940904010844601a0106", + /* ^^ Cell Identifier List: BSS */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, + { + "001952080859512069000743940904010844601a060415f5490065", + /* ^^^^^^^^^^^^ Cell Identifier List: LAI */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, +}; + +void test_cell_identifier() +{ + int i; + int rc; + struct gsm_network *net; + struct bsc_msc_data *msc; + + net = bsc_network_init(NULL, 1, 1, NULL); + net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); + net->bsc_data->rf_ctrl->policy = S_RF_ON; + + msc = talloc_zero(net, struct bsc_msc_data); + msc->network = net; + + for (i = 0; i < ARRAY_SIZE(cell_identifier_tests); i++) { + struct msgb *msg; + fprintf(stderr, "\n%d:\n", i); + msg = msgb_from_hex("test_cell_identifier", 1024, cell_identifier_tests[i].msg); + + gl_expect_lac = cell_identifier_tests[i].expect_lac; + rc = bsc_handle_udt(msc, msg, msgb_l2len(msg)); + + fprintf(stderr, "bsc_handle_udt() returned %d\n", rc); + OSMO_ASSERT(rc == cell_identifier_tests[i].expect_rc); + } +} + +int main(int argc, char **argv) +{ + osmo_init_logging(&log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + + test_cell_identifier(); + + return 0; +} diff --git a/tests/bssap/bssap_test.err b/tests/bssap/bssap_test.err new file mode 100644 index 0000000..33716f3 --- /dev/null +++ b/tests/bssap/bssap_test.err @@ -0,0 +1,13 @@ + +0: +BSC paging started with LAC 101 +bsc_handle_udt() returned 0 + +1: +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 + +2: +DMSC Paging IMSI 515029600703449: unimplemented Cell Identifier List (0x4), paging entire BSS instead (04 15 f5 49 00 65 ) +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 diff --git a/tests/bssap/bssap_test.ok b/tests/bssap/bssap_test.ok new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bssap/bssap_test.ok diff --git a/tests/testsuite.at b/tests/testsuite.at index 50f68e1..13f54e1 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -50,3 +50,10 @@ cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([bssap]) +AT_KEYWORDS([bssap]) +cat $abs_srcdir/bssap/bssap_test.ok > expout +cat $abs_srcdir/bssap/bssap_test.err > experr +AT_CHECK([$abs_top_builddir/tests/bssap/bssap_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/4705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 03:09:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 03:09:10 +0000 Subject: [PATCH] osmo-bsc[master]: bssap: paging: page entire BSS for unimplemented cell id list In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4705 to look at the new patch set (#2). bssap: paging: page entire BSS for unimplemented cell id list 3GPP TS ? 08.08 defines various types of Cell Identifier List IEs, but we only implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List that we don't implement, it is best for interoperability to page the entire BSS and post a log message instead of rejecting the paging altogether. Apart from resource management, it is not harmful to page more than the MSC requested; if use of resources becomes an issue, the log message will guide towards the solution of providing an actually implemented Cell Identifier List IE. Upon IE length that is other than we expect, log the error, but also fall back to paging the entire BSS. Overall message length correctness has been checked earlier. The particular case observed is that a Huwaei MSC sends a LAI for Cell Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may want to add later. Improve logging: identify the subscriber that is being paged. Coding style: use a switch() statement to clarify flow and provide a place to add more implementations later. Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two implemented Cell Identifier List IEs as well as the unimplemented LAI identifier, verify the resulting paging LAC in wrapped function and stderr. Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 --- M configure.ac M src/osmo-bsc/osmo_bsc_bssap.c M tests/Makefile.am A tests/bssap/Makefile.am A tests/bssap/bssap_test.c A tests/bssap/bssap_test.err A tests/bssap/bssap_test.ok M tests/testsuite.at 8 files changed, 240 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/4705/2 diff --git a/configure.ac b/configure.ac index 79523d1..02a81c6 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile + tests/bssap/Makefile doc/Makefile doc/examples/Makefile contrib/Makefile diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..93e9274 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -233,10 +233,11 @@ struct tlv_parsed tp; char mi_string[GSM48_MI_SIZE]; uint32_t tmsi = GSM_RESERVED_TMSI; - unsigned int lac = GSM_LAC_RESERVED_ALL_BTS; + unsigned int lac; uint8_t data_length; const uint8_t *data; uint8_t chan_needed = RSL_CHANNEED_ANY; + uint8_t cell_ident; tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); @@ -265,21 +266,50 @@ TLVP_VAL(&tp, GSM0808_IE_IMSI), TLVP_LEN(&tp, GSM0808_IE_IMSI)); /* - * parse the cell identifier list + * There are various cell identifier list types defined at 3GPP TS ? 08.08, we don't support all + * of them yet. To not disrupt paging operation just because we're lacking some implementation, + * interpret any unknown cell identifier type as "page the entire BSS". */ data_length = TLVP_LEN(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); data = TLVP_VAL(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); - /* - * Support paging to all network or one BTS at one LAC - */ - if (data_length == 3 && data[0] == CELL_IDENT_LAC) { - lac = osmo_load16be(&data[1]); - } else if (data_length > 1 || (data[0] & 0x0f) != CELL_IDENT_BSS) { - LOGP(DMSC, LOGL_ERROR, "Unsupported Cell Identifier List: %s\n", osmo_hexdump(data, data_length)); + if (data_length < 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Zero length Cell Identifier List\n", + mi_string); return -1; } + cell_ident = data[0] & 0xf; + + /* Default fallback: page entire BSS */ + lac = GSM_LAC_RESERVED_ALL_BTS; + + switch (cell_ident) { + case CELL_IDENT_LAC: + if (data_length != 3) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for LAC (0x%x)" + " has invalid length: %u, paging entire BSS instead (%s)\n", + mi_string, CELL_IDENT_LAC, data_length, osmo_hexdump(data, data_length)); + break; + } + lac = osmo_load16be(&data[1]); + break; + + case CELL_IDENT_BSS: + if (data_length != 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for BSS (0x%x)" + " has invalid length: %u, paging entire BSS anyway (%s)\n", + mi_string, CELL_IDENT_BSS, data_length, osmo_hexdump(data, data_length)); + } + break; + + default: + LOGP(DMSC, LOGL_NOTICE, "Paging IMSI %s: unimplemented Cell Identifier List (0x%x)," + " paging entire BSS instead (%s)\n", + mi_string, cell_ident, osmo_hexdump(data, data_length)); + break; + } + if (TLVP_PRESENT(&tp, GSM0808_IE_CHANNEL_NEEDED) && TLVP_LEN(&tp, GSM0808_IE_CHANNEL_NEEDED) == 1) chan_needed = TLVP_VAL(&tp, GSM0808_IE_CHANNEL_NEEDED)[0] & 0x03; diff --git a/tests/Makefile.am b/tests/Makefile.am index aff05bb..474f821 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,6 +8,7 @@ nanobts_omlattr \ bsc-nat \ bsc-nat-trie \ + bssap \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am new file mode 100644 index 0000000..80d655f --- /dev/null +++ b/tests/bssap/Makefile.am @@ -0,0 +1,50 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSIGTRAN_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(NULL) + +EXTRA_DIST = \ + bssap_test.ok \ + bssap_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + bssap_test \ + $(NULL) + +bssap_test_SOURCES = \ + bssap_test.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_bssap.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_sigtran.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_grace.c \ + $(NULL) + +bssap_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + $(LIBOSMOSIGTRAN_LIBS) \ + $(NULL) + +bssap_test_LDFLAGS = \ + -Wl,--wrap=bsc_grace_paging_request \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/bssap_test >$(srcdir)/bssap_test.ok 2>$(srcdir)/bssap_test.err diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c new file mode 100644 index 0000000..2b154c1 --- /dev/null +++ b/tests/bssap/bssap_test.c @@ -0,0 +1,120 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) +{ + struct msgb *msg = msgb_alloc(size, label); + unsigned char *rc; + msg->l2h = msg->l3h = msg->head; + rc = msgb_put(msg, osmo_hexparse(hex, msg->head, msgb_tailroom(msg))); + OSMO_ASSERT(rc == msg->l2h); + return msg; +} + +uint16_t gl_expect_lac = 0; + +/* override, requires '-Wl,--wrap=bsc_grace_paging_request' */ +int __real_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc); +int __wrap_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc) +{ + if (subscr->lac == GSM_LAC_RESERVED_ALL_BTS) + fprintf(stderr, "BSC paging started on entire BSS (%u)\n", subscr->lac); + else + fprintf(stderr, "BSC paging started with LAC %u\n", subscr->lac); + OSMO_ASSERT(gl_expect_lac == subscr->lac); + return 0; +} + +struct { + const char *msg; + uint16_t expect_lac; + int expect_rc; +} cell_identifier_tests[] = { + { + "001652080859512069000743940904010844601a03050065", + /* ^^^^^^ Cell Identifier List: LAC */ + 0x65, 0 + }, + { + "001452080859512069000743940904010844601a0106", + /* ^^ Cell Identifier List: BSS */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, + { + "001952080859512069000743940904010844601a060415f5490065", + /* ^^^^^^^^^^^^ Cell Identifier List: LAI */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, +}; + +void test_cell_identifier() +{ + int i; + int rc; + struct gsm_network *net; + struct bsc_msc_data *msc; + + net = bsc_network_init(NULL, 1, 1, NULL); + net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); + net->bsc_data->rf_ctrl->policy = S_RF_ON; + + msc = talloc_zero(net, struct bsc_msc_data); + msc->network = net; + + log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + + for (i = 0; i < ARRAY_SIZE(cell_identifier_tests); i++) { + struct msgb *msg; + fprintf(stderr, "\n%d:\n", i); + msg = msgb_from_hex("test_cell_identifier", 1024, cell_identifier_tests[i].msg); + + gl_expect_lac = cell_identifier_tests[i].expect_lac; + rc = bsc_handle_udt(msc, msg, msgb_l2len(msg)); + + fprintf(stderr, "bsc_handle_udt() returned %d\n", rc); + OSMO_ASSERT(rc == cell_identifier_tests[i].expect_rc); + + msgb_free(msg); + } +} + +int main(int argc, char **argv) +{ + osmo_init_logging(&log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + + test_cell_identifier(); + + return 0; +} diff --git a/tests/bssap/bssap_test.err b/tests/bssap/bssap_test.err new file mode 100644 index 0000000..1c432eb --- /dev/null +++ b/tests/bssap/bssap_test.err @@ -0,0 +1,22 @@ + +0: +DMSC Rx MSC UDT: 00 16 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 03 05 00 65 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0x65 +BSC paging started with LAC 101 +bsc_handle_udt() returned 0 + +1: +DMSC Rx MSC UDT: 00 14 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 01 06 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0xfffe +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 + +2: +DMSC Rx MSC UDT: 00 19 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 06 04 15 f5 49 00 65 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging IMSI 515029600703449: unimplemented Cell Identifier List (0x4), paging entire BSS instead (04 15 f5 49 00 65 ) +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0xfffe +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 diff --git a/tests/bssap/bssap_test.ok b/tests/bssap/bssap_test.ok new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bssap/bssap_test.ok diff --git a/tests/testsuite.at b/tests/testsuite.at index 50f68e1..13f54e1 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -50,3 +50,10 @@ cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([bssap]) +AT_KEYWORDS([bssap]) +cat $abs_srcdir/bssap/bssap_test.ok > expout +cat $abs_srcdir/bssap/bssap_test.err > experr +AT_CHECK([$abs_top_builddir/tests/bssap/bssap_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/4705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 7 03:11:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 03:11:59 +0000 Subject: osmo-bsc[master]: bssap: paging: page entire BSS for unimplemented cell id list In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 allow me to fast track this for the benefit of currently ongoing interop testing; review is still highly appreciated, we'll fixup in a subsequent commit if this has flaws. -- To view, visit https://gerrit.osmocom.org/4705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 03:16:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 03:16:35 +0000 Subject: [MERGED] osmo-bsc[master]: bssap: paging: page entire BSS for unimplemented cell id list In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bssap: paging: page entire BSS for unimplemented cell id list ...................................................................... bssap: paging: page entire BSS for unimplemented cell id list 3GPP TS ? 08.08 defines various types of Cell Identifier List IEs, but we only implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List that we don't implement, it is best for interoperability to page the entire BSS and post a log message instead of rejecting the paging altogether. Apart from resource management, it is not harmful to page more than the MSC requested; if use of resources becomes an issue, the log message will guide towards the solution of providing an actually implemented Cell Identifier List IE. Upon IE length that is other than we expect, log the error, but also fall back to paging the entire BSS. Overall message length correctness has been checked earlier. The particular case observed is that a Huwaei MSC sends a LAI for Cell Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may want to add later. Improve logging: identify the subscriber that is being paged. Coding style: use a switch() statement to clarify flow and provide a place to add more implementations later. Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two implemented Cell Identifier List IEs as well as the unimplemented LAI identifier, verify the resulting paging LAC in wrapped function and stderr. Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 --- M configure.ac M src/osmo-bsc/osmo_bsc_bssap.c M tests/Makefile.am A tests/bssap/Makefile.am A tests/bssap/bssap_test.c A tests/bssap/bssap_test.err A tests/bssap/bssap_test.ok M tests/testsuite.at 8 files changed, 240 insertions(+), 9 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 79523d1..02a81c6 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile + tests/bssap/Makefile doc/Makefile doc/examples/Makefile contrib/Makefile diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..93e9274 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -233,10 +233,11 @@ struct tlv_parsed tp; char mi_string[GSM48_MI_SIZE]; uint32_t tmsi = GSM_RESERVED_TMSI; - unsigned int lac = GSM_LAC_RESERVED_ALL_BTS; + unsigned int lac; uint8_t data_length; const uint8_t *data; uint8_t chan_needed = RSL_CHANNEED_ANY; + uint8_t cell_ident; tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0); @@ -265,21 +266,50 @@ TLVP_VAL(&tp, GSM0808_IE_IMSI), TLVP_LEN(&tp, GSM0808_IE_IMSI)); /* - * parse the cell identifier list + * There are various cell identifier list types defined at 3GPP TS ? 08.08, we don't support all + * of them yet. To not disrupt paging operation just because we're lacking some implementation, + * interpret any unknown cell identifier type as "page the entire BSS". */ data_length = TLVP_LEN(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); data = TLVP_VAL(&tp, GSM0808_IE_CELL_IDENTIFIER_LIST); - /* - * Support paging to all network or one BTS at one LAC - */ - if (data_length == 3 && data[0] == CELL_IDENT_LAC) { - lac = osmo_load16be(&data[1]); - } else if (data_length > 1 || (data[0] & 0x0f) != CELL_IDENT_BSS) { - LOGP(DMSC, LOGL_ERROR, "Unsupported Cell Identifier List: %s\n", osmo_hexdump(data, data_length)); + if (data_length < 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Zero length Cell Identifier List\n", + mi_string); return -1; } + cell_ident = data[0] & 0xf; + + /* Default fallback: page entire BSS */ + lac = GSM_LAC_RESERVED_ALL_BTS; + + switch (cell_ident) { + case CELL_IDENT_LAC: + if (data_length != 3) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for LAC (0x%x)" + " has invalid length: %u, paging entire BSS instead (%s)\n", + mi_string, CELL_IDENT_LAC, data_length, osmo_hexdump(data, data_length)); + break; + } + lac = osmo_load16be(&data[1]); + break; + + case CELL_IDENT_BSS: + if (data_length != 1) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for BSS (0x%x)" + " has invalid length: %u, paging entire BSS anyway (%s)\n", + mi_string, CELL_IDENT_BSS, data_length, osmo_hexdump(data, data_length)); + } + break; + + default: + LOGP(DMSC, LOGL_NOTICE, "Paging IMSI %s: unimplemented Cell Identifier List (0x%x)," + " paging entire BSS instead (%s)\n", + mi_string, cell_ident, osmo_hexdump(data, data_length)); + break; + } + if (TLVP_PRESENT(&tp, GSM0808_IE_CHANNEL_NEEDED) && TLVP_LEN(&tp, GSM0808_IE_CHANNEL_NEEDED) == 1) chan_needed = TLVP_VAL(&tp, GSM0808_IE_CHANNEL_NEEDED)[0] & 0x03; diff --git a/tests/Makefile.am b/tests/Makefile.am index aff05bb..474f821 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,6 +8,7 @@ nanobts_omlattr \ bsc-nat \ bsc-nat-trie \ + bssap \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am new file mode 100644 index 0000000..80d655f --- /dev/null +++ b/tests/bssap/Makefile.am @@ -0,0 +1,50 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSIGTRAN_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(NULL) + +EXTRA_DIST = \ + bssap_test.ok \ + bssap_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + bssap_test \ + $(NULL) + +bssap_test_SOURCES = \ + bssap_test.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_bssap.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_sigtran.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_grace.c \ + $(NULL) + +bssap_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + $(LIBOSMOSIGTRAN_LIBS) \ + $(NULL) + +bssap_test_LDFLAGS = \ + -Wl,--wrap=bsc_grace_paging_request \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/bssap_test >$(srcdir)/bssap_test.ok 2>$(srcdir)/bssap_test.err diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c new file mode 100644 index 0000000..2b154c1 --- /dev/null +++ b/tests/bssap/bssap_test.c @@ -0,0 +1,120 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) +{ + struct msgb *msg = msgb_alloc(size, label); + unsigned char *rc; + msg->l2h = msg->l3h = msg->head; + rc = msgb_put(msg, osmo_hexparse(hex, msg->head, msgb_tailroom(msg))); + OSMO_ASSERT(rc == msg->l2h); + return msg; +} + +uint16_t gl_expect_lac = 0; + +/* override, requires '-Wl,--wrap=bsc_grace_paging_request' */ +int __real_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc); +int __wrap_bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_subscr *subscr, int chan_needed, + struct bsc_msc_data *msc) +{ + if (subscr->lac == GSM_LAC_RESERVED_ALL_BTS) + fprintf(stderr, "BSC paging started on entire BSS (%u)\n", subscr->lac); + else + fprintf(stderr, "BSC paging started with LAC %u\n", subscr->lac); + OSMO_ASSERT(gl_expect_lac == subscr->lac); + return 0; +} + +struct { + const char *msg; + uint16_t expect_lac; + int expect_rc; +} cell_identifier_tests[] = { + { + "001652080859512069000743940904010844601a03050065", + /* ^^^^^^ Cell Identifier List: LAC */ + 0x65, 0 + }, + { + "001452080859512069000743940904010844601a0106", + /* ^^ Cell Identifier List: BSS */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, + { + "001952080859512069000743940904010844601a060415f5490065", + /* ^^^^^^^^^^^^ Cell Identifier List: LAI */ + GSM_LAC_RESERVED_ALL_BTS, 0 + }, +}; + +void test_cell_identifier() +{ + int i; + int rc; + struct gsm_network *net; + struct bsc_msc_data *msc; + + net = bsc_network_init(NULL, 1, 1, NULL); + net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); + net->bsc_data->rf_ctrl->policy = S_RF_ON; + + msc = talloc_zero(net, struct bsc_msc_data); + msc->network = net; + + log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + + for (i = 0; i < ARRAY_SIZE(cell_identifier_tests); i++) { + struct msgb *msg; + fprintf(stderr, "\n%d:\n", i); + msg = msgb_from_hex("test_cell_identifier", 1024, cell_identifier_tests[i].msg); + + gl_expect_lac = cell_identifier_tests[i].expect_lac; + rc = bsc_handle_udt(msc, msg, msgb_l2len(msg)); + + fprintf(stderr, "bsc_handle_udt() returned %d\n", rc); + OSMO_ASSERT(rc == cell_identifier_tests[i].expect_rc); + + msgb_free(msg); + } +} + +int main(int argc, char **argv) +{ + osmo_init_logging(&log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + + test_cell_identifier(); + + return 0; +} diff --git a/tests/bssap/bssap_test.err b/tests/bssap/bssap_test.err new file mode 100644 index 0000000..1c432eb --- /dev/null +++ b/tests/bssap/bssap_test.err @@ -0,0 +1,22 @@ + +0: +DMSC Rx MSC UDT: 00 16 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 03 05 00 65 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0x65 +BSC paging started with LAC 101 +bsc_handle_udt() returned 0 + +1: +DMSC Rx MSC UDT: 00 14 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 01 06 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0xfffe +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 + +2: +DMSC Rx MSC UDT: 00 19 52 08 08 59 51 20 69 00 07 43 94 09 04 01 08 44 60 1a 06 04 15 f5 49 00 65 +DMSC Rx MSC UDT BSSMAP PAGING +DMSC Paging IMSI 515029600703449: unimplemented Cell Identifier List (0x4), paging entire BSS instead (04 15 f5 49 00 65 ) +DMSC Paging request from MSC IMSI: '515029600703449' TMSI: '0x1084460/17319008' LAC: 0xfffe +BSC paging started on entire BSS (65534) +bsc_handle_udt() returned 0 diff --git a/tests/bssap/bssap_test.ok b/tests/bssap/bssap_test.ok new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bssap/bssap_test.ok diff --git a/tests/testsuite.at b/tests/testsuite.at index 50f68e1..13f54e1 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -50,3 +50,10 @@ cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([bssap]) +AT_KEYWORDS([bssap]) +cat $abs_srcdir/bssap/bssap_test.ok > expout +cat $abs_srcdir/bssap/bssap_test.err > experr +AT_CHECK([$abs_top_builddir/tests/bssap/bssap_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/4705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 08:56:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 08:56:43 +0000 Subject: osmo-gsm-tester[master]: default-suites: Add test cases with octphy BTS In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 08:56:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 08:56:45 +0000 Subject: [MERGED] osmo-gsm-tester[master]: default-suites: Add test cases with octphy BTS In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: default-suites: Add test cases with octphy BTS ...................................................................... default-suites: Add test cases with octphy BTS Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb --- M example/default-suites.conf 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/default-suites.conf b/example/default-suites.conf index 5cf19ef..039ead8 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -13,6 +13,11 @@ - voice:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 +- sms:octphy +- aoip_sms:octphy +- ussd:octphy +- aoip_ussd:octphy +- voice:octphy - smpp - aoip_smpp - aoip_encryption -- To view, visit https://gerrit.osmocom.org/4427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 09:18:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 09:18:15 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Patch Set 2: (3 comments) https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/bts_sysmo.py File src/osmo_gsm_tester/bts_sysmo.py: Line 147: 'location_area_code': self.suite_run.lac(), > -1: Each BTS object must get a LAC *once*, conf_for_bsc() should be a "cons On practise it doesn't matter because we only call conf_for_bsc once per bsc, but I agree it's better to move it as you suggest. I'll leave the BtsBase class for later as it requires several changes and it's not entirely related to this topic. https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 215: return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) > -1: What if x starts out as -23? maybe str(max(0, ... )); * X cannot start out as -23 because the default is 1 and in any case if a negative value is read, schema.unit16() is going to throw and exception before it reaches the increment function. * Good catch, I'll fix it. * Me too, but in python I think it's clearer this way. * I don't think it makes sense, as it's only being used here. https://gerrit.osmocom.org/#/c/4704/2/src/osmo_gsm_tester/schema.py File src/osmo_gsm_tester/schema.py: Line 78: if n >= pow(2,16): > 0: lol, why not just > 65535 ... python goes on to calculate 2 ** 16 every because it's clearer, but I can use 65535 and then write in a comment 2^16-1 -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:14:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4704 to look at the new patch set (#3). Use unique incrementing value for BTS LAC Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 --- M example/defaults.conf M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py 7 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/4704/3 diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..d555ab0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -28,7 +28,6 @@ authentication: optional bsc_bts: - location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index ae2e249..eb1092c 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -30,6 +30,7 @@ env = None pcu_sk_tmp_dir = None values = None + lac = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -158,6 +159,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -165,4 +168,7 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f53b8a3..731daa5 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -30,6 +30,7 @@ env = None trx = None pcu_sk_tmp_dir = None + lac = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -136,6 +137,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -143,6 +146,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e8ac7c2..03dc97e 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -29,6 +29,7 @@ remote_inst = None remote_env = None remote_dir = None + lac = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -143,6 +144,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -150,4 +153,7 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index ecafa2f..9571131 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -210,6 +210,8 @@ def next_msisdn(self, origin): return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) + def next_lac(self, origin): + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 9b142d3..a78bc63 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint16(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 65535: # 2^16 - 1 + raise ValueError('Value %d too big, max value is 65535' % n) + def times(val): n = int(val) if n < 1: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..9f9421e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -344,6 +344,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) + bts.set_lac(self.lac()) self.register_for_cleanup(bts) return bts @@ -370,6 +371,11 @@ self.log('using MSISDN', msisdn) return msisdn + def lac(self): + lac = self.resources_pool.next_lac(self) + self.log('using LAC', lac) + return lac + def poll(self): if self._processes: for process in self._processes: -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:14:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4703 to look at the new patch set (#2). resource: Refactor next_msisdn to be more generic The logic in next_msisdn can be later re-used for other purposes, such as getting different location area codes for BTS. Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 --- M src/osmo_gsm_tester/resource.py 1 file changed, 17 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/4703/2 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 25bb00f..ecafa2f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -38,7 +38,6 @@ USED_KEY = '_used' RESOURCES_CONF = 'resources.conf' -LAST_USED_MSISDN_FILE = 'last_used_msisdn.state' RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' @@ -189,24 +188,27 @@ if not self._remember_to_free: self.unregister_exit_handler() - def next_msisdn(self, origin): + def next_persistent_value(self, token, first_val, validate_func, inc_func, origin): origin_id = origin.origin_id() with self.state_dir.lock(origin_id): - msisdn_path = self.state_dir.child(LAST_USED_MSISDN_FILE) - log.ctx(msisdn_path) - last_msisdn = '1000' - if os.path.exists(msisdn_path): - if not os.path.isfile(msisdn_path): - raise RuntimeError('path should be a file but is not: %r' % msisdn_path) - with open(msisdn_path, 'r') as f: - last_msisdn = f.read().strip() - schema.msisdn(last_msisdn) + token_path = self.state_dir.child('last_used_%s.state' % token) + log.ctx(token_path) + last_value = first_val + if os.path.exists(token_path): + if not os.path.isfile(token_path): + raise RuntimeError('path should be a file but is not: %r' % token_path) + with open(token_path, 'r') as f: + last_value = f.read().strip() + validate_func(last_value) - next_msisdn = util.msisdn_inc(last_msisdn) - with open(msisdn_path, 'w') as f: - f.write(next_msisdn) - return next_msisdn + next_value = inc_func(last_value) + with open(token_path, 'w') as f: + f.write(next_value) + return next_value + + def next_msisdn(self, origin): + return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) class NoResourceExn(log.Error): -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:14:27 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:14:27 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId Message-ID: Review at https://gerrit.osmocom.org/4706 Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 7 files changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/4706/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None + cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None + cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None + cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -156,4 +159,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 9571131..1bacd38 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -213,6 +213,9 @@ def next_lac(self, origin): return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_cellid(self, origin): + return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 9f9421e..4a3de19 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -345,6 +345,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_cellid(self.cellid()) self.register_for_cleanup(bts) return bts @@ -375,6 +376,10 @@ lac = self.resources_pool.next_lac(self) self.log('using LAC', lac) return lac + def cellid(self): + cellid = self.resources_pool.next_cellid(self) + self.log('using CellId', cellid) + return cellid def poll(self): if self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 14aa62d..d79bb2b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -44,7 +44,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index fbafc8e..803a375 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -37,7 +37,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:15:35 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:15:35 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Patch Set 1: Works fine as seen by ofono modem: 11:11:54.392983 tst /sierra_2: DBG: 'org.ofono.NetworkRegistration'.PropertyChanged() -> LocationAreaCode=8 11:11:54.422874 tst /sierra_2: DBG: 'org.ofono.NetworkRegistration'.PropertyChanged() -> CellId=4 -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:35:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:35:21 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Remove unused file bts_model.py Message-ID: Review at https://gerrit.osmocom.org/4707 Remove unused file bts_model.py Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522 --- D src/osmo_gsm_tester/bts_model.py 1 file changed, 0 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/07/4707/1 diff --git a/src/osmo_gsm_tester/bts_model.py b/src/osmo_gsm_tester/bts_model.py deleted file mode 100644 index 41e8491..0000000 --- a/src/osmo_gsm_tester/bts_model.py +++ /dev/null @@ -1,29 +0,0 @@ -# osmo_gsm_tester: bts model specifics -# -# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH -# -# Author: Neels Hofmeyr -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -from . import log, schema, util - -class TestContext(log.Origin): - ''' - API to allow testing various BTS models. - ''' - - def __init__(self, - -# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/4707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:58:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:58:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: test.py: Remove unused parameter ofono_client in setup() Message-ID: Review at https://gerrit.osmocom.org/4708 test.py: Remove unused parameter ofono_client in setup() Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a --- M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/test.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/08/4708/1 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..33a7761 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -91,7 +91,7 @@ log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) self.status = Test.UNKNOWN self.start_timestamp = time.time() - test.setup(self.suite_run, self, ofono_client, sys.modules[__name__], event_loop, sms) + test.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), self.path) diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index 49911b3..b939054 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -35,7 +35,7 @@ Timeout = None Sms = None -def setup(suite_run, _test, ofono_client, suite_module, event_module, sms_module): +def setup(suite_run, _test, suite_module, event_module, sms_module): global trial, suite, test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Timeout, Sms trial = suite_run.trial suite = suite_run -- To view, visit https://gerrit.osmocom.org/4708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 10:58:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 10:58:49 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Rename module ofono_client as modem Message-ID: Review at https://gerrit.osmocom.org/4709 Rename module ofono_client as modem Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 --- R src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/09/4709/1 diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/modem.py similarity index 100% rename from src/osmo_gsm_tester/ofono_client.py rename to src/osmo_gsm_tester/modem.py diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 25bb00f..044de95 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -27,7 +27,7 @@ from . import config from . import util from . import schema -from . import ofono_client +from . import modem from . import osmo_nitb from . import bts_sysmo, bts_osmotrx, bts_octphy diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 33a7761..cca8e55 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -23,7 +23,7 @@ import copy import traceback import pprint -from . import config, log, template, util, resource, schema, ofono_client, event_loop, esme, sms +from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms from . import osmo_nitb from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp from . import test @@ -350,9 +350,9 @@ def modem(self, specifics=None): conf = self.reserved_resources.get(resource.R_MODEM, specifics=specifics) self.dbg('create Modem object', conf=conf) - modem = ofono_client.Modem(conf) - self.register_for_cleanup(modem) - return modem + ms = modem.Modem(conf) + self.register_for_cleanup(ms) + return ms def modems(self, count): l = [] -- To view, visit https://gerrit.osmocom.org/4709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 11:30:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 11:30:54 +0000 Subject: [PATCH] osmo-mgw[master]: network: remove unused return code Message-ID: Review at https://gerrit.osmocom.org/4710 network: remove unused return code The function that forwards the tapped (voice ebug) traffic returns its status (sendto) to the caller. However, none of the callers seem need this info. Remove the return code and print an error message on failure This fixes CID 178666 Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/4710/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..947b87e 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -627,14 +627,20 @@ /* Forward data to a debug tap. This is debug function that is intended for * debugging the voice traffic with tools like gstreamer */ -static int forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, - int len) +static void forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, + int len) { - if (!tap->enabled) - return 0; + int rc; - return sendto(fd, buf, len, 0, - (struct sockaddr *)&tap->forward, sizeof(tap->forward)); + if (!tap->enabled) + return; + + rc = sendto(fd, buf, len, 0, (struct sockaddr *)&tap->forward, + sizeof(tap->forward)); + + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, + "Forwarding tapped (debug) voice data failed.\n"); } /*! Send RTP/RTCP data to a specified destination connection. -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 11:30:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 11:30:54 +0000 Subject: [PATCH] osmo-mgw[master]: osmux: fix nullpointer dereference Message-ID: Review at https://gerrit.osmocom.org/4711 osmux: fix nullpointer dereference in point_lookup() the connection pointer is determined using mgcp_conn_get_rtp() this function may return 0. At the moment there are no nullpointer checks implemented Add checks to test for nullpointer. This fixes CID 178662 Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/11/4711/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 60ffe06..09b2636 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -207,12 +207,18 @@ case MGCP_DEST_NET: /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - this = &conn_net->end.addr; + if (conn_net) + this = &conn_net->end.addr; + else + this = NULL; break; case MGCP_DEST_BTS: /* FIXME: Get rid of CONN_ID_XXX! */ conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - this = &conn_bts->end.addr; + if (conn_bts) + this = &conn_bts->end.addr; + else + this = NULL; break; default: /* Should not ever happen */ @@ -222,7 +228,8 @@ /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net->osmux.cid == cid && this->s_addr == from_addr->s_addr) + if (conn_net && this && conn_net->osmux.cid == cid + && this->s_addr == from_addr->s_addr) return endp; } -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 11:30:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 11:30:54 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: guard dead coded with ifdef Message-ID: Review at https://gerrit.osmocom.org/4712 cosmetic: guard dead coded with ifdef Since currently osmux is not available we decided to lock down the respective VTY command with an early return CMD_WARNING, making the code after this line unreachable. Guard the dead code with an ifdef This fixes CID 178648 Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/4712/1 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..a7d9e4a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1102,7 +1102,7 @@ * allow to turn it on yet. */ vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); return CMD_WARNING; - +#if 0 if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) @@ -1114,6 +1114,7 @@ } return CMD_SUCCESS; +#endif } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 11:37:37 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 11:37:37 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4706 to look at the new patch set (#2). Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M selftest/template_test.ok M selftest/template_test.py M selftest/template_test/osmo-nitb.cfg.tmpl M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 32 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/4706/2 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 5bd32a4..dcfacc2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -38,7 +38,7 @@ bts 0 type val_type_bts0 band val_band_bts0 - cell_identity 0 + cell_identity val_bts.cell_identity_bts0 location_area_code val_bts.location_area_code_bts0 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts0 @@ -82,7 +82,7 @@ bts 1 type val_type_bts1 band val_band_bts1 - cell_identity 0 + cell_identity val_bts.cell_identity_bts1 location_area_code val_bts.location_area_code_bts1 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 769df49..0c83632 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,6 +22,7 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'cell_identity': 'val_bts.cell_identity', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl b/selftest/template_test/osmo-nitb.cfg.tmpl index 2559b14..f1508ec 100644 --- a/selftest/template_test/osmo-nitb.cfg.tmpl +++ b/selftest/template_test/osmo-nitb.cfg.tmpl @@ -54,7 +54,7 @@ bts ${loop.index} type ${bts.type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None + cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None + cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None + cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -156,4 +159,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 9571131..1bacd38 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -213,6 +213,9 @@ def next_lac(self, origin): return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_cellid(self, origin): + return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 9f9421e..4a3de19 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -345,6 +345,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_cellid(self.cellid()) self.register_for_cleanup(bts) return bts @@ -375,6 +376,10 @@ lac = self.resources_pool.next_lac(self) self.log('using LAC', lac) return lac + def cellid(self): + cellid = self.resources_pool.next_cellid(self) + self.log('using CellId', cellid) + return cellid def poll(self): if self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 14aa62d..d79bb2b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -44,7 +44,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index fbafc8e..803a375 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -37,7 +37,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 12:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 12:22:37 +0000 Subject: [PATCH] osmo-hlr[master]: hlr_db_tool: fix error log strerror invocation Message-ID: Review at https://gerrit.osmocom.org/4713 hlr_db_tool: fix error log strerror invocation The db API returns negative errno values, need to flip the sign before feeding to strerror. Fixes: coverity CID#178658 Change-Id: Iaab46f565a1112d8a7def8ea90a5cd440c0a3b41 --- M src/hlr_db_tool.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/4713/1 diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index 8982739..eb82c92 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -284,12 +284,12 @@ snprintf(imsi_str, sizeof(imsi_str), "%"PRId64, imsi); rc = db_subscr_create(dbc, imsi_str); - if (rc) { + if (rc < 0) { LOGP(DDB, LOGL_ERROR, "OsmoNITB DB import to %s: failed to create IMSI %s: %d: %s\n", dbc->fname, imsi_str, rc, - strerror(rc)); + strerror(-rc)); /* on error, still attempt to continue */ } @@ -303,13 +303,13 @@ /* find the just created id */ rc = db_subscr_get_by_imsi(dbc, imsi_str, &subscr); - if (rc) { + if (rc < 0) { LOGP(DDB, LOGL_ERROR, "OsmoNITB DB import to %s: created IMSI %s," " but failed to get new subscriber id: %d: %s\n", dbc->fname, imsi_str, rc, - strerror(rc)); + strerror(-rc)); return; } -- To view, visit https://gerrit.osmocom.org/4713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaab46f565a1112d8a7def8ea90a5cd440c0a3b41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 12:24:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 12:24:32 +0000 Subject: [PATCH] osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc Message-ID: Review at https://gerrit.osmocom.org/4714 vlr: auth_fsm_start: check return value of fsm alloc Fixes: coverity CID#178663 Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 --- M src/libvlr/vlr_auth_fsm.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/4714/1 diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index f07e60f..1376c82 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -583,7 +583,10 @@ fi = osmo_fsm_inst_alloc_child(&vlr_auth_fsm, parent, parent_term_event); - + if (!fi) { + osmo_fsm_inst_dispatch(parent, parent_term_event, 0); + return NULL; + } afp = talloc_zero(fi, struct auth_fsm_priv); if (!afp) { -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 12:27:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 12:27:14 +0000 Subject: [PATCH] osmo-hlr[master]: cosmetic: add comment on ignored return value Message-ID: Review at https://gerrit.osmocom.org/4715 cosmetic: add comment on ignored return value Coverity wants us to evaluate sqlite3_reset, but it is of no use to do so. Related: coverity CID#178653 Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 --- M src/db.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/4715/1 diff --git a/src/db.c b/src/db.c index 8733cf5..bcb67b1 100644 --- a/src/db.c +++ b/src/db.c @@ -99,6 +99,9 @@ void db_remove_reset(sqlite3_stmt *stmt) { sqlite3_clear_bindings(stmt); + /* coverity complains about ignoring the return value of + * sqlite3_reset(), but it just repeats an error code already evaluated + * during sqlite3_step(). */ sqlite3_reset(stmt); } -- To view, visit https://gerrit.osmocom.org/4715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 14:27:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 14:27:32 +0000 Subject: osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4678/2/src/bts.cpp File src/bts.cpp: Line 1628: if (ta_delta) { no change needed now/here, just general remark: Our usual coding style would be to exit early, i.e. "if (!ta_delta) return;" which saves us one level of indent. Maybe good to follow for any future patches/changes. Don't waste time on it now. -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 14:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 14:27:52 +0000 Subject: osmo-pcu[master]: PCU: display TA information in TBF stats In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 14:53:34 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 14:53:34 +0000 Subject: [PATCH] osmo-msc[master]: reset: check length of the reset context name Message-ID: Review at https://gerrit.osmocom.org/4716 reset: check length of the reset context name When allocating a reset context, the user must supply a human readable string name. At the moment the length of this name is not checked Check the length of the string name. This fixes CID 178664 Change-Id: Id7c4a7ff17e1c8ceb6e543ab6f0f07c87df603c7 --- M src/libcommon-cs/a_reset.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/4716/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 7dbd014..0bf36c6 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -138,6 +138,9 @@ struct a_reset_ctx *reset; + if (strlen(name) >= sizeof(reset->name)) + return NULL; + /* Register the fsm description (if not already done) */ if (osmo_fsm_find_by_name(fsm.name) != &fsm) osmo_fsm_register(&fsm); -- To view, visit https://gerrit.osmocom.org/4716 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7c4a7ff17e1c8ceb6e543ab6f0f07c87df603c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 14:54:06 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 14:54:06 +0000 Subject: [PATCH] osmo-bsc[master]: reset: check length of the reset context name Message-ID: Review at https://gerrit.osmocom.org/4717 reset: check length of the reset context name When allocating a reset context, the user must supply a human readable string name. At the moment the length of this name is not checked Check the length of the string name. This fixes CID 178664 Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 --- M src/libcommon-cs/a_reset.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/17/4717/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index f08d813..5216798 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -138,6 +138,9 @@ struct a_reset_ctx *reset; + if (strlen(name) >= sizeof(reset->name)) + return NULL; + /* Register the fsm description (if not already done) */ if (osmo_fsm_find_by_name(fsm.name) != &fsm) osmo_fsm_register(&fsm); -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:40:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 15:40:13 +0000 Subject: [PATCH] osmo-ci[master]: osmo-deps.sh: Force fetching git tags Message-ID: Review at https://gerrit.osmocom.org/4718 osmo-deps.sh: Force fetching git tags It was recently spotted, in a osmo-msc jenkins build, that an updated dependency (new commits to be fetched) contained a new tag which was not fetched with the commit. It resulted in the Makefile generating an old .version file, which ended up generating a library version in the .pc which later in the build make the configure script fail while checking at the dependencies. As far as I could understand after reading several discussion threads, it seems git fetch doesn't necessarily fetch and store locally all new tags found in the remote, and we need to explicitly add the --tags parameter to be sure all of them are downloaded. This patch adds a new fetch line instead of patching the one already present because it seems in old versions of git the --tags parameter had a different behaviour, in which only tags and not branches are fetched. This way is ensured that we get both correct regardless of git version. Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c --- M scripts/osmo-deps.sh 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/18/4718/1 diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index d5a724b..a4afec5 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -9,6 +9,7 @@ fi cd "$project" +git fetch --tags origin git fetch origin # Cleanup should already have happened during a global osmo-clean-workspace.sh, -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:42:30 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 7 Nov 2017 15:42:30 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:43:24 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 7 Nov 2017 15:43:24 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I think the --tags can be merged into one line. -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:44:00 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 7 Nov 2017 15:44:00 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: > I think the --tags can be merged into one line. `git fetch --tags` is already fetching the same as `git fetch` according to the man pages. -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 15:45:58 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Please read the whole description, specially latest paragraph. See https://stackoverflow.com/questions/1204190/does-git-fetch-tags-include-git-fetch first answer for information. It seems behavior/documentation changes starting from git 1.9/2.0 (Q1 2014) -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 15:52:39 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 7 Nov 2017 15:52:39 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 16:56:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 16:56:59 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error Message-ID: Review at https://gerrit.osmocom.org/4719 modem: Improve handling of errors in dbus_call_dismiss_error Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a --- M src/osmo_gsm_tester/modem.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/4719/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index e8f57cc..bff62bb 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -145,11 +145,11 @@ def dbus_call_dismiss_error(log_obj, err_str, method): try: method() - except Exception as e: - if isinstance(e, GLib.Error) and err_str in e.domain: + except GLib.Error as e: + if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == err_str: log_obj.log('Dismissed Dbus method error: %r' % e) return - raise log.Error('dbus_call_dismiss_error raised error %r' % e) + raise e class ModemDbusInteraction(log.Origin): '''Work around inconveniences specific to pydbus and ofono. -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 16:56:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 Nov 2017 16:56:59 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Fallback to automatic registration if manual one is n... Message-ID: Review at https://gerrit.osmocom.org/4720 modem: Fallback to automatic registration if manual one is not supported by modem Some modems such as the gobi 2000 doesn't support the Register() method in /operator path. If the method returns a NotSupported error, fallback to automatic registration. Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b --- M src/osmo_gsm_tester/modem.py 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/4720/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index bff62bb..cb4a8de 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -502,7 +502,14 @@ return dbus_op = systembus_get(matching_op_path) self.log('Registering with operator', matching_op_path, mcc_mnc) - dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) + try: + dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) + except GLib.Error as e: + if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == 'org.ofono.Error.NotSupported': + self.log('modem does not support manual registering, attempting automatic registering') + self.scan_cb_register_automatic(scanned_operators, mcc_mnc) + return + raise e def cancel_pending_dbus_methods(self): self.cancellable.cancel() -- To view, visit https://gerrit.osmocom.org/4720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 7 17:24:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 7 Nov 2017 17:24:39 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4334 to look at the new patch set (#14). mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,324 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/4334/14 diff --git a/configure.ac b/configure.ac index 79523d1..862e5bc 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..ddcba0f --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,48 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct gsm_lchan *ho_lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..0c11b85 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -117,18 +80,19 @@ /* NOTE: When an ho_lchan exists, the MDCX is part of an * handover operation (intra-bsc). This means we will not * inform the MSC about the event, which means that no - * assignment complete message is transmitted */ - LOGP(DMSC, LOGL_INFO," RTP connection handover complete\n"); + * assignment complete message is transmitted, we just + * inform the logic that controls the MGW about the new + * connection info */ + LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); + mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4311250..d5aaab3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -321,14 +322,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -426,7 +441,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -531,28 +545,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -729,3 +754,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..a7b6b41 --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,1136 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (MSC)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_CALL, + ST_MDCX_BTS_HO, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_CALL, "ST_CALL (call in progress)"}, + {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a call. It is also issued in case of errors to teardown a half + * open connection. */ + EV_TEARDOWN, + + /* External event: Handover event, this event notifies the FSM that a + * handover is required. The FSM will then perform an extra MDCX to + * configure the new connection data at the MGW. The only valid state + * where a Handover event can be received is ST_CALL. */ + EV_HANDOVER, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, + + /* Internal event: The mgcp_gw has responded to the (Handover-) + MDCX that has been send to update the BTS connection. */ + EV_MDCX_BTS_HO_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine, send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_ASS_COMPLETE: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "MDCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/NET: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv); + +/* Helper function to perform a connection teardown. This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_HALT when teardown is done. */ +static void handle_teardown(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Helper function to perform a handover (MDCX). This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_CALL when teardown is done. */ +static void handle_handover(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + struct gsm_lchan *ho_lchan; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + ho_lchan = mgcp_ctx->ho_lchan; + OSMO_ASSERT(ho_lchan); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), + ho_lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = ho_lchan->abis_ip.bound_port}; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_MDCX_BTS_HO, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for ST_CALL: Handle call teardown and Handover */ +static void fsm_active_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_TEARDOWN: + handle_teardown(mgcp_ctx); + break; + case EV_HANDOVER: + handle_handover(mgcp_ctx); + break; + } + +} + +/* Callback for MGCP-Client: handle response for BTS/Handover associated MDCX */ +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/BTS/HO: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS/HO: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_HO_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_BTS_HO: Complete updating the connection data after + * handoverin the call to another BTS */ +static void fsm_complete_handover(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_BTS_HO_RESP: + /* The response from the MGW arrived, the connection pointing + * towards the BTS is now updated, so we now change back to + * ST_CALL, where we will wait for the call-end (or another + * handover) */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + break; + case EV_HANDOVER: + /* This handles the rare, but possible situation where another + * handover is happening while we still wait for the the MGW to + * complete the current one. In this case we will stop waiting + * for the response and directly move on with that second + * handover */ + handle_handover(mgcp_ctx); + break; + case EV_TEARDOWN: + /* It may happen that the BSS wants to teardown all connections + * while we are still waiting for the MGW to respond. In this + * case we start to teard down the connection immediately */ + handle_teardown(mgcp_ctx); + break; + } +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * go for an extra MDCX to update the connection and land in + * this state again when done. */ + [ST_CALL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), + .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), + .name = "ST_CALL", + .action = fsm_active_call_cb, + }, + + /* A handover is in progress. When the response to the respective + * MDCX is received, then go back to ST_CALL and wait for the + * call end */ + [ST_MDCX_BTS_HO] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_MDCX_BTS_HO", + .action = fsm_complete_handover, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Notify that the call got handovered to another BTS, update the connection + * that is pointing to the BTS side with the connection data for the new bts. + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * ho_lchan: the lchan on the new BTS */ +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(ho_lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "handover attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->ho_lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating handover...\n"); + + mgcp_ctx->ho_lchan = ho_lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_HANDOVER, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 14 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From admin at opensuse.org Tue Nov 7 19:55:59 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 07 Nov 2017 19:55:59 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a020fe6a0e05_21cc838f882259f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 275s] | [ 275s] | This file was extended by libosmocore config.status 0.10.2.20171107, which was [ 275s] | generated by GNU Autoconf 2.69. Invocation command line was [ 275s] | [ 275s] | CONFIG_FILES = [ 275s] | CONFIG_HEADERS = [ 275s] | CONFIG_LINKS = [ 275s] | CONFIG_COMMANDS = [ 275s] | $ ./config.status Doxyfile.core [ 275s] | [ 275s] | on build36 [ 275s] | [ 275s] | config.status:1180: creating Doxyfile.core [ 275s] [ 275s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 275s] make[1]: *** [override_dh_auto_test] Error 1 [ 275s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 275s] debian/rules:15: recipe for target 'build' failed [ 275s] make: *** [build] Error 2 [ 275s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 275s] [ 275s] build36 failed "build libosmocore_0.10.2.20171107.dsc" at Tue Nov 7 19:55:44 UTC 2017. [ 275s] [ 275s] ### VM INTERACTION START ### [ 278s] [ 268.734739] reboot: Power down [ 279s] ### VM INTERACTION END ### [ 279s] [ 279s] build36 failed "build libosmocore_0.10.2.20171107.dsc" at Tue Nov 7 19:55:48 UTC 2017. [ 279s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:32:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:32:06 +0000 Subject: osmo-trx[master]: SocketsTest: Fix printing of non-nul-terminated string In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33d0ddf851d84b81ab5252e3755422170cee54ee Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:32:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:32:09 +0000 Subject: [MERGED] osmo-trx[master]: SocketsTest: Fix printing of non-nul-terminated string In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: SocketsTest: Fix printing of non-nul-terminated string ...................................................................... SocketsTest: Fix printing of non-nul-terminated string Change-Id: I33d0ddf851d84b81ab5252e3755422170cee54ee Fixes: Coverity CID#149363 --- M CommonLibs/SocketsTest.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/CommonLibs/SocketsTest.cpp b/CommonLibs/SocketsTest.cpp index c2849e0..3198a5e 100644 --- a/CommonLibs/SocketsTest.cpp +++ b/CommonLibs/SocketsTest.cpp @@ -61,7 +61,8 @@ readSocket.nonblocking(); int rc = 0; while (rc0) { COUT("read: " << buf); -- To view, visit https://gerrit.osmocom.org/4696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33d0ddf851d84b81ab5252e3755422170cee54ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:35:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:35:25 +0000 Subject: osmo-msc[master]: reset: check length of the reset context name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/4716/1//COMMIT_MSG Commit Message: Line 15: This fixes CID 178664 please use "Fixes: Coverity CID#178664" like in our other related comits. Thisis machine-parseable. We don't have any code that parses it yet (AFAIK) but this is useful in the future. https://gerrit.osmocom.org/#/c/4716/1/src/libcommon-cs/a_reset.c File src/libcommon-cs/a_reset.c: Line 141: if (strlen(name) >= sizeof(reset->name)) where does 'reset->name' come from? why is there a separate name at all? Isn't the fsm->name sufficient which we allocate/create below? I think I raised this question before in code review but don't recall an answer, sorry. -- To view, visit https://gerrit.osmocom.org/4716 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7c4a7ff17e1c8ceb6e543ab6f0f07c87df603c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:35:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:35:50 +0000 Subject: osmo-bsc[master]: reset: check length of the reset context name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 see review comments of related osmo-bsc patch -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:36:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:36:39 +0000 Subject: osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c File src/libvlr/vlr_auth_fsm.c: Line 592: if (!afp) { don't we leak 'fi' here if 'afp' allocation fails above? -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:42:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:42:59 +0000 Subject: osmo-hlr[master]: cosmetic: add comment on ignored return value In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4715/1/src/db.c File src/db.c: Line 104: * during sqlite3_step(). */ there is a way to tell coverity fo ignore this: Put "coverity[CHECKED_RETURN]" in this comment. -- To view, visit https://gerrit.osmocom.org/4715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:43:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:43:31 +0000 Subject: osmo-hlr[master]: hlr_db_tool: fix error log strerror invocation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaab46f565a1112d8a7def8ea90a5cd440c0a3b41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:44:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:44:25 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:45:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:45:05 +0000 Subject: osmo-gsm-tester[master]: modem: Fallback to automatic registration if manual one is n... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:46:20 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:49:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:49:23 +0000 Subject: osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-2 (1 comment) https://gerrit.osmocom.org/#/c/2668/5//COMMIT_MSG Commit Message: Line 1: Parent: d30eebaf (mobile/gsm322.c: replace memset() by simple for-loop) I think you have uploaded an unrelated patch with the same Change-Id as another patch. Please fix this up. Also, why would we want to replace memset? -- To view, visit https://gerrit.osmocom.org/2668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:50:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:50:47 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: replace memset() by simple for-loop In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4645/2/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: for (i = 0; i < value && i < sizeof(bar) - 1; i++) you could just as well simply compute the length of the interval as a positive integer and then call memset() on that. But hey, we don't need to optimize here. -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:51:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:51:37 +0000 Subject: osmo-mgw[master]: network: remove unused return code In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:52:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:52:31 +0000 Subject: [PATCH] osmo-mgw[master]: network: remove unused return code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4710 to look at the new patch set (#2). network: remove unused return code The function that forwards the tapped (voice ebug) traffic returns its status (sendto) to the caller. However, none of the callers seem need this info. Remove the return code and print an error message on failure Fixes: Coverity CID#178666 Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/4710/2 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..947b87e 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -627,14 +627,20 @@ /* Forward data to a debug tap. This is debug function that is intended for * debugging the voice traffic with tools like gstreamer */ -static int forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, - int len) +static void forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, + int len) { - if (!tap->enabled) - return 0; + int rc; - return sendto(fd, buf, len, 0, - (struct sockaddr *)&tap->forward, sizeof(tap->forward)); + if (!tap->enabled) + return; + + rc = sendto(fd, buf, len, 0, (struct sockaddr *)&tap->forward, + sizeof(tap->forward)); + + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, + "Forwarding tapped (debug) voice data failed.\n"); } /*! Send RTP/RTCP data to a specified destination connection. -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:52:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:52:35 +0000 Subject: osmo-mgw[master]: network: remove unused return code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:54:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:54:04 +0000 Subject: osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/4711/1//COMMIT_MSG Commit Message: Line 15: This fixes CID 178662 syntax https://gerrit.osmocom.org/#/c/4711/1/src/libosmo-mgcp/mgcp_osmux.c File src/libosmo-mgcp/mgcp_osmux.c: Line 213: this = NULL; one could simply initialize 'this' to NULL in the variable declaration and save the 'else' clauses here. Not overly important. -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:54:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:54:43 +0000 Subject: osmo-mgw[master]: cosmetic: guard dead coded with ifdef In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4712/1//COMMIT_MSG Commit Message: Line 15: This fixes CID 178648 syntax -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:55:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:55:10 +0000 Subject: osmo-sip-connector[master]: mncc.c: Ensure proper string buffer NUL termination In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:55:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:55:13 +0000 Subject: [MERGED] osmo-sip-connector[master]: mncc.c: Ensure proper string buffer NUL termination In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mncc.c: Ensure proper string buffer NUL termination ...................................................................... mncc.c: Ensure proper string buffer NUL termination Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb Fixes: Coverity CID#92223 --- M src/mncc.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/mncc.c b/src/mncc.c index 669a80c..45c062f 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -738,7 +738,7 @@ mncc.fields |= MNCC_F_CALLING; mncc.calling.plan = 1; mncc.calling.type = 0x0; - strncpy(mncc.calling.number, call->source, sizeof(mncc.calling.number)); + osmo_strlcpy(mncc.calling.number, call->source, sizeof(mncc.calling.number)); if (conn->app->use_imsi_as_id) { snprintf(mncc.imsi, 15, "%s", call->dest); @@ -746,7 +746,7 @@ mncc.fields |= MNCC_F_CALLED; mncc.called.plan = 1; mncc.called.type = 0x0; - strncpy(mncc.called.number, call->dest, sizeof(mncc.called.number)); + osmo_strlcpy(mncc.called.number, call->dest, sizeof(mncc.called.number)); } /* -- To view, visit https://gerrit.osmocom.org/4697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f58a495f60ed744c1f625dc8df56aa4dc0aa4cb Gerrit-PatchSet: 2 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:56:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:56:00 +0000 Subject: osmo-iuh[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I61b79f633d36814b53e40f1a92b5847c9ff4fde0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:56:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:56:05 +0000 Subject: openbsc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:56:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:56:08 +0000 Subject: osmo-hlr[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09762f110c7bcaf85c0ef2f472eb43ac543c74e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:57:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:57:48 +0000 Subject: osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Patch Set 14: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 14 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:57:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:57:51 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: use osmo-mgw to switch RTP streams ...................................................................... mgcp: use osmo-mgw to switch RTP streams osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a --- M configure.ac M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/osmo_bsc.h A include/osmocom/bsc/osmo_bsc_mgcp.h M src/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_main.c A src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c 13 files changed, 1,324 insertions(+), 67 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 02a81c6..4ec903a 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,9 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) -PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 0.0.1) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files AC_HEADER_STDC @@ -135,7 +136,6 @@ src/libfilter/Makefile src/libcommon-cs/Makefile src/osmo-bsc/Makefile - src/osmo-bsc_nat/Makefile src/ipaccess/Makefile src/utils/Makefile tests/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 8ad2b5d..1f7cd39 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ openbscdefines.h \ osmo_bsc.h \ osmo_bsc_grace.h \ + osmo_bsc_mgcp.h \ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 74298b8..b9427b8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -479,6 +479,11 @@ uint8_t t3212; struct { + struct mgcp_client_conf *conf; + struct mgcp_client *client; + } mgw; + + struct { /* CS7 instance id number (set via VTY) */ uint32_t cs7_instance; /* A list with the context information about diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 5ebea50..8a5cd30 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -29,6 +29,20 @@ uint32_t rtp_ip; int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment + * request) */ + struct sockaddr_storage aoip_rtp_addr_remote; + + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; + + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + /* for advanced ping/pong */ int send_ping; @@ -72,4 +86,6 @@ struct llist_head *bsc_access_lists(void); +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan); + #endif diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h new file mode 100644 index 0000000..ddcba0f --- /dev/null +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -0,0 +1,48 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + struct gsm_lchan *lchan; + struct gsm_lchan *ho_lchan; + struct msgb *resp; +}; + +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate); +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan); +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); diff --git a/src/Makefile.am b/src/Makefile.am index d04f025..dd1ad3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,5 +33,4 @@ utils \ ipaccess \ osmo-bsc \ - osmo-bsc_nat \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index dfc4def..7db698c 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -15,6 +15,7 @@ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) AM_LDFLAGS = \ @@ -30,6 +31,7 @@ osmo_bsc_vty.c \ osmo_bsc_api.c \ osmo_bsc_grace.c \ + osmo_bsc_mgcp.c \ osmo_bsc_msc.c \ osmo_bsc_sigtran.c \ osmo_bsc_filter.c \ @@ -53,4 +55,5 @@ $(COVERAGE_LDFLAGS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 94aa350..0c11b85 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -29,46 +29,9 @@ #include #include #include +#include #include - -/* Generate and send assignment complete message */ -static int send_aoip_ass_compl(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) -{ - struct msgb *resp; - struct sockaddr_storage rtp_addr; - struct sockaddr_in rtp_addr_in; - struct gsm0808_speech_codec sc; - - OSMO_ASSERT(lchan->abis_ip.ass_compl.valid == true); - - /* Package RTP-Address data */ - memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); - rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = htons(lchan->abis_ip.bound_port); - rtp_addr_in.sin_addr.s_addr = htonl(lchan->abis_ip.bound_ip); - memset(&rtp_addr, 0, sizeof(rtp_addr)); - memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); - - /* Extrapolate speech codec from speech mode */ - gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); - - /* Generate message */ - resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, - lchan->abis_ip.ass_compl.chosen_channel, - lchan->abis_ip.ass_compl.encr_alg_id, - lchan->abis_ip.ass_compl.speech_mode, - &rtp_addr, - &sc, - NULL); - - if (!resp) { - LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message!\n"); \ - return -EINVAL; - } - - return osmo_bsc_sigtran_send(conn->sccp_con, resp); -} static int handle_abisip_signal(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -117,18 +80,19 @@ /* NOTE: When an ho_lchan exists, the MDCX is part of an * handover operation (intra-bsc). This means we will not * inform the MSC about the event, which means that no - * assignment complete message is transmitted */ - LOGP(DMSC, LOGL_INFO," RTP connection handover complete\n"); + * assignment complete message is transmitted, we just + * inform the logic that controls the MGW about the new + * connection info */ + LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); + mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - if (send_aoip_ass_compl(con, lchan) != 0) - return -EINVAL; + mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); } break; - break; } return 0; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 93e9274..9f8032e 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -351,14 +352,28 @@ conn->conn = NULL; } - /* send the clear complete message */ + /* generate the clear complete message */ resp = gsm0808_create_clear_complete(); if (!resp) { LOGP(DMSC, LOGL_ERROR, "Sending clear complete failed.\n"); return -1; } - osmo_bsc_sigtran_send(conn, resp); + if (conn->mgcp_ctx) { + /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with + * the MGCP-GW. For this an mgcp_ctx should be created that + * contains the FSM and some system data. When the connection + * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() + * calls osmo_bsc_sigtran_send(). */ + mgcp_clear_complete(conn->mgcp_ctx, resp); + } else { + /* NOTE: This is the SCCP-Lite case, since we do not handle + * the MGCP-GW switching ourselves, we may skip everything + * that is MGCP-GW related and sent the clear complete message + * directly */ + osmo_bsc_sigtran_send(conn, resp); + } + return 0; } @@ -456,7 +471,6 @@ int port, full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; - struct sockaddr_in *rtp_addr_in; struct gsm0808_channel_type ct; struct gsm0808_speech_codec_list scl; struct gsm0808_speech_codec_list *scl_ptr = NULL; @@ -561,28 +575,39 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - if (aoip == false) { - /* map it to a MGCP Endpoint and a RTP port */ + /* Forward the assingment request to lower layers */ + if (aoip) { + /* Store network side RTP connection information, we will + * process this address later after we have established an RTP + * connection to the BTS. This is just for organizational + * reasons, functional wise it would not matter when exactly + * the network side RTP connection is made, as long it is made + * before we return with the assignment complete message. */ + memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + + /* Create an assignment request using the MGCP fsm. This FSM + * is directly started when its created (now) and will also + * take care about the further processing (creating RTP + * endpoints, calling gsm0808_assign_req(), rsponding to + * the assignment request etc... */ + conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); + if (!conn->mgcp_ctx) { + LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); + goto reject; + } + + /* We now may return here, the FSM will do all further work */ + return 0; + } else { + /* Note: In the sccp-lite case we to not perform any mgcp operation, + * (the MSC does that for us). We set conn->rtp_ip to 0 and check + * on this later. By this we know that we have to behave accordingly + * to sccp-lite. */ port = mgcp_timeslot_to_endpoint(multiplex, timeslot); conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); conn->rtp_ip = 0; - } else { - /* use address / port supplied with the AoIP - * transport address element */ - if (rtp_addr.ss_family == AF_INET) { - rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp_port = osmo_ntohs(rtp_addr_in->sin_port); - memcpy(&conn->rtp_ip, &rtp_addr_in->sin_addr.s_addr, - IP_V4_ADDR_LEN); - conn->rtp_ip = osmo_ntohl(conn->rtp_ip); - } else { - LOGP(DMSC, LOGL_ERROR, - "Unsopported addressing scheme. (supports only IPV4)\n"); - goto reject; - } + return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } - - return gsm0808_assign_req(conn->conn, chan_mode, full_rate); reject: resp = @@ -759,3 +784,39 @@ return -1; } + +/* Generate and send assignment complete message */ +int bssmap_send_aoip_ass_compl(struct gsm_lchan *lchan) +{ + struct msgb *resp; + struct gsm0808_speech_codec sc; + struct gsm_subscriber_connection *conn; + + conn = lchan->conn; + + OSMO_ASSERT(lchan->abis_ip.ass_compl.valid); + OSMO_ASSERT(conn); + OSMO_ASSERT(conn->sccp_con); + + LOGP(DMSC, LOGL_DEBUG, "Sending assignment complete message... (id=%i)\n", conn->sccp_con->conn_id); + + /* Extrapolate speech codec from speech mode */ + gsm0808_speech_codec_from_chan_type(&sc, lchan->abis_ip.ass_compl.speech_mode); + + /* Generate message */ + resp = gsm0808_create_ass_compl(lchan->abis_ip.ass_compl.rr_cause, + lchan->abis_ip.ass_compl.chosen_channel, + lchan->abis_ip.ass_compl.encr_alg_id, + lchan->abis_ip.ass_compl.speech_mode, + &conn->sccp_con->aoip_rtp_addr_local, + &sc, + NULL); + + if (!resp) { + LOGP(DMSC, LOGL_ERROR, "Failed to generate assignment completed message! (id=%i)\n", + conn->sccp_con->conn_id); + return -EINVAL; + } + + return osmo_bsc_sigtran_send(conn->sccp_con, resp); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 730e1db..5d25701 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -44,6 +44,7 @@ #include #include +#include #define _GNU_SOURCE #include @@ -206,6 +207,9 @@ exit(1); } + bsc_gsmnet->mgw.conf = talloc_zero(bsc_gsmnet, struct mgcp_client_conf); + mgcp_client_conf_init(bsc_gsmnet->mgw.conf); + bts_init(); libosmo_abis_init(tall_bsc_ctx); @@ -274,6 +278,15 @@ } } + bsc_gsmnet->mgw.client = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + + if (mgcp_client_connect(bsc_gsmnet->mgw.client)) { + LOGP(DNM, LOGL_ERROR, "MGW connect failed at (%s:%u)\n", + bsc_gsmnet->mgw.conf->remote_addr, + bsc_gsmnet->mgw.conf->remote_port); + exit(1); + } + if (osmo_bsc_sigtran_init(&bsc_gsmnet->bsc_data->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initalize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c new file mode 100644 index 0000000..a7b6b41 --- /dev/null +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -0,0 +1,1136 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_BTS 1 +#define CONN_ID_NET 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_BSS_TIMEOUT 4 /* in seconds */ +#define MGCP_BSS_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_ASSGMNT_FAIL, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_BSS_TIMEOUT, + MGCP_ERR_NOMEM +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown (BSS)"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (BSS)"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (MSC)"}, + {MGCP_ERR_BSS_TIMEOUT, "assignment could not be completed in time (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {0, NULL} +}; + +enum fsm_bsc_mgcp_states { + ST_CRCX_BTS, + ST_ASSIGN_PROC, + ST_MDCX_BTS, + ST_CRCX_NET, + ST_ASSIGN_COMPL, + ST_CALL, + ST_MDCX_BTS_HO, + ST_HALT +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, + {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, + {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, + {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, + {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, + {ST_CALL, "ST_CALL (call in progress)"}, + {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Assignment complete, event is issued shortly before + * the assignment complete message is sent via the A-Interface */ + EV_ASS_COMPLETE, + + /* External event: Teardown event, this event is used to notify the end + * of a call. It is also issued in case of errors to teardown a half + * open connection. */ + EV_TEARDOWN, + + /* External event: Handover event, this event notifies the FSM that a + * handover is required. The FSM will then perform an extra MDCX to + * configure the new connection data at the MGW. The only valid state + * where a Handover event can be received is ST_CALL. */ + EV_HANDOVER, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the BTS side */ + EV_CRCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the BTS side */ + EV_MDCX_BTS_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the NET side */ + EV_CRCX_NET_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the NET and BTS side */ + EV_DLCX_ALL_RESP, + + /* Internal event: The mgcp_gw has responded to the (Handover-) + MDCX that has been send to update the BTS connection. */ + EV_MDCX_BTS_HO_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine, send CRCX for BTS)"}, + {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, + {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, + {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, + {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, + {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ +static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_client_next_endpoint(mgcp); + mgcp_ctx->rtp_endpoint = rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated CRCX */ +static void crcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Set the connection details in the conn struct. The code that + * controls the BTS via RSL will take these values and signal them + * to the BTS via RSL/IPACC */ + conn->rtp_port = r->audio_port; + conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_PROC: An mgcp response has been received, proceed + * with the assignment request */ +static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + enum gsm48_chan_mode chan_mode; + bool full_rate; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + OSMO_ASSERT(conn->conn); + chan_mode = mgcp_ctx->chan_mode; + full_rate = mgcp_ctx->full_rate; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); + + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_BTS, MGCP_BSS_TIMEOUT, MGCP_BSS_TIMEOUT_TIMER_NR); +} + +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_BTS: When the BSS has completed the assignment, + * proceed with updating the connection for the BTS side */ +static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_ASS_COMPLETE: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = lchan->abis_ip.bound_port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for BTS associated MDCX */ +static void mdcx_for_bts_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct in_addr addr; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "MDCX/BTS: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "MDCX/BTS: Cannot parse MDCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + addr.s_addr = lchan->abis_ip.bound_ip; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS: corresponding lchan has been bound to address %s:%u\n", + inet_ntoa(addr), lchan->abis_ip.bound_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_RESP, mgcp_ctx); +} + +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ +static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + struct sockaddr_in *sin; + char *addr; + uint16_t port; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + + /* Currently we only have support for IPv4 in our MGCP software, the + * AoIP part is ready to support IPv6 in theory, because the IE + * parser/generator uses sockaddr_storage for the AoIP transport + * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * why we stop here in case some MSC tries to signal IPv6 AoIP + * transport identifiers */ + if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + rtp_endpoint); + handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); + return; + } + + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + addr = inet_ntoa(sin->sin_addr); + port = osmo_ntohs(sin->sin_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, + .conn_id = CONN_ID_NET, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = addr, + .audio_port = port + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void crcx_for_net_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct osmo_bsc_sccp_con *conn; + struct gsm_lchan *lchan; + struct sockaddr_in *sin; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "CRCX/NET: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/NET: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse CRCX response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + /* Store address */ + sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_port = osmo_ntohs(r->audio_port); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_NET_RESP, mgcp_ctx); +} + +/* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ +static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct gsm_lchan *lchan; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + case EV_CRCX_NET_RESP: + break; + } + + lchan = mgcp_ctx->lchan; + OSMO_ASSERT(lchan); + + /* Send assignment completion message via AoIP, this will complete + * the circuit. The message will also contain the port and IP-Address + * where the MGW expects the RTP input from the MSC side */ + bssmap_send_aoip_ass_compl(lchan); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); +} + +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv); + +/* Helper function to perform a connection teardown. This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_HALT when teardown is done. */ +static void handle_teardown(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + uint16_t rtp_endpoint; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = conn->conn_id + }; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Helper function to perform a handover (MDCX). This function may be + * called from ST_CALL and ST_MDCX_BTS_HO only. It will perform a state + * change to ST_CALL when teardown is done. */ +static void handle_handover(struct mgcp_ctx *mgcp_ctx) +{ + struct osmo_bsc_sccp_con *conn; + struct msgb *msg; + struct mgcp_msg mgcp_msg; + struct mgcp_client *mgcp; + struct gsm_lchan *ho_lchan; + uint16_t rtp_endpoint; + struct in_addr addr; + int rc; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + ho_lchan = mgcp_ctx->ho_lchan; + OSMO_ASSERT(ho_lchan); + + rtp_endpoint = mgcp_ctx->rtp_endpoint; + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); + + addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), + ho_lchan->abis_ip.bound_port); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = inet_ntoa(addr), + .audio_port = ho_lchan->abis_ip.bound_port}; + if (snprintf(mgcp_msg.endpoint, sizeof(mgcp_msg.endpoint), MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= + sizeof(mgcp_msg.endpoint)) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_MDCX_BTS_HO, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for ST_CALL: Handle call teardown and Handover */ +static void fsm_active_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_TEARDOWN: + handle_teardown(mgcp_ctx); + break; + case EV_HANDOVER: + handle_handover(mgcp_ctx); + break; + } + +} + +/* Callback for MGCP-Client: handle response for BTS/Handover associated MDCX */ +static void mdcx_for_bts_ho_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/BTS/HO: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/BTS/HO: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_BTS_HO_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_BTS_HO: Complete updating the connection data after + * handoverin the call to another BTS */ +static void fsm_complete_handover(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_BTS_HO_RESP: + /* The response from the MGW arrived, the connection pointing + * towards the BTS is now updated, so we now change back to + * ST_CALL, where we will wait for the call-end (or another + * handover) */ + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + break; + case EV_HANDOVER: + /* This handles the rare, but possible situation where another + * handover is happening while we still wait for the the MGW to + * complete the current one. In this case we will stop waiting + * for the response and directly move on with that second + * handover */ + handle_handover(mgcp_ctx); + break; + case EV_TEARDOWN: + /* It may happen that the BSS wants to teardown all connections + * while we are still waiting for the MGW to respond. In this + * case we start to teard down the connection immediately */ + handle_teardown(mgcp_ctx); + break; + } +} + +/* Callback for MGCP-Client: handle response for NET associated CRCX */ +static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct osmo_bsc_sccp_con *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + /* Note: We check the return code, but in case of an error there is + * not much that can be done to recover. However, at least we tryed + * to remove the connection (if there was even any) */ + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "DLCX: MGW has acknowledged the removal of the connections\n"); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + /* Send pending sigtran message */ + if (mgcp_ctx->resp) { + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); + mgcp_ctx->resp = NULL; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "timeout (T%i) in state %s, attempting graceful teardown...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + /* Ensure that no sigtran response, is present. Otherwiese we might try + * to send a sigtran response when the sccp connection is already freed. */ + mgcp_ctx->resp = NULL; + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGCP-GW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) + /* Note: If the logic that controls the BSS is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGCP-GW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); + else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static struct osmo_fsm_state fsm_bsc_mgcp_states[] = { + + /* Startup state machine, send CRCX to BTS. */ + [ST_CRCX_BTS] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .name = "ST_CRCX_BTS", + .action = fsm_crcx_bts_cb, + }, + + /* When the CRCX response for the BTS side is received, then + * proceed the assignment on the BSS side. */ + [ST_ASSIGN_PROC] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), + .name = "ST_ASSIGN_PROC", + .action = fsm_proc_assignmnent_req_cb, + }, + + /* When the BSS has processed the assignment request, + * then send the MDCX command for the BTS side in order to + * update the connections with the actual PORT/IP where the + * BTS expects the RTP input. */ + [ST_MDCX_BTS] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), + .name = "ST_MDCX_BTS", + .action = fsm_mdcx_bts_cb, + }, + + /* When the MDCX response for the BTS siede is received, then + * directly proceed with sending the CRCX command to connect the + * network side. This is done in one phase (no MDCX needed). */ + [ST_CRCX_NET] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), + .name = "ST_CRCX_NET", + .action = fsm_crcx_net_cb, + }, + + /* When the CRCX response for the NET side is received. Then + * send the assignment complete message via the A-Interface and + * enter wait state in order to wait for the end of the call. */ + [ST_ASSIGN_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_ASSIGN_COMPL", + .action = fsm_send_assignment_complete, + }, + + /* When the call ends, remove all RTP connections from the + * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * go for an extra MDCX to update the connection and land in + * this state again when done. */ + [ST_CALL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), + .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), + .name = "ST_CALL", + .action = fsm_active_call_cb, + }, + + /* A handover is in progress. When the response to the respective + * MDCX is received, then go back to ST_CALL and wait for the + * call end */ + [ST_MDCX_BTS_HO] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_MDCX_BTS_HO", + .action = fsm_complete_handover, + }, + + /* When the MGCP_GW confirms that the connections are terminated, + * then halt the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_bsc_mgcp = { + .name = "MGW", + .states = fsm_bsc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_bsc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * After that gsm0808_assign_req() to proceed. + * Parameter: + * ctx: talloc context + * network: associated gsm network + * conn: associated sccp connection + * chan_mode: channel mode (system data, passed through) + * full_rate: full rate flag (system data, passed through) + * Returns an mgcp_context that contains system data and the OSMO-FSM */ +struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, + enum gsm48_chan_mode chan_mode, bool full_rate) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + + OSMO_ASSERT(mgcp); + OSMO_ASSERT(conn); + + if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) + return NULL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_bsc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(ctx, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->conn = conn; + mgcp_ctx->chan_mode = chan_mode; + mgcp_ctx->full_rate = full_rate; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_BTS); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + return mgcp_ctx; +} + +/* Notify that the call has ended, remove all connections from the MGCP-GW, + * then send the clear complete message and destroy the FSM instance + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * respmgcp_ctx: pending clear complete message to send via A-Interface */ +void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp) +{ + struct osmo_bsc_sccp_con *conn; + + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(resp); + conn = mgcp_ctx->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, + "clear completion attemted on already terminated FSM -- forwarding directly...\n"); + osmo_bsc_sigtran_send(conn, resp); + mgcp_ctx->resp = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating call end...\n"); + + mgcp_ctx->resp = resp; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Notify that the BSS ready, send the assingnment complete message when the + * mgcp connection is completed + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * lchan: needed for sending the assignment complete message via A-Interface */ +void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "assignment completion attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating assignment completion...\n"); + + mgcp_ctx->lchan = lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASS_COMPLETE, mgcp_ctx); + + return; +} + +/* Notify that the call got handovered to another BTS, update the connection + * that is pointing to the BTS side with the connection data for the new bts. + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) + * ho_lchan: the lchan on the new BTS */ +void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan) +{ + OSMO_ASSERT(mgcp_ctx); + OSMO_ASSERT(ho_lchan); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "handover attemted on already terminated FSM -- ignored\n"); + mgcp_ctx->ho_lchan = NULL; + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "bss is indicating handover...\n"); + + mgcp_ctx->ho_lchan = ho_lchan; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_HANDOVER, mgcp_ctx); + + return; +} + +/* Free an existing mgcp context gracefully + * Parameter: + * mgcp_ctx: context information (FSM, and pointer to external system data) */ +void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx) +{ + OSMO_ASSERT(mgcp_ctx); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_DEBUG, "fsm already terminated, freeing only related context information...\n"); + talloc_free(mgcp_ctx); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "terminating fsm and freeing related context information...\n"); + + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 951061a..2ba777e 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -33,6 +33,7 @@ #include #include #include +#include /* A pointer to a list with all involved MSCs * (a copy of the pointer location submitted with osmo_bsc_sigtran_init() */ @@ -384,6 +385,10 @@ a_reset_conn_fail(conn->msc->a.reset); } + /* Remove mgcp context if existant */ + if (conn->mgcp_ctx) + mgcp_free_ctx(conn->mgcp_ctx); + llist_del(&conn->entry); talloc_free(conn); diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f816ae4..ca47097 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include @@ -972,6 +974,8 @@ int bsc_vty_init_extra(void) { + struct gsm_network *net = bsc_gsmnet; + install_element(CONFIG_NODE, &cfg_net_msc_cmd); install_element(CONFIG_NODE, &cfg_net_bsc_cmd); @@ -1034,5 +1038,7 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); + mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); + return 0; } -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 15 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 20:58:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 Nov 2017 20:58:45 +0000 Subject: [ABANDON] osmo-bsc[master]: osmo-bsc MGCP FSM: catch all unexpected events In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: osmo-bsc MGCP FSM: catch all unexpected events ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2aea11c476aa91ed5d508ec443ca7c992bda52d9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 7 22:06:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 22:06:06 +0000 Subject: [PATCH] osmo-bsc[master]: fix build: bssap test broke by undefined references Message-ID: Review at https://gerrit.osmocom.org/4721 fix build: bssap test broke by undefined references After the bssap test in Ie934c5d229140a89763bf2efff86d6a3766cd351, the subsequent commit Ia2882b7ca31a3219c676986e85045fa08a425d7a was not tested against the latest head, and its breaking bssap_test was not caught. Fix current master of osmo-bsc's 'make check' target: add osmo_bsc_mgcp.c and libosmo-mgcp-client dependencies to bssap_test linkage. Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc --- M tests/bssap/Makefile.am 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/4721/1 diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 80d655f..4bbe9ea 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -11,6 +11,7 @@ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(COVERAGE_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) EXTRA_DIST = \ @@ -28,6 +29,7 @@ $(top_srcdir)/src/osmo-bsc/osmo_bsc_sigtran.c \ $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c \ $(top_srcdir)/src/osmo-bsc/osmo_bsc_grace.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_mgcp.c \ $(NULL) bssap_test_LDADD = \ @@ -39,6 +41,7 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) bssap_test_LDFLAGS = \ -- To view, visit https://gerrit.osmocom.org/4721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 7 22:07:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 Nov 2017 22:07:17 +0000 Subject: osmo-bsc[master]: fix build: bssap test broke by undefined references In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 again fast tracking to prevent build fallout ... I hope I'm doing the right thing here, let me know if we need to revert some of these fast track merges. -- To view, visit https://gerrit.osmocom.org/4721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 00:02:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 00:02:17 +0000 Subject: [MERGED] osmo-bsc[master]: fix build: bssap test broke by undefined references In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix build: bssap test broke by undefined references ...................................................................... fix build: bssap test broke by undefined references After the bssap test in Ie934c5d229140a89763bf2efff86d6a3766cd351, the subsequent commit Ia2882b7ca31a3219c676986e85045fa08a425d7a was not tested against the latest head, and its breaking bssap_test was not caught. Fix current master of osmo-bsc's 'make check' target: add osmo_bsc_mgcp.c and libosmo-mgcp-client dependencies to bssap_test linkage. Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc --- M tests/bssap/Makefile.am 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 80d655f..4bbe9ea 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -11,6 +11,7 @@ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(COVERAGE_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) EXTRA_DIST = \ @@ -28,6 +29,7 @@ $(top_srcdir)/src/osmo-bsc/osmo_bsc_sigtran.c \ $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c \ $(top_srcdir)/src/osmo-bsc/osmo_bsc_grace.c \ + $(top_srcdir)/src/osmo-bsc/osmo_bsc_mgcp.c \ $(NULL) bssap_test_LDADD = \ @@ -39,6 +41,7 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ + $(LIBOSMOMGCPCLIENT_LIBS) \ $(NULL) bssap_test_LDFLAGS = \ -- To view, visit https://gerrit.osmocom.org/4721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Wed Nov 8 01:02:11 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 01:02:11 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a0257a7c1838_21cc838f883132a4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_8.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 247s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 247s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 247s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 247s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 247s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 247s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 247s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 247s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 247s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 247s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 247s] -Success [ 247s] ./testsuite.at:69: exit code was 132, expected 0 [ 247s] 11. testsuite.at:66: 11. coding (testsuite.at:66): FAILED (testsuite.at:69) [ 247s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 247s] make[1]: *** [override_dh_auto_test] Error 1 [ 247s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 247s] debian/rules:15: recipe for target 'build' failed [ 247s] make: *** [build] Error 2 [ 247s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 247s] [ 247s] build36 failed "build libosmocore_0.10.2.dsc" at Wed Nov 8 01:02:06 UTC 2017. [ 247s] [ 247s] ### VM INTERACTION START ### [ 248s] Powering off. [ 248s] [ 239.561579] reboot: Power down [ 249s] ### VM INTERACTION END ### [ 249s] [ 249s] build36 failed "build libosmocore_0.10.2.dsc" at Wed Nov 8 01:02:09 UTC 2017. [ 249s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 8 01:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 01:36:03 +0000 Subject: [PATCH] libosmo-sccp[master]: add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_... Message-ID: Review at https://gerrit.osmocom.org/4722 add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_name() It can be cumbersome to derive the ss7 instance needed to pass to sccp_addr_name(), because struct osmo_sccp_instance is opaque and only available in sccp_internal.h, within libosmo-sccp. Add osmo_sccp_inst_addr_name() which derives the ss7 instance from the internal knowledge of the osmo_sccp_instance struct. This can save calls to osmo_ss7_instance_find() just to do some logging of an sccp address. Naming: first I thought to pick osmo_sccp_addr_name2(), but for some of the string composing functions, adding a 2 already means that it is identical but using a second static buffer (to be used twice within the same printf). Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b --- M include/osmocom/sigtran/sccp_helpers.h M src/sccp_helpers.c 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/22/4722/1 diff --git a/include/osmocom/sigtran/sccp_helpers.h b/include/osmocom/sigtran/sccp_helpers.h index c2175f4..3ef7740 100644 --- a/include/osmocom/sigtran/sccp_helpers.h +++ b/include/osmocom/sigtran/sccp_helpers.h @@ -55,3 +55,4 @@ char *osmo_sccp_gt_dump(const struct osmo_sccp_gt *gt); char *osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr); char *osmo_sccp_addr_name(const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr); +char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr); diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 4b24392..f752e2a 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -324,3 +324,10 @@ return buf; } + +/* Derive ss7 from the sccp instance and call osmo_sccp_addr_name() with that. + * If sccp is passed as NULL, simply use the default point code format. */ +char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr) +{ + return osmo_sccp_addr_name(sccp? sccp->ss7 : NULL, addr); +} -- To view, visit https://gerrit.osmocom.org/4722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:28:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:28:23 +0000 Subject: [MERGED] osmo-hlr[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I09762f110c7bcaf85c0ef2f472eb43ac543c74e9 --- M src/hlr_vty.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_vty.c b/src/hlr_vty.c index a5eb26f..202f7f7 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -129,11 +129,9 @@ install_element(CONFIG_NODE, &cfg_hlr_cmd); install_node(&hlr_node, config_write_hlr); - install_default(HLR_NODE); install_element(HLR_NODE, &cfg_gsup_cmd); install_node(&gsup_node, config_write_hlr_gsup); - install_default(GSUP_NODE); install_element(GSUP_NODE, &cfg_hlr_gsup_bind_ip_cmd); -- To view, visit https://gerrit.osmocom.org/4611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09762f110c7bcaf85c0ef2f472eb43ac543c74e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:28:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:28:31 +0000 Subject: [MERGED] osmo-iuh[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I61b79f633d36814b53e40f1a92b5847c9ff4fde0 --- M src/hnbgw_vty.c M src/tests/hnb-test.c 2 files changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index ddea578..f504dd5 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -268,11 +268,9 @@ install_element(CONFIG_NODE, &cfg_hnbgw_cmd); install_node(&hnbgw_node, config_write_hnbgw); - vty_install_default(HNBGW_NODE); install_element(HNBGW_NODE, &cfg_hnbgw_iuh_cmd); install_node(&iuh_node, config_write_hnbgw_iuh); - vty_install_default(IUH_NODE); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_ip_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); @@ -280,13 +278,11 @@ install_element(HNBGW_NODE, &cfg_hnbgw_iucs_cmd); install_node(&iucs_node, config_write_hnbgw_iucs); - vty_install_default(IUCS_NODE); install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_addr_cmd); install_element(HNBGW_NODE, &cfg_hnbgw_iups_cmd); install_node(&iups_node, config_write_hnbgw_iups); - vty_install_default(IUPS_NODE); install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_addr_cmd); diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c index 68a3117..32f4ba8 100644 --- a/src/tests/hnb-test.c +++ b/src/tests/hnb-test.c @@ -904,7 +904,6 @@ install_element_ve(&chan_cmd); install_node(&chan_node, NULL); - vty_install_default(CHAN_NODE); } static void handle_options(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/4612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61b79f633d36814b53e40f1a92b5847c9ff4fde0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:29:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:29:05 +0000 Subject: [MERGED] osmo-hlr[master]: hlr_db_tool: fix error log strerror invocation In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: hlr_db_tool: fix error log strerror invocation ...................................................................... hlr_db_tool: fix error log strerror invocation The db API returns negative errno values, need to flip the sign before feeding to strerror. Fixes: coverity CID#178658 Change-Id: Iaab46f565a1112d8a7def8ea90a5cd440c0a3b41 --- M src/hlr_db_tool.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index 8982739..eb82c92 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -284,12 +284,12 @@ snprintf(imsi_str, sizeof(imsi_str), "%"PRId64, imsi); rc = db_subscr_create(dbc, imsi_str); - if (rc) { + if (rc < 0) { LOGP(DDB, LOGL_ERROR, "OsmoNITB DB import to %s: failed to create IMSI %s: %d: %s\n", dbc->fname, imsi_str, rc, - strerror(rc)); + strerror(-rc)); /* on error, still attempt to continue */ } @@ -303,13 +303,13 @@ /* find the just created id */ rc = db_subscr_get_by_imsi(dbc, imsi_str, &subscr); - if (rc) { + if (rc < 0) { LOGP(DDB, LOGL_ERROR, "OsmoNITB DB import to %s: created IMSI %s," " but failed to get new subscriber id: %d: %s\n", dbc->fname, imsi_str, rc, - strerror(rc)); + strerror(-rc)); return; } -- To view, visit https://gerrit.osmocom.org/4713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaab46f565a1112d8a7def8ea90a5cd440c0a3b41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:30:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:30:03 +0000 Subject: [PATCH] libosmo-sccp[master]: sccp vty: be fatal for addressbook entry errors Message-ID: Review at https://gerrit.osmocom.org/4725 sccp vty: be fatal for addressbook entry errors So far, the config would log an error upon config parsing, and then continue to use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE to abort the program in a config parsing error. Be fatal for re-using an already defined addressbook entry in another cs7 instance, and for having a too long addressbook entry name. Though it is mixing in cosmetic changes, add "Error:" to the output and arrange the erratic name to the end of the message, as is customary for error messages. Related: osmo-bsc Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60 --- M src/osmo_ss7_vty.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/25/4725/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 2c3d78e..890fec8 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1246,8 +1246,9 @@ const char *name = argv[0]; if (strlen(name) >= sizeof(entry->name)) { - vty_out(vty, "sccp address name to long!%s", VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: SCCP address name to long: '%s'%s", + name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Ensure that we do not use address names that @@ -1255,9 +1256,9 @@ entry = addr_entry_by_name_global(name); if (entry != NULL) { vty_out(vty, - "address name (%s) already used in ss7 instance %u%s", - entry->name, entry->inst->cfg.id, VTY_NEWLINE); - return CMD_WARNING; + "Error: SCCP address name already used in ss7 instance %u: '%s'%s", + entry->inst->cfg.id, entry->name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } entry = addr_entry_by_name_local(name, inst); -- To view, visit https://gerrit.osmocom.org/4725 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:30:51 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc: SCCP addrs: default only if unset, reject invalid Message-ID: Review at https://gerrit.osmocom.org/4726 osmo-bsc: SCCP addrs: default only if unset, reject invalid So far, if the user entered an invalid SCCP address in the config, the osmo_bsc_sigtran_init() code simply replaced that with the default, i.e. running with a completely different address than the user may intend. Use the default SCCP addresses only when they are unset by the user. Default MSC addr: set directly, do not detour via cs7 instance PC. The default MSC SCCP addr is just a point code + SSN, deriving it from the cs7 instance first is a confusing step. Just set the PC and SSN, and done. Using default addresses does not constitute an "auto configuration": if we set up a cs7 instance automatically, we do not want to have to create a second one automatically, to prevent "auto-confusion", and want to bail instead. But for each MSC on its own, using default SCCP addresses makes sense and is orthogonal to automatic cs7 instance creation. Hence drop the auto config semantics from the default SCCP address parts. Always validate the SCCP addresses we will end up using, and bail immediately if they are erratic. i.e. don't overwrite a non-empty invalid SCCP address with defaults, but straight bail. Beneficial side effects: - Fix some grammar ultra confusion in log messages. - Add context: log the MSC number the logging refers to. - Drop code dup: since we're always logging the used SCCP addresses, might as well log those once, unconditionally, in the end. Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 25 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/4726/1 diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 2ba777e..253f1e8 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -509,46 +509,39 @@ if (!msc->a.sccp) return -EINVAL; - /* Check if the sccp-address fullfills minimum requirements (SSN+PC is present, - * automatically recover addresses if the addresses are not set up properly) */ - if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, - "A-interface: invalid or missing local (BSC) SCCP address (a.bsc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + /* If unset, use default local SCCP address */ + if (!msc->a.bsc_addr.presence) osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using automatically generated local (BSC) SCCP address (a.bsc_addr=%s)\n", + + if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { + LOGP(DMSC, LOGL_ERROR, + "(%s) A-interface: invalid local (BSC) SCCP address: %s\n", + msc_name, osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); - } else { - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using local (BSC) automatically SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + return -EINVAL; } + + /* If unset, use default SCCP address for the MSC */ + if (!msc->a.msc_addr.presence) + osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, + osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), + SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, - "A-interface: invalid or missing remote (MSC) SCCP address for the MSC (a.msc_addr=%s)\n", + LOGP(DMSC, LOGL_ERROR, + "(%s) A-interface: invalid remote (MSC) SCCP address: %s\n", + msc_name, osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); - osmo_sccp_local_addr_by_instance(&msc->a.msc_addr, msc->a.sccp, SCCP_SSN_BSSAP); - msc->a.msc_addr.pc = osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC); - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using automatically generated remote (MSC) SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); - free_attempt_used = true; - } else { - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using remote (MSC) automatically SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + return -EINVAL; } + LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: local (BSC) SCCP address: %s\n", + msc_name, + osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: remote (MSC) SCCP address: %s\n", + msc_name, + osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + /* Bind SCCP user */ msc->a.sccp_user = osmo_sccp_user_bind(msc->a.sccp, msc_name, sccp_sap_up, msc->a.bsc_addr.ssn); if (!msc->a.sccp_user) -- To view, visit https://gerrit.osmocom.org/4726 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:30:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:30:51 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc vty: be fatal for addressbook entry errors Message-ID: Review at https://gerrit.osmocom.org/4727 osmo-bsc vty: be fatal for addressbook entry errors So far, the config would log an error upon config parsing, and then continue to use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE to abort the program in a config parsing error. Be fatal for non-existing addressbook entries and for using address book entries from mismatching cs7 instances. Though it is mixing in cosmetic changes, add "Error:" to the output and arrange the erratic name to the end of the message, as is customary for error messages. Related: libosmo-sccp I2f71b9c4dd30f919d2054da81283dd7035f44f60 Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec --- M src/osmo-bsc/osmo_bsc_vty.c 1 file changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/4727/1 diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index ca47097..0003cfa 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -724,18 +724,17 @@ ss7 = osmo_sccp_addr_by_name(&msc->a.bsc_addr, bsc_addr_name); if (!ss7) { - vty_out(vty, "No sccp address %s found%s", bsc_addr_name, - VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", bsc_addr_name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Prevent mixing addresses from different CS7/SS7 instances */ if (msc->a.cs7_instance_valid) { if (msc->a.cs7_instance != ss7->cfg.id) { vty_out(vty, - "SCCP address %s from different CS7 instance%s", + "Error: SCCP addressbook entry from mismatching CS7 instance: '%s'%s", bsc_addr_name, VTY_NEWLINE); - return CMD_WARNING; + return CMD_ERR_INCOMPLETE; } } @@ -757,18 +756,17 @@ ss7 = osmo_sccp_addr_by_name(&msc->a.msc_addr, msc_addr_name); if (!ss7) { - vty_out(vty, "No sccp address %s found%s", msc_addr_name, - VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", msc_addr_name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Prevent mixing addresses from different CS7/SS7 instances */ if (msc->a.cs7_instance_valid) { if (msc->a.cs7_instance != ss7->cfg.id) { vty_out(vty, - "SCCP address %s from different CS7 instance%s", + "Error: SCCP addressbook entry from mismatching CS7 instance: '%s'%s", msc_addr_name, VTY_NEWLINE); - return CMD_WARNING; + return CMD_ERR_INCOMPLETE; } } -- To view, visit https://gerrit.osmocom.org/4727 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:30:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:30:52 +0000 Subject: [PATCH] osmo-bsc[master]: use osmo_sccp_inst_addr_name() instead of looking up ss7 Message-ID: Review at https://gerrit.osmocom.org/4728 use osmo_sccp_inst_addr_name() instead of looking up ss7 Depends: libosmo-sccp I70ec5c8b42682a23f11a5820431c7e34e225709b Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 4 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/4728/1 diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 253f1e8..a18d4f3 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -516,8 +516,7 @@ if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, "(%s) A-interface: invalid local (BSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.bsc_addr)); return -EINVAL; } @@ -530,17 +529,14 @@ if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, "(%s) A-interface: invalid remote (MSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.msc_addr)); return -EINVAL; } LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: local (BSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.bsc_addr)); LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: remote (MSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.msc_addr)); /* Bind SCCP user */ msc->a.sccp_user = osmo_sccp_user_bind(msc->a.sccp, msc_name, sccp_sap_up, msc->a.bsc_addr.ssn); -- To view, visit https://gerrit.osmocom.org/4728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:39:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:39:37 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc RESET FSM: use distinct struct names In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4375 to look at the new patch set (#2). osmo-bsc RESET FSM: use distinct struct names Use distinctive struct names: s/fsm_/fsm_bsc_reset/. They only exist in the static context and it works fine, but the mad fsm-to-dot.py script breaks with identical struct names. Can't hurt to have unique names. Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 --- M src/osmo-bsc/osmo_bsc_reset.c 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/4375/2 diff --git a/src/osmo-bsc/osmo_bsc_reset.c b/src/osmo-bsc/osmo_bsc_reset.c index aadbd86..e482a44 100644 --- a/src/osmo-bsc/osmo_bsc_reset.c +++ b/src/osmo-bsc/osmo_bsc_reset.c @@ -33,24 +33,24 @@ #define RESET_RESEND_TIMER_NO 1234 /* FIXME: dig out the real timer number */ #define BAD_CONNECTION_THRESOLD 3 /* connection failures */ -enum fsm_states { +enum fsm_bsc_reset_states { ST_DISC, /* Disconnected from MSC */ ST_CONN, /* We have a confirmed connection to the MSC */ }; -static const struct value_string fsm_state_names[] = { +static const struct value_string fsm_bsc_reset_state_names[] = { {ST_DISC, "ST_DISC (disconnected)"}, {ST_CONN, "ST_CONN (connected)"}, {0, NULL}, }; -enum fsm_evt { +enum fsm_bsc_reset_evt { EV_RESET_ACK, /* got reset acknowlegement from the MSC */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ }; -static const struct value_string fsm_evt_names[] = { +static const struct value_string fsm_bsc_reset_evt_names[] = { {EV_RESET_ACK, "EV_RESET_ACK"}, {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, {EV_N_CONNECT, "EV_N_CONNECT"}, @@ -63,7 +63,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", - get_value_string(fsm_state_names, ST_DISC), get_value_string(fsm_evt_names, event), msc->nr); + get_value_string(fsm_bsc_reset_state_names, ST_DISC), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); msc->msc_con->msc_conn_loss_count = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); } @@ -74,7 +74,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event), msc->nr); + get_value_string(fsm_bsc_reset_state_names, ST_CONN), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); OSMO_ASSERT(msc); @@ -98,7 +98,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)fi->priv; LOGP(DMSC, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, MSC No.: %i, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state), msc->nr); + get_value_string(fsm_bsc_reset_state_names, fi->state), msc->nr); osmo_bsc_sigtran_reset(msc); osmo_bsc_sigtran_tx_reset(msc); @@ -107,7 +107,7 @@ return 0; } -static struct osmo_fsm_state fsm_states[] = { +static struct osmo_fsm_state fsm_bsc_reset_states[] = { [ST_DISC] = { .in_event_mask = (1 << EV_RESET_ACK), .out_state_mask = (1 << ST_DISC) | (1 << ST_CONN), @@ -125,8 +125,8 @@ /* State machine definition */ static struct osmo_fsm fsm = { .name = "A-CONNECTION", - .states = fsm_states, - .num_states = ARRAY_SIZE(fsm_states), + .states = fsm_bsc_reset_states, + .num_states = ARRAY_SIZE(fsm_bsc_reset_states), .log_subsys = DMSC, .timer_cb = fsm_reset_ack_timeout_cb, }; -- To view, visit https://gerrit.osmocom.org/4375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:39:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:39:54 +0000 Subject: [MERGED] openbsc[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/4608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 02:46:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 02:46:06 +0000 Subject: osmocom-bb[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: I'm not sure enough to merge. Can you verbally confirm that this is actually correct without updating a libosmocore contained within? -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:02:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:02:13 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4706/2/src/osmo_gsm_tester/suite.py File src/osmo_gsm_tester/suite.py: Line 378: return lac (add a blank line) -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:02:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:02:56 +0000 Subject: osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:05:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:05:39 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4704/3/src/osmo_gsm_tester/schema.py File src/osmo_gsm_tester/schema.py: Line 74: def uint16(val): (at some point, you know with those 65534 etc, it might be more useful to have a validator function returned as lambda from passed-in min,max range ... for now it's fine) -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:07:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:07:20 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Pau, if you've verified that it works, add a V+1 vote and go ahead... -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:08:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:08:50 +0000 Subject: osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I have no idea what this is doing, but it looks like you do -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:09:43 +0000 Subject: osmo-gsm-tester[master]: Rename module ofono_client as modem In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 finally :) -- To view, visit https://gerrit.osmocom.org/4709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:10:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:10:09 +0000 Subject: osmo-gsm-tester[master]: test.py: Remove unused parameter ofono_client in setup() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:11:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:11:11 +0000 Subject: osmo-gsm-tester[master]: Remove unused file bts_model.py In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 wow, what! gasp -- To view, visit https://gerrit.osmocom.org/4707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:15:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:15:11 +0000 Subject: osmo-gsm-tester[master]: Enable 2nd TRX In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4674/2/example/defaults.conf File example/defaults.conf: Line 52: - nominal_power: 23 Does this mean all octphy BTSs will have two TRXs configured, always? I mean ... it would be nice to kind of apply the defaults only if two TRXs are somehow requested... IOW, is it possible to add this second trx in the general bsc defaults instead, without making all BTSs everywhere have two TRXs in their configs? -- To view, visit https://gerrit.osmocom.org/4674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:18:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:18:40 +0000 Subject: osmo-gsm-manuals[master]: OsmoGsmTester: Put several permission categories under cat U... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:21:18 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/#/c/4669/1/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 70: File containing a set reserved resources by some osmo-gsm-tester add 'of' or remove 'a set'. s/some .. instance/any number of osmo-gsm-tester instances/ Line 80: osmo-gsm-tester processes running in parallel) can run without interfering each with each other -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 03:21:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 Nov 2017 03:21:39 +0000 Subject: [MERGED] libosmocore[master]: vty: deprecate now empty node commands In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: deprecate now empty node commands ...................................................................... vty: deprecate now empty node commands Following I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b a deprecation of vty_install_default() and install_default() commands is indicated. However, compiler warnings may clutter build output or even fail strict builds, hence I am submitting the deprecation in a separate patch. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: Icf5d83f641e838cebcccc635a043e94ba352abff --- M include/osmocom/vty/command.h 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 8fbdb7b..13d6e89 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -360,12 +360,12 @@ /* Prototypes. */ void install_node(struct cmd_node *, int (*)(struct vty *)); -void install_default(int node_type); +void install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()"); void install_element(int node_type, struct cmd_element *); void install_element_ve(struct cmd_element *cmd); void sort_node(void); -void vty_install_default(int node_type); +void vty_install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()"); /* Concatenates argv[shift] through argv[argc-1] into a single NUL-terminated string with a space between each element (allocated using -- To view, visit https://gerrit.osmocom.org/4052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf5d83f641e838cebcccc635a043e94ba352abff Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:05:51 +0000 Subject: osmocom-bb[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: "libosmocore within" is only used for the arm firmware in the target device, *not* for the host tools like layer23/firmware!! -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:06:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:06:12 +0000 Subject: osmo-msc[master]: examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4c5ec1046a3c7a916ecfb7e5aa83dfe2f5ea8bf Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:06:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:06:40 +0000 Subject: osmo-bsc[master]: osmo-bsc RESET FSM: use distinct struct names In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:12:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:12:41 +0000 Subject: osmo-bsc[master]: osmo-bsc: SCCP addrs: default only if unset, reject invalid In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4726 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:13:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:13:19 +0000 Subject: osmo-bsc[master]: osmo-bsc vty: be fatal for addressbook entry errors In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4727 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:15:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:15:42 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 1: As we already screwed up with the first attempt to merge a fix, I would rather not want to touch this code again unless we have a test case. -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:16:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:16:57 +0000 Subject: libosmo-sccp[master]: add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:17:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:17:21 +0000 Subject: libosmo-sccp[master]: sccp vty: be fatal for addressbook entry errors In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4725 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:17:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:17:25 +0000 Subject: [MERGED] libosmo-sccp[master]: sccp vty: be fatal for addressbook entry errors In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sccp vty: be fatal for addressbook entry errors ...................................................................... sccp vty: be fatal for addressbook entry errors So far, the config would log an error upon config parsing, and then continue to use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE to abort the program in a config parsing error. Be fatal for re-using an already defined addressbook entry in another cs7 instance, and for having a too long addressbook entry name. Though it is mixing in cosmetic changes, add "Error:" to the output and arrange the erratic name to the end of the message, as is customary for error messages. Related: osmo-bsc Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60 --- M src/osmo_ss7_vty.c 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 2c3d78e..890fec8 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1246,8 +1246,9 @@ const char *name = argv[0]; if (strlen(name) >= sizeof(entry->name)) { - vty_out(vty, "sccp address name to long!%s", VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: SCCP address name to long: '%s'%s", + name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Ensure that we do not use address names that @@ -1255,9 +1256,9 @@ entry = addr_entry_by_name_global(name); if (entry != NULL) { vty_out(vty, - "address name (%s) already used in ss7 instance %u%s", - entry->name, entry->inst->cfg.id, VTY_NEWLINE); - return CMD_WARNING; + "Error: SCCP address name already used in ss7 instance %u: '%s'%s", + entry->inst->cfg.id, entry->name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } entry = addr_entry_by_name_local(name, inst); -- To view, visit https://gerrit.osmocom.org/4725 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:17:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:17:26 +0000 Subject: [MERGED] libosmo-sccp[master]: add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_name() ...................................................................... add osmo_sccp_inst_addr_name(), a variant of osmo_sccp_addr_name() It can be cumbersome to derive the ss7 instance needed to pass to sccp_addr_name(), because struct osmo_sccp_instance is opaque and only available in sccp_internal.h, within libosmo-sccp. Add osmo_sccp_inst_addr_name() which derives the ss7 instance from the internal knowledge of the osmo_sccp_instance struct. This can save calls to osmo_ss7_instance_find() just to do some logging of an sccp address. Naming: first I thought to pick osmo_sccp_addr_name2(), but for some of the string composing functions, adding a 2 already means that it is identical but using a second static buffer (to be used twice within the same printf). Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b --- M include/osmocom/sigtran/sccp_helpers.h M src/sccp_helpers.c 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/sccp_helpers.h b/include/osmocom/sigtran/sccp_helpers.h index c2175f4..3ef7740 100644 --- a/include/osmocom/sigtran/sccp_helpers.h +++ b/include/osmocom/sigtran/sccp_helpers.h @@ -55,3 +55,4 @@ char *osmo_sccp_gt_dump(const struct osmo_sccp_gt *gt); char *osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr); char *osmo_sccp_addr_name(const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr); +char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr); diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 4b24392..f752e2a 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -324,3 +324,10 @@ return buf; } + +/* Derive ss7 from the sccp instance and call osmo_sccp_addr_name() with that. + * If sccp is passed as NULL, simply use the default point code format. */ +char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr) +{ + return osmo_sccp_addr_name(sccp? sccp->ss7 : NULL, addr); +} -- To view, visit https://gerrit.osmocom.org/4722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:43:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:43:16 +0000 Subject: osmo-bts[master]: octphy: override firmware version check In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 04:43:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 04:43:55 +0000 Subject: [MERGED] osmo-bts[master]: octphy: override firmware version check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octphy: override firmware version check ...................................................................... octphy: override firmware version check When osmo-bts detects a mismatch between the firmware of the DSP and the header version which it was compile with, a hard exit is performed. In some cases this may hinder debugging/testing things. Implement a commandline option to intentinally override the check. Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 --- M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/main.c 2 files changed, 24 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index d1d5bf6..a1c384a 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -52,6 +52,8 @@ #include #include +bool no_fw_check = 0; + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -1161,11 +1163,23 @@ "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s', ver_hdr='%s')\n", air->szName, air->szDescription, air->szVersion, ver_hdr); - /* Bail if dsp firmware does not match up the header version info */ + /* Check if the firmware version of the DSP matches the header files + * that were used to compile osmo-bts */ if (strcmp(air->szVersion, ver_hdr) != 0) { LOGP(DL1C, LOGL_ERROR, - "Invalid header-file / dsp-firmware combination, exiting...\n"); - exit(1); + "Invalid header-file-version / dsp-firmware-version combination\n"); + LOGP(DL1C, LOGL_ERROR, + "Expected firmware version: %s\n", ver_hdr); + LOGP(DL1C, LOGL_ERROR, + "Actual firmware version: %s\n", air->szVersion); + + if (!no_fw_check) { + LOGP(DL1C, LOGL_ERROR, + "use option -I to override the check (not recommened)\n"); + LOGP(DL1C, LOGL_ERROR, + "exiting...\n"); + exit(1); + } } talloc_replace(fl1h->info.app.name, fl1h, air->szName); diff --git a/src/osmo-bts-octphy/main.c b/src/osmo-bts-octphy/main.c index 0f4d0dd..928a4c8 100644 --- a/src/osmo-bts-octphy/main.c +++ b/src/osmo-bts-octphy/main.c @@ -51,9 +51,11 @@ #define RF_LOCK_PATH "/var/lock/bts_rf_lock" extern int pcu_direct; +extern bool no_fw_check; int bts_model_print_help() { + printf(" -I --no-fw-check Override firmware version check\n"); return 0; } @@ -65,15 +67,19 @@ int option_idx = 0, c; static const struct option long_options[] = { /* specific to this hardware */ + { "no-fw-check", 0, 0, 'I' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "", + c = getopt_long(argc, argv, "I", long_options, &option_idx); if (c == -1) break; switch (c) { + case 'I': + no_fw_check = true; + break; default: num_errors++; break; -- To view, visit https://gerrit.osmocom.org/4446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5774fbb29da832786326afb991014b9bd8b04b59 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:11:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:11:50 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 1: > As we already screwed up with the first attempt to merge a fix, I > would rather not want to touch this code again unless we have a > test case. Do you imply you don't want to merge this patch unless there's a test case? This new patch is not changing logic, as '\0' = 0x0 = NULL, so we should be on the safe side now to at least not add new breakage. -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:13:10 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:13:10 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4672/1/src/vty/command.c File src/vty/command.c: Line 1952: the end of the line. */ > (does anyone understand what the comment is trying to say about '?' -- it's I find it really confusing too. -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:13:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:13:40 +0000 Subject: osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:14:25 +0000 Subject: [MERGED] osmo-ci[master]: osmo-deps.sh: Force fetching git tags In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-deps.sh: Force fetching git tags ...................................................................... osmo-deps.sh: Force fetching git tags It was recently spotted, in a osmo-msc jenkins build, that an updated dependency (new commits to be fetched) contained a new tag which was not fetched with the commit. It resulted in the Makefile generating an old .version file, which ended up generating a library version in the .pc which later in the build make the configure script fail while checking at the dependencies. As far as I could understand after reading several discussion threads, it seems git fetch doesn't necessarily fetch and store locally all new tags found in the remote, and we need to explicitly add the --tags parameter to be sure all of them are downloaded. This patch adds a new fetch line instead of patching the one already present because it seems in old versions of git the --tags parameter had a different behaviour, in which only tags and not branches are fetched. This way is ensured that we get both correct regardless of git version. Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c --- M scripts/osmo-deps.sh 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: lynxis lazus: Looks good to me, but someone else must approve Pau Espin Pedrol: Verified Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index d5a724b..a4afec5 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -9,6 +9,7 @@ fi cd "$project" +git fetch --tags origin git fetch origin # Cleanup should already have happened during a global osmo-clean-workspace.sh, -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:23:58 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4706 to look at the new patch set (#3). Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M selftest/template_test.ok M selftest/template_test.py M selftest/template_test/osmo-nitb.cfg.tmpl M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 33 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/4706/3 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 5bd32a4..dcfacc2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -38,7 +38,7 @@ bts 0 type val_type_bts0 band val_band_bts0 - cell_identity 0 + cell_identity val_bts.cell_identity_bts0 location_area_code val_bts.location_area_code_bts0 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts0 @@ -82,7 +82,7 @@ bts 1 type val_type_bts1 band val_band_bts1 - cell_identity 0 + cell_identity val_bts.cell_identity_bts1 location_area_code val_bts.location_area_code_bts1 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 769df49..0c83632 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,6 +22,7 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'cell_identity': 'val_bts.cell_identity', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl b/selftest/template_test/osmo-nitb.cfg.tmpl index 2559b14..f1508ec 100644 --- a/selftest/template_test/osmo-nitb.cfg.tmpl +++ b/selftest/template_test/osmo-nitb.cfg.tmpl @@ -54,7 +54,7 @@ bts ${loop.index} type ${bts.type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None + cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None + cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None + cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -156,4 +159,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 9571131..1bacd38 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -213,6 +213,9 @@ def next_lac(self, origin): return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_cellid(self, origin): + return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 9f9421e..fc4930d 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -345,6 +345,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_cellid(self.cellid()) self.register_for_cleanup(bts) return bts @@ -376,6 +377,11 @@ self.log('using LAC', lac) return lac + def cellid(self): + cellid = self.resources_pool.next_cellid(self) + self.log('using CellId', cellid) + return cellid + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 14aa62d..d79bb2b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -44,7 +44,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index fbafc8e..803a375 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -37,7 +37,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:27:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:27:16 +0000 Subject: osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error In-Reply-To: References: Message-ID: Patch Set 1: > I have no idea what this is doing, but it looks like you do Yes, I did some tests and it works fine. I find it really difficult to find how to use the API of GLib/Gio in python in DBus related operations, as it seems some of the python symbols are not in /lib/python*/ but somehow magically generated/fetched from I guess C code. Fortunately I found the python API doc in https://people.gnome.org/~gcampagna/docs/Gio-2.0/index.html -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 09:38:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 09:38:00 +0000 Subject: osmo-gsm-tester[master]: Enable 2nd TRX In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4674/2/example/defaults.conf File example/defaults.conf: Line 52: - nominal_power: 23 > Does this mean all octphy BTSs will have two TRXs configured, always? I mea It indeed means all octphy BTS will have two TRX configured always. > IOW, is it possible to add this second trx in the general bsc defaults instead, without making all BTSs everywhere have two TRXs in their configs? It's not possible as per current implementation, because in conf_for_bsc we simply pass the overlay of all the trx_list configs, which means if one overlay level has 2 trx in the list, the final list will end up having 2 trx. It can be solved in 2 different ways: - Adding an extra "num_trx" attribute in config which specifies that only the first N trx from "trx_list" are to be used (and thus written in the config passed to the bsc). - Adding a BTS API set_num_trx() which sets self.num_trx and that is used to inficate that the first N trx from "trx_list" are to be used (and thus written in the config passed to the bsc). Actually, both are compatible. We may also want to add a BTS API to set TRX in "trx_list" from inside tests too. In any case, I'm not merging this patch for now as the octbts we have is failing to configure it. I pushed it as a showcase to continue work for later once we are able to configure the BTS with 2 TRX without failing. -- To view, visit https://gerrit.osmocom.org/4674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:05:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:05:31 +0000 Subject: osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:05:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:05:41 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Use unique incrementing value for BTS CellId ...................................................................... Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M selftest/template_test.ok M selftest/template_test.py M selftest/template_test/osmo-nitb.cfg.tmpl M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 33 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 5bd32a4..dcfacc2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -38,7 +38,7 @@ bts 0 type val_type_bts0 band val_band_bts0 - cell_identity 0 + cell_identity val_bts.cell_identity_bts0 location_area_code val_bts.location_area_code_bts0 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts0 @@ -82,7 +82,7 @@ bts 1 type val_type_bts1 band val_band_bts1 - cell_identity 0 + cell_identity val_bts.cell_identity_bts1 location_area_code val_bts.location_area_code_bts1 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 769df49..0c83632 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,6 +22,7 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'cell_identity': 'val_bts.cell_identity', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl b/selftest/template_test/osmo-nitb.cfg.tmpl index 2559b14..f1508ec 100644 --- a/selftest/template_test/osmo-nitb.cfg.tmpl +++ b/selftest/template_test/osmo-nitb.cfg.tmpl @@ -54,7 +54,7 @@ bts ${loop.index} type ${bts.type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None + cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None + cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None + cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -156,4 +159,7 @@ def set_lac(self, lac): self.lac = lac + def set_cellid(self, cellid): + self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 9571131..1bacd38 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -213,6 +213,9 @@ def next_lac(self, origin): return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_cellid(self, origin): + return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 9f9421e..fc4930d 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -345,6 +345,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_cellid(self.cellid()) self.register_for_cleanup(bts) return bts @@ -376,6 +377,11 @@ self.log('using LAC', lac) return lac + def cellid(self): + cellid = self.resources_pool.next_cellid(self) + self.log('using CellId', cellid) + return cellid + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 14aa62d..d79bb2b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -44,7 +44,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index fbafc8e..803a375 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -37,7 +37,7 @@ bts ${loop.index} type ${bts.osmobsc_bts_type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:05:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:05:41 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Use unique incrementing value for BTS LAC ...................................................................... Use unique incrementing value for BTS LAC Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 --- M example/defaults.conf M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py 7 files changed, 33 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..d555ab0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -28,7 +28,6 @@ authentication: optional bsc_bts: - location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index ae2e249..eb1092c 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -30,6 +30,7 @@ env = None pcu_sk_tmp_dir = None values = None + lac = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -158,6 +159,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -165,4 +168,7 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f53b8a3..731daa5 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -30,6 +30,7 @@ env = None trx = None pcu_sk_tmp_dir = None + lac = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -136,6 +137,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -143,6 +146,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e8ac7c2..03dc97e 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -29,6 +29,7 @@ remote_inst = None remote_env = None remote_dir = None + lac = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -143,6 +144,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -150,4 +153,7 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_lac(self, lac): + self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index ecafa2f..9571131 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -210,6 +210,8 @@ def next_msisdn(self, origin): return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) + def next_lac(self, origin): + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 9b142d3..a78bc63 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint16(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 65535: # 2^16 - 1 + raise ValueError('Value %d too big, max value is 65535' % n) + def times(val): n = int(val) if n < 1: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..9f9421e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -344,6 +344,7 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) + bts.set_lac(self.lac()) self.register_for_cleanup(bts) return bts @@ -370,6 +371,11 @@ self.log('using MSISDN', msisdn) return msisdn + def lac(self): + lac = self.resources_pool.next_lac(self) + self.log('using LAC', lac) + return lac + def poll(self): if self._processes: for process in self._processes: -- To view, visit https://gerrit.osmocom.org/4704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:05:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:05:41 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resource: Refactor next_msisdn to be more generic ...................................................................... resource: Refactor next_msisdn to be more generic The logic in next_msisdn can be later re-used for other purposes, such as getting different location area codes for BTS. Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 --- M src/osmo_gsm_tester/resource.py 1 file changed, 17 insertions(+), 15 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 25bb00f..ecafa2f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -38,7 +38,6 @@ USED_KEY = '_used' RESOURCES_CONF = 'resources.conf' -LAST_USED_MSISDN_FILE = 'last_used_msisdn.state' RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' @@ -189,24 +188,27 @@ if not self._remember_to_free: self.unregister_exit_handler() - def next_msisdn(self, origin): + def next_persistent_value(self, token, first_val, validate_func, inc_func, origin): origin_id = origin.origin_id() with self.state_dir.lock(origin_id): - msisdn_path = self.state_dir.child(LAST_USED_MSISDN_FILE) - log.ctx(msisdn_path) - last_msisdn = '1000' - if os.path.exists(msisdn_path): - if not os.path.isfile(msisdn_path): - raise RuntimeError('path should be a file but is not: %r' % msisdn_path) - with open(msisdn_path, 'r') as f: - last_msisdn = f.read().strip() - schema.msisdn(last_msisdn) + token_path = self.state_dir.child('last_used_%s.state' % token) + log.ctx(token_path) + last_value = first_val + if os.path.exists(token_path): + if not os.path.isfile(token_path): + raise RuntimeError('path should be a file but is not: %r' % token_path) + with open(token_path, 'r') as f: + last_value = f.read().strip() + validate_func(last_value) - next_msisdn = util.msisdn_inc(last_msisdn) - with open(msisdn_path, 'w') as f: - f.write(next_msisdn) - return next_msisdn + next_value = inc_func(last_value) + with open(token_path, 'w') as f: + f.write(next_value) + return next_value + + def next_msisdn(self, origin): + return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) class NoResourceExn(log.Error): -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:11:27 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:11:27 +0000 Subject: osmo-gsm-tester[master]: osmo-msc: Use mgw instead of mgcpgw in cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:11:28 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:11:28 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-msc: Use mgw instead of mgcpgw in cfg In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-msc: Use mgw instead of mgcpgw in cfg ...................................................................... osmo-msc: Use mgw instead of mgcpgw in cfg As of osmo-mgw 87203f2a3746d708f85ee75d978e2821bda58e6d, mgcpw commands are deprectated. Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 --- M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index 93c3a7c..665c151 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -81,7 +81,7 @@ return self.ip_address.get('addr') def conf_for_msc(self): - return dict(mgcpgw=dict(ip_address=self.ip_address)) + return dict(mgw=dict(ip_address=self.ip_address)) def running(self): return not self.process.terminated() diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 6851ea9..9ac68b3 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -20,7 +20,7 @@ cs7 instance 0 point-code 0.0.1 msc - mgcpgw remote-ip ${mgcpgw.ip_address.addr} + mgw remote-ip ${mgw.ip_address.addr} assign-tmsi cs7-instance-iu 0 cs7-instance-a 0 -- To view, visit https://gerrit.osmocom.org/4699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:12:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:12:07 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Improve handling of errors in dbus_call_dismiss_error ...................................................................... modem: Improve handling of errors in dbus_call_dismiss_error Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a --- M src/osmo_gsm_tester/modem.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index e8f57cc..bff62bb 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -145,11 +145,11 @@ def dbus_call_dismiss_error(log_obj, err_str, method): try: method() - except Exception as e: - if isinstance(e, GLib.Error) and err_str in e.domain: + except GLib.Error as e: + if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == err_str: log_obj.log('Dismissed Dbus method error: %r' % e) return - raise log.Error('dbus_call_dismiss_error raised error %r' % e) + raise e class ModemDbusInteraction(log.Origin): '''Work around inconveniences specific to pydbus and ofono. -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:12:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:12:07 +0000 Subject: [MERGED] osmo-gsm-tester[master]: test.py: Remove unused parameter ofono_client in setup() In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: test.py: Remove unused parameter ofono_client in setup() ...................................................................... test.py: Remove unused parameter ofono_client in setup() Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a --- M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/test.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index fc4930d..eead5af 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -91,7 +91,7 @@ log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) self.status = Test.UNKNOWN self.start_timestamp = time.time() - test.setup(self.suite_run, self, ofono_client, sys.modules[__name__], event_loop, sms) + test.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), self.path) diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index 49911b3..b939054 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -35,7 +35,7 @@ Timeout = None Sms = None -def setup(suite_run, _test, ofono_client, suite_module, event_module, sms_module): +def setup(suite_run, _test, suite_module, event_module, sms_module): global trial, suite, test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Timeout, Sms trial = suite_run.trial suite = suite_run -- To view, visit https://gerrit.osmocom.org/4708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:12:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:12:08 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Rename module ofono_client as modem In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Rename module ofono_client as modem ...................................................................... Rename module ofono_client as modem Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 --- R src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/modem.py similarity index 100% rename from src/osmo_gsm_tester/ofono_client.py rename to src/osmo_gsm_tester/modem.py diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 1bacd38..746aae0 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -27,7 +27,7 @@ from . import config from . import util from . import schema -from . import ofono_client +from . import modem from . import osmo_nitb from . import bts_sysmo, bts_osmotrx, bts_octphy diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index eead5af..4b33abc 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -23,7 +23,7 @@ import copy import traceback import pprint -from . import config, log, template, util, resource, schema, ofono_client, event_loop, esme, sms +from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms from . import osmo_nitb from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp from . import test @@ -352,9 +352,9 @@ def modem(self, specifics=None): conf = self.reserved_resources.get(resource.R_MODEM, specifics=specifics) self.dbg('create Modem object', conf=conf) - modem = ofono_client.Modem(conf) - self.register_for_cleanup(modem) - return modem + ms = modem.Modem(conf) + self.register_for_cleanup(ms) + return ms def modems(self, count): l = [] -- To view, visit https://gerrit.osmocom.org/4709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:12:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 10:12:08 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: Fallback to automatic registration if manual one is n... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Fallback to automatic registration if manual one is not supported by modem ...................................................................... modem: Fallback to automatic registration if manual one is not supported by modem Some modems such as the gobi 2000 doesn't support the Register() method in /operator path. If the method returns a NotSupported error, fallback to automatic registration. Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b --- M src/osmo_gsm_tester/modem.py 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index bff62bb..cb4a8de 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -502,7 +502,14 @@ return dbus_op = systembus_get(matching_op_path) self.log('Registering with operator', matching_op_path, mcc_mnc) - dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) + try: + dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) + except GLib.Error as e: + if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == 'org.ofono.Error.NotSupported': + self.log('modem does not support manual registering, attempting automatic registering') + self.scan_cb_register_automatic(scanned_operators, mcc_mnc) + return + raise e def cancel_pending_dbus_methods(self): self.cancellable.cancel() -- To view, visit https://gerrit.osmocom.org/4720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 10:39:40 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 10:39:40 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: replace memset() by simple for-loop In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4645/2/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: for (i = 0; i < value && i < sizeof(bar) - 1; i++) > you could just as well simply compute the length of the interval as a posit The main idea of this commit was to avoid a compiler warning related to possibility of calling memset with zero length argument, but seems I went a long way ;) I just found out a bit different way of solving this issue, so this change will be updated soon. -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:35:53 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:35:53 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4645 to look at the new patch set (#3). mobile/gsm322.c: prevent calling memset() with zero length This change prevents a possibility of calling memset() with constant zero length parameter, and the corresponding compiler warning. Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/45/4645/3 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..887a0ee 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,10 @@ else value -= min; + /* Prevent calling memset() with zero length */ + if (value == 0) + return ""; + memset(bar, '=', value); bar[value] = '\0'; -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:35:54 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:35:54 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run Message-ID: Review at https://gerrit.osmocom.org/4729 mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/4729/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 887a0ee..b1e0362 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value > 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:36:59 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:36:59 +0000 Subject: [ABANDON] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: host/mobile: use osmocom_ms as talloc context ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/2668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:38:37 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:38:37 +0000 Subject: [PATCH] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context Message-ID: Review at https://gerrit.osmocom.org/4730 host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6433d6e92d20a1a8e4944a758b26ebb48730866e --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/30/4730/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2481,7 +2479,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return NULL; ba->mcc = s->mcc; @@ -2523,7 +2521,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(cs->ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; ba->mcc = s->mcc; @@ -4093,7 +4091,7 @@ time(&now); - nb = talloc_zero(l23_ctx, struct gsm322_neighbour); + nb = talloc_zero(cs->ms, struct gsm322_neighbour); if (!nb) return 0; @@ -4423,8 +4421,8 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, - struct gsm48_sysinfo); + cs->list[cs->arfci].sysinfo = talloc_zero(ms, + struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); cs->si = cs->list[cs->arfci].sysinfo; @@ -4595,7 +4593,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -5074,7 +5072,7 @@ "stored BA list becomes obsolete.\n"); } else while(!feof(fp)) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; rc = fread(buf, 4, 1, fp); diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 38dfab0..d398c76 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -38,8 +38,6 @@ #include #include -extern void *l23_ctx; - static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); static int gsm48_rel_null_free(struct gsm_trans *trans); int mncc_release_ind(struct osmocom_ms *ms, struct gsm_trans *trans, diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 1e23942..7315927 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -252,13 +252,13 @@ } -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx) +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name) { struct mncc_sock_state *state; struct osmo_fd *bfd; int rc; - state = talloc_zero(tall_ctx, struct mncc_sock_state); + state = talloc_zero(inst, struct mncc_sock_state); if (!state) return NULL; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index d364ca3..b8c2558 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -32,7 +32,6 @@ #include #include -void *l23_ctx; static uint32_t new_callref = 1; static LLIST_HEAD(call_list); @@ -287,7 +286,7 @@ if (!call) { if (llist_empty(&call_list)) first_call = 1; - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; @@ -551,7 +550,7 @@ } } - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 455db50..d332a07 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -36,8 +36,6 @@ * if list is changed, the result is not written back to SIM */ //#define TEST_EMPTY_FPLMN -void *l23_ctx; - static void subscr_sim_query_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_update_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_key_cb(struct osmocom_ms *ms, struct msgb *msg); @@ -400,7 +398,7 @@ break; /* add to list */ - plmn = talloc_zero(l23_ctx, struct gsm_sub_plmn_list); + plmn = talloc_zero(ms, struct gsm_sub_plmn_list); if (!plmn) return -ENOMEM; lai[0] = data[0]; @@ -504,7 +502,7 @@ break; /* add to list */ - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; lai[0] = data[0]; @@ -1119,7 +1117,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden PLMNs " "(mcc=%s, mnc=%s)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc)); - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(subscr->ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; na->mcc = mcc; diff --git a/src/host/layer23/src/mobile/transaction.c b/src/host/layer23/src/mobile/transaction.c index 45bf2b4..9824bd1 100644 --- a/src/host/layer23/src/mobile/transaction.c +++ b/src/host/layer23/src/mobile/transaction.c @@ -30,8 +30,6 @@ #include #include -extern void *l23_ctx; - void _gsm48_cc_trans_free(struct gsm_trans *trans); void _gsm480_ss_trans_free(struct gsm_trans *trans); void _gsm411_sms_trans_free(struct gsm_trans *trans); @@ -67,7 +65,7 @@ { struct gsm_trans *trans; - trans = talloc_zero(l23_ctx, struct gsm_trans); + trans = talloc_zero(ms, struct gsm_trans); if (!trans) return NULL; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 0f27194..06f66b5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -43,8 +43,6 @@ #include #include -void *l23_ctx; - int mncc_call(struct osmocom_ms *ms, char *number); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); @@ -2104,7 +2102,7 @@ if (vty_check_number(vty, argv[1])) return CMD_WARNING; - abbrev = talloc_zero(l23_ctx, struct gsm_settings_abbrev); + abbrev = talloc_zero(ms, struct gsm_settings_abbrev); if (!abbrev) { vty_out(vty, "No Memory!%s", VTY_NEWLINE); return CMD_WARNING; -- To view, visit https://gerrit.osmocom.org/4730 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6433d6e92d20a1a8e4944a758b26ebb48730866e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:43:44 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:43:44 +0000 Subject: [ABANDON] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: host/mobile: use osmocom_ms as talloc context ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4730 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6433d6e92d20a1a8e4944a758b26ebb48730866e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 8 11:47:12 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 11:47:12 +0000 Subject: [PATCH] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context Message-ID: Review at https://gerrit.osmocom.org/4731 host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/31/4731/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2481,7 +2479,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return NULL; ba->mcc = s->mcc; @@ -2523,7 +2521,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(cs->ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; ba->mcc = s->mcc; @@ -4093,7 +4091,7 @@ time(&now); - nb = talloc_zero(l23_ctx, struct gsm322_neighbour); + nb = talloc_zero(cs->ms, struct gsm322_neighbour); if (!nb) return 0; @@ -4423,8 +4421,8 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, - struct gsm48_sysinfo); + cs->list[cs->arfci].sysinfo = talloc_zero(ms, + struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); cs->si = cs->list[cs->arfci].sysinfo; @@ -4595,7 +4593,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -5074,7 +5072,7 @@ "stored BA list becomes obsolete.\n"); } else while(!feof(fp)) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; rc = fread(buf, 4, 1, fp); diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 38dfab0..d398c76 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -38,8 +38,6 @@ #include #include -extern void *l23_ctx; - static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); static int gsm48_rel_null_free(struct gsm_trans *trans); int mncc_release_ind(struct osmocom_ms *ms, struct gsm_trans *trans, diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 1e23942..7315927 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -252,13 +252,13 @@ } -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx) +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name) { struct mncc_sock_state *state; struct osmo_fd *bfd; int rc; - state = talloc_zero(tall_ctx, struct mncc_sock_state); + state = talloc_zero(inst, struct mncc_sock_state); if (!state) return NULL; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index d364ca3..b8c2558 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -32,7 +32,6 @@ #include #include -void *l23_ctx; static uint32_t new_callref = 1; static LLIST_HEAD(call_list); @@ -287,7 +286,7 @@ if (!call) { if (llist_empty(&call_list)) first_call = 1; - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; @@ -551,7 +550,7 @@ } } - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 455db50..d332a07 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -36,8 +36,6 @@ * if list is changed, the result is not written back to SIM */ //#define TEST_EMPTY_FPLMN -void *l23_ctx; - static void subscr_sim_query_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_update_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_key_cb(struct osmocom_ms *ms, struct msgb *msg); @@ -400,7 +398,7 @@ break; /* add to list */ - plmn = talloc_zero(l23_ctx, struct gsm_sub_plmn_list); + plmn = talloc_zero(ms, struct gsm_sub_plmn_list); if (!plmn) return -ENOMEM; lai[0] = data[0]; @@ -504,7 +502,7 @@ break; /* add to list */ - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; lai[0] = data[0]; @@ -1119,7 +1117,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden PLMNs " "(mcc=%s, mnc=%s)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc)); - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(subscr->ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; na->mcc = mcc; diff --git a/src/host/layer23/src/mobile/transaction.c b/src/host/layer23/src/mobile/transaction.c index 45bf2b4..9824bd1 100644 --- a/src/host/layer23/src/mobile/transaction.c +++ b/src/host/layer23/src/mobile/transaction.c @@ -30,8 +30,6 @@ #include #include -extern void *l23_ctx; - void _gsm48_cc_trans_free(struct gsm_trans *trans); void _gsm480_ss_trans_free(struct gsm_trans *trans); void _gsm411_sms_trans_free(struct gsm_trans *trans); @@ -67,7 +65,7 @@ { struct gsm_trans *trans; - trans = talloc_zero(l23_ctx, struct gsm_trans); + trans = talloc_zero(ms, struct gsm_trans); if (!trans) return NULL; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 0f27194..06f66b5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -43,8 +43,6 @@ #include #include -void *l23_ctx; - int mncc_call(struct osmocom_ms *ms, char *number); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); @@ -2104,7 +2102,7 @@ if (vty_check_number(vty, argv[1])) return CMD_WARNING; - abbrev = talloc_zero(l23_ctx, struct gsm_settings_abbrev); + abbrev = talloc_zero(ms, struct gsm_settings_abbrev); if (!abbrev) { vty_out(vty, "No Memory!%s", VTY_NEWLINE); return CMD_WARNING; -- To view, visit https://gerrit.osmocom.org/4731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 13:41:02 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 13:41:02 +0000 Subject: [PATCH] osmo-bsc[master]: doc: add example configuration for osmo-mgw Message-ID: Review at https://gerrit.osmocom.org/4732 doc: add example configuration for osmo-mgw osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf --- M doc/examples/osmo-bsc/osmo-bsc.cfg 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/4732/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index efa27ec..82d0ea1 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -102,6 +102,9 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden + mgcpgw remote-ip 127.0.0.1 + mgcpgw remote-port 2428 + mgcpgw endpoint-range 1 31 bsc mid-call-timeout 0 no missing-msc-text -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 13:54:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 13:54:39 +0000 Subject: osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4732/1/doc/examples/osmo-bsc/osmo-bsc.cfg File doc/examples/osmo-bsc/osmo-bsc.cfg: Line 105: mgcpgw remote-ip 127.0.0.1 Deprecated, better use "mgw". -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 14:20:57 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 Nov 2017 14:20:57 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories Message-ID: Review at https://gerrit.osmocom.org/4733 mobile: Do not exclude DGPS from the list of default categories I don't remember why we parse the categories like this. First if the mobile doesn't use a subsystem there is no harm to have it enabled, second the default levels can be adjusted for all apps and third we have the VTY to reconfigure these logging targets. Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce --- M src/host/layer23/src/mobile/main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/4733/1 diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 997e2d5..91ed341 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 8 14:20:58 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 Nov 2017 14:20:58 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app Message-ID: Review at https://gerrit.osmocom.org/4734 mobile: Make VTY logging commands available to the mobile app So far logging_vty_add_cmds wasn't called. The main.c might be shared with other apps so place it into the routine that is setting up the VTY. Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 --- M src/host/layer23/src/mobile/app_mobile.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/4734/1 diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..ba5315f 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -398,6 +399,7 @@ vty_info.tall_ctx = l23_ctx; vty_init(&vty_info); + logging_vty_add_cmds(NULL); ms_vty_init(); dummy_conn.priv = NULL; vty_reading = 1; -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 8 14:21:22 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 Nov 2017 14:21:22 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Search for lua5.3 and link to it Message-ID: Review at https://gerrit.osmocom.org/4735 mobile: Search for lua5.3 and link to it I will be adding a high-level async scripting interface to the mobile application. The initial implementation will use Lua 5.3. This version was released in January 2015 and is the latest version at the time the commit was made. Lua as extension and extensible language seems well suited for scripting. The plan is to attach a script to a ms and be able to trigger high level operations (send SMS, attach to network, detach). Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb --- M src/host/layer23/configure.ac M src/host/layer23/src/mobile/Makefile.am 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/35/4735/1 diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index de26d23..a5938c7 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -21,6 +21,13 @@ AC_SUBST([LIBGPS_LIBS]) +dnl optional dependencies +PKG_CHECK_MODULES(LIBLUA, lua53, [ + WITH_LUA=1], [ + WITH_LUA=0]) +AC_SUBST([WITH_LUA]) +AM_CONDITIONAL([BUILD_LUA], test "x$WITH_LUA" = "x1") + dnl checks for header files AC_HEADER_STDC diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..70f7aed 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) -LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) $(LIBLUA_CFLAGS) +LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) $(LIBLUA_LIBS) noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ -- To view, visit https://gerrit.osmocom.org/4735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 8 14:21:22 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 Nov 2017 14:21:22 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add LUA as debug category to the applications Message-ID: Review at https://gerrit.osmocom.org/4736 mobile: Add LUA as debug category to the applications Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/main.c 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/4736/1 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 3efa57a..e96bdc0 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -22,6 +22,7 @@ DSUM, DSIM, DGPS, + DLUA, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index d8fd076..ce3af2c 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -127,6 +127,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DLUA] = { + .name = "DLUA", + .description = "LUA", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 91ed341..848be6e 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 8 14:21:22 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 Nov 2017 14:21:22 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support Message-ID: Review at https://gerrit.osmocom.org/4737 mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 223 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/1 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 9b544ab..ed05a8b 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -77,6 +77,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 6162a38..69a49b3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -13,5 +13,8 @@ int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct vty *vty, struct osmocom_ms *ms); + #endif diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 70f7aed..50ced6c 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..1cf9050 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *state) +{ + lua_getglobal(state, "_G"); + luaL_setfuncs(state, global_runtime, 0); + lua_pop(state, 1); +} + +static void add_runtime(lua_State *state, struct osmocom_ms *ms) +{ + add_globals(state); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct vty *vty, struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..4594e64 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct vty *vty, struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 0f27194..708670e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1533,6 +1533,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2757,6 +2759,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(vty, ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2951,6 +2977,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 8 15:26:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 15:26:03 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands Message-ID: Review at https://gerrit.osmocom.org/4738 cosmetic: remove prefix "net" from rtp related vty commands There the prefix "net" is a leftover from the time when there was a bts and a net side. Now we do not distinguish anymore between the two. remove prefix "net" Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/38/4738/1 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..2c8c6cc 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -67,11 +67,11 @@ vty_out(vty, " local ip %s%s", g_cfg->local_ip, VTY_NEWLINE); vty_out(vty, " bind ip %s%s", g_cfg->source_addr, VTY_NEWLINE); vty_out(vty, " bind port %u%s", g_cfg->source_port, VTY_NEWLINE); - vty_out(vty, " rtp net-range %u %u%s", + vty_out(vty, " rtp port-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr) - vty_out(vty, " rtp net-bind-ip %s%s", + vty_out(vty, " rtp bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr_probe) vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); @@ -292,9 +292,9 @@ #define RANGE_START_STR "Start of the range of ports\n" #define RANGE_END_STR "End of the range of ports\n" -DEFUN(cfg_mgcp_rtp_net_range, - cfg_mgcp_rtp_net_range_cmd, - "rtp net-range <0-65534> <0-65534>", +DEFUN(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_port_range_cmd, + "rtp port-range <0-65534> <0-65534>", RTP_STR "Range of ports to use for the NET side\n" RANGE_START_STR RANGE_END_STR) { @@ -302,18 +302,18 @@ return CMD_SUCCESS; } -DEFUN(cfg_mgcp_rtp_net_bind_ip, - cfg_mgcp_rtp_net_bind_ip_cmd, - "rtp net-bind-ip A.B.C.D", +DEFUN(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_bind_ip_cmd, + "rtp bind-ip A.B.C.D", RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { osmo_talloc_replace_string(g_cfg, &g_cfg->net_ports.bind_addr, argv[0]); return CMD_SUCCESS; } -DEFUN(cfg_mgcp_rtp_no_net_bind_ip, - cfg_mgcp_rtp_no_net_bind_ip_cmd, - "no rtp net-bind-ip", +DEFUN(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_bind_ip_cmd, + "no rtp bind-ip", NO_STR RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { @@ -1180,9 +1180,9 @@ install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_early_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_port_range_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 15:26:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 15:26:03 +0000 Subject: [PATCH] osmo-mgw[master]: doc: update sample config file Message-ID: Review at https://gerrit.osmocom.org/4739 doc: update sample config file The current example configuration is out of date. Add a recent configuration file Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 --- M doc/examples/osmo-mgw/osmo-mgw.cfg 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/39/4739/1 diff --git a/doc/examples/osmo-mgw/osmo-mgw.cfg b/doc/examples/osmo-mgw/osmo-mgw.cfg index d8ea3a5..3057369 100644 --- a/doc/examples/osmo-mgw/osmo-mgw.cfg +++ b/doc/examples/osmo-mgw/osmo-mgw.cfg @@ -2,12 +2,17 @@ ! MGCP configuration example ! mgcp - !local ip 10.23.24.2 - !bts ip 10.24.24.1 - !bind ip 10.23.24.1 - bind port 2427 - rtp force-ptime 20 - sdp audio payload number 98 - sdp audio payload name AMR/8000 - number endpoints 31 - no rtcp-omit + bind ip 127.0.0.1 + rtp port-range 4002 16000 + rtp bind-ip 10.9.1.122 + rtp ip-probing + rtp ip-tos 184 + bind port 2427 + sdp audio payload number 98 + sdp audio payload name GSM + number endpoints 31 + loop 0 + force-realloc 1 + rtcp-omit + rtp-patch ssrc + rtp-patch timestamp -- To view, visit https://gerrit.osmocom.org/4739 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 15:45:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 15:45:51 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix abort on big RTP packet received Message-ID: Review at https://gerrit.osmocom.org/4740 l1sap: Fix abort on big RTP packet received Recently while testing new osmo-mgw, big RTP packets (around 4K bytes, see OS#2625 for more info), were being received on the BTS, which was aborting with the following message: "msgb(0xff208): Not enough tailroom msgb_put (348 < 1488)" The crash can be reproduced in a sysmobts as well as on my PC locally with osmo-bts-trx. I used osmo-bts-trx to test that the patch solved the abort. Fixes: OS#2624 Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 --- M src/common/l1sap.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/4740/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ebcfd2f..c388c82 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -117,7 +117,9 @@ * in front and behind data pointer */ struct msgb *l1sap_msgb_alloc(unsigned int l2_len) { - struct msgb *msg = msgb_alloc_headroom(512, 128, "l1sap_prim"); + int headroom = 128; + int size = headroom + sizeof(struct osmo_phsap_prim) + l2_len; + struct msgb *msg = msgb_alloc_headroom(size, headroom, "l1sap_prim"); if (!msg) return NULL; -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 15:58:11 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 15:58:11 +0000 Subject: [PATCH] osmo-mgw[master]: network: fix rtp packet length Message-ID: Review at https://gerrit.osmocom.org/4741 network: fix rtp packet length When sending rtp packets sizeof(buf) is used as length. This causes all RTP packets to be the size of the buffer (4096) containing the rtp payload and random excess data from previoes memory usage Use the actual length of the received RTP data, rather then the full buffer size. Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/41/4741/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..28d1fed 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1054,7 +1054,7 @@ char buf[RTP_BUF_SIZE]; int proto; - int rc; + int len; conn_src = (struct mgcp_conn_rtp *)fd->data; OSMO_ASSERT(conn_src); @@ -1065,20 +1065,20 @@ ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ - rc = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); - if (rc < 0) + len = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); + if (len < 0) return -1; /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { return mgcp_send_rtp(proto, &addr, buf, - sizeof(buf), conn_src, conn_src); + len, conn_src, conn_src); } /* Execute endpoint specific implementation that handles the * dispatching of the RTP data */ - return endp->type->dispatch_rtp_cb(proto, &addr, buf, sizeof(buf), + return endp->type->dispatch_rtp_cb(proto, &addr, buf, len, conn_src->conn); } -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 16:05:29 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 16:05:29 +0000 Subject: osmo-mgw[master]: network: fix rtp packet length In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4741/1//COMMIT_MSG Commit Message: Line 11: rtp payload and random excess data from previoes memory usage previoes->previous -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 16:12:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 16:12:17 +0000 Subject: osmo-mgw[master]: network: fix rtp packet length In-Reply-To: References: Message-ID: Patch Set 1: I tested this patch in my setup which showed the issue, and after applying the patch the issue is gone -> it works. -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 17:35:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 17:35:18 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: remove distracting newline Message-ID: Review at https://gerrit.osmocom.org/4742 cosmetic: remove distracting newline Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db --- M include/osmocom/bsc/osmo_bsc_mgcp.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/4742/1 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index ddcba0f..dd26d40 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -31,7 +31,6 @@ /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; - struct osmo_bsc_sccp_con *conn; enum gsm48_chan_mode chan_mode; bool full_rate; -- To view, visit https://gerrit.osmocom.org/4742 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 17:35:19 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 17:35:19 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: reorder case list Message-ID: Review at https://gerrit.osmocom.org/4743 cosmetic: reorder case list the switch statement in fsm_send_assignment_complete() has the default case at the beginning. Move the default case to the end to match common coding style rules Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/4743/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index a7b6b41..f4acc39 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -575,11 +575,11 @@ get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { + case EV_CRCX_NET_RESP: + break; default: handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); return; - case EV_CRCX_NET_RESP: - break; } lchan = mgcp_ctx->lchan; -- To view, visit https://gerrit.osmocom.org/4743 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 17:35:19 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 17:35:19 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: replace term MGCP-GW with MGW Message-ID: Review at https://gerrit.osmocom.org/4744 cosmetic: replace term MGCP-GW with MGW The term MGCP-GW is deprecated, use now MGW Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/4744/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f4acc39..3115422 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -469,7 +469,7 @@ /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE * parser/generator uses sockaddr_storage for the AoIP transport - * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { @@ -872,7 +872,7 @@ mgcp_ctx->resp = NULL; if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { - /* Note: We were unable to communicate with the MGCP-GW, + /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); @@ -886,7 +886,7 @@ } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) /* Note: If the logic that controls the BSS is unable to * negotiate a connection, we presumably still have a - * working connection to the MGCP-GW, we will try to + * working connection to the MGW, we will try to * shut down gracefully. */ handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); else { @@ -949,7 +949,7 @@ }, /* When the call ends, remove all RTP connections from the - * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * MGW by sending a wildcarded DLCX. In case of a handover, * go for an extra MDCX to update the connection and land in * this state again when done. */ [ST_CALL] = { @@ -969,7 +969,7 @@ .action = fsm_complete_handover, }, - /* When the MGCP_GW confirms that the connections are terminated, + /* When the MGW confirms that the connections are terminated, * then halt the state machine. */ [ST_HALT] = { .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), @@ -989,7 +989,7 @@ }; /* Notify that the a new call begins. This will create a connection for the - * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * BTS on the MGW and set up the port numbers in struct osmo_bsc_sccp_con. * After that gsm0808_assign_req() to proceed. * Parameter: * ctx: talloc context @@ -1037,7 +1037,7 @@ return mgcp_ctx; } -/* Notify that the call has ended, remove all connections from the MGCP-GW, +/* Notify that the call has ended, remove all connections from the MGW, * then send the clear complete message and destroy the FSM instance * Parameter: * mgcp_ctx: context information (FSM, and pointer to external system data) -- To view, visit https://gerrit.osmocom.org/4744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 17:35:20 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 17:35:20 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: add missing out state Message-ID: Review at https://gerrit.osmocom.org/4745 mgcp: add missing out state Even in the very early ST_CRCX_BTS phase, the error handler may decide to go to ST_CALL in order to initate the termination of a possibly half open connection. Add ST_CALL to the out state list in ST_CRCX_BTS Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/4745/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 3115422..aa008a8 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -903,7 +903,7 @@ /* Startup state machine, send CRCX to BTS. */ [ST_CRCX_BTS] = { .in_event_mask = (1 << EV_INIT), - .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_PROC), .name = "ST_CRCX_BTS", .action = fsm_crcx_bts_cb, }, -- To view, visit https://gerrit.osmocom.org/4745 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 17:35:20 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 8 Nov 2017 17:35:20 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: remove unused variable Message-ID: Review at https://gerrit.osmocom.org/4746 mgcp: remove unused variable The function handle_error asserts mgcp_ctx->conn to be non null, but it does not access it otherwise. remove unused variable conn Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/4746/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index aa008a8..f0c31df 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -151,12 +151,8 @@ static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) { struct osmo_fsm_inst *fi; - struct osmo_bsc_sccp_con *conn; OSMO_ASSERT(mgcp_ctx); - conn = mgcp_ctx->conn; - OSMO_ASSERT(conn); - fi = mgcp_ctx->fsm; OSMO_ASSERT(fi); -- To view, visit https://gerrit.osmocom.org/4746 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:00:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:00:47 +0000 Subject: osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I think this is complete legacy and results from a time when there was no VTY interface to configure log levels yet. So all of this could probably disappear. -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:01:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:01:21 +0000 Subject: osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: laforge Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:01:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:01:44 +0000 Subject: osmocom-bb[master]: mobile: Search for lua5.3 and link to it In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:01:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:01:58 +0000 Subject: osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:04:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:04:10 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 no issues from my side, but I think it might make sense to keep this out of master until we see some users to validate that the current approach really can be useful this way? -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:05:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:05:22 +0000 Subject: osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:05:51 +0000 Subject: osmo-bsc[master]: cosmetic: remove distracting newline In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4742 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:06:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:06:17 +0000 Subject: osmo-bsc[master]: cosmetic: reorder case list In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4743 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:06:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:06:29 +0000 Subject: osmo-bsc[master]: cosmetic: replace term MGCP-GW with MGW In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:06:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:06:48 +0000 Subject: osmo-bsc[master]: mgcp: add missing out state In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4745 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:06:58 +0000 Subject: osmo-bsc[master]: mgcp: remove unused variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4746 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:08:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:08:01 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:08:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:08:45 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4729/1/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: OSMO_ASSERT(value > 0 && value < 128); if you assert > 0 here, the "== 0" below will never be used. Sure you didn't mean >= 0? -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:11:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:11:33 +0000 Subject: osmo-bts[master]: l1sap: Fix abort on big RTP packet received In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:11:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:11:59 +0000 Subject: osmo-mgw[master]: network: fix rtp packet length In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:12:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:12:02 +0000 Subject: [MERGED] osmo-mgw[master]: network: fix rtp packet length In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: network: fix rtp packet length ...................................................................... network: fix rtp packet length When sending rtp packets sizeof(buf) is used as length. This causes all RTP packets to be the size of the buffer (4096) containing the rtp payload and random excess data from previoes memory usage Use the actual length of the received RTP data, rather then the full buffer size. Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..28d1fed 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1054,7 +1054,7 @@ char buf[RTP_BUF_SIZE]; int proto; - int rc; + int len; conn_src = (struct mgcp_conn_rtp *)fd->data; OSMO_ASSERT(conn_src); @@ -1065,20 +1065,20 @@ ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ - rc = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); - if (rc < 0) + len = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); + if (len < 0) return -1; /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { return mgcp_send_rtp(proto, &addr, buf, - sizeof(buf), conn_src, conn_src); + len, conn_src, conn_src); } /* Execute endpoint specific implementation that handles the * dispatching of the RTP data */ - return endp->type->dispatch_rtp_cb(proto, &addr, buf, sizeof(buf), + return endp->type->dispatch_rtp_cb(proto, &addr, buf, len, conn_src->conn); } -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:12:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:12:53 +0000 Subject: osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 what about existing config files? We need compatibility alieses to be able to still parse old config files, right? Think of osmo-gsm-testers or users of the debian packages. -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:13:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:13:08 +0000 Subject: osmo-mgw[master]: doc: update sample config file In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4739 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:14:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 19:14:06 +0000 Subject: [MERGED] osmo-mgw[master]: network: remove unused return code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: network: remove unused return code ...................................................................... network: remove unused return code The function that forwards the tapped (voice ebug) traffic returns its status (sendto) to the caller. However, none of the callers seem need this info. Remove the return code and print an error message on failure Fixes: Coverity CID#178666 Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 12 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 28d1fed..d51b829 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -627,14 +627,20 @@ /* Forward data to a debug tap. This is debug function that is intended for * debugging the voice traffic with tools like gstreamer */ -static int forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, - int len) +static void forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, + int len) { - if (!tap->enabled) - return 0; + int rc; - return sendto(fd, buf, len, 0, - (struct sockaddr *)&tap->forward, sizeof(tap->forward)); + if (!tap->enabled) + return; + + rc = sendto(fd, buf, len, 0, (struct sockaddr *)&tap->forward, + sizeof(tap->forward)); + + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, + "Forwarding tapped (debug) voice data failed.\n"); } /*! Send RTP/RTCP data to a specified destination connection. -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:14:44 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 19:14:44 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4729/1/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: OSMO_ASSERT(value > 0 && value < 128); > if you assert > 0 here, the "== 0" below will never be used. Sure you didn Ah, sure, my bad... Thanks :) -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:15:57 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 19:15:57 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4729 to look at the new patch set (#2). mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/4729/2 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 887a0ee..5a0400e 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value >= 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:16:53 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 Nov 2017 19:16:53 +0000 Subject: [MERGED] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: host/mobile: use osmocom_ms as talloc context ...................................................................... host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2481,7 +2479,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return NULL; ba->mcc = s->mcc; @@ -2523,7 +2521,7 @@ /* find or create ba list */ ba = gsm322_find_ba_list(cs, s->mcc, s->mnc); if (!ba) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(cs->ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; ba->mcc = s->mcc; @@ -4093,7 +4091,7 @@ time(&now); - nb = talloc_zero(l23_ctx, struct gsm322_neighbour); + nb = talloc_zero(cs->ms, struct gsm322_neighbour); if (!nb) return 0; @@ -4423,8 +4421,8 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, - struct gsm48_sysinfo); + cs->list[cs->arfci].sysinfo = talloc_zero(ms, + struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); cs->si = cs->list[cs->arfci].sysinfo; @@ -4595,7 +4593,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -5074,7 +5072,7 @@ "stored BA list becomes obsolete.\n"); } else while(!feof(fp)) { - ba = talloc_zero(l23_ctx, struct gsm322_ba_list); + ba = talloc_zero(ms, struct gsm322_ba_list); if (!ba) return -ENOMEM; rc = fread(buf, 4, 1, fp); diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 38dfab0..d398c76 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -38,8 +38,6 @@ #include #include -extern void *l23_ctx; - static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); static int gsm48_rel_null_free(struct gsm_trans *trans); int mncc_release_ind(struct osmocom_ms *ms, struct gsm_trans *trans, diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 1e23942..7315927 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -252,13 +252,13 @@ } -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx) +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name) { struct mncc_sock_state *state; struct osmo_fd *bfd; int rc; - state = talloc_zero(tall_ctx, struct mncc_sock_state); + state = talloc_zero(inst, struct mncc_sock_state); if (!state) return NULL; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index d364ca3..b8c2558 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -32,7 +32,6 @@ #include #include -void *l23_ctx; static uint32_t new_callref = 1; static LLIST_HEAD(call_list); @@ -287,7 +286,7 @@ if (!call) { if (llist_empty(&call_list)) first_call = 1; - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; @@ -551,7 +550,7 @@ } } - call = talloc_zero(l23_ctx, struct gsm_call); + call = talloc_zero(ms, struct gsm_call); if (!call) return -ENOMEM; call->ms = ms; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 455db50..d332a07 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -36,8 +36,6 @@ * if list is changed, the result is not written back to SIM */ //#define TEST_EMPTY_FPLMN -void *l23_ctx; - static void subscr_sim_query_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_update_cb(struct osmocom_ms *ms, struct msgb *msg); static void subscr_sim_key_cb(struct osmocom_ms *ms, struct msgb *msg); @@ -400,7 +398,7 @@ break; /* add to list */ - plmn = talloc_zero(l23_ctx, struct gsm_sub_plmn_list); + plmn = talloc_zero(ms, struct gsm_sub_plmn_list); if (!plmn) return -ENOMEM; lai[0] = data[0]; @@ -504,7 +502,7 @@ break; /* add to list */ - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; lai[0] = data[0]; @@ -1119,7 +1117,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden PLMNs " "(mcc=%s, mnc=%s)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc)); - na = talloc_zero(l23_ctx, struct gsm_sub_plmn_na); + na = talloc_zero(subscr->ms, struct gsm_sub_plmn_na); if (!na) return -ENOMEM; na->mcc = mcc; diff --git a/src/host/layer23/src/mobile/transaction.c b/src/host/layer23/src/mobile/transaction.c index 45bf2b4..9824bd1 100644 --- a/src/host/layer23/src/mobile/transaction.c +++ b/src/host/layer23/src/mobile/transaction.c @@ -30,8 +30,6 @@ #include #include -extern void *l23_ctx; - void _gsm48_cc_trans_free(struct gsm_trans *trans); void _gsm480_ss_trans_free(struct gsm_trans *trans); void _gsm411_sms_trans_free(struct gsm_trans *trans); @@ -67,7 +65,7 @@ { struct gsm_trans *trans; - trans = talloc_zero(l23_ctx, struct gsm_trans); + trans = talloc_zero(ms, struct gsm_trans); if (!trans) return NULL; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 0f27194..06f66b5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -43,8 +43,6 @@ #include #include -void *l23_ctx; - int mncc_call(struct osmocom_ms *ms, char *number); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); @@ -2104,7 +2102,7 @@ if (vty_check_number(vty, argv[1])) return CMD_WARNING; - abbrev = talloc_zero(l23_ctx, struct gsm_settings_abbrev); + abbrev = talloc_zero(ms, struct gsm_settings_abbrev); if (!abbrev) { vty_out(vty, "No Memory!%s", VTY_NEWLINE); return CMD_WARNING; -- To view, visit https://gerrit.osmocom.org/4731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 8 19:26:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 Nov 2017 19:26:00 +0000 Subject: [MERGED] osmo-bts[master]: l1sap: Fix abort on big RTP packet received In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: l1sap: Fix abort on big RTP packet received ...................................................................... l1sap: Fix abort on big RTP packet received Recently while testing new osmo-mgw, big RTP packets (around 4K bytes, see OS#2625 for more info), were being received on the BTS, which was aborting with the following message: "msgb(0xff208): Not enough tailroom msgb_put (348 < 1488)" The crash can be reproduced in a sysmobts as well as on my PC locally with osmo-bts-trx. I used osmo-bts-trx to test that the patch solved the abort. Fixes: OS#2624 Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 --- M src/common/l1sap.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ebcfd2f..c388c82 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -117,7 +117,9 @@ * in front and behind data pointer */ struct msgb *l1sap_msgb_alloc(unsigned int l2_len) { - struct msgb *msg = msgb_alloc_headroom(512, 128, "l1sap_prim"); + int headroom = 128; + int size = headroom + sizeof(struct osmo_phsap_prim) + l2_len; + struct msgb *msg = msgb_alloc_headroom(size, headroom, "l1sap_prim"); if (!msg) return NULL; -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter From admin at opensuse.org Wed Nov 8 20:06:17 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:06:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a0363eec6589_21cc838f888019f0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 74s] #define HAVE_MEMORY_H 1 [ 74s] #define HAVE_STRINGS_H 1 [ 74s] #define HAVE_INTTYPES_H 1 [ 74s] #define HAVE_STDINT_H 1 [ 74s] #define HAVE_UNISTD_H 1 [ 74s] #define HAVE_DLFCN_H 1 [ 74s] #define LT_OBJDIR ".libs/" [ 74s] [ 74s] configure: exit 1 [ 74s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 74s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 74s] make[1]: *** [override_dh_auto_configure] Error 2 [ 74s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 74s] [ 66.192216] serial8250: too much work for irq4 [ 74s] [ 66.284152] serial8250: too much work for irq4 [ 74s] debian/rules:45: recipe for target 'build' failed [ 74s] make: *** [build] Error 2 [ 74s] [ 66.368150] serial8250: too much work for irq4 [ 74s] [ 66.456091] serial8250: too much work for irq4 [ 74s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 74s] [ 74s] lamb20 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:06 UTC 2017. [ 74s] [ 74s] ### VM INTERACTION START ### [ 77s] [ 69.726997] reboot: Power down [ 77s] ### VM INTERACTION END ### [ 77s] [ 77s] lamb20 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:09 UTC 2017. [ 77s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:06:17 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:06:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a0363ee6ea87_21cc838f8880189a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 77s] #define HAVE_SYS_TYPES_H 1 [ 77s] #define HAVE_SYS_STAT_H 1 [ 77s] #define HAVE_STDLIB_H 1 [ 77s] #define HAVE_STRING_H 1 [ 77s] #define HAVE_MEMORY_H 1 [ 77s] #define HAVE_STRINGS_H 1 [ 77s] #define HAVE_INTTYPES_H 1 [ 77s] #define HAVE_STDINT_H 1 [ 77s] #define HAVE_UNISTD_H 1 [ 77s] #define HAVE_DLFCN_H 1 [ 77s] #define LT_OBJDIR ".libs/" [ 77s] [ 77s] configure: exit 1 [ 77s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 77s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 77s] make[1]: *** [override_dh_auto_configure] Error 2 [ 77s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 77s] debian/rules:45: recipe for target 'build' failed [ 77s] make: *** [build] Error 2 [ 77s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 77s] [ 77s] lamb07 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:03 UTC 2017. [ 77s] [ 77s] ### VM INTERACTION START ### [ 80s] [ 73.704088] reboot: Power down [ 80s] ### VM INTERACTION END ### [ 80s] [ 80s] lamb07 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:06 UTC 2017. [ 80s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:07:59 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:07:59 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a036432e1201_21cc838f888022f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 92s] #define HAVE_SYS_STAT_H 1 [ 92s] #define HAVE_STDLIB_H 1 [ 92s] #define HAVE_STRING_H 1 [ 92s] #define HAVE_MEMORY_H 1 [ 92s] #define HAVE_STRINGS_H 1 [ 92s] #define HAVE_INTTYPES_H 1 [ 92s] #define HAVE_STDINT_H 1 [ 92s] #define HAVE_UNISTD_H 1 [ 92s] #define HAVE_DLFCN_H 1 [ 92s] #define LT_OBJDIR ".libs/" [ 92s] [ 92s] configure: exit 1 [ 92s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 92s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 92s] make[1]: *** [override_dh_auto_configure] Error 255 [ 92s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 92s] debian/rules:45: recipe for target 'build' failed [ 92s] make: *** [build] Error 2 [ 92s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 92s] [ 92s] lamb26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:55 UTC 2017. [ 92s] [ 92s] ### VM INTERACTION START ### [ 93s] Powering off. [ 93s] [ 86.035335] reboot: Power down [ 93s] ### VM INTERACTION END ### [ 93s] [ 93s] lamb26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:57 UTC 2017. [ 93s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:07:59 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:07:59 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a03643416141_21cc838f8880245d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 114s] #define HAVE_SYS_TYPES_H 1 [ 114s] #define HAVE_SYS_STAT_H 1 [ 114s] #define HAVE_STDLIB_H 1 [ 114s] #define HAVE_STRING_H 1 [ 114s] #define HAVE_MEMORY_H 1 [ 114s] #define HAVE_STRINGS_H 1 [ 114s] #define HAVE_INTTYPES_H 1 [ 114s] #define HAVE_STDINT_H 1 [ 114s] #define HAVE_UNISTD_H 1 [ 114s] #define HAVE_DLFCN_H 1 [ 114s] #define LT_OBJDIR ".libs/" [ 114s] [ 114s] configure: exit 1 [ 114s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 114s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 114s] make[1]: *** [override_dh_auto_configure] Error 2 [ 114s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 114s] debian/rules:45: recipe for target 'build' failed [ 114s] make: *** [build] Error 2 [ 114s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 114s] [ 114s] cloud101 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:39 UTC 2017. [ 114s] [ 114s] ### VM INTERACTION START ### [ 117s] [ 100.948327] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] cloud101 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:45 UTC 2017. [ 120s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:08:17 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:08:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a0364363469a_21cc838f88802721@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 87s] #define HAVE_SYS_TYPES_H 1 [ 87s] #define HAVE_SYS_STAT_H 1 [ 87s] #define HAVE_STDLIB_H 1 [ 87s] #define HAVE_STRING_H 1 [ 87s] #define HAVE_MEMORY_H 1 [ 87s] #define HAVE_STRINGS_H 1 [ 87s] #define HAVE_INTTYPES_H 1 [ 87s] #define HAVE_STDINT_H 1 [ 87s] #define HAVE_UNISTD_H 1 [ 87s] #define HAVE_DLFCN_H 1 [ 87s] #define LT_OBJDIR ".libs/" [ 87s] [ 87s] configure: exit 1 [ 87s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 87s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 87s] make[1]: *** [override_dh_auto_configure] Error 2 [ 87s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 87s] debian/rules:45: recipe for target 'build' failed [ 87s] make: *** [build] Error 2 [ 87s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 87s] [ 87s] wildcard3 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:53 UTC 2017. [ 87s] [ 87s] ### VM INTERACTION START ### [ 90s] [ 77.139287] reboot: Power down [ 91s] ### VM INTERACTION END ### [ 91s] [ 91s] wildcard3 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:58 UTC 2017. [ 91s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:08:34 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:08:34 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a036453e88d_21cc838f8880308@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 77s] #define HAVE_SYS_TYPES_H 1 [ 77s] #define HAVE_SYS_STAT_H 1 [ 77s] #define HAVE_STDLIB_H 1 [ 77s] #define HAVE_STRING_H 1 [ 77s] #define HAVE_MEMORY_H 1 [ 77s] #define HAVE_STRINGS_H 1 [ 77s] #define HAVE_INTTYPES_H 1 [ 77s] #define HAVE_STDINT_H 1 [ 77s] #define HAVE_UNISTD_H 1 [ 77s] #define HAVE_DLFCN_H 1 [ 77s] #define LT_OBJDIR ".libs/" [ 77s] [ 77s] configure: exit 1 [ 77s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 77s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 77s] make[1]: *** [override_dh_auto_configure] Error 2 [ 77s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 77s] debian/rules:45: recipe for target 'build' failed [ 77s] make: *** [build] Error 2 [ 77s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 77s] [ 77s] lamb52 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:27 UTC 2017. [ 77s] [ 77s] ### VM INTERACTION START ### [ 80s] [ 72.907914] reboot: Power down [ 80s] ### VM INTERACTION END ### [ 80s] [ 80s] lamb52 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:30 UTC 2017. [ 80s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:08:34 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:08:34 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a0364534e10e_21cc838f88803130@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 75s] #define HAVE_SYS_TYPES_H 1 [ 75s] #define HAVE_SYS_STAT_H 1 [ 75s] #define HAVE_STDLIB_H 1 [ 75s] #define HAVE_STRING_H 1 [ 75s] #define HAVE_MEMORY_H 1 [ 75s] #define HAVE_STRINGS_H 1 [ 75s] #define HAVE_INTTYPES_H 1 [ 75s] #define HAVE_STDINT_H 1 [ 75s] #define HAVE_UNISTD_H 1 [ 75s] #define HAVE_DLFCN_H 1 [ 75s] #define LT_OBJDIR ".libs/" [ 75s] [ 75s] configure: exit 1 [ 75s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 75s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 75s] make[1]: *** [override_dh_auto_configure] Error 2 [ 75s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 75s] debian/rules:45: recipe for target 'build' failed [ 75s] make: *** [build] Error 2 [ 75s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 75s] [ 75s] lamb01 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:27 UTC 2017. [ 75s] [ 75s] ### VM INTERACTION START ### [ 78s] [ 70.951006] reboot: Power down [ 78s] ### VM INTERACTION END ### [ 78s] [ 78s] lamb01 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:30 UTC 2017. [ 78s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:09:42 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:09:42 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a0364937b13c_21cc838f88803896@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 108s] #define HAVE_SYS_TYPES_H 1 [ 108s] #define HAVE_SYS_STAT_H 1 [ 108s] #define HAVE_STDLIB_H 1 [ 108s] #define HAVE_STRING_H 1 [ 108s] #define HAVE_MEMORY_H 1 [ 108s] #define HAVE_STRINGS_H 1 [ 108s] #define HAVE_INTTYPES_H 1 [ 108s] #define HAVE_STDINT_H 1 [ 108s] #define HAVE_UNISTD_H 1 [ 108s] #define HAVE_DLFCN_H 1 [ 108s] #define LT_OBJDIR ".libs/" [ 108s] [ 108s] configure: exit 1 [ 108s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 108s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 108s] make[1]: *** [override_dh_auto_configure] Error 255 [ 108s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 108s] debian/rules:45: recipe for target 'build' failed [ 108s] make: *** [build] Error 2 [ 108s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 108s] [ 108s] lamb24 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:32 UTC 2017. [ 108s] [ 108s] ### VM INTERACTION START ### [ 111s] [ 104.167069] reboot: Power down [ 111s] ### VM INTERACTION END ### [ 111s] [ 111s] lamb24 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:35 UTC 2017. [ 111s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:10:17 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:10:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a0364afbf0bb_21cc838f8880408e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 133s] #define HAVE_SYS_TYPES_H 1 [ 133s] #define HAVE_SYS_STAT_H 1 [ 133s] #define HAVE_STDLIB_H 1 [ 133s] #define HAVE_STRING_H 1 [ 133s] #define HAVE_MEMORY_H 1 [ 133s] #define HAVE_STRINGS_H 1 [ 133s] #define HAVE_INTTYPES_H 1 [ 133s] #define HAVE_STDINT_H 1 [ 133s] #define HAVE_UNISTD_H 1 [ 133s] #define HAVE_DLFCN_H 1 [ 133s] #define LT_OBJDIR ".libs/" [ 133s] [ 133s] configure: exit 1 [ 133s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 133s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 133s] make[1]: *** [override_dh_auto_configure] Error 255 [ 133s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 133s] debian/rules:45: recipe for target 'build' failed [ 133s] make: *** [build] Error 2 [ 133s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 133s] [ 133s] cloud124 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:54 UTC 2017. [ 133s] [ 133s] ### VM INTERACTION START ### [ 136s] [ 121.046456] reboot: Power down [ 139s] ### VM INTERACTION END ### [ 139s] [ 139s] cloud124 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:00 UTC 2017. [ 139s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:10:51 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:10:51 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a0364e72d348_21cc838f888043d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 73s] #define HAVE_SYS_STAT_H 1 [ 73s] #define HAVE_STDLIB_H 1 [ 73s] #define HAVE_STRING_H 1 [ 73s] #define HAVE_MEMORY_H 1 [ 73s] #define HAVE_STRINGS_H 1 [ 73s] #define HAVE_INTTYPES_H 1 [ 73s] #define HAVE_STDINT_H 1 [ 73s] #define HAVE_UNISTD_H 1 [ 73s] #define HAVE_DLFCN_H 1 [ 73s] #define LT_OBJDIR ".libs/" [ 73s] [ 73s] configure: exit 1 [ 73s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 73s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 73s] make[1]: *** [override_dh_auto_configure] Error 255 [ 73s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 73s] debian/rules:45: recipe for target 'build' failed [ 73s] make: *** [build] Error 2 [ 73s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 73s] [ 73s] build78 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:34 UTC 2017. [ 73s] [ 73s] ### VM INTERACTION START ### [ 74s] Powering off. [ 74s] [ 67.399224] reboot: Power down [ 74s] ### VM INTERACTION END ### [ 74s] [ 74s] build78 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:36 UTC 2017. [ 74s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:14:01 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:14:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a03659b210e1_21cc838f88805541@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 126s] #define HAVE_SYS_TYPES_H 1 [ 126s] #define HAVE_SYS_STAT_H 1 [ 126s] #define HAVE_STDLIB_H 1 [ 126s] #define HAVE_STRING_H 1 [ 126s] #define HAVE_MEMORY_H 1 [ 126s] #define HAVE_STRINGS_H 1 [ 126s] #define HAVE_INTTYPES_H 1 [ 126s] #define HAVE_STDINT_H 1 [ 126s] #define HAVE_UNISTD_H 1 [ 126s] #define HAVE_DLFCN_H 1 [ 126s] #define LT_OBJDIR ".libs/" [ 126s] [ 126s] configure: exit 1 [ 126s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 126s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 126s] make[1]: *** [override_dh_auto_configure] Error 2 [ 126s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 126s] debian/rules:45: recipe for target 'build' failed [ 126s] make: *** [build] Error 2 [ 126s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 126s] [ 126s] cloud108 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:13:23 UTC 2017. [ 126s] [ 126s] ### VM INTERACTION START ### [ 129s] [ 105.853421] reboot: Power down [ 148s] ### VM INTERACTION END ### [ 148s] [ 148s] cloud108 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:13:46 UTC 2017. [ 148s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 20:50:18 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 20:50:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a036e0e2ec89_21cc838f888154cf@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 327s] #define HAVE_SYS_STAT_H 1 [ 327s] #define HAVE_STDLIB_H 1 [ 327s] #define HAVE_STRING_H 1 [ 327s] #define HAVE_MEMORY_H 1 [ 327s] #define HAVE_STRINGS_H 1 [ 327s] #define HAVE_INTTYPES_H 1 [ 327s] #define HAVE_STDINT_H 1 [ 327s] #define HAVE_UNISTD_H 1 [ 327s] #define HAVE_DLFCN_H 1 [ 327s] #define LT_OBJDIR ".libs/" [ 327s] [ 327s] configure: exit 1 [ 327s] dh_auto_configure: ./configure --build=aarch64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/aarch64-linux-gnu --libexecdir=${prefix}/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 327s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 327s] make[1]: *** [override_dh_auto_configure] Error 2 [ 327s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 327s] debian/rules:45: recipe for target 'build' failed [ 327s] make: *** [build] Error 2 [ 327s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 327s] [ 327s] obs-arm-5 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:50:05 UTC 2017. [ 327s] [ 327s] ### VM INTERACTION START ### [ 330s] [ 308.112431] sysrq: SysRq : Power Off [ 330s] [ 308.122337] reboot: Power down [ 331s] ### VM INTERACTION END ### [ 331s] [ 331s] obs-arm-5 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:50:09 UTC 2017. [ 331s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 8 21:02:35 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 Nov 2017 21:02:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0370f82707b_21cc838f88816713@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 249s] #define HAVE_SYS_STAT_H 1 [ 249s] #define HAVE_STDLIB_H 1 [ 249s] #define HAVE_STRING_H 1 [ 249s] #define HAVE_MEMORY_H 1 [ 249s] #define HAVE_STRINGS_H 1 [ 249s] #define HAVE_INTTYPES_H 1 [ 249s] #define HAVE_STDINT_H 1 [ 249s] #define HAVE_UNISTD_H 1 [ 249s] #define HAVE_DLFCN_H 1 [ 249s] #define LT_OBJDIR ".libs/" [ 249s] [ 249s] configure: exit 1 [ 249s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 249s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 249s] make[1]: *** [override_dh_auto_configure] Error 2 [ 249s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 249s] debian/rules:45: recipe for target 'build' failed [ 249s] make: *** [build] Error 2 [ 249s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 249s] [ 249s] armbuild26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 21:02:25 UTC 2017. [ 249s] [ 249s] ### VM INTERACTION START ### [ 252s] [ 212.305997] SysRq : Power Off [ 252s] [ 212.322602] reboot: Power down [ 252s] ### VM INTERACTION END ### [ 252s] [ 252s] armbuild26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 21:02:28 UTC 2017. [ 252s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:17:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:17:27 +0000 Subject: [PATCH] osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev Message-ID: Review at https://gerrit.osmocom.org/4747 debian: Add dependency to libosmo-mgcp-client-dev Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it, so let's make sure the Debian control file states that dependency. Unfortuantely, this still won't make the osmo-bsc debian package build again, as in fact the above commit uses symbols not even present in 1.0.0 or 1.1.0 releases of libosmo-mgcp-client :( So we first need a new release of that library, and we need to update the configure.ac and debian/control version requirements in osmo-bsc before this is fixed. This needs to be automatized in the future. Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 --- M debian/control 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/4747/1 diff --git a/debian/control b/debian/control index e4a5b1f..4192f7b 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1) + libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:17:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:17:32 +0000 Subject: [PATCH] osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version Message-ID: Review at https://gerrit.osmocom.org/4748 debian: Increase required libosmo-legacy-mgcp-dev version Use the same version requirement as in configure.ac. Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/4748/1 diff --git a/debian/control b/debian/control index 4192f7b..963d664 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-legacy-mgcp-dev (>= 1.0.0), libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:23:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:23:55 +0000 Subject: osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 +2,but please read the comment in the change log. We will probably discuss about this next week, too. We have to make sure we clean up our development process to avoid creating such situations. Now you can install libosmo-mgcp.git 1.1.0 and autoconf will succeed, while the build (debian or not) of osmo-bsc breaks. In the future, this must be verified by gerrit before providing V+1 -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:24:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:24:04 +0000 Subject: osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:24:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:24:07 +0000 Subject: [MERGED] osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: Increase required libosmo-legacy-mgcp-dev version ...................................................................... debian: Increase required libosmo-legacy-mgcp-dev version Use the same version requirement as in configure.ac. Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 4192f7b..963d664 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-legacy-mgcp-dev (>= 1.0.0), libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 8 21:24:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 Nov 2017 21:24:08 +0000 Subject: [MERGED] osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: Add dependency to libosmo-mgcp-client-dev ...................................................................... debian: Add dependency to libosmo-mgcp-client-dev Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it, so let's make sure the Debian control file states that dependency. Unfortuantely, this still won't make the osmo-bsc debian package build again, as in fact the above commit uses symbols not even present in 1.0.0 or 1.1.0 releases of libosmo-mgcp-client :( So we first need a new release of that library, and we need to update the configure.ac and debian/control version requirements in osmo-bsc before this is fixed. This needs to be automatized in the future. Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 --- M debian/control 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index e4a5b1f..4192f7b 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1) + libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From admin at opensuse.org Thu Nov 9 01:00:23 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 09 Nov 2017 01:00:23 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a03a8be950ad_21cc838f88861858@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_8.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] -[+] Testing: gsm0503_mcs9 [ 229s] -[.] Input length : ret = 606 exp = 606 -> OK [ 229s] -[.] Output length : ret = 1836 exp = 1836 -> OK [ 229s] -[.] Random vector checks: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] ./testsuite.at:63: exit code was 132, expected 0 [ 229s] 10. testsuite.at:60: 10. conv_gsm0503 (testsuite.at:60): FAILED (testsuite.at:63) [ 229s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 229s] make[1]: *** [override_dh_auto_test] Error 1 [ 229s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 229s] debian/rules:15: recipe for target 'build' failed [ 229s] make: *** [build] Error 2 [ 229s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 229s] [ 229s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:04 UTC 2017. [ 229s] [ 229s] ### VM INTERACTION START ### [ 231s] Powering off. [ 231s] [ 221.558214] reboot: Power down [ 232s] ### VM INTERACTION END ### [ 232s] [ 232s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:07 UTC 2017. [ 232s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 9 01:00:23 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 09 Nov 2017 01:00:23 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a03a8bfae6bb_21cc838f88861921@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_17.04/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 206s] - [ 206s] -[+] Testing: ??? (non-recursive, direct truncation, not punctured) [ 206s] -[.] Input length : ret = 224 exp = 224 -> OK [ 206s] -[.] Output length : ret = 448 exp = 448 -> OK [ 206s] -[.] Pre computed vector checks: [ 206s] -[..] Encoding: OK [ 206s] -[..] Decoding: OK [ 206s] -[.] Random vector checks: [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] - [ 206s] ./testsuite.at:57: exit code was 132, expected 0 [ 206s] 9. testsuite.at:54: 9. conv (testsuite.at:54): FAILED (testsuite.at:57) [ 206s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 206s] make[1]: *** [override_dh_auto_test] Error 1 [ 206s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 206s] debian/rules:15: recipe for target 'build' failed [ 206s] make: *** [build] Error 2 [ 206s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 206s] [ 206s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:09 UTC 2017. [ 206s] [ 206s] ### VM INTERACTION START ### [ 209s] [ 201.781574] reboot: Power down [ 210s] ### VM INTERACTION END ### [ 210s] [ 210s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:13 UTC 2017. [ 210s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:14:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:14:09 +0000 Subject: [MERGED] osmo-bsc[master]: osmo-bsc RESET FSM: use distinct struct names In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-bsc RESET FSM: use distinct struct names ...................................................................... osmo-bsc RESET FSM: use distinct struct names Use distinctive struct names: s/fsm_/fsm_bsc_reset/. They only exist in the static context and it works fine, but the mad fsm-to-dot.py script breaks with identical struct names. Can't hurt to have unique names. Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 --- M src/osmo-bsc/osmo_bsc_reset.c 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_reset.c b/src/osmo-bsc/osmo_bsc_reset.c index aadbd86..e482a44 100644 --- a/src/osmo-bsc/osmo_bsc_reset.c +++ b/src/osmo-bsc/osmo_bsc_reset.c @@ -33,24 +33,24 @@ #define RESET_RESEND_TIMER_NO 1234 /* FIXME: dig out the real timer number */ #define BAD_CONNECTION_THRESOLD 3 /* connection failures */ -enum fsm_states { +enum fsm_bsc_reset_states { ST_DISC, /* Disconnected from MSC */ ST_CONN, /* We have a confirmed connection to the MSC */ }; -static const struct value_string fsm_state_names[] = { +static const struct value_string fsm_bsc_reset_state_names[] = { {ST_DISC, "ST_DISC (disconnected)"}, {ST_CONN, "ST_CONN (connected)"}, {0, NULL}, }; -enum fsm_evt { +enum fsm_bsc_reset_evt { EV_RESET_ACK, /* got reset acknowlegement from the MSC */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ }; -static const struct value_string fsm_evt_names[] = { +static const struct value_string fsm_bsc_reset_evt_names[] = { {EV_RESET_ACK, "EV_RESET_ACK"}, {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, {EV_N_CONNECT, "EV_N_CONNECT"}, @@ -63,7 +63,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", - get_value_string(fsm_state_names, ST_DISC), get_value_string(fsm_evt_names, event), msc->nr); + get_value_string(fsm_bsc_reset_state_names, ST_DISC), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); msc->msc_con->msc_conn_loss_count = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); } @@ -74,7 +74,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event), msc->nr); + get_value_string(fsm_bsc_reset_state_names, ST_CONN), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); OSMO_ASSERT(msc); @@ -98,7 +98,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)fi->priv; LOGP(DMSC, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, MSC No.: %i, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state), msc->nr); + get_value_string(fsm_bsc_reset_state_names, fi->state), msc->nr); osmo_bsc_sigtran_reset(msc); osmo_bsc_sigtran_tx_reset(msc); @@ -107,7 +107,7 @@ return 0; } -static struct osmo_fsm_state fsm_states[] = { +static struct osmo_fsm_state fsm_bsc_reset_states[] = { [ST_DISC] = { .in_event_mask = (1 << EV_RESET_ACK), .out_state_mask = (1 << ST_DISC) | (1 << ST_CONN), @@ -125,8 +125,8 @@ /* State machine definition */ static struct osmo_fsm fsm = { .name = "A-CONNECTION", - .states = fsm_states, - .num_states = ARRAY_SIZE(fsm_states), + .states = fsm_bsc_reset_states, + .num_states = ARRAY_SIZE(fsm_bsc_reset_states), .log_subsys = DMSC, .timer_cb = fsm_reset_ack_timeout_cb, }; -- To view, visit https://gerrit.osmocom.org/4375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:14:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:14:27 +0000 Subject: [MERGED] osmo-msc[master]: examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' ...................................................................... examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' osmo-mgw.git is changing the mgcp_client_vty API to use 'mgw' instead of 'mgcpgw'. Fix example configs after that patch is merged. Depends: I1d43d42929dc9162e57640499526fb7cadbcfbe6 Change-Id: Ib4c5ec1046a3c7a916ecfb7e5aa83dfe2f5ea8bf --- M doc/examples/osmo-msc/osmo-msc.cfg M doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg M doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-msc/osmo-msc.cfg b/doc/examples/osmo-msc/osmo-msc.cfg index fff964b..1261160 100644 --- a/doc/examples/osmo-msc/osmo-msc.cfg +++ b/doc/examples/osmo-msc/osmo-msc.cfg @@ -15,7 +15,7 @@ rrlp mode none mm info 1 msc - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi auth-tuple-max-reuse-count 3 auth-tuple-reuse-on-error 1 diff --git a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg index 4ccb0d0..a5131e4 100644 --- a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg +++ b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg @@ -23,5 +23,5 @@ msc cs7-instance-a 0 cs7-instance-iu 0 - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi diff --git a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg index 8b481de..72f3410 100644 --- a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg +++ b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg @@ -25,5 +25,5 @@ msc cs7-instance-a 0 cs7-instance-iu 1 - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi -- To view, visit https://gerrit.osmocom.org/4599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4c5ec1046a3c7a916ecfb7e5aa83dfe2f5ea8bf Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:14:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:14:49 +0000 Subject: [MERGED] osmocom-bb[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba --- M src/host/layer23/src/mobile/vty_interface.c M src/shared/libosmocore/src/gb/gprs_bssgp_vty.c M src/shared/libosmocore/src/gb/gprs_ns_vty.c M src/shared/libosmocore/src/vty/logging_vty.c M src/shared/libosmocore/src/vty/vty.c 5 files changed, 0 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 06f66b5..9a4ae63 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2837,7 +2837,6 @@ install_element(CONFIG_NODE, &cfg_ms_rename_cmd); install_element(CONFIG_NODE, &cfg_no_ms_cmd); install_node(&ms_node, config_write); - install_default(MS_NODE); install_element(MS_NODE, &cfg_ms_show_this_cmd); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); @@ -2880,7 +2879,6 @@ install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); install_element(MS_NODE, &cfg_ms_support_cmd); install_node(&support_node, config_write_dummy); - install_default(SUPPORT_NODE); install_element(SUPPORT_NODE, &cfg_ms_sup_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_sms_cmd); @@ -2936,7 +2934,6 @@ install_element(SUPPORT_NODE, &cfg_ms_sup_skip_max_per_band_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_skip_max_per_band_cmd); install_node(&testsim_node, config_write_dummy); - install_default(TESTSIM_NODE); install_element(TESTSIM_NODE, &cfg_test_imsi_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_xor_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_comp128_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c index d8e1d32..7017c50 100644 --- a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c @@ -189,7 +189,6 @@ install_element(CONFIG_NODE, &cfg_bssgp_cmd); install_node(&bssgp_node, config_write_bssgp); - install_default(L_BSSGP_NODE); install_element(L_BSSGP_NODE, &libgb_exit_cmd); install_element(L_BSSGP_NODE, &libgb_end_cmd); //install_element(L_BSSGP_NODE, &cfg_bssgp_timer_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_ns_vty.c b/src/shared/libosmocore/src/gb/gprs_ns_vty.c index fac431c..b443601 100644 --- a/src/shared/libosmocore/src/gb/gprs_ns_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_ns_vty.c @@ -559,7 +559,6 @@ install_element(CONFIG_NODE, &cfg_ns_cmd); install_node(&ns_node, config_write_ns); - install_default(L_NS_NODE); install_element(L_NS_NODE, &libgb_exit_cmd); install_element(L_NS_NODE, &libgb_end_cmd); install_element(L_NS_NODE, &cfg_nse_nsvci_cmd); diff --git a/src/shared/libosmocore/src/vty/logging_vty.c b/src/shared/libosmocore/src/vty/logging_vty.c index d473f12..6029d58 100644 --- a/src/shared/libosmocore/src/vty/logging_vty.c +++ b/src/shared/libosmocore/src/vty/logging_vty.c @@ -592,7 +592,6 @@ install_element_ve(&show_logging_vty_cmd); install_node(&cfg_log_node, config_write_log); - install_default(CFG_LOG_NODE); install_element(CFG_LOG_NODE, &config_end_cmd); install_element(CFG_LOG_NODE, &logging_fltr_all_cmd); install_element(CFG_LOG_NODE, &logging_use_clr_cmd); diff --git a/src/shared/libosmocore/src/vty/vty.c b/src/shared/libosmocore/src/vty/vty.c index 696766a..cafe202 100644 --- a/src/shared/libosmocore/src/vty/vty.c +++ b/src/shared/libosmocore/src/vty/vty.c @@ -1753,7 +1753,6 @@ install_element(ENABLE_NODE, &terminal_monitor_cmd); install_element(ENABLE_NODE, &terminal_no_monitor_cmd); - install_default(VTY_NODE); install_element(VTY_NODE, &vty_login_cmd); install_element(VTY_NODE, &no_vty_login_cmd); } -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:16:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:16:37 +0000 Subject: [MERGED] osmo-bsc[master]: osmo-bsc: SCCP addrs: default only if unset, reject invalid In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-bsc: SCCP addrs: default only if unset, reject invalid ...................................................................... osmo-bsc: SCCP addrs: default only if unset, reject invalid So far, if the user entered an invalid SCCP address in the config, the osmo_bsc_sigtran_init() code simply replaced that with the default, i.e. running with a completely different address than the user may intend. Use the default SCCP addresses only when they are unset by the user. Default MSC addr: set directly, do not detour via cs7 instance PC. The default MSC SCCP addr is just a point code + SSN, deriving it from the cs7 instance first is a confusing step. Just set the PC and SSN, and done. Using default addresses does not constitute an "auto configuration": if we set up a cs7 instance automatically, we do not want to have to create a second one automatically, to prevent "auto-confusion", and want to bail instead. But for each MSC on its own, using default SCCP addresses makes sense and is orthogonal to automatic cs7 instance creation. Hence drop the auto config semantics from the default SCCP address parts. Always validate the SCCP addresses we will end up using, and bail immediately if they are erratic. i.e. don't overwrite a non-empty invalid SCCP address with defaults, but straight bail. Beneficial side effects: - Fix some grammar ultra confusion in log messages. - Add context: log the MSC number the logging refers to. - Drop code dup: since we're always logging the used SCCP addresses, might as well log those once, unconditionally, in the end. Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 25 insertions(+), 32 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 2ba777e..253f1e8 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -509,46 +509,39 @@ if (!msc->a.sccp) return -EINVAL; - /* Check if the sccp-address fullfills minimum requirements (SSN+PC is present, - * automatically recover addresses if the addresses are not set up properly) */ - if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, - "A-interface: invalid or missing local (BSC) SCCP address (a.bsc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + /* If unset, use default local SCCP address */ + if (!msc->a.bsc_addr.presence) osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using automatically generated local (BSC) SCCP address (a.bsc_addr=%s)\n", + + if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { + LOGP(DMSC, LOGL_ERROR, + "(%s) A-interface: invalid local (BSC) SCCP address: %s\n", + msc_name, osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); - } else { - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using local (BSC) automatically SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + return -EINVAL; } + + /* If unset, use default SCCP address for the MSC */ + if (!msc->a.msc_addr.presence) + osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, + osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), + SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, - "A-interface: invalid or missing remote (MSC) SCCP address for the MSC (a.msc_addr=%s)\n", + LOGP(DMSC, LOGL_ERROR, + "(%s) A-interface: invalid remote (MSC) SCCP address: %s\n", + msc_name, osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); - osmo_sccp_local_addr_by_instance(&msc->a.msc_addr, msc->a.sccp, SCCP_SSN_BSSAP); - msc->a.msc_addr.pc = osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC); - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using automatically generated remote (MSC) SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); - free_attempt_used = true; - } else { - LOGP(DMSC, LOGL_NOTICE, - "A-interface: using remote (MSC) automatically SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + return -EINVAL; } + LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: local (BSC) SCCP address: %s\n", + msc_name, + osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: remote (MSC) SCCP address: %s\n", + msc_name, + osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + /* Bind SCCP user */ msc->a.sccp_user = osmo_sccp_user_bind(msc->a.sccp, msc_name, sccp_sap_up, msc->a.bsc_addr.ssn); if (!msc->a.sccp_user) -- To view, visit https://gerrit.osmocom.org/4726 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:22:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:22:36 +0000 Subject: [PATCH] osmo-sgsn[master]: vty: skip installing cmds now always installed by default Message-ID: Review at https://gerrit.osmocom.org/4749 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b --- M src/gprs/gb_proxy_vty.c M src/gprs/gtphub_vty.c M src/gprs/sgsn_vty.c 3 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/49/4749/1 diff --git a/src/gprs/gb_proxy_vty.c b/src/gprs/gb_proxy_vty.c index 156f337..25ef756 100644 --- a/src/gprs/gb_proxy_vty.c +++ b/src/gprs/gb_proxy_vty.c @@ -808,7 +808,6 @@ install_element(CONFIG_NODE, &cfg_gbproxy_cmd); install_node(&gbproxy_node, config_write_gbproxy); - vty_install_default(GBPROXY_NODE); install_element(GBPROXY_NODE, &cfg_nsip_sgsn_nsei_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mcc_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mnc_cmd); diff --git a/src/gprs/gtphub_vty.c b/src/gprs/gtphub_vty.c index 3a46e81..ec35e4d 100644 --- a/src/gprs/gtphub_vty.c +++ b/src/gprs/gtphub_vty.c @@ -583,7 +583,6 @@ install_element(CONFIG_NODE, &cfg_gtphub_cmd); install_node(>phub_node, config_write_gtphub); - vty_install_default(GTPHUB_NODE); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_short_cmd); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_cmd); diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 496bd68..a01de2d 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -1232,7 +1232,6 @@ install_element(CONFIG_NODE, &cfg_sgsn_cmd); install_node(&sgsn_node, config_write_sgsn); - vty_install_default(SGSN_NODE); install_element(SGSN_NODE, &cfg_sgsn_bind_addr_cmd); install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd); //install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd); -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:22:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 01:22:56 +0000 Subject: osmo-sgsn[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: seems I forgot to push this one for some reason -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 01:47:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 01:47:54 +0000 Subject: osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:45:25 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 9 Nov 2017 03:45:25 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Do not exclude DGPS from the list of default categories ...................................................................... mobile: Do not exclude DGPS from the list of default categories I don't remember why we parse the categories like this. First if the mobile doesn't use a subsystem there is no harm to have it enabled, second the default levels can be adjusted for all apps and third we have the VTY to reconfigure these logging targets. Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce --- M src/host/layer23/src/mobile/main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 997e2d5..91ed341 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:45:37 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 9 Nov 2017 03:45:37 +0000 Subject: osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories In-Reply-To: References: Message-ID: Patch Set 2: Will remove this line in the next round.. -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:46:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 03:46:41 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm322.c: prevent buffer over-/under-run ...................................................................... mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 0e2c9af..91729d8 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -320,6 +320,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value >= 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:46:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 03:46:42 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm322.c: prevent calling memset() with zero length ...................................................................... mobile/gsm322.c: prevent calling memset() with zero length This change prevents a possibility of calling memset() with constant zero length parameter, and the corresponding compiler warning. Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 8311a44..0e2c9af 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -320,6 +320,10 @@ else value -= min; + /* Prevent calling memset() with zero length */ + if (value == 0) + return ""; + memset(bar, '=', value); bar[value] = '\0'; -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:47:21 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 9 Nov 2017 03:47:21 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Make VTY logging commands available to the mobile app ...................................................................... mobile: Make VTY logging commands available to the mobile app So far logging_vty_add_cmds wasn't called. The main.c might be shared with other apps so place it into the routine that is setting up the VTY. Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 --- M src/host/layer23/src/mobile/app_mobile.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index bd786b5..e3e948f 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -398,6 +399,7 @@ vty_info.tall_ctx = l23_ctx; vty_init(&vty_info); + logging_vty_add_cmds(NULL); ms_vty_init(); dummy_conn.priv = NULL; vty_reading = 1; -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: laforge From gerrit-no-reply at lists.osmocom.org Thu Nov 9 03:50:37 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 9 Nov 2017 03:50:37 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 1: Right. All LUA related work should be merged at once or not at all. I will rebase so that general fixes are coming first. It is to catch feedback early and often. The expected next patch will build some primitives to get a feeling for lua callbacks and if it does make sense. -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 04:35:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 Nov 2017 04:35:25 +0000 Subject: [PATCH] osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level Message-ID: Review at https://gerrit.osmocom.org/4750 bsc filter: don't ignore imsi-allow on "global" filter level First off, there are "global" and "local" IMSI black/whitelist levels: "global" "local" VTY 'bsc' 'msc' for osmo-bsc VTY 'nat' 'bsc' for osmo-bsc_nat Both in osmo-bsc and osmo-bsc-nat, the "global" IMSI filter so far completely ignores all 'imsi-allow' rules it may contain. A comment in imsi_allow() proclaims actions that are missing in the code. Notably, in our example config osmo-bsc_nat.cfg, there is an imsi-allow on the 'nat' level, which with the code before this patch cannot have been effective in any way. Furthermore, on the "local" level the order is to check imsi-allow first, and imsi-deny after that. The comment says to do that in reverse order on the "global" level. There is no apparent reason for reversing. Add evaluation of imsi-allow directives on the "global" level, i.e. 'bsc' in osmo-bsc and 'nat' in osmo-bsc-nat, in the same order as on "local" level, to avoid confusion. Swap the comment to be consistent. Before this patch, to have effective imsi-allow, this config would be necessary for osmo-bsc: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* msc 0 access-list-name acl ... msc 1 access-list-name acl ... With this patch, imsi-allow also works on the "global" level: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* access-list-name acl msc 0 ... msc 1 ... Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f --- M src/libfilter/bsc_msg_filter.c 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/4750/1 diff --git a/src/libfilter/bsc_msg_filter.c b/src/libfilter/bsc_msg_filter.c index fc87e88..816ed94 100644 --- a/src/libfilter/bsc_msg_filter.c +++ b/src/libfilter/bsc_msg_filter.c @@ -150,8 +150,8 @@ * 1.) Check the global IMSI barr list * 2.) Allow directly if the IMSI is allowed at the BSC * 3.) Reject if the IMSI is not allowed at the BSC - * 4.) Reject if the IMSI not allowed at the global level. - * 5.) Allow directly if the IMSI is allowed at the global level + * 4.) Allow directly if the IMSI is allowed at the global level + * 5.) Reject if the IMSI not allowed at the global level. */ int cm, lu; struct bsc_msg_acc_lst *nat_lst = NULL; @@ -189,8 +189,12 @@ } - /* 4. NAT deny */ if (nat_lst) { + /* 4. global allow */ + if (bsc_msg_acc_lst_check_allow(nat_lst, imsi) == 0) + return 1; + + /* 5. global deny */ if (lst_check_deny(nat_lst, imsi, &cm, &lu) == 0) { LOGP(DFILTER, LOGL_ERROR, "Filtering %s global imsi_deny on bsc nr: %d.\n", imsi, req->bsc_nr); -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 9 08:17:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 08:17:29 +0000 Subject: [PATCH] libosmo-sccp[master]: xua: Write 'local-ip' only if non-NULL Message-ID: Review at https://gerrit.osmocom.org/4751 xua: Write 'local-ip' only if non-NULL Avoid writing 'local-ip (null)' to the config file Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196 --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/51/4751/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 890fec8..81b5521 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -489,7 +489,8 @@ vty_out(vty, " listen %s %u%s", get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), xs->cfg.local.port, VTY_NEWLINE); - vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); + if (xs->cfg.local.host) + vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); if (xs->cfg.accept_dyn_reg) vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/4751 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 9 08:17:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 08:17:32 +0000 Subject: [PATCH] libosmo-sccp[master]: vty: Make sure 'point-code override dpc' is saved with corre... Message-ID: Review at https://gerrit.osmocom.org/4752 vty: Make sure 'point-code override dpc' is saved with correct indent Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6 --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/52/4752/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 81b5521..61f9747 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -927,7 +927,7 @@ vty_out(vty, "%s", VTY_NEWLINE); if (as->cfg.pc_override.dpc) - vty_out(vty, " point-code override dpc %s%s", + vty_out(vty, " point-code override dpc %s%s", osmo_ss7_pointcode_print(as->inst, as->cfg.pc_override.dpc), VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/4752 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 9 08:17:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 Nov 2017 08:17:32 +0000 Subject: [PATCH] libosmo-sccp[master]: ipa: Fix setting of OPC/DPC based on routing-context + override Message-ID: Review at https://gerrit.osmocom.org/4753 ipa: Fix setting of OPC/DPC based on routing-context + override As IPA is a transport layer underneath SCCP, and we don't have MTP-level OPC and DPC fields in it, we are using the "point-code override dpc" feature for setting the pseudo-M3UA DPC on incoming Rx packets, and we use the PC from the routing context as pseudo-M3UA OPC. However, we were so far only storing this in the M3UA data header, and not in the xua->mtp.{opc,dpc} members, which are consulted during the routing decisions. Change-Id: I5e2244620cd48f848382eb595ce59c6212069788 --- M src/ipa.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/53/4753/1 diff --git a/src/ipa.c b/src/ipa.c index a7060db..11ff422 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -179,6 +179,8 @@ data_hdr.dpc = as->cfg.routing_key.pc; } xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); + xua->mtp.opc = data_hdr.opc; + xua->mtp.dpc = data_hdr.dpc; return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4753 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e2244620cd48f848382eb595ce59c6212069788 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:36:32 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:36:32 +0000 Subject: [PATCH] osmo-bsc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4717 to look at the new patch set (#2). reset: remove name variable from reset context The reset context contains a string buffer to allow for setting a human readable name, that is then displayed in the logs. Since OSMO-FSMs already have such a feature there is no need for an extra name variable. Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc() to display the name of the FSM Fixes: Coverity CID#178664 Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 --- M include/osmocom/bsc/a_reset.h M src/libcommon-cs/a_reset.c 2 files changed, 9 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/17/4717/2 diff --git a/include/osmocom/bsc/a_reset.h b/include/osmocom/bsc/a_reset.h index 7aaab06..c01a8b0 100644 --- a/include/osmocom/bsc/a_reset.h +++ b/include/osmocom/bsc/a_reset.h @@ -33,9 +33,6 @@ * will be triggered */ int conn_loss_counter; - /* A human readable name to display in the logs */ - char name[256]; - /* Callback function to be called when a connection * failure is detected and a rest must occur */ void (*cb)(void *priv); diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index f08d813..5e45b09 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -62,8 +62,9 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); reset->conn_loss_counter = 0; @@ -76,13 +77,13 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) { - LOGP(DMSC, LOGL_NOTICE, "(%s) SIGTRAN connection down, reconnecting...\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection down, reconnecting...\n"); osmo_fsm_inst_state_chg(fi, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); } else reset->conn_loss_counter++; @@ -97,8 +98,9 @@ static int fsm_reset_ack_timeout_cb(struct osmo_fsm_inst *fi) { struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset-ack timeout (T%i) in state %s, resending...\n", reset->name, fi->T, + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, get_value_string(fsm_state_names, fi->state)); reset->cb(reset->priv); @@ -147,12 +149,11 @@ OSMO_ASSERT(reset); reset->priv = priv; reset->cb = cb; - strncpy(reset->name, name, sizeof(reset->name)); reset->conn_loss_counter = 0; - reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, NULL); + reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,7 +173,7 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm destroyed.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:40:02 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:40:02 +0000 Subject: [PATCH] osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4711 to look at the new patch set (#2). osmux: fix nullpointer dereference in point_lookup() the connection pointer is determined using mgcp_conn_get_rtp() this function may return 0. At the moment there are no nullpointer checks implemented Add checks to test for nullpointer. Fixes: Coverity CID#178662 Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/11/4711/2 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 60ffe06..09b2636 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -207,12 +207,18 @@ case MGCP_DEST_NET: /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - this = &conn_net->end.addr; + if (conn_net) + this = &conn_net->end.addr; + else + this = NULL; break; case MGCP_DEST_BTS: /* FIXME: Get rid of CONN_ID_XXX! */ conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - this = &conn_bts->end.addr; + if (conn_bts) + this = &conn_bts->end.addr; + else + this = NULL; break; default: /* Should not ever happen */ @@ -222,7 +228,8 @@ /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net->osmux.cid == cid && this->s_addr == from_addr->s_addr) + if (conn_net && this && conn_net->osmux.cid == cid + && this->s_addr == from_addr->s_addr) return endp; } -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:40:02 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:40:02 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: guard dead coded with ifdef In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4712 to look at the new patch set (#2). cosmetic: guard dead coded with ifdef Since currently osmux is not available we decided to lock down the respective VTY command with an early return CMD_WARNING, making the code after this line unreachable. Guard the dead code with an ifdef Fixes: Coverity CID#178648 Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/4712/2 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..a7d9e4a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1102,7 +1102,7 @@ * allow to turn it on yet. */ vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); return CMD_WARNING; - +#if 0 if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) @@ -1114,6 +1114,7 @@ } return CMD_SUCCESS; +#endif } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:40:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:40:18 +0000 Subject: [PATCH] osmo-msc[master]: reset: remove name variable from reset context Message-ID: Review at https://gerrit.osmocom.org/4754 reset: remove name variable from reset context The reset context contains a string buffer to allow for setting a human readable name, that is then displayed in the logs. Since OSMO-FSMs already have such a feature there is no need for an extra name variable. Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc() to display the name of the FSM Fixes: Coverity CID#178664 Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 --- M src/libcommon-cs/a_reset.c M src/libmsc/a_iface.c 2 files changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/54/4754/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 7dbd014..32c00ae 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -62,8 +62,9 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); reset->conn_loss_counter = 0; @@ -76,13 +77,13 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) { - LOGP(DMSC, LOGL_NOTICE, "(%s) SIGTRAN connection down, reconnecting...\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection down, reconnecting...\n"); osmo_fsm_inst_state_chg(fi, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); } else reset->conn_loss_counter++; @@ -97,8 +98,9 @@ static int fsm_reset_ack_timeout_cb(struct osmo_fsm_inst *fi) { struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset-ack timeout (T%i) in state %s, resending...\n", reset->name, fi->T, + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, get_value_string(fsm_state_names, fi->state)); reset->cb(reset->priv); @@ -147,12 +149,11 @@ OSMO_ASSERT(reset); reset->priv = priv; reset->cb = cb; - strncpy(reset->name, name, sizeof(reset->name)); reset->conn_loss_counter = 0; - reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, NULL); + reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,7 +173,7 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm destroyed.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 4892fb8..bdfef87 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -460,6 +460,7 @@ { struct bsc_context *bsc_ctx; struct osmo_ss7_instance *ss7; + char bsc_name[32]; OSMO_ASSERT(bsc_addr); OSMO_ASSERT(msc_addr); @@ -482,7 +483,8 @@ llist_add_tail(&bsc_ctx->list, &gsm_network->a.bscs); /* Start reset procedure to make the new connection active */ - bsc_ctx->reset = a_reset_alloc(bsc_ctx, osmo_sccp_addr_name(ss7, bsc_addr), a_reset_cb, bsc_ctx); + snprintf(bsc_name, sizeof(bsc_name), "bsc-%i", bsc_addr->pc); + bsc_ctx->reset = a_reset_alloc(bsc_ctx, bsc_name, a_reset_cb, bsc_ctx); } /* Callback function, called by the SSCP stack when data arrives */ -- To view, visit https://gerrit.osmocom.org/4754 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:40:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:40:18 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: move log message to else branch Message-ID: Review at https://gerrit.osmocom.org/4755 cosmetic: move log message to else branch The log message after the nullpointer check for conn tricks Coverity Scan into detecting a nullpointer deref. Include the log message into else branch to state the program flow more clearly Fixes: Coverity CID#178656 Change-Id: If6e962f4033c955ecd3539a719031a83c9b6205a --- M src/libmsc/gsm_04_08.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/55/4755/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 8a5265b..438f681 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3004,14 +3004,14 @@ trans->callref = 0; trans_free(trans); return rc; + } else { + DEBUGP(DCC, "(ti %02x sub %s) " + "Received '%s' from MNCC in state %d (%s)\n", + trans->transaction_id, + vlr_subscr_msisdn_or_name(trans->conn->vsub), + get_mncc_name(msg_type), trans->cc.state, + gsm48_cc_state_name(trans->cc.state)); } - - DEBUGP(DCC, "(ti %02x sub %s) " - "Received '%s' from MNCC in state %d (%s)\n", - trans->transaction_id, - vlr_subscr_msisdn_or_name(trans->conn->vsub), - get_mncc_name(msg_type), trans->cc.state, - gsm48_cc_state_name(trans->cc.state)); /* Find function for current state and message */ for (i = 0; i < DOWNSLLEN; i++) -- To view, visit https://gerrit.osmocom.org/4755 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6e962f4033c955ecd3539a719031a83c9b6205a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:49:23 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 10:49:23 +0000 Subject: [PATCH] osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4732 to look at the new patch set (#3). doc: add example configuration for osmo-mgw osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf --- M doc/examples/osmo-bsc/osmo-bsc.cfg 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/4732/3 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index efa27ec..272dbad 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -102,6 +102,9 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden + mgw remote-ip 127.0.0.1 + mgw remote-port 2428 + mgw endpoint-range 1 31 bsc mid-call-timeout 0 no missing-msc-text -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 10:58:14 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 10:58:14 +0000 Subject: osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4732/3/doc/examples/osmo-bsc/osmo-bsc.cfg File doc/examples/osmo-bsc/osmo-bsc.cfg: Line 106: mgw remote-port 2428 You are using 2428 by default here, but the example config file osmo-mgw.cfg in the same repository (which afaik is the only user of osmo-bsc so far) has a default port of 2427. As a result example configs don't work by default. I'd document that somewhere in the wiki/manual. -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:18:20 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 11:18:20 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4738 to look at the new patch set (#3). cosmetic: remove prefix "net" from rtp related vty commands There the prefix "net" is a leftover from the time when there was a bts and a net side. Now we do not distinguish anymore between the two. remove prefix "net" Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 28 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/38/4738/3 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..fc39817 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -67,11 +67,11 @@ vty_out(vty, " local ip %s%s", g_cfg->local_ip, VTY_NEWLINE); vty_out(vty, " bind ip %s%s", g_cfg->source_addr, VTY_NEWLINE); vty_out(vty, " bind port %u%s", g_cfg->source_port, VTY_NEWLINE); - vty_out(vty, " rtp net-range %u %u%s", + vty_out(vty, " rtp port-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr) - vty_out(vty, " rtp net-bind-ip %s%s", + vty_out(vty, " rtp bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr_probe) vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); @@ -292,28 +292,37 @@ #define RANGE_START_STR "Start of the range of ports\n" #define RANGE_END_STR "End of the range of ports\n" -DEFUN(cfg_mgcp_rtp_net_range, - cfg_mgcp_rtp_net_range_cmd, - "rtp net-range <0-65534> <0-65534>", +DEFUN(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_port_range_cmd, + "rtp port-range <0-65534> <0-65534>", RTP_STR "Range of ports to use for the NET side\n" RANGE_START_STR RANGE_END_STR) { parse_range(&g_cfg->net_ports, argv); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_net_range_cmd, + "rtp net-range <0-65534> <0-65534>", + RTP_STR "Range of ports to use for the NET side\n" + RANGE_START_STR RANGE_END_STR) -DEFUN(cfg_mgcp_rtp_net_bind_ip, - cfg_mgcp_rtp_net_bind_ip_cmd, - "rtp net-bind-ip A.B.C.D", +DEFUN(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_bind_ip_cmd, + "rtp bind-ip A.B.C.D", RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { osmo_talloc_replace_string(g_cfg, &g_cfg->net_ports.bind_addr, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_net_bind_ip_cmd, + "rtp net-bind-ip A.B.C.D", + RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") -DEFUN(cfg_mgcp_rtp_no_net_bind_ip, - cfg_mgcp_rtp_no_net_bind_ip_cmd, - "no rtp net-bind-ip", +DEFUN(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_bind_ip_cmd, + "no rtp bind-ip", NO_STR RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { @@ -321,6 +330,11 @@ g_cfg->net_ports.bind_addr = NULL; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_net_bind_ip_cmd, + "no rtp net-bind-ip", + NO_STR RTP_STR "Bind endpoints facing the Network\n" + "Address to bind to\n") DEFUN(cfg_mgcp_rtp_net_bind_ip_probing, cfg_mgcp_rtp_net_bind_ip_probing_cmd, @@ -1181,8 +1195,11 @@ install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_early_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_port_range_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:22:12 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 11:22:12 +0000 Subject: osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Patch Set 3: > what about existing config files? We need compatibility alieses to > be able to still parse old config files, right? Think of > osmo-gsm-testers or users of the debian packages. I have added an ALIAS_DEPRECATED for the commands I have changed. Old config files should work again now. -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:24:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 9 Nov 2017 11:24:18 +0000 Subject: [PATCH] osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4732 to look at the new patch set (#4). doc: add example configuration for osmo-mgw osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf --- M doc/examples/osmo-bsc/osmo-bsc.cfg 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/4732/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index efa27ec..69f8ab7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -102,6 +102,9 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden + mgw remote-ip 127.0.0.1 + mgw remote-port 2427 + mgw endpoint-range 1 31 bsc mid-call-timeout 0 no missing-msc-text -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:28:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 11:28:16 +0000 Subject: [PATCH] osmo-gsm-tester[master]: contrib: Add binary osmo-mgw to artifact with same name Message-ID: Review at https://gerrit.osmocom.org/4756 contrib: Add binary osmo-mgw to artifact with same name Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d --- M contrib/jenkins-build-osmo-mgw.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/56/4756/1 diff --git a/contrib/jenkins-build-osmo-mgw.sh b/contrib/jenkins-build-osmo-mgw.sh index 4ca1e45..1bc7b76 100755 --- a/contrib/jenkins-build-osmo-mgw.sh +++ b/contrib/jenkins-build-osmo-mgw.sh @@ -9,4 +9,4 @@ build_repo libosmo-netif --disable-doxygen build_repo osmo-mgw -create_bin_tgz osmo-bsc_mgcp +create_bin_tgz osmo-bsc_mgcp osmo-mgw -- To view, visit https://gerrit.osmocom.org/4756 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:28:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 11:28:58 +0000 Subject: osmo-gsm-tester[master]: contrib: Add binary osmo-mgw to artifact with same name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 Tested manually in jenkins job osmo-gsm-tester_build-osmo-mgw -- To view, visit https://gerrit.osmocom.org/4756 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 11:29:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 11:29:01 +0000 Subject: [MERGED] osmo-gsm-tester[master]: contrib: Add binary osmo-mgw to artifact with same name In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: contrib: Add binary osmo-mgw to artifact with same name ...................................................................... contrib: Add binary osmo-mgw to artifact with same name Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d --- M contrib/jenkins-build-osmo-mgw.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved; Verified diff --git a/contrib/jenkins-build-osmo-mgw.sh b/contrib/jenkins-build-osmo-mgw.sh index 4ca1e45..1bc7b76 100755 --- a/contrib/jenkins-build-osmo-mgw.sh +++ b/contrib/jenkins-build-osmo-mgw.sh @@ -9,4 +9,4 @@ build_repo libosmo-netif --disable-doxygen build_repo osmo-mgw -create_bin_tgz osmo-bsc_mgcp +create_bin_tgz osmo-bsc_mgcp osmo-mgw -- To view, visit https://gerrit.osmocom.org/4756 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 12:09:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 12:09:12 +0000 Subject: osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 12:16:26 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 12:16:26 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Introduce OsmoMgw class (osmo-mgw) Message-ID: Review at https://gerrit.osmocom.org/4757 Introduce OsmoMgw class (osmo-mgw) Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac --- A src/osmo_gsm_tester/osmo_mgw.py A src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl 2 files changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/57/4757/1 diff --git a/src/osmo_gsm_tester/osmo_mgw.py b/src/osmo_gsm_tester/osmo_mgw.py new file mode 100644 index 0000000..fc242f4 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_mgw.py @@ -0,0 +1,87 @@ +# osmo_gsm_tester: specifics for running an osmo-mgw +# +# Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoMgw(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + + def __init__(self, suite_run, ip_address): + super().__init__(log.C_RUN, 'osmo-mgw_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-mgw') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-mgw'))) + binary = inst.child('bin', 'osmo-mgw') + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % inst) + + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', + os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-mgw.cfg') + self.dbg(config_file=self.config_file) + + values = dict(mgw=config.get_defaults('mgw')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(mgw=dict(ip_address=self.ip_address))) + + self.dbg('MGW CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-mgw.cfg', values) + self.dbg(r) + f.write(r) + + def addr(self): + return self.ip_address.get('addr') + + def conf_for_client(self): + return dict(mgw=dict(ip_address=self.ip_address)) + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl new file mode 100644 index 0000000..9e338e1 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl @@ -0,0 +1,16 @@ +! +! MGCP configuration example +! +line vty + no login + bind ${mgw.ip_address.addr} +mgcp + bind ip ${mgw.ip_address.addr} + bind port 2427 + rtp net-range 4002 16000 + rtp force-ptime 20 + sdp audio payload number 98 + sdp audio payload name AMR/8000 + number endpoints 31 + rtcp-omit + rtp-accept-all 1 -- To view, visit https://gerrit.osmocom.org/4757 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 12:16:26 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 12:16:26 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Require OsmoMgw in OsmoBsc and update tests Message-ID: Review at https://gerrit.osmocom.org/4758 Require OsmoMgw in OsmoBsc and update tests Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it. This commit fixes latest constant failures in voice suite. Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 --- M example/resources.conf M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_encryption/suite.conf M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_smpp/suite.conf M suites/aoip_sms/mo_mt_sms.py M suites/aoip_sms/suite.conf M suites/aoip_ussd/assert_extension.py M suites/aoip_ussd/suite.conf M suites/voice/mo_mt_call.py M suites/voice/suite.conf 19 files changed, 50 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/58/4758/1 diff --git a/example/resources.conf b/example/resources.conf index c4c5e31..697b5c8 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -6,6 +6,7 @@ - addr: 10.42.42.4 - addr: 10.42.42.5 - addr: 10.42.42.6 +- addr: 10.42.42.7 bts: - label: sysmoBTS 1002 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 5fbeea6..736fe8f 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -30,13 +30,15 @@ process = None bts = None encryption = None + mgw = None - def __init__(self, suite_run, msc, ip_address): + def __init__(self, suite_run, msc, mgw, ip_address): super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.bts = [] self.msc = msc + self.mgw = mgw def start(self): self.log('Starting osmo-bsc') @@ -73,6 +75,7 @@ values = dict(bsc=config.get_defaults('bsc')) config.overlay(values, self.suite_run.config()) config.overlay(values, dict(bsc=dict(ip_address=self.ip_address))) + config.overlay(values, self.mgw.conf_for_client()) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 4b33abc..dd1baf8 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -25,7 +25,7 @@ import pprint from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms from . import osmo_nitb -from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp +from . import osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp from . import test class Timeout(Exception): @@ -327,15 +327,20 @@ ip_address = self.ip_address() return osmo_mgcpgw.OsmoMgcpgw(self, ip_address, bts_ip) + def mgw(self, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_mgw.OsmoMgw(self, ip_address) + def msc(self, hlr, mgcpgw, ip_address=None): if ip_address is None: ip_address = self.ip_address() return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address) - def bsc(self, msc, ip_address=None): + def bsc(self, msc, mgw, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_bsc.OsmoBsc(self, msc, ip_address) + return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address) def stp(self, ip_address=None): if ip_address is None: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index d79bb2b..2f06710 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -74,7 +74,10 @@ token msc_token_23_42 core-mobile-country-code ${bsc.net.mcc} core-mobile-network-code ${bsc.net.mnc} - ip.access rtp-base 8000 + ip.access rtp-base 25000 + mgw remote-ip ${mgw.ip_address.addr} + mgw remote-port 2427 + mgw endpoint-range 1 31 timeout-ping 1800 timeout-ping advanced timeout-pong 60 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index f09732b..cfa5d6c 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -3,8 +3,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() modems = suite.modems(int(prompt('How many modems?'))) @@ -12,6 +13,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index bb343a5..d75cacb 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 + - times: 6 bts: - times: 1 modem: diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 0224ee0..6e5e459 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 114c628..428fc8d 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index a84fa3a..59e3fac 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/suite.conf b/suites/aoip_encryption/suite.conf index d6d0eee..18e94a3 100644 --- a/suites/aoip_encryption/suite.conf +++ b/suites/aoip_encryption/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 ciphers: diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index 308ebf3..d49401f 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -15,8 +15,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() bsc.bts_add(bts) @@ -28,6 +29,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.start() bts.start() diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 8bcfb6b..6892a7e 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -13,8 +13,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() bsc.bts_add(bts) @@ -26,6 +27,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.start() bts.start() diff --git a/suites/aoip_smpp/suite.conf b/suites/aoip_smpp/suite.conf index 688fe0a..61e7015 100644 --- a/suites/aoip_smpp/suite.conf +++ b/suites/aoip_smpp/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 217d807..a7c1f48 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() @@ -14,6 +15,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf index 677a95e..28a81ea 100644 --- a/suites/aoip_sms/suite.conf +++ b/suites/aoip_sms/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 5e934db..36d6222 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -6,8 +6,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -15,6 +16,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf index 1da0cc5..460147a 100644 --- a/suites/aoip_ussd/suite.conf +++ b/suites/aoip_ussd/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index f426037..8cd3b23 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() @@ -14,6 +15,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/voice/suite.conf b/suites/voice/suite.conf index 40d9f97..522b1ca 100644 --- a/suites/voice/suite.conf +++ b/suites/voice/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/4758 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 12:25:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 12:25:41 +0000 Subject: osmo-gsm-tester[master]: Require OsmoMgw in OsmoBsc and update tests In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 I cancelled the jenkins job because I had to change the Prod /etc/network/interfaces setup, but now it seems there's no easy way to re-trigger the build. I did run all aoip suites in RnD manually yo check everything was working fine, and run make -C selftest check locally. I mark it as verified manually. -- To view, visit https://gerrit.osmocom.org/4758 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:24:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:24:40 +0000 Subject: osmo-gsm-tester[master]: Require OsmoMgw in OsmoBsc and update tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4758 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:24:46 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:24:46 +0000 Subject: osmo-gsm-tester[master]: Introduce OsmoMgw class (osmo-mgw) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4757 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:24:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:24:50 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Introduce OsmoMgw class (osmo-mgw) In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Introduce OsmoMgw class (osmo-mgw) ...................................................................... Introduce OsmoMgw class (osmo-mgw) Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac --- A src/osmo_gsm_tester/osmo_mgw.py A src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl 2 files changed, 103 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_mgw.py b/src/osmo_gsm_tester/osmo_mgw.py new file mode 100644 index 0000000..fc242f4 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_mgw.py @@ -0,0 +1,87 @@ +# osmo_gsm_tester: specifics for running an osmo-mgw +# +# Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoMgw(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + + def __init__(self, suite_run, ip_address): + super().__init__(log.C_RUN, 'osmo-mgw_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-mgw') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-mgw'))) + binary = inst.child('bin', 'osmo-mgw') + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % inst) + + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', + os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-mgw.cfg') + self.dbg(config_file=self.config_file) + + values = dict(mgw=config.get_defaults('mgw')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(mgw=dict(ip_address=self.ip_address))) + + self.dbg('MGW CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-mgw.cfg', values) + self.dbg(r) + f.write(r) + + def addr(self): + return self.ip_address.get('addr') + + def conf_for_client(self): + return dict(mgw=dict(ip_address=self.ip_address)) + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl new file mode 100644 index 0000000..9e338e1 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-mgw.cfg.tmpl @@ -0,0 +1,16 @@ +! +! MGCP configuration example +! +line vty + no login + bind ${mgw.ip_address.addr} +mgcp + bind ip ${mgw.ip_address.addr} + bind port 2427 + rtp net-range 4002 16000 + rtp force-ptime 20 + sdp audio payload number 98 + sdp audio payload name AMR/8000 + number endpoints 31 + rtcp-omit + rtp-accept-all 1 -- To view, visit https://gerrit.osmocom.org/4757 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:24:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:24:50 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Require OsmoMgw in OsmoBsc and update tests In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Require OsmoMgw in OsmoBsc and update tests ...................................................................... Require OsmoMgw in OsmoBsc and update tests Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it. This commit fixes latest constant failures in voice suite. Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 --- M example/resources.conf M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_encryption/suite.conf M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_smpp/suite.conf M suites/aoip_sms/mo_mt_sms.py M suites/aoip_sms/suite.conf M suites/aoip_ussd/assert_extension.py M suites/aoip_ussd/suite.conf M suites/voice/mo_mt_call.py M suites/voice/suite.conf 19 files changed, 50 insertions(+), 20 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved; Verified diff --git a/example/resources.conf b/example/resources.conf index c4c5e31..697b5c8 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -6,6 +6,7 @@ - addr: 10.42.42.4 - addr: 10.42.42.5 - addr: 10.42.42.6 +- addr: 10.42.42.7 bts: - label: sysmoBTS 1002 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 5fbeea6..736fe8f 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -30,13 +30,15 @@ process = None bts = None encryption = None + mgw = None - def __init__(self, suite_run, msc, ip_address): + def __init__(self, suite_run, msc, mgw, ip_address): super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.bts = [] self.msc = msc + self.mgw = mgw def start(self): self.log('Starting osmo-bsc') @@ -73,6 +75,7 @@ values = dict(bsc=config.get_defaults('bsc')) config.overlay(values, self.suite_run.config()) config.overlay(values, dict(bsc=dict(ip_address=self.ip_address))) + config.overlay(values, self.mgw.conf_for_client()) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 4b33abc..dd1baf8 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -25,7 +25,7 @@ import pprint from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms from . import osmo_nitb -from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp +from . import osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp from . import test class Timeout(Exception): @@ -327,15 +327,20 @@ ip_address = self.ip_address() return osmo_mgcpgw.OsmoMgcpgw(self, ip_address, bts_ip) + def mgw(self, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_mgw.OsmoMgw(self, ip_address) + def msc(self, hlr, mgcpgw, ip_address=None): if ip_address is None: ip_address = self.ip_address() return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address) - def bsc(self, msc, ip_address=None): + def bsc(self, msc, mgw, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_bsc.OsmoBsc(self, msc, ip_address) + return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address) def stp(self, ip_address=None): if ip_address is None: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index d79bb2b..2f06710 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -74,7 +74,10 @@ token msc_token_23_42 core-mobile-country-code ${bsc.net.mcc} core-mobile-network-code ${bsc.net.mnc} - ip.access rtp-base 8000 + ip.access rtp-base 25000 + mgw remote-ip ${mgw.ip_address.addr} + mgw remote-port 2427 + mgw endpoint-range 1 31 timeout-ping 1800 timeout-ping advanced timeout-pong 60 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index f09732b..cfa5d6c 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -3,8 +3,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() modems = suite.modems(int(prompt('How many modems?'))) @@ -12,6 +13,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index bb343a5..d75cacb 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 + - times: 6 bts: - times: 1 modem: diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 0224ee0..6e5e459 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 114c628..428fc8d 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index a84fa3a..59e3fac 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -17,6 +18,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() bts.start() diff --git a/suites/aoip_encryption/suite.conf b/suites/aoip_encryption/suite.conf index d6d0eee..18e94a3 100644 --- a/suites/aoip_encryption/suite.conf +++ b/suites/aoip_encryption/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 ciphers: diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index 308ebf3..d49401f 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -15,8 +15,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() bsc.bts_add(bts) @@ -28,6 +29,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.start() bts.start() diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 8bcfb6b..6892a7e 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -13,8 +13,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() bsc.bts_add(bts) @@ -26,6 +27,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.start() bts.start() diff --git a/suites/aoip_smpp/suite.conf b/suites/aoip_smpp/suite.conf index 688fe0a..61e7015 100644 --- a/suites/aoip_smpp/suite.conf +++ b/suites/aoip_smpp/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 217d807..a7c1f48 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() @@ -14,6 +15,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf index 677a95e..28a81ea 100644 --- a/suites/aoip_sms/suite.conf +++ b/suites/aoip_sms/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 5e934db..36d6222 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -6,8 +6,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms = suite.modem() @@ -15,6 +16,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf index 1da0cc5..460147a 100644 --- a/suites/aoip_ussd/suite.conf +++ b/suites/aoip_ussd/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index f426037..8cd3b23 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -4,8 +4,9 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc) +bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() @@ -14,6 +15,7 @@ stp.start() msc.start() mgcpgw.start() +mgw_bsc.start() bsc.bts_add(bts) bsc.start() diff --git a/suites/voice/suite.conf b/suites/voice/suite.conf index 40d9f97..522b1ca 100644 --- a/suites/voice/suite.conf +++ b/suites/voice/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 5 # msc, bsc, hlr, stp, mgw + - times: 6 # msc, bsc, hlr, stp, mgw*2 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/4758 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suite: Separate better internal imports and the ones aimed a... Message-ID: Review at https://gerrit.osmocom.org/4759 suite: Separate better internal imports and the ones aimed at tests Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a --- M src/osmo_gsm_tester/suite.py 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/59/4759/1 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index dd1baf8..e1bb11a 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -23,9 +23,8 @@ import copy import traceback import pprint -from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms -from . import osmo_nitb -from . import osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp +from . import config, log, template, util, resource, schema, event_loop +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms from . import test class Timeout(Exception): -- To view, visit https://gerrit.osmocom.org/4759 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: event_loop: Remove unneeded commented import line and explan... Message-ID: Review at https://gerrit.osmocom.org/4760 event_loop: Remove unneeded commented import line and explanation Those lines come most probably from copy+paste using test.py header when creating the file. Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296 --- M src/osmo_gsm_tester/event_loop.py 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/60/4760/1 diff --git a/src/osmo_gsm_tester/event_loop.py b/src/osmo_gsm_tester/event_loop.py index 6f64ef9..ebe6afb 100644 --- a/src/osmo_gsm_tester/event_loop.py +++ b/src/osmo_gsm_tester/event_loop.py @@ -17,9 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# These will be initialized before each test run. -# A test script can thus establish its context by doing: -# from osmo_gsm_tester.test import * import time from . import log -- To view, visit https://gerrit.osmocom.org/4760 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suite: Remove unneeded import copy Message-ID: Review at https://gerrit.osmocom.org/4761 suite: Remove unneeded import copy Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145 --- M src/osmo_gsm_tester/suite.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/61/4761/1 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index e1bb11a..1a96b1e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -20,7 +20,6 @@ import os import sys import time -import copy import traceback import pprint from . import config, log, template, util, resource, schema, event_loop -- To view, visit https://gerrit.osmocom.org/4761 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:46 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:46 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem, process: Remove unneeded test import Message-ID: Review at https://gerrit.osmocom.org/4762 modem, process: Remove unneeded test import Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c --- M src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/process.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/62/4762/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index cb4a8de..ca8387b 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from . import log, test, util, event_loop, sms +from . import log, util, event_loop, sms from pydbus import SystemBus, Variant import time diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 4b68ef5..4c55fe9 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -23,7 +23,7 @@ import signal from datetime import datetime -from . import log, test, event_loop +from . import log, event_loop from .util import Dir class Process(log.Origin): -- To view, visit https://gerrit.osmocom.org/4762 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:46 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:46 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Rename test module to testenv and update references Message-ID: Review at https://gerrit.osmocom.org/4763 Rename test module to testenv and update references Preparation to move current Test class into its own module test from suite module. Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 --- M selftest/suite_test/test_suite/hello_world.py M selftest/suite_test/test_suite/test_error.py M selftest/suite_test/test_suite/test_fail.py M src/osmo_gsm_tester/suite.py R src/osmo_gsm_tester/testenv.py M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_connect_policy_acceptall.py M suites/aoip_smpp/esme_connect_policy_closed.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/debug/error.py M suites/debug/fail.py M suites/debug/fail_raise.py M suites/debug/interactive.py M suites/debug/pass.py M suites/netreg/register.py M suites/netreg/register_default.py M suites/smpp/esme_connect_policy_acceptall.py M suites/smpp/esme_connect_policy_closed.py M suites/smpp/esme_ms_sms_storeforward.py M suites/smpp/esme_ms_sms_transaction.py M suites/sms/mo_mt_sms.py M suites/ussd/assert_extension.py M suites/voice/mo_mt_call.py 29 files changed, 30 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/63/4763/1 diff --git a/selftest/suite_test/test_suite/hello_world.py b/selftest/suite_test/test_suite/hello_world.py index 9f3bf4a..073d07f 100644 --- a/selftest/suite_test/test_suite/hello_world.py +++ b/selftest/suite_test/test_suite/hello_world.py @@ -1,4 +1,4 @@ -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('hello world') print('I am %r / %r' % (suite.name(), test.name())) diff --git a/selftest/suite_test/test_suite/test_error.py b/selftest/suite_test/test_suite/test_error.py index 17b05f4..c0583ff 100755 --- a/selftest/suite_test/test_suite/test_error.py +++ b/selftest/suite_test/test_suite/test_error.py @@ -1,4 +1,4 @@ -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('I am %r / %r' % (suite.name(), test.name())) diff --git a/selftest/suite_test/test_suite/test_fail.py b/selftest/suite_test/test_suite/test_fail.py index 6880c81..cbaeded 100755 --- a/selftest/suite_test/test_suite/test_fail.py +++ b/selftest/suite_test/test_suite/test_fail.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('I am %r / %r' % (suite.name(), test.name())) diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 1a96b1e..5b9df76 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -24,7 +24,7 @@ import pprint from . import config, log, template, util, resource, schema, event_loop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms -from . import test +from . import testenv class Timeout(Exception): pass @@ -89,7 +89,7 @@ log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) self.status = Test.UNKNOWN self.start_timestamp = time.time() - test.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) + testenv.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), self.path) diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/testenv.py similarity index 97% rename from src/osmo_gsm_tester/test.py rename to src/osmo_gsm_tester/testenv.py index b939054..26b492e 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/testenv.py @@ -19,7 +19,7 @@ # These will be initialized before each test run. # A test script can thus establish its context by doing: -# from osmo_gsm_tester.test import * +# from osmo_gsm_tester.testenv import * trial = None suite = None test = None diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cfa5d6c..98b9170 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 6e5e459..f528742 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 428fc8d..a192ff3 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index 59e3fac..f5bccfb 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_smpp/esme_connect_policy_acceptall.py b/suites/aoip_smpp/esme_connect_policy_acceptall.py index 2a954d5..34516a3 100755 --- a/suites/aoip_smpp/esme_connect_policy_acceptall.py +++ b/suites/aoip_smpp/esme_connect_policy_acceptall.py @@ -4,7 +4,7 @@ # * SMPP interface of SMSC accepts SMPP clients (ESMEs) which do not appear on # the config file -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() # bts not started, only needed for mgcpgw diff --git a/suites/aoip_smpp/esme_connect_policy_closed.py b/suites/aoip_smpp/esme_connect_policy_closed.py index 29b25d1..79cb0c7 100755 --- a/suites/aoip_smpp/esme_connect_policy_closed.py +++ b/suites/aoip_smpp/esme_connect_policy_closed.py @@ -6,7 +6,7 @@ # * SMPP interface of SMSC rejects ESMEs with known system id but wrong password. # * SMPP interface of SMSC rejects ESEMs with unknown system id -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVPASWD = 0x0000000E SMPP_ESME_RINVSYSID = 0x0000000F diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index d49401f..f0d5dd5 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -8,7 +8,7 @@ # * When SMS is sent in 'store & forward' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'store & forward' mode, ESME receives a SMS receipt if it asked for it. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 6892a7e..2b12829 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -6,7 +6,7 @@ # * When SMS is sent in 'transaction' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'transaction' mode, ESME fails to send an SMS to non registered MS. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index a7c1f48..12f8f2b 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 36d6222..5204be8 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * USSD_COMMAND_GET_EXTENSION = '*#100#' diff --git a/suites/debug/error.py b/suites/debug/error.py index 8e146fa..032e26c 100644 --- a/suites/debug/error.py +++ b/suites/debug/error.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test error is reported properly. assert False diff --git a/suites/debug/fail.py b/suites/debug/fail.py index 8e30578..a2d9e3a 100644 --- a/suites/debug/fail.py +++ b/suites/debug/fail.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test failure is reported properly. test.set_fail('ExpectedFail', 'This failure is expected') diff --git a/suites/debug/fail_raise.py b/suites/debug/fail_raise.py index 336029b..c30a4f5 100644 --- a/suites/debug/fail_raise.py +++ b/suites/debug/fail_raise.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * class ExpectedExn(Exception): pass diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index d5f7615..6df5b6d 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/debug/pass.py b/suites/debug/pass.py index 42c1f25..c07f079 100644 --- a/suites/debug/pass.py +++ b/suites/debug/pass.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test passes correctly. pass diff --git a/suites/netreg/register.py b/suites/netreg/register.py index 9141986..9807d2b 100755 --- a/suites/netreg/register.py +++ b/suites/netreg/register.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/netreg/register_default.py b/suites/netreg/register_default.py index d15b3f5..797b2c1 100755 --- a/suites/netreg/register_default.py +++ b/suites/netreg/register_default.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/smpp/esme_connect_policy_acceptall.py b/suites/smpp/esme_connect_policy_acceptall.py index d22703d..904226b 100755 --- a/suites/smpp/esme_connect_policy_acceptall.py +++ b/suites/smpp/esme_connect_policy_acceptall.py @@ -4,7 +4,7 @@ # * SMPP interface of SMSC accepts SMPP clients (ESMEs) which do not appear on # the config file -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * nitb = suite.nitb() smsc = nitb.smsc diff --git a/suites/smpp/esme_connect_policy_closed.py b/suites/smpp/esme_connect_policy_closed.py index 7fac276..eaabb3d 100755 --- a/suites/smpp/esme_connect_policy_closed.py +++ b/suites/smpp/esme_connect_policy_closed.py @@ -6,7 +6,7 @@ # * SMPP interface of SMSC rejects ESMEs with known system id but wrong password. # * SMPP interface of SMSC rejects ESEMs with unknown system id -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVPASWD = 0x0000000E SMPP_ESME_RINVSYSID = 0x0000000F diff --git a/suites/smpp/esme_ms_sms_storeforward.py b/suites/smpp/esme_ms_sms_storeforward.py index 5ff6ad3..c35e3b1 100755 --- a/suites/smpp/esme_ms_sms_storeforward.py +++ b/suites/smpp/esme_ms_sms_storeforward.py @@ -8,7 +8,7 @@ # * When SMS is sent in 'store & forward' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'store & forward' mode, ESME receives a SMS receipt if it asked for it. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/smpp/esme_ms_sms_transaction.py b/suites/smpp/esme_ms_sms_transaction.py index a147754..efc244c 100755 --- a/suites/smpp/esme_ms_sms_transaction.py +++ b/suites/smpp/esme_ms_sms_transaction.py @@ -6,7 +6,7 @@ # * When SMS is sent in 'transaction' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'transaction' mode, ESME fails to send an SMS to non registered MS. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/sms/mo_mt_sms.py b/suites/sms/mo_mt_sms.py index 4e0ba08..f729f99 100755 --- a/suites/sms/mo_mt_sms.py +++ b/suites/sms/mo_mt_sms.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * nitb = suite.nitb() bts = suite.bts() diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 717c58d..77e5423 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * USSD_COMMAND_GET_EXTENSION = '*#100#' diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index 8cd3b23..b2d6f8d 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 13:51:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 13:51:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Move Test class to its own test.py module Message-ID: Review at https://gerrit.osmocom.org/4764 Move Test class to its own test.py module Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a --- M selftest/suite_test.ok M src/osmo_gsm_tester/report.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/test.py 4 files changed, 148 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/64/4764/1 diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok index cd5a9e7..79c37cc 100644 --- a/selftest/suite_test.ok +++ b/selftest/suite_test.ok @@ -110,7 +110,7 @@ ---------------------------------------------- tst test_error.py:[LINENR]: I am 'test_suite' / 'test_error.py:[LINENR]' [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]] tst test_error.py:[LINENR]: ERR: AssertionError: test_error.py:[LINENR]: assert False [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]: assert False] -tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [suite.py:[LINENR]] +tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -133,7 +133,7 @@ ---------------------------------------------- tst test_fail.py:[LINENR]: I am 'test_suite' / 'test_fail.py:[LINENR]' [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] tst test_fail.py:[LINENR]: ERR: EpicFail: This failure is expected [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] -tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -155,7 +155,7 @@ trial test_suite test_fail_raise.py ---------------------------------------------- tst test_fail_raise.py:[LINENR]: ERR: ExpectedFail: This failure is expected [test_suite?test_fail_raise.py:[LINENR]] [test_fail_raise.py:[LINENR]: raise ExpectedFail('This failure is expected')] -tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -233,7 +233,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- @@ -311,7 +311,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py index 82b2f13..a53504b 100644 --- a/src/osmo_gsm_tester/report.py +++ b/src/osmo_gsm_tester/report.py @@ -21,7 +21,7 @@ import math from datetime import datetime import xml.etree.ElementTree as et -from . import log, suite +from . import log, suite, test def trial_to_junit_write(trial, junit_path): elements = et.ElementTree(element=trial_to_junit(trial)) @@ -48,20 +48,20 @@ testsuite.append(testcase) return testsuite -def test_to_junit(test): +def test_to_junit(t): testcase = et.Element('testcase') - testcase.set('name', test.name()) - testcase.set('time', str(math.ceil(test.duration))) - if test.status == suite.Test.SKIP: + testcase.set('name', t.name()) + testcase.set('time', str(math.ceil(t.duration))) + if t.status == test.Test.SKIP: skip = et.SubElement(testcase, 'skipped') - elif test.status == suite.Test.FAIL: + elif t.status == test.Test.FAIL: failure = et.SubElement(testcase, 'failure') - failure.set('type', test.fail_type or 'failure') - failure.text = test.fail_message - if test.fail_tb: + failure.set('type', t.fail_type or 'failure') + failure.text = t.fail_message + if t.fail_tb: system_err = et.SubElement(testcase, 'system-err') - system_err.text = test.fail_tb - elif test.status != suite.Test.PASS: + system_err.text = t.fail_tb + elif t.status != test.Test.PASS: error = et.SubElement(testcase, 'error') error.text = 'could not run' return testcase @@ -102,12 +102,12 @@ msgs.extend([test_to_text(t) for t in suite.tests]) return '\n '.join(msgs) -def test_to_text(test): - msgs = ['%s: %s' % (test.status, test.name())] - if test.start_timestamp: - msgs.append('(%.1f sec)' % test.duration) - if test.status == suite.Test.FAIL: - msgs.append('%s: %s' % (test.fail_type, test.fail_message)) +def test_to_text(t): + msgs = ['%s: %s' % (t.status, t.name())] + if t.start_timestamp: + msgs.append('(%.1f sec)' % t.duration) + if t.status == test.Test.FAIL: + msgs.append('%s: %s' % (t.fail_type, t.fail_message)) return ' '.join(msgs) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 5b9df76..25aef35 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -20,11 +20,9 @@ import os import sys import time -import traceback import pprint -from . import config, log, template, util, resource, schema, event_loop -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms -from . import testenv +from . import config, log, template, util, resource, schema, event_loop, test +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme class Timeout(Exception): pass @@ -59,94 +57,6 @@ continue self.test_basenames.append(basename) - -class Test(log.Origin): - UNKNOWN = 'UNKNOWN' - SKIP = 'skip' - PASS = 'pass' - FAIL = 'FAIL' - - _run_dir = None - - def __init__(self, suite_run, test_basename): - self.basename = test_basename - super().__init__(log.C_TST, self.basename) - self.suite_run = suite_run - self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) - self.status = Test.UNKNOWN - self.start_timestamp = 0 - self.duration = 0 - self.fail_type = None - self.fail_message = None - - def get_run_dir(self): - if self._run_dir is None: - self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) - return self._run_dir - - def run(self): - try: - log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) - self.status = Test.UNKNOWN - self.start_timestamp = time.time() - testenv.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) - with self.redirect_stdout(): - util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), - self.path) - if self.status == Test.UNKNOWN: - self.set_pass() - except Exception as e: - if hasattr(e, 'msg'): - msg = e.msg - else: - msg = str(e) - if isinstance(e, AssertionError): - # AssertionError lacks further information on what was - # asserted. Find the line where the code asserted: - msg += log.get_src_from_exc_info(sys.exc_info()) - # add source file information to failure report - if hasattr(e, 'origins'): - msg += ' [%s]' % e.origins - tb_str = traceback.format_exc() - if isinstance(e, resource.NoResourceExn): - tb_str += self.suite_run.resource_status_str() - self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) - except BaseException as e: - # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. - self.err('TEST RUN ABORTED: %s' % type(e).__name__) - raise - - def name(self): - l = log.get_line_for_src(self.path) - if l is not None: - return '%s:%s' % (self._name, l) - return super().name() - - def set_fail(self, fail_type, fail_message, tb_str=None, src=4): - self.status = Test.FAIL - self.duration = time.time() - self.start_timestamp - self.fail_type = fail_type - self.fail_message = fail_message - - if tb_str is None: - # populate an exception-less call to set_fail() with traceback info - tb_str = ''.join(traceback.format_stack()[:-1]) - - self.fail_tb = tb_str - self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) - if self.fail_tb: - self.log(self.fail_tb, _level=log.L_TRACEBACK) - self.log('Test FAILED (%.1f sec)' % self.duration) - - def set_pass(self): - self.status = Test.PASS - self.duration = time.time() - self.start_timestamp - self.log('Test passed (%.1f sec)' % self.duration) - - def set_skip(self): - self.status = Test.SKIP - self.duration = 0 - class SuiteRun(log.Origin): UNKNOWN = 'UNKNOWN' PASS = 'PASS' @@ -176,7 +86,7 @@ def load_tests(self): self.tests = [] for test_basename in self.definition.test_basenames: - self.tests.append(Test(self, test_basename)) + self.tests.append(test.Test(self, test_basename)) def register_for_cleanup(self, *obj): assert all([hasattr(o, 'cleanup') for o in obj]) @@ -243,12 +153,12 @@ event_loop.register_poll_func(self.poll) if not self.reserved_resources: self.reserve_resources() - for test in self.tests: - if names and not test.name() in names: - test.set_skip() + for t in self.tests: + if names and not t.name() in names: + t.set_skip() continue - self.current_test = test - test.run() + self.current_test = t + t.run() self.stop_processes() self.objects_cleanup() self.reserved_resources.put_all() @@ -284,10 +194,10 @@ passed = 0 skipped = 0 failed = 0 - for test in self.tests: - if test.status == Test.PASS: + for t in self.tests: + if t.status == test.Test.PASS: passed += 1 - elif test.status == Test.FAIL: + elif t.status == test.Test.FAIL: failed += 1 else: skipped += 1 diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py new file mode 100644 index 0000000..5fa857b --- /dev/null +++ b/src/osmo_gsm_tester/test.py @@ -0,0 +1,115 @@ +# osmo_gsm_tester: test class +# +# Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import time +import traceback +from . import testenv + +from . import log, util, resource, event_loop, suite, sms + +class Test(log.Origin): + UNKNOWN = 'UNKNOWN' + SKIP = 'skip' + PASS = 'pass' + FAIL = 'FAIL' + + _run_dir = None + + def __init__(self, suite_run, test_basename): + self.basename = test_basename + super().__init__(log.C_TST, self.basename) + self.suite_run = suite_run + self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) + self.status = Test.UNKNOWN + self.start_timestamp = 0 + self.duration = 0 + self.fail_type = None + self.fail_message = None + + def get_run_dir(self): + if self._run_dir is None: + self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) + return self._run_dir + + def run(self): + try: + log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) + self.status = Test.UNKNOWN + self.start_timestamp = time.time() + testenv.setup(self.suite_run, self, suite, event_loop, sms) + with self.redirect_stdout(): + util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), + self.path) + if self.status == Test.UNKNOWN: + self.set_pass() + except Exception as e: + if hasattr(e, 'msg'): + msg = e.msg + else: + msg = str(e) + if isinstance(e, AssertionError): + # AssertionError lacks further information on what was + # asserted. Find the line where the code asserted: + msg += log.get_src_from_exc_info(sys.exc_info()) + # add source file information to failure report + if hasattr(e, 'origins'): + msg += ' [%s]' % e.origins + tb_str = traceback.format_exc() + if isinstance(e, resource.NoResourceExn): + tb_str += self.suite_run.resource_status_str() + self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) + except BaseException as e: + # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. + self.err('TEST RUN ABORTED: %s' % type(e).__name__) + raise + + def name(self): + l = log.get_line_for_src(self.path) + if l is not None: + return '%s:%s' % (self._name, l) + return super().name() + + def set_fail(self, fail_type, fail_message, tb_str=None, src=4): + self.status = Test.FAIL + self.duration = time.time() - self.start_timestamp + self.fail_type = fail_type + self.fail_message = fail_message + + if tb_str is None: + # populate an exception-less call to set_fail() with traceback info + tb_str = ''.join(traceback.format_stack()[:-1]) + + self.fail_tb = tb_str + self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) + if self.fail_tb: + self.log(self.fail_tb, _level=log.L_TRACEBACK) + self.log('Test FAILED (%.1f sec)' % self.duration) + + def set_pass(self): + self.status = Test.PASS + self.duration = time.time() - self.start_timestamp + self.log('Test passed (%.1f sec)' % self.duration) + + def set_skip(self): + self.status = Test.SKIP + self.duration = 0 + +# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 14:00:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 14:00:34 +0000 Subject: [PATCH] osmo-mgw[master]: contrib: Add osmo-mgw systemd service Message-ID: Review at https://gerrit.osmocom.org/4765 contrib: Add osmo-mgw systemd service Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712 --- A contrib/systemd/osmo-mgw.service 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/65/4765/1 diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service new file mode 100644 index 0000000..f75277e --- /dev/null +++ b/contrib/systemd/osmo-mgw.service @@ -0,0 +1,11 @@ +[Unit] +Description=Osmocom Media Gateway (MGW) + +[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg +RestartSec=2 + +[Install] +WantedBy=multi-user.target -- To view, visit https://gerrit.osmocom.org/4765 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 9 15:47:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 Nov 2017 15:47:31 +0000 Subject: osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Patch Set 1: This works fine in my PC and in RnD setup, which has a newer python 3 version. Afair some fixes were made between the 2 versions to solve circular imports between modules. -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 00:51:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 00:51:04 +0000 Subject: osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From admin at opensuse.org Fri Nov 10 01:00:22 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 10 Nov 2017 01:00:22 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a04fa3ed0cf9_a94d30f7c32076d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_9.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 231s] - [ 231s] -[+] Testing: ??? (non-recursive, direct truncation, not punctured) [ 231s] -[.] Input length : ret = 224 exp = 224 -> OK [ 231s] -[.] Output length : ret = 448 exp = 448 -> OK [ 231s] -[.] Pre computed vector checks: [ 231s] -[..] Encoding: OK [ 231s] -[..] Decoding: OK [ 231s] -[.] Random vector checks: [ 231s] -[..] Encoding / Decoding cycle : OK [ 231s] -[..] Encoding / Decoding cycle : OK [ 231s] -[..] Encoding / Decoding cycle : OK [ 231s] - [ 231s] ./testsuite.at:57: exit code was 132, expected 0 [ 231s] 9. testsuite.at:54: 9. conv (testsuite.at:54): FAILED (testsuite.at:57) [ 231s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 231s] make[1]: *** [override_dh_auto_test] Error 1 [ 231s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 231s] debian/rules:15: recipe for target 'build' failed [ 231s] make: *** [build] Error 2 [ 231s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 231s] [ 231s] build35 failed "build libosmocore_0.10.2.dsc" at Fri Nov 10 01:00:11 UTC 2017. [ 231s] [ 231s] ### VM INTERACTION START ### [ 234s] [ 224.861061] reboot: Power down [ 235s] ### VM INTERACTION END ### [ 235s] [ 235s] build35 failed "build libosmocore_0.10.2.dsc" at Fri Nov 10 01:00:15 UTC 2017. [ 235s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:03:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:03:00 +0000 Subject: osmo-bsc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:03:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:03:28 +0000 Subject: osmo-msc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4754 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:04:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:04:39 +0000 Subject: osmo-msc[master]: cosmetic: move log message to else branch In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4755 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6e962f4033c955ecd3539a719031a83c9b6205a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:05:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:05:15 +0000 Subject: osmo-mgw[master]: cosmetic: guard dead coded with ifdef In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:05:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:05:48 +0000 Subject: osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:06:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:06:43 +0000 Subject: osmo-mgw[master]: contrib: Add osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4765 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:03 +0000 Subject: libosmo-sccp[master]: ipa: Fix setting of OPC/DPC based on routing-context + override In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4753 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5e2244620cd48f848382eb595ce59c6212069788 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:09 +0000 Subject: libosmo-sccp[master]: vty: Make sure 'point-code override dpc' is saved with corre... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4752 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:16 +0000 Subject: libosmo-sccp[master]: xua: Write 'local-ip' only if non-NULL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4751 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:22 +0000 Subject: [MERGED] libosmo-sccp[master]: xua: Write 'local-ip' only if non-NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: xua: Write 'local-ip' only if non-NULL ...................................................................... xua: Write 'local-ip' only if non-NULL Avoid writing 'local-ip (null)' to the config file Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196 --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 890fec8..81b5521 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -489,7 +489,8 @@ vty_out(vty, " listen %s %u%s", get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), xs->cfg.local.port, VTY_NEWLINE); - vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); + if (xs->cfg.local.host) + vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); if (xs->cfg.accept_dyn_reg) vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/4751 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:22 +0000 Subject: [MERGED] libosmo-sccp[master]: vty: Make sure 'point-code override dpc' is saved with corre... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: Make sure 'point-code override dpc' is saved with correct indent ...................................................................... vty: Make sure 'point-code override dpc' is saved with correct indent Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6 --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 81b5521..61f9747 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -927,7 +927,7 @@ vty_out(vty, "%s", VTY_NEWLINE); if (as->cfg.pc_override.dpc) - vty_out(vty, " point-code override dpc %s%s", + vty_out(vty, " point-code override dpc %s%s", osmo_ss7_pointcode_print(as->inst, as->cfg.pc_override.dpc), VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/4752 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:08:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:08:23 +0000 Subject: [MERGED] libosmo-sccp[master]: ipa: Fix setting of OPC/DPC based on routing-context + override In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ipa: Fix setting of OPC/DPC based on routing-context + override ...................................................................... ipa: Fix setting of OPC/DPC based on routing-context + override As IPA is a transport layer underneath SCCP, and we don't have MTP-level OPC and DPC fields in it, we are using the "point-code override dpc" feature for setting the pseudo-M3UA DPC on incoming Rx packets, and we use the PC from the routing context as pseudo-M3UA OPC. However, we were so far only storing this in the M3UA data header, and not in the xua->mtp.{opc,dpc} members, which are consulted during the routing decisions. Change-Id: I5e2244620cd48f848382eb595ce59c6212069788 --- M src/ipa.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipa.c b/src/ipa.c index a7060db..11ff422 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -179,6 +179,8 @@ data_hdr.dpc = as->cfg.routing_key.pc; } xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); + xua->mtp.opc = data_hdr.opc; + xua->mtp.dpc = data_hdr.dpc; return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4753 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e2244620cd48f848382eb595ce59c6212069788 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:09:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:09:20 +0000 Subject: osmo-sgsn[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:09:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:09:25 +0000 Subject: [MERGED] osmo-sgsn[master]: vty: skip installing cmds now always installed by default In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default ...................................................................... vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b --- M src/gprs/gb_proxy_vty.c M src/gprs/gtphub_vty.c M src/gprs/sgsn_vty.c 3 files changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gb_proxy_vty.c b/src/gprs/gb_proxy_vty.c index 156f337..25ef756 100644 --- a/src/gprs/gb_proxy_vty.c +++ b/src/gprs/gb_proxy_vty.c @@ -808,7 +808,6 @@ install_element(CONFIG_NODE, &cfg_gbproxy_cmd); install_node(&gbproxy_node, config_write_gbproxy); - vty_install_default(GBPROXY_NODE); install_element(GBPROXY_NODE, &cfg_nsip_sgsn_nsei_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mcc_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mnc_cmd); diff --git a/src/gprs/gtphub_vty.c b/src/gprs/gtphub_vty.c index 3a46e81..ec35e4d 100644 --- a/src/gprs/gtphub_vty.c +++ b/src/gprs/gtphub_vty.c @@ -583,7 +583,6 @@ install_element(CONFIG_NODE, &cfg_gtphub_cmd); install_node(>phub_node, config_write_gtphub); - vty_install_default(GTPHUB_NODE); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_short_cmd); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_cmd); diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 496bd68..a01de2d 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -1232,7 +1232,6 @@ install_element(CONFIG_NODE, &cfg_sgsn_cmd); install_node(&sgsn_node, config_write_sgsn); - vty_install_default(SGSN_NODE); install_element(SGSN_NODE, &cfg_sgsn_bind_addr_cmd); install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd); //install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd); -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:10:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:10:54 +0000 Subject: osmo-bsc[master]: use osmo_sccp_inst_addr_name() instead of looking up ss7 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:13:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:13:19 +0000 Subject: osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 looks fine to me, but Holger is the person to ask. Also, might make sense to confirm with on-waves, as they probably are the only known user of all of this? -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:16:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:16:24 +0000 Subject: osmo-gsm-tester[master]: suite: Separate better internal imports and the ones aimed a... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4759 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:16:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:16:38 +0000 Subject: osmo-gsm-tester[master]: event_loop: Remove unneeded commented import line and explan... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4760 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:16:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:16:51 +0000 Subject: osmo-gsm-tester[master]: suite: Remove unneeded import copy In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4761 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:17:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:17:46 +0000 Subject: osmo-gsm-tester[master]: modem, process: Remove unneeded test import In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4762 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:18:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 01:18:02 +0000 Subject: osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/4750/1/src/libfilter/bsc_msg_filter.c File src/libfilter/bsc_msg_filter.c: Line 194: if (bsc_msg_acc_lst_check_allow(nat_lst, imsi) == 0) sure we can do it. Line 208: return 1; But that was "the global allow". So It might make sense to have an access-list define a default? -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:18:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:18:18 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 01:19:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 01:19:12 +0000 Subject: osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 might be good to state the rationale/intention in the log -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 02:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 02:33:35 +0000 Subject: [PATCH] osmo-mgw[master]: Tag/Release Version 1.2.0 Message-ID: Review at https://gerrit.osmocom.org/4766 Tag/Release Version 1.2.0 Change-Id: Ieff5a16285d2d2d46ad8977713fec622ad0596a7 --- M debian/changelog M debian/control R debian/libosmo-mgcp-client2.install R debian/libosmo-mgcp1.install M src/libosmo-mgcp-client/Makefile.am M src/libosmo-mgcp/Makefile.am 6 files changed, 36 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/66/4766/1 diff --git a/debian/changelog b/debian/changelog index c6db93c..bb9a849 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,33 @@ +osmo-mgw (1.2.0) unstable; urgency=medium + + [ Neels Hofmeyr ] + * jenkins: use osmo-clean-workspace.sh before and after build + * vty: skip installing cmds now always installed by default + * mgcp-client vty: use name 'mgw' instead of 'mgcpgw' + * mgcp client: vty: tweak doc strings + + [ Philipp Maier ] + * sdp: refactoring sdp parser/generator + * cosmetic: rename bts_codec to codec_str + * cosmetic: fix coding style for mgcp_parse_sdp_data() + * cosmetic: fix commenting style + * cosmetic: correct whitespaces + * client: fix stderror logging in unit-test + * client: add unified function to generate MGCP messages + * client: add ip address parsing to the client + * protocol: allow wildcarded DLCX + * mgcp: remove port/timeslot calculator functions from mgcp.h + * network: add separate log category + * cosmetic: make dummy packet handling more explicit + * network: autdetect rtp bind ip-address + * network: fix rtp packet length + * network: remove unused return code + + [ Pau Espin Pedrol ] + * mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' + + -- Harald Welte Fri, 10 Nov 2017 11:10:23 +0900 + osmo-mgw (1.1.0) unstable; urgency=medium * New upstream release diff --git a/debian/control b/debian/control index ef96796..11fa685 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Depends: libosmo-mgcp0, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks -Package: libosmo-mgcp0 +Package: libosmo-mgcp1 Section: libs Architecture: any Multi-Arch: same @@ -31,10 +31,10 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp: Osmocom's Media Gateway server library -Package: libosmo-mgcp-client1 +Package: libosmo-mgcp-client2 Section: libs Architecture: any Multi-Arch: same @@ -46,7 +46,7 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client2 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: osmo-bsc-mgcp diff --git a/debian/libosmo-mgcp-client1.install b/debian/libosmo-mgcp-client2.install similarity index 100% rename from debian/libosmo-mgcp-client1.install rename to debian/libosmo-mgcp-client2.install diff --git a/debian/libosmo-mgcp0.install b/debian/libosmo-mgcp1.install similarity index 100% rename from debian/libosmo-mgcp0.install rename to debian/libosmo-mgcp1.install diff --git a/src/libosmo-mgcp-client/Makefile.am b/src/libosmo-mgcp-client/Makefile.am index 1eaa370..1e4e764 100644 --- a/src/libosmo-mgcp-client/Makefile.am +++ b/src/libosmo-mgcp-client/Makefile.am @@ -20,7 +20,7 @@ # This is not at all related to the release version, but a range of supported # API versions. Read TODO_RELEASE in the source tree's root! -MGCP_CLIENT_LIBVERSION=1:0:1 +MGCP_CLIENT_LIBVERSION=2:0:0 lib_LTLIBRARIES = \ libosmo-mgcp-client.la \ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index a9e1b6c..fce0e1b 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -21,7 +21,7 @@ # This is not at all related to the release version, but a range of supported # API versions. Read TODO_RELEASE in the source tree's root! -MGCP_LIBVERSION=0:0:0 +MGCP_LIBVERSION=1:0:0 lib_LTLIBRARIES = \ libosmo-mgcp.la \ -- To view, visit https://gerrit.osmocom.org/4766 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieff5a16285d2d2d46ad8977713fec622ad0596a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 10 02:40:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 02:40:39 +0000 Subject: osmo-mgw[master]: Tag/Release Version 1.2.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4766 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieff5a16285d2d2d46ad8977713fec622ad0596a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 02:40:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 02:40:42 +0000 Subject: [MERGED] osmo-mgw[master]: Tag/Release Version 1.2.0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Tag/Release Version 1.2.0 ...................................................................... Tag/Release Version 1.2.0 Change-Id: Ieff5a16285d2d2d46ad8977713fec622ad0596a7 --- M debian/changelog M debian/control R debian/libosmo-mgcp-client2.install R debian/libosmo-mgcp1.install M src/libosmo-mgcp-client/Makefile.am M src/libosmo-mgcp/Makefile.am 6 files changed, 36 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/changelog b/debian/changelog index c6db93c..bb9a849 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,33 @@ +osmo-mgw (1.2.0) unstable; urgency=medium + + [ Neels Hofmeyr ] + * jenkins: use osmo-clean-workspace.sh before and after build + * vty: skip installing cmds now always installed by default + * mgcp-client vty: use name 'mgw' instead of 'mgcpgw' + * mgcp client: vty: tweak doc strings + + [ Philipp Maier ] + * sdp: refactoring sdp parser/generator + * cosmetic: rename bts_codec to codec_str + * cosmetic: fix coding style for mgcp_parse_sdp_data() + * cosmetic: fix commenting style + * cosmetic: correct whitespaces + * client: fix stderror logging in unit-test + * client: add unified function to generate MGCP messages + * client: add ip address parsing to the client + * protocol: allow wildcarded DLCX + * mgcp: remove port/timeslot calculator functions from mgcp.h + * network: add separate log category + * cosmetic: make dummy packet handling more explicit + * network: autdetect rtp bind ip-address + * network: fix rtp packet length + * network: remove unused return code + + [ Pau Espin Pedrol ] + * mgcp_client_vty.c: Fix VTY compatibility with 'mgcpgw bts-base' + + -- Harald Welte Fri, 10 Nov 2017 11:10:23 +0900 + osmo-mgw (1.1.0) unstable; urgency=medium * New upstream release diff --git a/debian/control b/debian/control index ef96796..11fa685 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Depends: libosmo-mgcp0, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks -Package: libosmo-mgcp0 +Package: libosmo-mgcp1 Section: libs Architecture: any Multi-Arch: same @@ -31,10 +31,10 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp: Osmocom's Media Gateway server library -Package: libosmo-mgcp-client1 +Package: libosmo-mgcp-client2 Section: libs Architecture: any Multi-Arch: same @@ -46,7 +46,7 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client2 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: osmo-bsc-mgcp diff --git a/debian/libosmo-mgcp-client1.install b/debian/libosmo-mgcp-client2.install similarity index 100% rename from debian/libosmo-mgcp-client1.install rename to debian/libosmo-mgcp-client2.install diff --git a/debian/libosmo-mgcp0.install b/debian/libosmo-mgcp1.install similarity index 100% rename from debian/libosmo-mgcp0.install rename to debian/libosmo-mgcp1.install diff --git a/src/libosmo-mgcp-client/Makefile.am b/src/libosmo-mgcp-client/Makefile.am index 1eaa370..1e4e764 100644 --- a/src/libosmo-mgcp-client/Makefile.am +++ b/src/libosmo-mgcp-client/Makefile.am @@ -20,7 +20,7 @@ # This is not at all related to the release version, but a range of supported # API versions. Read TODO_RELEASE in the source tree's root! -MGCP_CLIENT_LIBVERSION=1:0:1 +MGCP_CLIENT_LIBVERSION=2:0:0 lib_LTLIBRARIES = \ libosmo-mgcp-client.la \ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index a9e1b6c..fce0e1b 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -21,7 +21,7 @@ # This is not at all related to the release version, but a range of supported # API versions. Read TODO_RELEASE in the source tree's root! -MGCP_LIBVERSION=0:0:0 +MGCP_LIBVERSION=1:0:0 lib_LTLIBRARIES = \ libosmo-mgcp.la \ -- To view, visit https://gerrit.osmocom.org/4766 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieff5a16285d2d2d46ad8977713fec622ad0596a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 02:41:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 Nov 2017 02:41:36 +0000 Subject: [PATCH] osmo-bsc[master]: configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 Message-ID: Review at https://gerrit.osmocom.org/4767 configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 We recently started to use some symbols that were not available in libosmo-mgcp-client-dev 1.0.0 or even 1.1.0. Let's depend on a newly tagged version of libosmo-mgcp-client. Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c --- M configure.ac M debian/control 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/67/4767/1 diff --git a/configure.ac b/configure.ac index 4ec903a..f741441 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) -PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.2.0) PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files diff --git a/debian/control b/debian/control index 963d664..5e9ad60 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), libosmo-legacy-mgcp-dev (>= 1.0.0), - libosmo-mgcp-client-dev (>= 1.0.0) + libosmo-mgcp-client-dev (>= 1.2.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4767 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 10 06:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 06:44:54 +0000 Subject: osmo-bsc[master]: mgcp: use osmo-mgw to switch RTP streams In-Reply-To: References: Message-ID: Patch Set 15: (1 comment) https://gerrit.osmocom.org/#/c/4334/15/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 1012: return NULL; One general high-level comment. All software will fail. Put yourself into the mindset it is 36C3, it is late, you are tired and handover/assignment is failing. All you got is the log file (and maybe a PCAP). From the 100 hundred concurrent calls some fail. Is MGW_%d enough information to identify the trunk? Does it help you to identify the IMSI so you can find the packets in the PCAP file? Would you have significant information to build a mental model of what happens? And I picked the line as it represents a silent failure (Unlikely it will be ever returning NULL here though). -- To view, visit https://gerrit.osmocom.org/4334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a Gerrit-PatchSet: 15 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 09:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 10 Nov 2017 09:58:25 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw Message-ID: Review at https://gerrit.osmocom.org/4768 common: add VTY port number for osmo-mgw Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/68/4768/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 08d9b3c..32baad5 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,6 +35,7 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|ggsn (OpenGGSN) +|TCP|4261|telnet (VTY)|osmo-mgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/4768 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 10 09:59:55 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 10 Nov 2017 09:59:55 +0000 Subject: [PATCH] libosmocore[master]: vty: add port number for osmo-mgw Message-ID: Review at https://gerrit.osmocom.org/4769 vty: add port number for osmo-mgw Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96 --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/4769/1 diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab3e1d5..ab43f05 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -28,4 +28,5 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 +#define OSMO_VTY_PORT_MGW 4261 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/4769 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:07:51 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 10 Nov 2017 10:07:51 +0000 Subject: [PATCH] osmo-mgw[master]: vty: assign new VTY port numbr Message-ID: Review at https://gerrit.osmocom.org/4770 vty: assign new VTY port numbr Osmo-mgw currently uses VTY port number of osmo-bsc_mgwp, which may lead to colisions when operating osmo-bsc_mgcp and osmo-mgw at the same time on the same machine. Assign osmo-mgw a new port number Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f Depends: libosmocore Ied224fe94b5152fd19e259396fbc0eaf69be4b96 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/70/4770/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index ab54e62..6932468 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -279,7 +279,7 @@ /* start telnet after reading config for vty_get_bind_addr() */ rc = telnet_init_dynif(tall_bsc_ctx, NULL, - vty_get_bind_addr(), OSMO_VTY_PORT_BSC_MGCP); + vty_get_bind_addr(), OSMO_VTY_PORT_MGW); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4770 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:31:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 10 Nov 2017 10:31:39 +0000 Subject: [MERGED] osmo-mgw[master]: contrib: Add osmo-mgw systemd service In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: contrib: Add osmo-mgw systemd service ...................................................................... contrib: Add osmo-mgw systemd service Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712 --- A contrib/systemd/osmo-mgw.service 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service new file mode 100644 index 0000000..f75277e --- /dev/null +++ b/contrib/systemd/osmo-mgw.service @@ -0,0 +1,11 @@ +[Unit] +Description=Osmocom Media Gateway (MGW) + +[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg +RestartSec=2 + +[Install] +WantedBy=multi-user.target -- To view, visit https://gerrit.osmocom.org/4765 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:41:42 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 10:41:42 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code Message-ID: Review at https://gerrit.osmocom.org/4771 mobile: Begin with a primitive interface on top of the code We want the script interface to interface through a primitive interface. This will allow to move it to a different thread or a process in the future. The script interface will just use the primitives. It is not clear how "sap" will be used here. I am keeping it at 0 right now. The first primitive is starting a timer with a request and then getting an indication as a response. Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/main.c A src/host/layer23/src/mobile/primitives.c 7 files changed, 126 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/4771/1 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index e96bdc0..bb26acd 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -23,6 +23,7 @@ DSIM, DGPS, DLUA, + DPRIM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index b58b952..12cf24b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h + transaction.h vty.h mncc_sock.h primitives.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h new file mode 100644 index 0000000..0ba0cac --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -0,0 +1,33 @@ +#pragma once + +#include + +/** + * Mobile Script<->App primitives. Application script will receive + * indications and will send primitives to the lower layers. Here + * we will convert from internal state/events to the primitives. In + * the future the indications might be generated at lower levels + * directly. + */ +enum mobile_prim { + PRIM_MOB_TIMER, +}; + +struct mobile_prim_intf { + struct osmocom_ms *ms; + void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr *hdr); +}; + +/** + * Primitive to create timers and get indication once they have + * expired. Currently there is no way to cancel timers. + */ +struct mobile_timer_prim { + struct osmo_prim_hdr hdr; /*!< Primitive base class */ + uint64_t timer_id; /*!< Unique Id identifying the timer */ + int seconds; /*!< Seconds the timer should fire in */ +}; + + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index ce3af2c..1cbb1c3 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -133,6 +133,12 @@ .color = "\033[1;32m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DPRIM] = { + .name = "DPRIM", + .description = "PRIM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 50ced6c..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -5,7 +5,7 @@ noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ gsm48_rr.c mnccms.c settings.c subscriber.c support.c \ - transaction.c vty_interface.c voice.c mncc_sock.c + transaction.c vty_interface.c voice.c mncc_sock.c primitives.c bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 848be6e..500270d 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA:DPRIM"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c new file mode 100644 index 0000000..bdfbabb --- /dev/null +++ b/src/host/layer23/src/mobile/primitives.c @@ -0,0 +1,83 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include +#include + +struct timer_closure { + struct mobile_prim_intf *intf; + struct osmo_timer_list timer; + uint64_t id; +}; + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms) +{ + struct mobile_prim_intf *intf; + + intf = talloc_zero(ms, struct mobile_prim_intf); + intf->ms = ms; + return intf; +} + +static void timer_expired_cb(void *_closure) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_closure *closure = _closure; + struct mobile_prim_intf *intf; + + intf = closure->intf; + prim.timer_id = closure->id; + talloc_free(closure); + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_INDICATION, NULL); + intf->indication(intf, &prim.hdr); +} + +static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_closure *closure; + + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", prim->timer_id); + + closure = talloc_zero(intf, struct timer_closure); + closure->intf = intf; + closure->id = prim->timer_id; + closure->timer.cb = timer_expired_cb; + closure->timer.data = closure; + osmo_timer_schedule(&closure->timer, prim->seconds, 0); + return 0; +} + +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr) +{ + switch (OSMO_PRIM_HDR(hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_REQUEST): + return create_timer(intf, (struct mobile_timer_prim *)hdr); + break; + default: + LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(hdr)); + break; + } + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:41:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 10:41:43 +0000 Subject: [PATCH] osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua.. Message-ID: Review at https://gerrit.osmocom.org/4772 WIP: First invocation of a primitive and callback into lua.. local timer = osmo.timeout(5, function() print("After timeout!!!") end) print("Timer", timer, type(timer)) <0011> @foo.lua:18 Timer<0011> @foo.lua:18 userdata Connection to layer 1 failed! Using configuration from ../../../doc/examples/mobile/default.cfg VTY available on 127.0.0.1 4247 <0011> @foo.lua:16 After timeout!!! Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1 --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/primitives.c M src/host/layer23/src/mobile/script_lua.c 3 files changed, 138 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/4772/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 0ba0cac..c5bceb5 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -16,6 +16,9 @@ struct mobile_prim_intf { struct osmocom_ms *ms; void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr *hdr); + + /* Internal state */ + struct llist_head timers; }; /** @@ -31,3 +34,4 @@ struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); +void mobile_prim_intf_free(struct mobile_prim_intf *intf); diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index bdfbabb..71e4b63 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -25,6 +25,7 @@ #include struct timer_closure { + struct llist_head entry; struct mobile_prim_intf *intf; struct osmo_timer_list timer; uint64_t id; @@ -36,7 +37,21 @@ intf = talloc_zero(ms, struct mobile_prim_intf); intf->ms = ms; + + INIT_LLIST_HEAD(&intf->timers); return intf; +} + +void mobile_prim_intf_free(struct mobile_prim_intf *intf) +{ + struct timer_closure *timer, *tmp; + + llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) { + osmo_timer_del(&timer->timer); + llist_del(&timer->entry); + talloc_free(timer); + } + talloc_free(intf); } static void timer_expired_cb(void *_closure) @@ -47,6 +62,7 @@ intf = closure->intf; prim.timer_id = closure->id; + llist_del(&closure->entry); talloc_free(closure); osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_INDICATION, NULL); @@ -64,6 +80,7 @@ closure->id = prim->timer_id; closure->timer.cb = timer_expired_cb; closure->timer.data = closure; + llist_add_tail(&closure->entry, &intf->timers); osmo_timer_schedule(&closure->timer, prim->seconds, 0); return 0; } diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 1cf9050..5e9859e 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -25,7 +25,26 @@ #include #include +#include + #include + +struct timer_userdata { + int cb_ref; +}; + +static char lua_prim_key[] = "osmocom.org-mobile-prim"; + +static struct mobile_prim_intf *get_primitive(lua_State *L) +{ + struct mobile_prim_intf *intf; + + lua_pushlightuserdata(L, lua_prim_key); + lua_gettable(L, LUA_REGISTRYINDEX); + intf = (void *) lua_topointer(L, -1); + lua_pop(L, 1); + return intf; +} static int lua_osmo_do_log(lua_State *L, int loglevel) { @@ -75,6 +94,77 @@ { NULL, NULL }, }; +static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_userdata *timer = (void *)(intptr_t) prim->timer_id; + lua_State *L = intf->ms->lua_state; + + lua_rawgeti(L, LUA_REGISTRYINDEX, timer->cb_ref); + luaL_unref(L, LUA_REGISTRYINDEX, timer->cb_ref); + lua_pcall(L, 0, 0, 0); +} + +static int lua_osmo_timeout(lua_State *L) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_userdata *timer; + + if(lua_gettop(L) != 2) { + lua_pushliteral(L, "Need two arguments"); + lua_error(L); + return 0; + } + + luaL_argcheck(L, lua_isnumber(L, -2), 1, "Timeout needs to be a number"); + luaL_argcheck(L, lua_isfunction(L, -1), 2, "Callback needs to be a function"); + + /* + * Create a handle to prevent the function to be GCed while we run the + * timer. Add a metatable to the object so itself will be GCed properly. + */ + timer = lua_newuserdata(L, sizeof(*timer)); + luaL_getmetatable(L, "Timer"); + lua_setmetatable(L, -2); + + lua_pushvalue(L, -2); + timer->cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + + /* Take the address of the user data... */ + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_REQUEST, NULL); + prim.timer_id = (intptr_t) timer; + prim.seconds = lua_tonumber(L, -3); + mobile_prim_intf_req(get_primitive(L), &prim.hdr); + + return 1; +} + +static int lua_timer_gc(lua_State *L) +{ + printf("GC...\n"); + return 0; +} + +static const struct luaL_Reg timer_funcs[] = { + { "__gc", lua_timer_gc }, + { NULL, NULL }, +}; + +static const struct luaL_Reg osmo_funcs[] = { + { "timeout", lua_osmo_timeout }, + { NULL, NULL }, +}; + +static void lua_prim_ind(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr) +{ + switch (OSMO_PRIM_HDR(hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): + return handle_timeout(intf, (struct mobile_timer_prim *)hdr); + break; + default: + LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(hdr)); + }; +} + /* * Add functions to the global lua scope. Technically these are * included in the _G table. The following lua code can be used @@ -89,9 +179,29 @@ lua_pop(state, 1); } -static void add_runtime(lua_State *state, struct osmocom_ms *ms) +static void add_runtime(lua_State *state, struct mobile_prim_intf *intf) { add_globals(state); + + /* Add a osmo module/table. Seems an oldschool module? */ + lua_newtable(state); + luaL_setfuncs(state, osmo_funcs, 0); + lua_setglobal(state, "osmo"); + + /* Create metatables so we can GC objects... */ + luaL_newmetatable(state, "Timer"); + lua_pushliteral(state, "__index"); + lua_pushvalue(state, -2); + lua_rawset(state, -3); + luaL_setfuncs(state, timer_funcs, 0); + lua_pop(state, 1); + + + /* Remember the primitive pointer... store it in the registry */ + lua_pushlightuserdata(state, lua_prim_key); + lua_pushlightuserdata(state, intf); + lua_settable(state, LUA_REGISTRYINDEX); + } static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) @@ -115,6 +225,7 @@ int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) { + struct mobile_prim_intf *intf; int err; if (ms->lua_state) @@ -124,6 +235,11 @@ return -1; luaL_openlibs(ms->lua_state); + + intf = mobile_prim_intf_alloc(ms); + intf->indication = lua_prim_ind; + add_runtime(ms->lua_state, intf); + err = luaL_loadfilex(ms->lua_state, filename, NULL); if (err) { vty_out(vty, "%% LUA load error: %s%s", @@ -132,7 +248,6 @@ return -2; } - add_runtime(ms->lua_state, ms); err = lua_pcall(ms->lua_state, 0, 0, 0); if (err) { -- To view, visit https://gerrit.osmocom.org/4772 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:42:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 10:42:38 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 1: So the question if this is the intended use of the primitive interface. One todo is which SAP client code should use? -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:45:04 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 10:45:04 +0000 Subject: osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua.. In-Reply-To: References: Message-ID: Patch Set 1: And here is the just completed callback code.. * Call from Lua->C and issue a primtivie.. * On primitive indication callback into LUA So I want a callback style of work for the scripts. Instead of plain imperative. But actually we could also have a style of... osmo.timeout(5) print("Continue stuff") and yield execution inbetween. The big issue with this.. is one needs to invent kind of a selective receive to wait for SMS or network selection... -- To view, visit https://gerrit.osmocom.org/4772 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 10:57:16 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 10 Nov 2017 10:57:16 +0000 Subject: osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua.. In-Reply-To: References: Message-ID: Patch Set 1: (5 comments) https://gerrit.osmocom.org/#/c/4772/1/src/host/layer23/src/mobile/script_lua.c File src/host/layer23/src/mobile/script_lua.c: Line 99: struct timer_userdata *timer = (void *)(intptr_t) prim->timer_id; Don't we have a macro for ptr/int conversion? Line 114: lua_error(L); I think this is using a "longjmp" same for luaL_argcheck... Line 127: lua_setmetatable(L, -2); In LUA one manipulates the stack and 1 <= abs(index) <= top-of-stack is a valid range. One can use negative or positive numbers. stack pos #1.. the first push to the stack (e.g. bottom) stack pos #-1 the top of stack (last push) Line 143: printf("GC...\n"); Need to cancel the timer here. There is no PRIM_OP_CANCEL. Should there be? Otherwise I do PRIM_MOB_TIMER_CANCEL primitive and no indication.. Line 147: static const struct luaL_Reg timer_funcs[] = { these are the instance methods of the timer object. SO far only GC.. but we can add cancel later.. -- To view, visit https://gerrit.osmocom.org/4772 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 12:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 10 Nov 2017 12:46:25 +0000 Subject: [PATCH] meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service Message-ID: Review at https://gerrit.osmocom.org/4773 osmo-mgw: Split packages and install osmo-mgw systemd service Change-Id: I1b902842cf8766af1e58de76e46786213d222389 --- M recipes-osmocom/osmo-mgw/osmo-mgw.inc 1 file changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/73/4773/1 diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 45ee338..2d6db64 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif bcg729 libgsm" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -17,6 +17,38 @@ install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service ${D}${systemd_system_unitdir}/ + + install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg ${D}${sysconfdir}/osmocom/osmo-mgw.cfg + install -m 0644 ${S}/contrib/systemd/osmo-mgw.service ${D}${systemd_system_unitdir}/ } -SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" +PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp" +SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service" +SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service" + +FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}" +FILES_libosmo-legacy-mgcp-dev = " \ + ${includedir}/osmocom/legacy_mgcp \ + ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \ + ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}" +FILES_libosmo-mgcp-dev = " \ + ${includedir}/osmocom/mgcp \ + ${libdir}/pkgconfig/libosmo-mgcp.pc \ + ${libdir}/libosmo-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}" +FILES_libosmo-mgcp-client-dev = " \ + ${includedir}/osmocom/mgcp_client \ + ${libdir}/pkgconfig/libosmo-mgcp-client.pc \ + ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \ + " + +FILES_osmo-bsc-mgcp = " \ + ${bindir}/osmo-bsc_mgcp \ + ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ + ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ + " -- To view, visit https://gerrit.osmocom.org/4773 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 10 14:53:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 14:53:48 +0000 Subject: osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4768 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 14:54:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 14:54:32 +0000 Subject: libosmocore[master]: vty: add port number for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4769 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 14:55:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 14:55:04 +0000 Subject: [MERGED] libosmocore[master]: vty: add port number for osmo-mgw In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: add port number for osmo-mgw ...................................................................... vty: add port number for osmo-mgw Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96 --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab3e1d5..ab43f05 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -28,4 +28,5 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 +#define OSMO_VTY_PORT_MGW 4261 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/4769 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 14:55:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 14:55:07 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: common: add VTY port number for osmo-mgw ...................................................................... common: add VTY port number for osmo-mgw Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 08d9b3c..32baad5 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,6 +35,7 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|ggsn (OpenGGSN) +|TCP|4261|telnet (VTY)|osmo-mgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/4768 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 14:59:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 14:59:12 +0000 Subject: osmo-mgw[master]: vty: assign new VTY port numbr In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 you also need to adjust the osmo-appdesc.py or whatever it is called so the VTY tests are using the new port number -- To view, visit https://gerrit.osmocom.org/4770 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 15:06:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 15:06:47 +0000 Subject: meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4773 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 15:24:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 15:24:29 +0000 Subject: [PATCH] osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL... Message-ID: Review at https://gerrit.osmocom.org/4774 fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/74/4774/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 8c6bd6e..9e04e50 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -853,12 +853,12 @@ struct mgcp_conn_rtp *conn = NULL; uint32_t conn_id; + if (p->found != 0) + return create_err_response(NULL, error_code, "DLCX", p->trans); + LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); - - if (p->found != 0) - return create_err_response(NULL, error_code, "DLCX", p->trans); if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/4774 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 15:58:09 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 10 Nov 2017 15:58:09 +0000 Subject: [PATCH] osmo-mgw[master]: vty: simplify endpoint allocation Message-ID: Review at https://gerrit.osmocom.org/4775 vty: simplify endpoint allocation mgcp_parse_config() uses a helper function allocate_trunk() to perform the trunk allocation. This helper function only calls mgcp_endpoints_allocate() and checks the return code. Call mgcp_endpoints_allocate() directly from mgcp_parse_config() Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/4775/1 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..fcf756b 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1251,18 +1251,6 @@ return 0; } -static int allocate_trunk(struct mgcp_trunk_config *trunk) -{ - if (mgcp_endpoints_allocate(trunk) != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "Failed to allocate %d endpoints on trunk %d.\n", - trunk->number_endpoints, trunk->trunk_nr); - return -1; - } - - return 0; -} - int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg, enum mgcp_role role) { @@ -1286,14 +1274,14 @@ return -1; } - if (allocate_trunk(&g_cfg->trunk) != 0) { + if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize the virtual trunk.\n"); return -1; } llist_for_each_entry(trunk, &g_cfg->trunks, entry) { - if (allocate_trunk(trunk) != 0) { + if (mgcp_endpoints_allocate(trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize E1 trunk %d.\n", trunk->trunk_nr); -- To view, visit https://gerrit.osmocom.org/4775 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:00:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:00:33 +0000 Subject: [PATCH] osmo-hlr[master]: db-tool: add command 'create' Message-ID: Review at https://gerrit.osmocom.org/4776 db-tool: add command 'create' Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12 --- M src/hlr_db_tool.c 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/76/4776/1 diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index eb82c92..13281f2 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -51,8 +51,7 @@ static void print_help() { printf("\n"); - printf("Usage: osmo-hlr-db-tool [-l ] import-nitb-db ]\n"); - printf("Call without arguments to create a new empty ./hlr.db.\n"); + printf("Usage: osmo-hlr-db-tool [-l ] [create|import-nitb-db ]\n"); printf(" -l --database db-name The OsmoHLR database to use, default '%s'.\n", cmdline_opts.db_file); printf(" -h --help This text.\n"); @@ -61,6 +60,11 @@ printf(" -T --timestamp Prefix every log line with a timestamp.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -V --version Print the version of OsmoHLR-db-tool.\n"); + printf("\n"); + printf("Commands:\n"); + printf("\n"); + printf(" create Create an empty OsmoHLR database.\n"); + printf(" (All commands imply this if none exists yet.)\n"); printf("\n"); printf(" import-nitb-db db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); printf(" Be aware that the import is lossy, only the\n"); @@ -141,7 +145,10 @@ cmd = argv[optind++]; printf("command '%s', %d extra arguments\n", cmd, argc - optind); - if (!strcmp(cmd, "import-nitb-db")) { + if (!strcmp(cmd, "create")) { + /* Nothing to do, just run the main program to open the database without running any + * action, which will bootstrap all tables. */ + } else if (!strcmp(cmd, "import-nitb-db")) { if (argc - optind < 1) { fprintf(stderr, "You must specify an input db file\n"); print_help(); @@ -387,7 +394,8 @@ goto too_many_actions; main_action = import_nitb_db; } - /* Future: add more main_actions, besides --import-nitb-db, here. */ + /* Future: add more main_actions, besides import-nitb-db, here. + * For command 'create', no action is required. */ /* Just in case any db actions need randomness */ rc = rand_init(); -- To view, visit https://gerrit.osmocom.org/4776 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:00:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:00:33 +0000 Subject: [PATCH] osmo-hlr[master]: db-tool: cosmetic: tweak printf output Message-ID: Review at https://gerrit.osmocom.org/4777 db-tool: cosmetic: tweak printf output Say to indicate a filename. No need to print the cmd and arg count, really. Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b --- M src/hlr_db_tool.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/77/4777/1 diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index 13281f2..fb10f3e 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -66,7 +66,7 @@ printf(" create Create an empty OsmoHLR database.\n"); printf(" (All commands imply this if none exists yet.)\n"); printf("\n"); - printf(" import-nitb-db db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); + printf(" import-nitb-db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); printf(" Be aware that the import is lossy, only the\n"); printf(" IMSI, MSISDN, nam_cs/ps and 2G auth data are set.\n"); } @@ -143,7 +143,6 @@ } cmd = argv[optind++]; - printf("command '%s', %d extra arguments\n", cmd, argc - optind); if (!strcmp(cmd, "create")) { /* Nothing to do, just run the main program to open the database without running any -- To view, visit https://gerrit.osmocom.org/4777 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:00:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:00:33 +0000 Subject: [PATCH] osmo-hlr[master]: db-tool: error-exit on too many arguments Message-ID: Review at https://gerrit.osmocom.org/4778 db-tool: error-exit on too many arguments Each arg parsing should increment optind, so if there are any surplus args in the end, that's an error. Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961 --- M src/hlr_db_tool.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/78/4778/1 diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index fb10f3e..d8a3584 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -159,6 +159,12 @@ print_help(); exit(EXIT_FAILURE); } + + if (argc - optind > 0) { + fprintf(stderr, "Too many arguments: '%s'\n", argv[optind]); + print_help(); + exit(EXIT_FAILURE); + } } static void signal_hdlr(int signal) -- To view, visit https://gerrit.osmocom.org/4778 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:15:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:15:23 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add suites_dir section In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:31:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:31:09 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4667 to look at the new patch set (#2). OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/67/4667/2 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..bf5f04f 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,61 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +This dir contains scenario configuration files. + +Scenarios define contraints to serve the resource requests of a 'suite.conf', +to select specific resources from the general resource pool specified in 'resources.conf'. + +All 'times' attributes are expanded before matching. For example, if a 'suite.conf' +requests two BTS, we may enforce that both BTS should be of type 'osmo-bts-sysmo' in +these ways: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that remaining +resources have no restrictions to be taken into consideration. + +To apply restrictions only on the second resource, the first element can be left +emtpy, like: + +---- +resources: + bts: + - {} + - type: osmo-bts-sysmo +---- + +On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any number of +such scenario configurations can be combined in the form: + +---- +:[+[+...]] +---- + +e.g. + +---- +my_suite:sysmo+tch_f+amr +---- + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:31:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:31:29 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 2: Pau, could you verify that my edits are correct? -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:36:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:36:34 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4666 to look at the new patch set (#2). OsmoGSMTester: Improve Trial section content Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc --- M OsmoGSMTester/chapters/trial.adoc 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/66/4666/2 diff --git a/OsmoGSMTester/chapters/trial.adoc b/OsmoGSMTester/chapters/trial.adoc index 86bf12b..bc9fe05 100644 --- a/OsmoGSMTester/chapters/trial.adoc +++ b/OsmoGSMTester/chapters/trial.adoc @@ -18,5 +18,14 @@ * the rendered configuration files used to run the binaries * stdout and stderr outputs of the binaries +* pcap files for processes doing relevant network communication * a test log -* *TODO*: jenkins parsable XML reports +* jenkins parsable XML (Junit) reports + +The script in 'contrib/jenkins-run.sh' takes care of related tasks such as + +* creating the dir structure, +* generating md5 sums for the various tar.gz containing software builds to be tested, +* cleaning up after the build, +* saving extra logs such as journalctl output from ofonod, +* generating a final .tar.gz file with all the logs and reports. -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:37:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:37:30 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update defaults.conf example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:37:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:37:40 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:37:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:37:49 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO In-Reply-To: References: Message-ID: Patch Set 1: yay :) -- To view, visit https://gerrit.osmocom.org/4664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:39:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:39:13 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update resources cfg documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:39:59 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 10 Nov 2017 16:39:59 +0000 Subject: [PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime Message-ID: Review at https://gerrit.osmocom.org/4779 vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_vty.c 2 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/79/4779/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..1d46b8e 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int new_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index fcf756b..ac4e82b 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.new_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -509,8 +509,19 @@ "number endpoints <0-65534>", "Number options\n" "Endpoints available\n" "Number endpoints\n") { - /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + if (g_cfg->trunk.new_number_endpoints < 0) { + /* + 1 as we start counting at one */ + g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.new_number_endpoints = + g_cfg->trunk.number_endpoints; + } else { + g_cfg->trunk.new_number_endpoints = atoi(argv[0]) + 1; + vty_out(vty, "%%endpoint number changed, write config file and%s", + VTY_NEWLINE); + vty_out(vty, "%%restart osmo-mgw for the changes take effect%s", + VTY_NEWLINE); + } + return CMD_SUCCESS; } @@ -1262,6 +1273,8 @@ cfg->osmux_batch_size = OSMUX_BATCH_DEFAULT_MAX; g_cfg = cfg; + g_cfg->trunk.new_number_endpoints = -1; + rc = vty_read_config_file(config_file, NULL); if (rc < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:40:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:40:02 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Document how to setup main unit to set CAP_NE... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4662 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:40:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:40:11 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Move TODO comment to a redmine task In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:41:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:41:24 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Installation: change some confusing terminology In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c882e77b469629028b8d773053783e18f3d1737 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:41:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:41:53 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:41:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:41:57 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:42:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:42:53 +0000 Subject: osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Patch Set 3: Verified+1 Code-Review+3 -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:43:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:43:06 +0000 Subject: [MERGED] osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins: Follow the convention and create a jenkins.sh as well ...................................................................... jenkins: Follow the convention and create a jenkins.sh as well Instead of modifying the job on Jenkins, let's do it like in our other projects. Create the diretcory if it doesn't exist and use git pull origin for the Debian9 system. Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa --- A contrib/jenkins.sh 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified Harald Welte: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..eb079a2 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd osmo-ci) +git rev-parse HEAD +git status + +git fetch && git checkout -f -B master origin/master + +git rev-parse HEAD +git status -- To view, visit https://gerrit.osmocom.org/3676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:44:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:44:45 +0000 Subject: libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Patch Set 1: This should be fine to submit .. I am tempted to do so now -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:45:03 +0000 Subject: [MERGED] libosmocore[master]: vty: Fix bad use of vector_slot() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: Fix bad use of vector_slot() ...................................................................... vty: Fix bad use of vector_slot() Commit in e9e9e427b78271941a25a63567fc2ec2bb9e4433 attempted to fix a compilation warning but introduced a regression documented in OS#2613. The commit was reverted in 4aa0258269296f078e685e21fb08b115567e814. After closer lookup and testing, it seems vector_slot(vline, index) is expected to be NULL in this case as set by vty_complete_command: /* In case of 'help \t'. */ if (isspace((int)vty->buf[vty->length - 1])) vector_set(vline, NULL); As a result, the correct fix for the compilation warning is to test against NULL instead of testing for empty string. Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a --- M src/vty/command.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 21b26b4..98d86d2 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1950,7 +1950,7 @@ /* In case of 'command \t' pattern. Do you need '?' command at the end of the line. */ - if (vector_slot(vline, index) == '\0') + if (vector_slot(vline, index) == NULL) *status = CMD_ERR_NOTHING_TODO; else *status = CMD_ERR_NO_MATCH; -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:46:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:46:42 +0000 Subject: osmo-ci[master]: Use stow for dependency management In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 We need someone to add a +V vote, I'd be fine with doing the installation of stow and editing the osmocom servers wiki -- To view, visit https://gerrit.osmocom.org/2691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Andr? Boddenberg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: blobb Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 16:50:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 16:50:24 +0000 Subject: osmo-ci[master]: Use stow for dependency management In-Reply-To: References: Message-ID: Patch Set 3: stow is now installed on all build slaves, wiki also lists stow now. -- To view, visit https://gerrit.osmocom.org/2691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Andr? Boddenberg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: blobb Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:07:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:07:17 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) add 'Related: OS#1234' to commit log https://gerrit.osmocom.org/#/c/4779/1/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 511: { hmm, these are fairly complex semantics now. Is it guaranteed that allocation has already happened after the first VTY command was issued? What if the user by accident has two number endpoints commands in the config? The later one will not be applied at runtime, yet be written out during 'write config'. What if there is no 'number endpoints' VTY command in the config at all? Will new_number_endpoints still be -1? It would be far clearer and less error prone to separately remember how much was actually allocated. So instead of adding new_number_endpoints, I'd add a vty_number_endpoints, let the vty always and only write to that, and precisely upon allocating the struct, copy that value over to number_endpoints, to be used by the for() loops. Telling the user that the command does not take immediate effect is nice, maybe you can still do that by checking whether number_endpoints > 0 (i.e. whether something was allocated yet). (We do have numerous such cases where we don't warn the user, so it's no requirement) -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:09:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:09:20 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:12:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:12:02 +0000 Subject: osmo-mgw[master]: vty: simplify endpoint allocation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4775/1/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 1286: "Failed to initialize E1 trunk %d.\n", is this log message actually accurate? I liked the one above better, "failed to allocate N endpoints on trunk M" -- To view, visit https://gerrit.osmocom.org/4775 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:12:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:12:41 +0000 Subject: osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 severity + triviality = fast track -- To view, visit https://gerrit.osmocom.org/4774 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:12:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:12:43 +0000 Subject: [MERGED] osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint ...................................................................... fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 8c6bd6e..9e04e50 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -853,12 +853,12 @@ struct mgcp_conn_rtp *conn = NULL; uint32_t conn_id; + if (p->found != 0) + return create_err_response(NULL, error_code, "DLCX", p->trans); + LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); - - if (p->found != 0) - return create_err_response(NULL, error_code, "DLCX", p->trans); if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/4774 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:13:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:13:22 +0000 Subject: osmo-bsc[master]: configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4767 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:19:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:19:15 +0000 Subject: osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c File src/libvlr/vlr_auth_fsm.c: Line 592: if (!afp) { > don't we leak 'fi' here if 'afp' allocation fails above? how did I miss that. -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:23:58 +0000 Subject: [PATCH] osmo-hlr[master]: cosmetic: add comment on ignored return value In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4715 to look at the new patch set (#2). cosmetic: add comment on ignored return value Coverity wants us to evaluate sqlite3_reset, but it is of no use to do so. Related: coverity CID#178653 Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 --- M src/db.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/4715/2 diff --git a/src/db.c b/src/db.c index 8733cf5..d16f8ec 100644 --- a/src/db.c +++ b/src/db.c @@ -99,6 +99,8 @@ void db_remove_reset(sqlite3_stmt *stmt) { sqlite3_clear_bindings(stmt); + /* sqlite3_reset() just repeats an error code already evaluated during sqlite3_step(). */ + /* coverity[CHECKED_RETURN] */ sqlite3_reset(stmt); } -- To view, visit https://gerrit.osmocom.org/4715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 17:29:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 17:29:31 +0000 Subject: osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c File src/libvlr/vlr_auth_fsm.c: Line 592: if (!afp) { > how did I miss that. Oh wait, fi is a child FSM, isn't it going to be cleaned up from the parent cleanup? -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 18:59:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 10 Nov 2017 18:59:05 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 19:00:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 10 Nov 2017 19:00:13 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From admin at opensuse.org Fri Nov 10 19:57:14 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 10 Nov 2017 19:57:14 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a0604a74fd55_a94d30f7c5897d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 252s] | [ 252s] | This file was extended by libosmocore config.status 0.10.2.20171110, which was [ 252s] | generated by GNU Autoconf 2.69. Invocation command line was [ 252s] | [ 252s] | CONFIG_FILES = [ 252s] | CONFIG_HEADERS = [ 252s] | CONFIG_LINKS = [ 252s] | CONFIG_COMMANDS = [ 252s] | $ ./config.status Doxyfile.core [ 252s] | [ 252s] | on build31 [ 252s] | [ 252s] | config.status:1180: creating Doxyfile.core [ 252s] [ 252s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 252s] make[1]: *** [override_dh_auto_test] Error 1 [ 252s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 252s] debian/rules:15: recipe for target 'build' failed [ 252s] make: *** [build] Error 2 [ 252s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 252s] [ 252s] build31 failed "build libosmocore_0.10.2.20171110.dsc" at Fri Nov 10 19:57:04 UTC 2017. [ 252s] [ 252s] ### VM INTERACTION START ### [ 255s] [ 246.651640] reboot: Power down [ 255s] ### VM INTERACTION END ### [ 255s] [ 255s] build31 failed "build libosmocore_0.10.2.20171110.dsc" at Fri Nov 10 19:57:08 UTC 2017. [ 255s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:21:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:21:09 +0000 Subject: osmo-gsm-tester[master]: Enable 2nd TRX In-Reply-To: References: Message-ID: Patch Set 2: -Code-Review (1 comment) https://gerrit.osmocom.org/#/c/4674/2/example/defaults.conf File example/defaults.conf: Line 52: - nominal_power: 23 > It indeed means all octphy BTS will have two TRX configured always. Another idea is to keep an entirely separate defaults set for two trx: bsc_bts_2trx ... but that would probably imply duplicating lots of things. So I guess best is to have some special magic specifically for the number of trx, like the num_trx attribute you mention. Another spin: have a single trx in the defaults (bsc_bts above) and if num_trx is 2, duplicate the first TRX's defaults. Anyway, it would be nice to not need separate defaults for osmo_bts_octphy just because it may use two TRX. -- To view, visit https://gerrit.osmocom.org/4674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:26:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:26:42 +0000 Subject: osmo-hlr[master]: hlr.c: Avoid overflow of lu_operation.subscr.imsi In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 regardless of buffer sizes, we should always use osmo_strlcpy, at least for buggy cases of missing nul. -- To view, visit https://gerrit.osmocom.org/4695 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:26:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:26:53 +0000 Subject: [MERGED] osmo-hlr[master]: hlr.c: Avoid overflow of lu_operation.subscr.imsi In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: hlr.c: Avoid overflow of lu_operation.subscr.imsi ...................................................................... hlr.c: Avoid overflow of lu_operation.subscr.imsi It appears that hlr_subscriber.imsi is 16 buffers in size: 15 chars for IMSI + 1 byte NUL. However, osmo_gsup_message.imsi is 17 bytes (for whatever reason), so we cannot simply do a strpy() as this might overflow the hlr_subscriber.imsi field! TODO: check if weactually ever receive a too-long IMSI in GSUP and reject that at an earlier time in the code flow. Fixes: Coverity CID#164746 Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048 --- M src/hlr.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index 6310526..78a7055 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -164,7 +164,7 @@ /* check if subscriber is known at all */ if (!lu_op_fill_subscr(luop, g_hlr->dbc, gsup->imsi)) { /* Send Error back: Subscriber Unknown in HLR */ - strcpy(luop->subscr.imsi, gsup->imsi); + osmo_strlcpy(luop->subscr.imsi, gsup->imsi, sizeof(luop->subscr.imsi)); lu_op_tx_error(luop, GMM_CAUSE_IMSI_UNKNOWN); return 0; } -- To view, visit https://gerrit.osmocom.org/4695 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:28:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:28:18 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Remove unused file bts_model.py In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Remove unused file bts_model.py ...................................................................... Remove unused file bts_model.py Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522 --- D src/osmo_gsm_tester/bts_model.py 1 file changed, 0 insertions(+), 29 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_model.py b/src/osmo_gsm_tester/bts_model.py deleted file mode 100644 index 41e8491..0000000 --- a/src/osmo_gsm_tester/bts_model.py +++ /dev/null @@ -1,29 +0,0 @@ -# osmo_gsm_tester: bts model specifics -# -# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH -# -# Author: Neels Hofmeyr -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -from . import log, schema, util - -class TestContext(log.Origin): - ''' - API to allow testing various BTS models. - ''' - - def __init__(self, - -# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/4707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:29:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:29:58 +0000 Subject: [PATCH] osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4711 to look at the new patch set (#3). osmux: fix nullpointer dereference in point_lookup() the connection pointer is determined using mgcp_conn_get_rtp() this function may return 0. At the moment there are no nullpointer checks implemented Add checks to test for nullpointer. Fixes: Coverity CID#178662 Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/11/4711/3 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 60ffe06..09b2636 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -207,12 +207,18 @@ case MGCP_DEST_NET: /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - this = &conn_net->end.addr; + if (conn_net) + this = &conn_net->end.addr; + else + this = NULL; break; case MGCP_DEST_BTS: /* FIXME: Get rid of CONN_ID_XXX! */ conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - this = &conn_bts->end.addr; + if (conn_bts) + this = &conn_bts->end.addr; + else + this = NULL; break; default: /* Should not ever happen */ @@ -222,7 +228,8 @@ /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net->osmux.cid == cid && this->s_addr == from_addr->s_addr) + if (conn_net && this && conn_net->osmux.cid == cid + && this->s_addr == from_addr->s_addr) return endp; } -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:30:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:30:05 +0000 Subject: osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:32:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:32:27 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4712 to look at the new patch set (#3). cosmetic: guard dead osmux vty code with ifdef Since currently osmux is not available we decided to lock down the respective VTY command with an early return CMD_WARNING, making the code after this line unreachable. Guard the dead code with an ifdef Fixes: Coverity CID#178648 Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/4712/3 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..a7d9e4a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1102,7 +1102,7 @@ * allow to turn it on yet. */ vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); return CMD_WARNING; - +#if 0 if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) @@ -1114,6 +1114,7 @@ } return CMD_SUCCESS; +#endif } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:35:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:35:00 +0000 Subject: [MERGED] osmo-mgw[master]: osmux: fix nullpointer dereference In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmux: fix nullpointer dereference ...................................................................... osmux: fix nullpointer dereference in point_lookup() the connection pointer is determined using mgcp_conn_get_rtp() this function may return 0. At the moment there are no nullpointer checks implemented Add checks to test for nullpointer. Fixes: Coverity CID#178662 Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 60ffe06..09b2636 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -207,12 +207,18 @@ case MGCP_DEST_NET: /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - this = &conn_net->end.addr; + if (conn_net) + this = &conn_net->end.addr; + else + this = NULL; break; case MGCP_DEST_BTS: /* FIXME: Get rid of CONN_ID_XXX! */ conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - this = &conn_bts->end.addr; + if (conn_bts) + this = &conn_bts->end.addr; + else + this = NULL; break; default: /* Should not ever happen */ @@ -222,7 +228,8 @@ /* FIXME: Get rid of CONN_ID_XXX! */ conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net->osmux.cid == cid && this->s_addr == from_addr->s_addr) + if (conn_net && this && conn_net->osmux.cid == cid + && this->s_addr == from_addr->s_addr) return endp; } -- To view, visit https://gerrit.osmocom.org/4711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:35:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:35:09 +0000 Subject: osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 21:35:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 21:35:11 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: guard dead osmux vty code with ifdef ...................................................................... cosmetic: guard dead osmux vty code with ifdef Since currently osmux is not available we decided to lock down the respective VTY command with an early return CMD_WARNING, making the code after this line unreachable. Guard the dead code with an ifdef Fixes: Coverity CID#178648 Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..a7d9e4a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1102,7 +1102,7 @@ * allow to turn it on yet. */ vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); return CMD_WARNING; - +#if 0 if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) @@ -1114,6 +1114,7 @@ } return CMD_SUCCESS; +#endif } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/4712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:29:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:29:34 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:32:18 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4667 to look at the new patch set (#3). OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/67/4667/3 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..a56c4ad 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,61 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +This dir contains scenario configuration files. + +Scenarios define constraints to serve the resource requests of a 'suite.conf', +to select specific resources from the general resource pool specified in 'resources.conf'. + +All 'times' attributes are expanded before matching. For example, if a 'suite.conf' +requests two BTS, we may enforce that both BTS should be of type 'osmo-bts-sysmo' in +these ways: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that remaining +resources have no restrictions to be taken into consideration. + +To apply restrictions only on the second resource, the first element can be left +emtpy, like: + +---- +resources: + bts: + - {} + - type: osmo-bts-sysmo +---- + +On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any number of +such scenario configurations can be combined in the form: + +---- +:[+[+...]] +---- + +e.g. + +---- +my_suite:sysmo+tch_f+amr +---- + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:32:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:32:31 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:36:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:36:02 +0000 Subject: [MERGED] osmo-bsc[master]: osmo-bsc vty: be fatal for addressbook entry errors In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-bsc vty: be fatal for addressbook entry errors ...................................................................... osmo-bsc vty: be fatal for addressbook entry errors So far, the config would log an error upon config parsing, and then continue to use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE to abort the program in a config parsing error. Be fatal for non-existing addressbook entries and for using address book entries from mismatching cs7 instances. Though it is mixing in cosmetic changes, add "Error:" to the output and arrange the erratic name to the end of the message, as is customary for error messages. Related: libosmo-sccp I2f71b9c4dd30f919d2054da81283dd7035f44f60 Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec --- M src/osmo-bsc/osmo_bsc_vty.c 1 file changed, 8 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index ca47097..0003cfa 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -724,18 +724,17 @@ ss7 = osmo_sccp_addr_by_name(&msc->a.bsc_addr, bsc_addr_name); if (!ss7) { - vty_out(vty, "No sccp address %s found%s", bsc_addr_name, - VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", bsc_addr_name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Prevent mixing addresses from different CS7/SS7 instances */ if (msc->a.cs7_instance_valid) { if (msc->a.cs7_instance != ss7->cfg.id) { vty_out(vty, - "SCCP address %s from different CS7 instance%s", + "Error: SCCP addressbook entry from mismatching CS7 instance: '%s'%s", bsc_addr_name, VTY_NEWLINE); - return CMD_WARNING; + return CMD_ERR_INCOMPLETE; } } @@ -757,18 +756,17 @@ ss7 = osmo_sccp_addr_by_name(&msc->a.msc_addr, msc_addr_name); if (!ss7) { - vty_out(vty, "No sccp address %s found%s", msc_addr_name, - VTY_NEWLINE); - return CMD_WARNING; + vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", msc_addr_name, VTY_NEWLINE); + return CMD_ERR_INCOMPLETE; } /* Prevent mixing addresses from different CS7/SS7 instances */ if (msc->a.cs7_instance_valid) { if (msc->a.cs7_instance != ss7->cfg.id) { vty_out(vty, - "SCCP address %s from different CS7 instance%s", + "Error: SCCP addressbook entry from mismatching CS7 instance: '%s'%s", msc_addr_name, VTY_NEWLINE); - return CMD_WARNING; + return CMD_ERR_INCOMPLETE; } } -- To view, visit https://gerrit.osmocom.org/4727 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:46:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:46:28 +0000 Subject: osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4750/1/src/libfilter/bsc_msg_filter.c File src/libfilter/bsc_msg_filter.c: Line 208: return 1; > But that was "the global allow". So It might make sense to have an access-l The above "allow" check does change the semantics significantly: In order to be able to deny anything, we need *some* deny rule. Without a deny rule, we always end up accepting everything; either we allow before, or we hit this 'return 1'. Now, *with* a deny rule in place, say a "deny .*", which acts as the default you propose, we would deny all IMSIs and never reach this 'return 1', unless we allow some IMSIs before that and exit early. So before this patch, you can either compose a deny regex that matches all IMSIs except the ones you want to allow (usually rather cumbersome), or you're stuck on allowing all or nothing. After this patch you can conveniently pick IMSI prefixes to allow, rather than having to negate a deny regex. -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 10 23:49:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 Nov 2017 23:49:28 +0000 Subject: osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Patch Set 1: > looks fine to me, but Holger is the person to ask. Also, might > make sense to confirm with on-waves, as they probably are the only > known user of all of this? Unless they have dead "allow" rules on the "global" level lying around, they should not be bothered by this patch. The worst case is that they need to remove those allow rules from 'nat' in osmo-bsc_nat and from 'bsc' in osmo-bsc, which before now have had no effect. I can mail them anyway... -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:16:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:16:14 +0000 Subject: osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:23:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:23:54 +0000 Subject: osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 @Harald, adding legacy aliases on a brand new program (osmo-mgw) that is not in use anywhere really or has just started to be used seems a bit overboard to me. dexter spent time on those and we'll have to drag them along forever now... This is not about osmo-bsc_mgcp or anything that's already widely rolled out beyond osmo-gsm-tester. In my view, the alpha stage on osmo-mgw hasn't fallen yet and we should be allowed to make breaking changes before we commit to a long term API. What do you think? -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:32:19 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:38:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:38:49 +0000 Subject: osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 can you avoid circular imports so that we don't require a newer python version? Otherwise this and the previous patch are one large chunk of cosmetics, I mean each of us is permitted one of these every now and then, but there is no real use in this, is there, besides knowing where to find the Test class? I would +2 when this doesn't add requirement for python upgrades besides being huge and cosmetic, but for now... -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:39:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:39:37 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 first resolve the G#4764 comments to get my +2 here -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 00:40:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 00:40:58 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 1: and I also want to see an osmo-gsm-manuals patch to adjust to 'testenv' ... all in all I doubt that this is worth the effort -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 01:07:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 01:07:06 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex Message-ID: Review at https://gerrit.osmocom.org/4780 MGCP endpoints: parse as decimal, not hex Parse the endpoint index from the MGCP messages as base-10, not 16. If osmo-mgw parses the endpoint IDs as base-16 numbers while OsmoMSC and OsmoBSC pass in decimal endpoint numbers, the consequence is, for example: - I configure 32 endpoints in osmo-mgw, - I tell OsmoBSC to use endpoint range 1-32, - At some point OsmoBSC may pass in, say, "30 at mgw", - "30" is parsed base-16 and ends up being endpoint index 48, instead of 32, - OsmoMGW sees that 48 > number_endpoints and barfs. Related: OS#2633 Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e --- M src/libosmo-mgcp/mgcp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/80/4780/1 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index d686bca..763a5a1 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -192,7 +192,7 @@ if (strncmp(mgcp, "ds/e1", 5) == 0) return find_e1_endpoint(cfg, mgcp); - gw = strtoul(mgcp, &endptr, 16); + gw = strtoul(mgcp, &endptr, 10); if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@') return &cfg->trunk.endpoints[gw]; -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From admin at opensuse.org Sat Nov 11 01:01:03 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 11 Nov 2017 01:01:03 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a064bdd51ce8_a94d30f7c68893d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_16.10/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 246s] | [ 246s] | This file was extended by libosmocore config.status 0.10.2, which was [ 246s] | generated by GNU Autoconf 2.69. Invocation command line was [ 246s] | [ 246s] | CONFIG_FILES = [ 246s] | CONFIG_HEADERS = [ 246s] | CONFIG_LINKS = [ 246s] | CONFIG_COMMANDS = [ 246s] | $ ./config.status Doxyfile.core [ 246s] | [ 246s] | on build32 [ 246s] | [ 246s] | config.status:1174: creating Doxyfile.core [ 246s] [ 246s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 246s] make[1]: *** [override_dh_auto_test] Error 1 [ 246s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 246s] debian/rules:15: recipe for target 'build' failed [ 246s] make: *** [build] Error 2 [ 246s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 246s] [ 246s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 11 01:00:42 UTC 2017. [ 246s] [ 246s] ### VM INTERACTION START ### [ 249s] [ 237.540370] reboot: Power down [ 251s] ### VM INTERACTION END ### [ 251s] [ 251s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 11 01:00:47 UTC 2017. [ 251s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Nov 11 05:49:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 05:49:11 +0000 Subject: osmo-mgw[master]: vty: assign new VTY port numbr In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 As indicated in the respective redmine isuse, I am not convinced that this is a good idea. -- To view, visit https://gerrit.osmocom.org/4770 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 05:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 05:50:28 +0000 Subject: [MERGED] osmo-bsc[master]: use osmo_sccp_inst_addr_name() instead of looking up ss7 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: use osmo_sccp_inst_addr_name() instead of looking up ss7 ...................................................................... use osmo_sccp_inst_addr_name() instead of looking up ss7 Depends: libosmo-sccp I70ec5c8b42682a23f11a5820431c7e34e225709b Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 4 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 253f1e8..a18d4f3 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -516,8 +516,7 @@ if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, "(%s) A-interface: invalid local (BSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.bsc_addr)); return -EINVAL; } @@ -530,17 +529,14 @@ if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, "(%s) A-interface: invalid remote (MSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.msc_addr)); return -EINVAL; } LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: local (BSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.bsc_addr)); LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: remote (MSC) SCCP address: %s\n", - msc_name, - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.msc_addr)); + msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, &msc->a.msc_addr)); /* Bind SCCP user */ msc->a.sccp_user = osmo_sccp_user_bind(msc->a.sccp, msc_name, sccp_sap_up, msc->a.bsc_addr.ssn); -- To view, visit https://gerrit.osmocom.org/4728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 05:52:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 05:52:16 +0000 Subject: osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c File src/libvlr/vlr_auth_fsm.c: Line 592: if (!afp) { > Oh wait, fi is a child FSM, isn't it going to be cleaned up from the parent iyes, you are right. migt still be good to do it explicit or to have a comment here about it, but it's not all that important. -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 11 05:52:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 05:52:55 +0000 Subject: osmo-hlr[master]: cosmetic: add comment on ignored return value In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 05:53:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 05:53:54 +0000 Subject: meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4773 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 06:02:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 06:02:38 +0000 Subject: osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Patch Set 3: The software was released/tagged, and binary pacakges have been released. The assumption that within those (two?) weeks nobody will have used it is a hypothesis that nobody can guarantee. We have to start caring about our users and finally maintain compatiiblity of library APIs as well as the VTY and any other interfaces. I believe this is absolutely important. -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 18:37:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 Nov 2017 18:37:14 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: GGSN: don't say 'NITB' Message-ID: Review at https://gerrit.osmocom.org/4781 GGSN: don't say 'NITB' Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc --- M OsmoGGSN/chapters/running.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/81/4781/1 diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index cff3f8d..a242e36 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -1,4 +1,4 @@ -== Running OsmoNITB +== Running OsmoGGSN The OsmoGGSN executable (`osmo-ggsn`) offers the following command-line arguments: -- To view, visit https://gerrit.osmocom.org/4781 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:28 +0000 Subject: [PATCH] openbsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT Message-ID: Review at https://gerrit.osmocom.org/4782 osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT When we receive unimplemented/unhandled message types, we shouldn't simply silently discard them, but print a log message for the benefit of the user. Change-Id: I8ecb1d2134f9c6a96f29e145fa0430880e971168 --- M openbsc/src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/82/4782/1 diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 100f664..9c549c3 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -407,6 +407,10 @@ case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; + default: + LOGP(DMSC, LOGL_NOTICE, "Received unimplemented BSSMAP UDT %s\n", + gsm0808_bssmap_name(msg->l4h[0])); + break; } return ret; -- To view, visit https://gerrit.osmocom.org/4782 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ecb1d2134f9c6a96f29e145fa0430880e971168 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:29 +0000 Subject: [PATCH] openbsc[master]: osmo-bsc-sccplite: Implement incoming RESET procedure Message-ID: Review at https://gerrit.osmocom.org/4783 osmo-bsc-sccplite: Implement incoming RESET procedure In osmo-bsc-sccplite we so far didn't implement the inbound RESET procedure. We instead ignored any RESET message from the MSC. This commit adds support for RESET: We will destrpy any SCCP connections and acknowledge the RESET to the MSC. As osmo-msc is requiring the BSC to handle an inbound RESET procedure, this commit allows osmo-msc to properly initialize the A interface towards osmo-bsc-sccplite via a translating/routing osmo-stp. While we don't anticipate any new deployments of osmo-bsc-sccplite, making it interoperate with osmo-msc enables us to do more testing of osmo-bsc-sccplite. Change-Id: Iceb8278deb36d6103662a704f489ba0d685e04d3 --- M openbsc/include/openbsc/bsc_msc_data.h M openbsc/src/osmo-bsc/osmo_bsc_bssap.c M openbsc/src/osmo-bsc/osmo_bsc_sccp.c 3 files changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/83/4783/1 diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h index 38e87cf..9a92955 100644 --- a/openbsc/include/openbsc/bsc_msc_data.h +++ b/openbsc/include/openbsc/bsc_msc_data.h @@ -138,5 +138,6 @@ struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *, int); struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *, int); +void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con); #endif diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 9c549c3..349c98f 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -29,6 +29,7 @@ #include #include +#include /* * helpers for the assignment command @@ -94,6 +95,35 @@ { LOGP(DMSC, LOGL_NOTICE, "Reset ACK from MSC\n"); return 0; +} + +static int bssmap_send_reset_ack(struct bsc_msc_data *msc) +{ + struct msgb *resp; + int rc; + + LOGP(DMSC, LOGL_NOTICE, "Tx RESET-ACK to MSC\n"); + + resp = gsm0808_create_reset_ack(); + OSMO_ASSERT(resp); + + rc = sccp_write(resp, &sccp_ssn_bssap, &sccp_ssn_bssap, 0, msc->msc_con); + msgb_free(resp); + return rc; +} + +static int bssmap_handle_reset(struct bsc_msc_data *msc, + struct msgb *msg, unsigned int length) +{ + LOGP(DMSC, LOGL_NOTICE, "Rx RESET from MSC\n"); + + /* Instruct the BSC to close all open SCCP connections and to close all + * active radio channels on the BTS side as well */ + bsc_notify_and_close_conns(msc->msc_con); + + /* Inform the MSC that we have received the reset request and + * that we acted accordingly */ + return bssmap_send_reset_ack(msc); } /* GSM 08.08 ? 3.2.1.19 */ @@ -404,6 +434,9 @@ case BSS_MAP_MSG_RESET_ACKNOWLEDGE: ret = bssmap_handle_reset_ack(msc, msg, length); break; + case BSS_MAP_MSG_RESET: + ret = bssmap_handle_reset(msc, msg, length); + break; case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c index e242390..8388f88 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c @@ -287,7 +287,7 @@ bsc_send_ussd_release_complete(conn); } -static void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) +void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) { struct osmo_bsc_sccp_con *con, *tmp; -- To view, visit https://gerrit.osmocom.org/4783 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iceb8278deb36d6103662a704f489ba0d685e04d3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:35 +0000 Subject: [PATCH] libosmo-sccp[master]: ipa: Fix endianness of pseud-M3UA header Message-ID: Review at https://gerrit.osmocom.org/4784 ipa: Fix endianness of pseud-M3UA header Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73 --- M src/ipa.c 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/84/4784/1 diff --git a/src/ipa.c b/src/ipa.c index 11ff422..36fbd38 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -169,18 +170,18 @@ data_hdr.si = MTP_SI_SCCP; if (asp->cfg.is_server) { /* Source: the PC of the routing key */ - data_hdr.opc = as->cfg.routing_key.pc; + data_hdr.opc = osmo_htonl(as->cfg.routing_key.pc); /* Destination: Based on VTY config */ - data_hdr.dpc = as->cfg.pc_override.dpc; + data_hdr.dpc = osmo_htonl(as->cfg.pc_override.dpc); } else { /* Source: Based on VTY config */ - data_hdr.opc = as->cfg.pc_override.dpc; + data_hdr.opc = osmo_htonl(as->cfg.pc_override.dpc); /* Destination: PC of the routing key */ - data_hdr.dpc = as->cfg.routing_key.pc; + data_hdr.dpc = osmo_htonl(as->cfg.routing_key.pc); } xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); - xua->mtp.opc = data_hdr.opc; - xua->mtp.dpc = data_hdr.dpc; + xua->mtp.opc = osmo_ntohl(data_hdr.opc); + xua->mtp.dpc = osmo_ntohl(data_hdr.dpc); return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4784 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:35 +0000 Subject: [PATCH] libosmo-sccp[master]: initialize msg->l2h in sccp_msgb_alloc() Message-ID: Review at https://gerrit.osmocom.org/4785 initialize msg->l2h in sccp_msgb_alloc() Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 --- M src/sua.c 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/4785/1 diff --git a/src/sua.c b/src/sua.c index fb7545e..7575021 100644 --- a/src/sua.c +++ b/src/sua.c @@ -60,10 +60,15 @@ struct msgb *sccp_msgb_alloc(const char *name) { + struct msgb *msg; if (!name) name = "SCCP"; - return msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, - SCCP_MSG_HEADROOM, name); + msg = msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, + SCCP_MSG_HEADROOM, name); + if (!msg) + return NULL; + msg->l2h = msg->tail; + return msg; } /*********************************************************************** -- To view, visit https://gerrit.osmocom.org/4785 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:36 +0000 Subject: [PATCH] libosmo-sccp[master]: ipa: Patch DPC/OPC information into SCCP Calling/Called Part... Message-ID: Review at https://gerrit.osmocom.org/4786 ipa: Patch DPC/OPC information into SCCP Calling/Called Party Address When we receive a SCCPlite message from an IPA peer, it may simply contain a SSN number but no point codes. Similarly to creating a fake MTP routing label from override DPC and routing key OPC, we can also add that point code information to the SCCP header. This way the rest of the SS7 network can handle the message and route it accordingly. Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b --- M src/ipa.c 1 file changed, 93 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/86/4786/1 diff --git a/src/ipa.c b/src/ipa.c index 36fbd38..2671896 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -38,8 +38,10 @@ #include #include +#include #include #include +#include #include #include "xua_internal.h" @@ -134,11 +136,74 @@ return NULL; } +/* Patch a SCCP message and add point codes to Called/Calling Party (if missing) */ +static struct msgb *patch_sccp_with_pc(struct osmo_ss7_asp *asp, struct msgb *sccp_msg_in, + uint32_t opc, uint32_t dpc) +{ + struct osmo_sccp_addr addr; + struct msgb *sccp_msg_out; + struct xua_msg *sua; + int rc; + + /* start by converting SCCP to SUA */ + sua = osmo_sccp_to_xua(sccp_msg_in); + if (!sua) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "Couldn't convert SCCP to SUA: %s\n", + msgb_hexdump(sccp_msg_in)); + msgb_free(sccp_msg_in); + return NULL; + } + /* free the input message and work with SUA version instead */ + msgb_free(sccp_msg_in); + + rc = sua_addr_parse(&addr, sua, SUA_IEI_DEST_ADDR); + switch (rc) { + case 0: + if (addr.presence & OSMO_SCCP_ADDR_T_PC) + break; + /* if there's no point code in dest_addr, add one */ + addr.presence |= OSMO_SCCP_ADDR_T_PC; + addr.pc = dpc; + xua_msg_free_tag(sua, SUA_IEI_DEST_ADDR); + xua_msg_add_sccp_addr(sua, SUA_IEI_DEST_ADDR, &addr); + break; + case -ENODEV: /* no destination address in message */ + break; + default: /* some other error */ + xua_msg_free(sua); + return NULL; + } + + rc = sua_addr_parse(&addr, sua, SUA_IEI_SRC_ADDR); + switch (rc) { + case 0: + if (addr.presence & OSMO_SCCP_ADDR_T_PC) + break; + /* if there's no point code in src_addr, add one */ + addr.presence |= OSMO_SCCP_ADDR_T_PC; + addr.pc = opc; + xua_msg_free_tag(sua, SUA_IEI_SRC_ADDR); + xua_msg_add_sccp_addr(sua, SUA_IEI_SRC_ADDR, &addr); + break; + case -ENODEV: /* no source address in message */ + break; + default: /* some other error */ + xua_msg_free(sua); + return NULL; + } + + /* re-encode SUA to SCCP and return */ + sccp_msg_out = osmo_sua_to_sccp(sua); + xua_msg_free(sua); + return sccp_msg_out; +} + static int ipa_rx_msg_sccp(struct osmo_ss7_asp *asp, struct msgb *msg) { struct m3ua_data_hdr data_hdr; struct xua_msg *xua = xua_msg_alloc(); struct osmo_ss7_as *as = find_as_for_asp(asp); + uint32_t opc, dpc; if (!as) { LOGPASP(asp, DLSS7, LOGL_ERROR, "Rx message for IPA ASP without AS?!\n"); @@ -150,13 +215,15 @@ msgb_pull_to_l2(msg); /* We have received an IPA-encapsulated SCCP message, without - * any MTP routing label. This means we have no real idea where - * it came from, nor where it goes to. We could simply treat it - * as being for the local point code, but then this means that - * we would have to implement SCCP connection coupling in order - * to route the connections to any other point code. The reason - * for this is the lack of addressing information inside the - * non-CR/CC connection oriented messages. + * any MTP routing label. Furthermore, the SCCP Called/Calling + * Party are SSN-only, with no GT or PC. This means we have no + * real idea where it came from, nor where it goes to. We could + * simply treat it as being for the local point code, but then + * this means that we would have to implement SCCP connection + * coupling in order to route the connections to any other point + * code. The reason for this is the lack of addressing + * information inside the non-CR/CC connection oriented + * messages. * * The only other alternative we have is to simply have a * STP (server) side configuration that specifies which point @@ -166,23 +233,33 @@ * to us. This is all quite ugly, but then what can we do :/ */ - memset(&data_hdr, 0, sizeof(data_hdr)); - data_hdr.si = MTP_SI_SCCP; + /* First, determine the DPC and OPC to use */ if (asp->cfg.is_server) { /* Source: the PC of the routing key */ - data_hdr.opc = osmo_htonl(as->cfg.routing_key.pc); + opc = as->cfg.routing_key.pc; /* Destination: Based on VTY config */ - data_hdr.dpc = osmo_htonl(as->cfg.pc_override.dpc); + dpc = as->cfg.pc_override.dpc; } else { /* Source: Based on VTY config */ - data_hdr.opc = osmo_htonl(as->cfg.pc_override.dpc); + opc = as->cfg.pc_override.dpc; /* Destination: PC of the routing key */ - data_hdr.dpc = osmo_htonl(as->cfg.routing_key.pc); + dpc = as->cfg.routing_key.pc; } - xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); - xua->mtp.opc = osmo_ntohl(data_hdr.opc); - xua->mtp.dpc = osmo_ntohl(data_hdr.dpc); + /* Second, patch this into the SCCP message */ + msg = patch_sccp_with_pc(asp, msg, opc, dpc); + + /* Third, create a MTP3/M3UA label with those point codes */ + memset(&data_hdr, 0, sizeof(data_hdr)); + data_hdr.si = MTP_SI_SCCP; + data_hdr.opc = osmo_htonl(opc); + data_hdr.dpc = osmo_htonl(dpc); + /* Create M3UA message in XUA structure */ + xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); + /* Update xua->mtp with values from data_hdr */ + m3ua_dh_to_xfer_param(&xua->mtp, &data_hdr); + + /* Pass on as if we had received it from an M3UA ASP */ return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4786 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:36 +0000 Subject: [PATCH] libosmo-sccp[master]: ipa: Automatically create / destroy route on IPA connect/dis... Message-ID: Review at https://gerrit.osmocom.org/4787 ipa: Automatically create / destroy route on IPA connect/disconnect >From the STP point of view: In order to be able to route messages back to an IPA client, we need to create a route at the time we have successfully identified the AS for this client based on the name presented in the IPA CCM ACK "name" field. Once the IPA client is destroyed, the route must be deleted again. With this commit present, we can have an IPA client (such as osmo-bsc-sccplite) connect to OsmoSTP and exchange BSS[M]AP with an M3UA-speaking osmo-msc. Basically, the STP reaches the point where it can translate between IPA-style SCCPlite and proper M3UA/SUA on the other side. Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66 --- M src/xua_asp_fsm.c 1 file changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/87/4787/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index d54d45e..823402e 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -835,11 +835,22 @@ /* Server: We're waiting for an ID ACK */ static void ipa_asp_fsm_wait_id_ack2(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct osmo_ss7_asp *asp = iafp->asp; + struct osmo_ss7_instance *inst = asp->inst; + struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0); + + OSMO_ASSERT(as); + switch (event) { case IPA_ASP_E_ID_ACK: /* ACK received, we can go to active state now. The * ACTIVE onenter function will inform the AS */ osmo_fsm_inst_state_chg(fi, IPA_ASP_S_ACTIVE, 0, 0); + /* As opposed to M3UA, there is no RKM and we have to implicitly automatically add + * a route once an IPA connection has come up */ + osmo_ss7_route_create(inst->rtable_system, as->cfg.routing_key.pc, 0xffffff, + as->cfg.name); break; } } @@ -1007,6 +1018,27 @@ }, }; +static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct osmo_ss7_asp *asp = iafp->asp; + struct osmo_ss7_instance *inst = asp->inst; + struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0); + struct osmo_ss7_route *rt; + + OSMO_ASSERT(as); + + /* find the route which we have created if we ever reached ipa_asp_fsm_wait_id_ack2 */ + rt = osmo_ss7_route_find_dpc_mask(inst->rtable_system, as->cfg.routing_key.pc, 0xffffff); + /* no route found, bail out */ + if (!rt) + return; + /* route points to different AS, bail out */ + if (rt->dest.as != as) + return; + + osmo_ss7_route_destroy(rt); +} struct osmo_fsm ipa_asp_fsm = { .name = "IPA_ASP", @@ -1020,6 +1052,7 @@ S(XUA_ASP_E_ASPSM_BEAT) | S(XUA_ASP_E_ASPSM_BEAT_ACK), .allstate_action = ipa_asp_allstate, + .cleanup = ipa_asp_fsm_cleanup, }; -- To view, visit https://gerrit.osmocom.org/4787 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:26:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:26:45 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT Message-ID: Review at https://gerrit.osmocom.org/4788 osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT When we receive unimplemented/unhandled message types, we shouldn't simply silently discard them, but print a log message for the benefit of the user. Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/88/4788/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 9f8032e..59c2979 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -645,6 +645,10 @@ case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; + default: + LOGP(DMSC, LOGL_NOTICE, "Received unimplemented BSSMAP UDT %s\n", + gsm0808_bssmap_name(msg->l4h[0])); + break; } return ret; -- To view, visit https://gerrit.osmocom.org/4788 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:34:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:34:07 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: First step towards an OsmoSTP manual In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2371 to look at the new patch set (#6). First step towards an OsmoSTP manual Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31 --- M Makefile A OsmoSTP/Makefile A OsmoSTP/chapters/overview.adoc A OsmoSTP/osmostp-usermanual-docinfo.xml A OsmoSTP/osmostp-usermanual.adoc A OsmoSTP/osmostp-vty-reference.xml A OsmoSTP/vty/stp_vty_reference.xml M common/chapters/bibliography.adoc M common/chapters/glossary.adoc A common/chapters/sigtran-osmocom.adoc A common/chapters/sigtran-simple-2g.dot A common/chapters/sigtran-simple-3g.dot A common/chapters/sigtran.adoc 13 files changed, 989 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/71/2371/6 diff --git a/Makefile b/Makefile index 8f8d9b6..cd1b10e 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ cd OsmoGSMTester; $(MAKE) cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) + cd OsmoSTP; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -23,6 +24,7 @@ cd OsmoGSMTester; $(MAKE) clean cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean + cd OsmoSTP; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -36,6 +38,7 @@ cd OsmoGSMTester; $(MAKE) upload cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload + cd OsmoSTP; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -44,12 +47,14 @@ cd OsmoSGSN; $(MAKE) check cd OsmoGGSN; $(MAKE) check cd OsmoPCU; $(MAKE) check + cd OsmoSTP; $(MAKE) check # These don't use asciidoc, so they have no 'make check' target: #cd OsmoMGCP; $(MAKE) check #cd OsmoNAT; $(MAKE) check cd OsmoGSMTester; $(MAKE) check cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check + cd OsmoSTP; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmoSTP/Makefile b/OsmoSTP/Makefile new file mode 100644 index 0000000..6832dd4 --- /dev/null +++ b/OsmoSTP/Makefile @@ -0,0 +1,11 @@ +TOPDIR = .. + +ASCIIDOC = osmostp-usermanual.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc +osmostp-usermanual.pdf: chapters/*.adoc +aoip-mgw-options.pdf: aoip-mgw-options.adoc mgw/*.msc + +VTY_REFERENCE = osmostp-vty-reference.xml +include $(TOPDIR)/build/Makefile.vty-reference.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmoSTP/chapters/overview.adoc b/OsmoSTP/chapters/overview.adoc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/OsmoSTP/chapters/overview.adoc diff --git a/OsmoSTP/osmostp-usermanual-docinfo.xml b/OsmoSTP/osmostp-usermanual-docinfo.xml new file mode 100644 index 0000000..4253957 --- /dev/null +++ b/OsmoSTP/osmostp-usermanual-docinfo.xml @@ -0,0 +1,47 @@ + + + 1 + April 16, 2017 + HW + + Initial OsmoSTP manual + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + + + 2012-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with the Invariant Sections being just 'Foreword', + 'Acknowledgements' and 'Preface', with no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmoSTP/osmostp-usermanual.adoc b/OsmoSTP/osmostp-usermanual.adoc new file mode 100644 index 0000000..6dc1d08 --- /dev/null +++ b/OsmoSTP/osmostp-usermanual.adoc @@ -0,0 +1,34 @@ +OsmoSTP User Manual +=================== +Harald Welte + + +include::../common/chapters/preface.adoc[] + +// include::chapters/overview.adoc[] + +include::../common/chapters/sigtran.adoc[] + +include::../common/chapters/sigtran-osmocom.adoc[] + +//include::chapters/running.adoc[] +// include::chapters/control.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + +//include::../common/chapters/bts.adoc[] + +//include::../OsmoNITB/chapters/bts-examples.adoc[] + +//include::../common/chapters/control_if.adoc[] + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] + diff --git a/OsmoSTP/osmostp-vty-reference.xml b/OsmoSTP/osmostp-vty-reference.xml new file mode 100644 index 0000000..807d427 --- /dev/null +++ b/OsmoSTP/osmostp-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + April 16, 2017 + h2 + Initial + + + + OsmoSTP VTY Reference + + + 2012-2017 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoSTP/vty/stp_vty_reference.xml b/OsmoSTP/vty/stp_vty_reference.xml new file mode 100644 index 0000000..a4c675e --- /dev/null +++ b/OsmoSTP/vty/stp_vty_reference.xml @@ -0,0 +1,2 @@ + + diff --git a/common/chapters/bibliography.adoc b/common/chapters/bibliography.adoc index 129758f..12115c6 100644 --- a/common/chapters/bibliography.adoc +++ b/common/chapters/bibliography.adoc @@ -116,11 +116,29 @@ https://tools.ietf.org/html/rfc1350 - [[[ietf-rfc2131]]] IETF RFC 2131: Dynamic Host Configuration Protocol https://tools.ietf.org/html/rfc2131 +- [[[ietf-rfc2719]]] IETF RFC 2719: Signal Transport over IP + https://tools.ietf.org/html/rfc2719 +- [[[ietf-rfc3331]]] IETF RFC 3331: Message Transfer Part 2 User Adaptation Layer + https://tools.ietf.org/html/rfc3331 - [[[ietf-rfc3550]]] IETF RFC 3550: RTP: A Transport protocol for Real-Time Applications https://tools.ietf.org/html/rfc3550 +- [[[ietf-rfc3868]]] IETF RFC 3868: SCCP User Adaptation Layer + https://tools.ietf.org/html/rfc3868 +- [[[ietf-rfc4165]]] IETF RFC 4165: Message Transfer Part 2 Peer-to-Peeer Adaptation Layer + https://tools.ietf.org/html/rfc4165 - [[[ietf-rfc4251]]] IETF RFC 4251: The Secure Shell (SSH) Protocol Architecture https://tools.ietf.org/html/rfc4251 +- [[[ietf-rfc4666]]] IETF RFC 4666: Message Transfer Part 3 User Adaptation Layer + https://tools.ietf.org/html/rfc4666 +- [[[itu-t-q701]]] ITU-T Q.701: Functional Description of the Message Transfer Part (MTP) + https://www.itu.int/rec/T-REC-Q.701/en/ +- [[[itu-t-q711]]] ITU-T Q.711: Functional Description of the Signalling Connection Control Part + https://www.itu.int/rec/T-REC-Q.711/en/ +- [[[itu-t-q713]]] ITU-T Q.713: Signalling connection control part formats and codes + https://www.itu.int/rec/T-REC-Q.713/en/ +- [[[itu-t-q714]]] ITU-T Q.714: Signalling connection control part procedures + https://www.itu.int/rec/T-REC-Q.714/en/ - [[[itu-t-q921]]] ITU-T Q.921: ISDN user-network interface - Data link layer specification https://www.itu.int/rec/T-REC-Q.921/en diff --git a/common/chapters/glossary.adoc b/common/chapters/glossary.adoc index 2a0d3c4..74973b3 100644 --- a/common/chapters/glossary.adoc +++ b/common/chapters/glossary.adoc @@ -117,6 +117,8 @@ GSMTAP:: GSM tap; pseudo standard for encapsulating GSM protocol layers over UDP/IP for analysis +GT:: + Global Title; an address in SCCP GTP:: GPRS Tunnel Protocol; used between SGSN and GGSN HLR:: @@ -145,6 +147,12 @@ 44.064_ <<3gpp-ts-44-064>>) Location Area:: Location Area; a geographic area containing multiple BTS +M2PA:: + MTP2 Peer-to-Peer Adaptation; a SIGTRAN Variant (_RFC 4165_ <>) +M2UA:: + MTP2 User Adaptation; a SIGTRAN Variant (_RFC 3331_ <>) +M3UA:: + MTP3 User Adaptation; a SIGTRAN Variant (_RFC 4666_ <>) MCC:: Mobile Country Code; unique identifier of a country, e.g. 262 for Germany MFF:: @@ -165,6 +173,8 @@ core network MSISDN:: Mobile Subscriber ISDN Number; telephone number of the subscriber +MTP:: + Message Transfer Part; SS7 signaling protocol (_ITU-T Q.701_ <>) MVNO:: Mobile Virtual Network Operator; Operator without physical radio network NCC:: @@ -208,6 +218,8 @@ OTA:: Over-The-Air; Capability of operators to remotely reconfigure/reprogram ISM/USIM cards +PC:: + Point Code; an address in MTP PCH:: Paging Channel on downlink Um interface; used by network to page an MS PCU:: @@ -251,11 +263,15 @@ SACCH:: Slow Associate Control Channel on Um interface; bundled to a TCH or SDCCH, used for signalling in parallel to active dedicated channel +SCCP:: + Signaling Connection Control Part; SS7 signaling protocol (_ITU-T Q.711_ <>) SDCCH:: Slow Dedicated Control Channel on Um interface; used for signalling and SMS transport in GSM SDK:: Software Development Kit +SIGTRAN:: + Signaling Transport over IP (_IETF RFC 2719_ <>) SIM:: Subscriber Identity Module; small chip card storing subscriber identity Site:: @@ -266,8 +282,16 @@ entities with an SMSC SMSC:: Short Message Service Center; store-and-forward relay for short messages +SS7:: + Signaling System No. 7; Classic digital telephony signaling system SSH:: Secure Shell; _IETF RFC 4250_ <> to 4254 +SSN:: + Sub-System Number; identifies a given SCCP Service such as MSC, HLR +STP:: + Signaling Transfer Point; A Router in SS7 Networks +SUA:: + SCCP User Adaptation; a SIGTRAN Variant (_RFC 3868_ <>) syslog:: System logging service of UNIX-like operating systems System Information:: diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc new file mode 100644 index 0000000..82ee2ac --- /dev/null +++ b/common/chapters/sigtran-osmocom.adoc @@ -0,0 +1,432 @@ +== Osmocom SS7 + SIGTRAN support + +=== History / Background + +If you're upgrading from earlier releases of the Osmocom stack, this +section will give you some background about the evolution. + +==== The Past (before 2017) + +In the original implementation of the GSM BSC inside Osmocom (the +OsmoBSC program, part of OpenBSC), no SS7 support was included. + +This is despite the fact that ETSI/3GPP mandated the use of SCCP over +MTP over E1/T1 TDM lines for the A interface at that time. + +Instead of going down to the TDM based legacy physical layers, OsmoBSC +implemented someting called an IPA multiplex, which apparently some +people also refer to as SCCPlite. We have never seen any +specifications for this interface, but implemented it from scratch +using protocol traces. + +The IPA protocol stack is based on a minimal sub-set of SCCP +(including connection oriented SCCP) wrapped into a 3-byte header to +packetize a TCP stream. + +The IPA/SCCPlite based A interface existed at a time when the +ETSI/3GPP specifications did not offer any IP based transport for the +A interface. An official as added only in Release FIXME of the 3GPP +specifications. + +The A interface BSSMAP protocol refers to voice circuits (E1/T1 +timeslots) using circuit identity codes (CICs). As there are no +physical timeslots on a TCP/IP based transport layer, the CICs get +mapped to RTP streams for circuit-switched data using out-of-band +signaling via MGCP, the IETF-standardized Media Gateway Control +Protocol. + +==== The present (2017) + +In 2017, sysmocom was tasked with implementing a 3GPP AoIP compliant A +interface. This meant that lot of things had to change in the +existing code: + +* removal of the existing hard-wired SCCPlite/IPA code from OsmoBSC +* introduction of a formal SCCP User SAP at the lower boundary of + BSSMAP +* introduction of libosmo-sigtran, a comprehensive SS7 and SIGTRAN + library which includes a SCCP implementation for connectionless and + connection-oriented procedures, offering the SCCP User SAP towards + BSSAP +* introduction of an A interface in OsmoMSC (which so far offered Iu + only) +* port of the existing SUA-baesd IuCS and IuPS over to the SCCP User + SAP of libosmo-sigtran. +* Implementation of ETSI M3UA as preferred/primary transport layer for + SCCP +* Implementation of an IPA transport layer inside libosmo-sigtran, in + order to keep backwards-compatibility. + +This work enables the Osmocom universe to become more compliant +with modern Releases of 3GPP specifications, which enables +interoperability with other MSCs or even BSCs. However, this comes at +a price: Increased complexity in set-up and configuration. + +Using SS7 or SIGTRAN based transport of the A interface adds an +entirely new domain that needs to be understood by system and network +administrators setting up cellular networks based on Osmocom. + +One of the key advantages of the Osmocom architecture with OsmoNITB +was exactly this simplification and reduction of complexity, enabling +more people to set-up and operate cellular networks. + +So we have put some thought into how we can achieve compatibility with +SS7/SIGTRAN and the 3GPP specifications, while at the same time +enabling some degree of auto-configuration where a small network can +be set up without too many configuration related to the signaling +network. We have achieved this by "abusing" (or extending) the M3UA +Routing Key Management slightly. + +=== Osmocom extensions to SIGTRAN + +Osmocom has implemented some extensions to the SIGTRAN protocol suite. +Those extensions will be documented below. + +==== Osmocom M3UA Routing Key Management Extensions + +In classic M3UA, a peer identifies its remote peer based on IP address +and port details. So once an ASP connects to an SG, the SG will check +if there is any configuration that matches the source IP (and possibly +source port) of that connection in order to understand which routing +context is used - and subsequently which traffic is to be routed to +this M3UA peer. + +This is quite inflexible, as it means that every BSC in a GSM network +needs to be manually pre-configured at the SG/STP, and that +configuration on the BSC and MSC must match to enable communication. + +M3UA specifies an optional Routing Key Management (RKM) sub-protocol. +Using RKM, an ASP can dynamically tell the SG/STP, which traffic it +wants to receive. However, the idea is still that the SG has some +matching configuration. + +In OsmoSTP based on libosmo-sigtran, we decided to (optionally) enable +fully dynamic registration. This means that any ASP can simply +connect to the SG and request the dynamic creation of an ASP and AS +with a corresponding routing key for a given point code. As long as +the SG doesn't already have a route to this requested point code, The +SG will simply trust any ASP and set a corresponding route. + +This is of course highly insecure and can only be used in trusted, +internal networks. However, it is quite elegant in reducing the +amount of configuration complexity. All that is needed, is that an +unique point code is configured at each of the ASPs (application +programs) that connect to the STP. + +To put things more concretely: Each BSC and MSC connecting to OsmoSTP +simply needs to be configured to have a different point code, and to +know to which IP/port of the STP to connect. There's no other +configuration required for a small, autonomous, self-contained +network. OsmoSTP will automatically install ASP, AS and route +definitions on demand, and route messages between all connected +entities. + +The same above of course also applies to HNB-GW and OsmoSGSN in the +case of Iu interfaces. + +==== IPA / SCCPlite backwards compatibility + +The fundamental problem with IPA/SCCPlite is that there's no MTP +routing label surrounding the SCCP message. This is generally +problematic in the context of connection-oriented SCCP, as there is no +addressing information inside the SCCP messages after the connection +has been established. Instead, the messages are routed based on the +MTP label, containing point codes established during connection set-up +time. + +This means that even if the SCCP messages did contain Called/Calling +Party Addresses with point codes or global titles, it would only help +us for routing connectionless SCCP. The A interface, however, is +connection-oriented. + +So in order to integrate IPA/SCCPlite with a new full-blown +SS7/SIGTRAN stack, there are the following options: + +. implement SCCP connection coupling. This is something like a proxy + for connection-oriented SCCP, and is what is used in SS7 to route + beyond a given MTP netwokr (e.g. at gateways between different MTP + networks) + +. consider all SCCP messages to be destined for the local point code + of the receiver. This then means that the SG functionality must be + included inside the MSC, and the MSC be bound to the SSN on the + local point code. + +. hard-code some DPC when receiving a message from an IPA connection. + It could be any remote PC and we'd simply route the message towards + that point code. + +But then we also have the return direction: + +. We could "assign" a unique SPC to each connected IPA client (BSC), + and then announce that PC towards the SS7 side. Return packets + would then end up at our IPA-server-bearing STP, which forwards them + to the respective IPA connection and thus BSC. On the transmit + side, we'd simply strip the MTP routing label and send the raw SCCP + message over IPA. + +. If the IPA server / SGW resides within the MSC, one could also have + some kind of handle/reference to the specific TCP connection through + which the BSC connected. All responses for a given peer would then + have to be routed back to the same connection. This is quite ugly + as it completely breaks the concepts of the SCCP User SAP, where a + user has no information (nor to worry about ) any "physical" + signaling links. + + +=== Minimal Osmocom SIGTRAN configurations for small networks + +If you're not an SS7 expert, and all you want is to run your own small +self-contained cellular network, this section explains what you need +to do. + +In general, you can consider OsmoSTP as something like an IP router. +On the application layer (in our case the BSSAP/BSSMAP or RANAP +protocols between Radio Access Network and Core Network), it is +completely invisible/transparent. The BSC connects via SCCP to the +MSC. It doesn't know that there's an STP in between, and that this +STP is performing some routing function. Compares this to your web +browser not knowing about IP routers, it just establishes an http +connection to a web server. + +This is also why most GSM nework architecture diagrams will not +explicitly show an STP. It is not part of the cellular network. +Rather, one or many STPs are part of the underlying SS7 signaling +transport network, on top of which the cellular network elements are +built. + +==== A minimal 2G configuration to get started + +You will be running the following programs: + +* OsmoBSC as the base-station controller between your BTS (possibly + running OsmoBTS) and the MSC +* OsmoMSC as the mobile switching center providing SMS and telephony + service to your subscribers +* OsmoSTP as the signal transfer point, routing messages between one + or more BSCs and the MSC + +[[fig-sigtran-simple-2g]] +.Simple signaling network for 2G (GSM) +[graphviz] +---- +include::sigtran-simple-2g.dot[] +---- + +You can use the OsmoSTP fully dynamic registration feature, so the BSCs +and the MSC will simply register with their point codes to the STP, +and the STP will create most configuration on the fly. + +All you need to make sure is: + +* to assign one unique point code to each BSC and MSC +* to point all BSCs and the MSC to connect to the IP+Port of the STP +* to configure the point code of the MSC in the BSCs + +==== A minimaal 3G configuration to get started + +You will be running the following programs: + +* OsmoHNBGW as the homeNodeB Gateway between your femtocells / small + cells and the MSC+SGSN +* OsmoMSC as the mobile switching center providing SMS and telephony + service to your subscribers +* OsmoSGSN as the Serving GPRS Support Node, providing packet data + (internet) services to your subscribers +* OsmoSTP as the signal transfer point, routing messages between one + or more HNBGWs and the MSC and SGSN + +[[fig-sigtran-simple-3g]] +.Simple signaling network for 3G (UMTS) +[graphviz] +---- +include::sigtran-simple-3g.dot[] +---- + +You can use the OsmoSTP fully dynamic registration feature, so the +HNBGWs, the SMC and the SGSNwill simply register with their point +codes to the STP, and the STP will create most configuration on the +fly. + +All you need to make sure is: + +* to assign one unique point code to each HNBGW, MSC and SGSN +* to point all HNBGWs and the MSC and SGSN to connect to the IP+Port of STP +* to configure the point code of the MSC in the HNBGWs +* to configure the point code of the SGSN in the HNBGWs + +=== Osmocom SS7 Instances + +The entire SS7 stack can be operated multiple times within one +application/program by means of so-called SS7 Instances. + +There can be any number of SS7 Instances, and each instance has its +own set of XUA Servers, ASPs, ASs, Routes, etc. + +Each SS7 Instance can have different point code formats / lengths. + +.Major Attributes of an Osmocom SS7 Instance +[options="header",cols="25%,35%,40%"] +|==== +|Name|VTY Command|Description +|ID|(config)# cs7 instance ID|The numeric identifier of this instance +|Name|(config-cs7)# name NAME|A human-readable name for this instance +|Description|(cnfig-cs7)# description DESC| More verbose description +|Primary PC|(config-cs7)# point-code PC|Primary local point code +|Network Indicator|(config-cs7)# network-indicator|Network Indicator used in MTP3 Routing Label +|Point Code Format|(config-cs7)# point-code format|Point Code Format (Default: 3.8.3) +|Point Code Delimiter|(config-cs7)# point-code delimiter|Point Code Delimiter: . or - +|==== + +=== Osmocom SS7 xUA Server + +A *xUA Server* is a server that binds + listens to a given SCTP +(SIGTRAN) or TCP (IPA) port and accepts connections from remote peers +(ASPs). + +There can be any number of xUA Servers within one SS7 Instance, as +long as they all run on a different combination of IP address and +port. + +.Major Attributes of an Osmocom SS7 xUA Server +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Local IP|Local Port Number to which the server shall bind/listen +|Local Port|Local IP Address to which the server shall bind/listen +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Accept Dynamic ASPs|Should we accept connections from ASPs that are not explicitly pre-configured with their source IP and port? +|==== + + +=== Osmocom SS7 Users + +A SS7 User is part of a program that binds to a given MTP-Layer +Service Indicator (SI). The Osmocom SS7 stack offers an API to +register SS7 Users, as well as the VTY command ``show cs7 instance +<0-15> users'' to list the currently registered users. + +=== Osmocom SS7 Links + +TBD. + +=== Osmocom SS7 Linksets + +TBD. + +=== Osmocom SS7 Application Servers + +This corresponds 1:1 to the SIGTRAN concept of an Application Server, +i.e. a given external Application that interfaces the SS7 network via +a SS7 protocol variant such as M3UA. + +In the context of Osmocom, for each program connecting to a STP (like +a BSC or MSC), you will have one Application Server definition. + +An AS has the following properties: + +.Major Attributes of an Osmocom SS7 Application Server +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Name|A human-readable name for this instance +|Description|More verbose description (for human user only) +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Routing Key|Routing Key (mostly Point Code) routed to this AS +|Traffic Mode|Theoretically Bradcast, Load-Balance. Currently only Ovverride +|Recovery Timeout|Duration of the AS T(r) recovery timer. During this time, + outgoing messages are queued. If the AS is ACTIVE + before timer expiration, the queue is drained. At + expriation, the queue is flushed. +|State|Application Server State (Down, Inactive, Active, Pending) +|ASPs|Which ASPs are permitted to transfer traffic for this AS +|==== + +=== Osmocom SS7 Application Server Processes + +An Application Server Process corresponds to a given SCTP (or TCP) +connection. From the STP/SG (Server) point-of-view, those are +incoming connections from Application Servers such as the BSCs. From +the ASP (Client) Point of view, it has one ``osmo_ss7_asp'' object for +each outbound SIGTARN connection. + +An ASP has the following properties: + +.Major Attributes of an Osmocom SS7 Application Server Process +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Name|A human-readable name for this instance +|Description|More verbose description (for human user only) +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Role|Server (SG) or Client (ASP)? +|Local Port|Port Number of the local end of the connection +|Local IP|IP Address of the local end of the connection +|Remote Port|Port Number of the remote end of the connection +|Remote IP|IP Address of the remote end of the connection +|State|ASP State (Down, Inactive, Active) +|==== + +=== Osmocom SS7 Routes + +An Osmocom SS7 Route routes traffic with a matching destination point +code and point code mask (similar to IP Address + Netmask) towards a +specified SS7 Linkset or Application Server. The Linkset or +Application Servers are identified by their name. + +.Major Attributes of an Osmocom SS7 Application Server Process +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Point Code|Destination Point Code for this route +|Mask|Destination Mask for this route (like an IP netmask) +|Linkset/AS Name|Destination Linkset or AS, identified by name +|==== + + +=== Osmocom SCCP Instances + +An Osmocom SS7 Instance can be bound to an Osmocom SS7 Instance. It +will register/bind for the ITU-standard Service Indicator (SI). + +=== Osmocom SCCP User + +An Program (like a BSC) will _bind_ itself to a given well-known +sub-system number (SSN) in order to receive SCCP messages destined for +this SSN. + +There is an API to bind a program to a SSN, which implicitly generates +an SCCP User object. + +The ``show cs7 instance <0-15> sccp users'' command can be used on the +VTY to obtain a list of currently bound SCCP users, as well as their +corresponding SSNs. + +=== Osmocom SCCP Connection + +This is how Osmocom represents each individual connection of +connection-oriented SCCP. + +To illustrate the practical applicaiton: For the common use case of +the A or Iu interfaces, this means that every dedicated radio channel +that is currently active to any UE/MS has one SCCP connection to the +MSC and/or SGSN. + +The ``show cs7 instance <0-15> sccp connections'' command can be used +on the VTY to obtain a list of currently active SCCP connections, as +well as their source/destination and current state. + + +=== Osmocom SCCP User SAP + +The Osmocom SCCP User SAP (Service Access Point) is the programming +interface between the SCCP Provider (libosmo-sigtran) and the SCCP +User. It follows primitives as laid out in <>, encapsulated +in ``osmo_prim'' structures. + +=== Osmocom MTP User SAP + +The Osmocom MTP User SAP (Service Access Point) is the programming +interface between the MTP Provider and the MTP User (e.g. SCCP). It +follows primitives as laid out in <>, encapsulated in +``osmo_prim'' structures. diff --git a/common/chapters/sigtran-simple-2g.dot b/common/chapters/sigtran-simple-2g.dot new file mode 100644 index 0000000..28098fd --- /dev/null +++ b/common/chapters/sigtran-simple-2g.dot @@ -0,0 +1,22 @@ +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC"]; + MSC [label="OsmoMSC"]; + STP [label="OsmoSTP"]; + + MS0 -> BTS0; + MS1 -> BTS0; + MS2 -> BTS1; + MS3 -> BTS1; + BTS0 -> BSC [label="Abis/IP"]; + BTS1 -> BSC [label="Abis/IP"]; + BSC -> STP [label="SCCP/M3UA"]; + STP -> MSC [label="SCCP/M3UA", dir="back"]; +} + diff --git a/common/chapters/sigtran-simple-3g.dot b/common/chapters/sigtran-simple-3g.dot new file mode 100644 index 0000000..eac363d --- /dev/null +++ b/common/chapters/sigtran-simple-3g.dot @@ -0,0 +1,24 @@ +digraph G { + rankdir=LR; + UE0 [label="UE"]; + UE1 [label="UE"]; + UE2 [label="UE"]; + UE3 [label="UE"]; + HNB0 [label="hNodeB"]; + HNB1 [label="hNodeB"]; + HNBGW [label="OsmoHNBGW"]; + MSC [label="OsmoMSC"]; + SGSN [label="OsmoSGSN"]; + STP [label="OsmoSTP"]; + + UE0 -> HNB0; + UE1 -> HNB0; + UE2 -> HNB1; + UE3 -> HNB1; + HNB0 -> HNBGW [label="Iuh (RUA)"]; + HNB1 -> HNBGW [label="Iuh (RUA)"]; + HNBGW -> STP [label="Iu (SCCP/M3UA)"]; + STP -> MSC [label="Iu (SCCP/M3UA)", dir="back"]; + STP -> SGSN [label="Iu (SCCP/M3UA)", dir="back"]; +} + diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc new file mode 100644 index 0000000..fc5c725 --- /dev/null +++ b/common/chapters/sigtran.adoc @@ -0,0 +1,332 @@ +== Signaling Networks: SS7 and SIGTRAN + +Classic digital telephony networks (whether wired or wireless) use the +ITU-T SS7 (Signaling System 7) to exchange signaling information +between network elements. + +Most of the ETSI/3GPP interfaces in the GSM and UMTS network are also +based on top of [parts of] SS7. This includes, among others, the +following interfaces: + +* _A_ interface between BSC and MSC +* _IuCS_ interface between RNC (or HNB-GW) and MSC +* _IuPS_ interface between RNC (or HNB-GW) and SGSN + +NOTE:: This does not include the A-bis interface between BTS and BSC. +While Abis traditionally is spoken over the same physical TDM circuits +as SS7, the protocol stack from L2 upwards is quite different (Abis +uses LAPD, while SS7 uses MTP)! + +=== Physical Layer + +The traditional physical layer of SS7 is based on TDM (time division +multiplex) links of the PDH/SDH family, as they were common in ISDN +networks. Some people may know their smallest incarnation as +so-called E1/T1 links. It can run either on individual 64kBps +timeslots of such a link, or on entire 2Mbps/1.5MBps E1/T1 links. + +There are also specifications for SS7 over ATM, though it is unclear +to the author if this is actually still used anywhere. + +On top of the Physical Layer is the Message Transfer Part (MTP). + +=== Message Transfer Part (MTP) + +MTP is the lower layer of the SS7 protocol stack. It is comprised of +two sub-layes, called MTP2 and MTP3. + +Nodes in a MTP network are addressed by their unique PC (Point Code). + +A _MTP Routing Label_ is in the MTP header and indicates the +_Originationg Point Code_ (OPC) as well as the _Destination Point +Code_ (DPC) and the _Service Indicator Octet_ (SIO). The SIO is used +to de-multiplex between different upper-layer protocol such as ISUP, +TUP or SCCP. + +Routing is performed by means of routers with routing tables, similar +to routing is performed in IP networks. Even the concept of a _point +code mask_ analogous to the _netmask_ exists. + +Routers are connected with one another over one or more _Link Sets_, +each comprised of one or multiple _Links_. Multiple Links in a +Linkset exist both for load sharing as well as for fail over purposes. + +==== Point Codes + +The length of point codes depends on the particular MTP dialect that +is used. In the 1980ies, when international telephony signaling +networks were established, most countries had their own national +dialects with certain specifics. + +Today, mostly the ITU and ANSI variants survive. The ITU variant uses +14bit point codes, while the ANSI variant uses 24 bit point code +length. + +Point Codes can be represented either as unsigned integers, or +grouped. Unfortunately there is no standard as to their +representation. In ITU networks, the _3.8.3_ notation is commonly +used, i.e. one decimal for the first 3 bits, followed by one decimal +for the center 8 bits, followed by another decimal for the final 3 +bits. + +Example:: The Point Code *1.5.3* (in 3.8.3 notation) is 1*2^11^ + 5*2^3^ + 3 = *2091 decimal*. + +=== Higher-Layer Protocols + +There are various higher-layer protocols used on top of MTP3, such as +TUP, ISUP, BICC as well as SCCP. Those protocols exist side-by-side +on top of MTP3, similar to e.g. ICMP, TCP and UDP existing +side-by-side on top of IP. + +In the context of cellular networks, SCCP is the most relevant part. + +=== Signaling Connection Control Part (SCCP) + +SCCP runs on top of MTP3 and creates something like an overlay network +on top of it. SCCP communication can e.g. span multiple different +isolated MTP networks, each with their own MTP dialect and addressing. + +SCCP provides both connectionless (datagram) and connection-oriented +services. Both are used in the context of cellular networks. + +==== SCCP Adresses + +SCCP Adresses are quite complex. This is due to the fact that it is +not simply one address format, but in fact a choice of one or multiple +different types of addresses. + +SCCP Addresses exist as _Calling Party_ and _Called Party_ addresses. +In the context of connectionless datagram services, the sender is +always the Calling Party, and the receiver the Called Party. In +connection-oriented SCCP, they resemble the initiator and recipient of +the connection. + +.SCCP Address Parts +[options="header",cols="10%,20%,70%"] +|==== +|Acronym|Name|Description +|SSN|Sub-System Number|Describes a given application such as e.g. a + GSM MSC, BSC or HLR. Can be compared to port + numbers on the Internet +|PC|Point Code |The Point Code of the underlying MTP network +|GT|Global Title |What most people would call a "phone number". + However, Global Titles come in many different + numbering plans, and only one of them (E.164) + resembles actual phone numbers. +|RI|Routing Indicator |Determines if message shall be routed on PC+SSN + or on GT basis +|==== + +==== Global Titles + +A Global Title is a (typically) globally unique address in the global +telephony network. The body of the Global Title consists of a series +of BCD-encoded digits similar to what everyone knows as phone numbers. + +A GT is however not only the digits of the "phone number", but also +some other equally important information, such as the _Numbering Plan_ +as well as the _Nature of Address Indication_. + +.Global Title Parts +[options="header",cols="10%,20%,70%"] +|==== +|Acronym|Name|Description +|GTI|Global Title Indicator|Determines the GT Format. Ranges from no + GT (0) to GT+TT+NP+ES+NAI (4) +|NAI|Nature of Address Indicator|Exists in GTI=1 and is sort of a mixture of TON + NPI +|TT|Translation Type |Used as a look-up key in Global Title Translation Tables +|NP|Numbering Plan |Indicates ITU Numbering Plan, such as E.164, E.212, E.214 +|ES|Encoding Scheme |Just a peculiar way to idicate the length of the digits +|- |Signals |The actual "phone number digits" +|==== + +For more information about SCCP Adresses and Global Titles, please +refer to <> + + +==== Global Title Translation (GTT) + +Global Title Translation is a process of re-writing the Global Title +on-the-fly while a signaling message passes a STP. + +Basically, a SCCP message is first transported by MTP3 on the MTP +level to the Destination Point Code indicated in the MTP Routing +Label. This process uses MTP routing and is transparent to SCCP. + +Once the SCCP message arrives at the MTP End-Node identified by the +Destination Point Code, the message is handed up to the local SCCP +stack, which then may implement Global Title Translation. + +The input to the GTT process is + +* the destination address of the SCCP message +* a local list/database of Global Title Translation Rules + +The successful output of he GTT includes + +* A new Routing Indicator +* The Destination Point Code to which the message is forwarded on MTP + level +* a Sub-system Number (if RI is set to "Route on SSN") +* a new Global Title (if RI is set to "Route on GT"), e.g. with translated digits. + +Between sender and recipient of a signaling message, there can be many +instances of Global Title Translation (up to 15 as per the hop +counter). + +For more information on Global Title Translation, please refer to +<>. + + +==== Peculiarities of Connection Oriented SCCP + +Interestingly, Connection-Oriented SCCP messages carry SCCP Addresses +*only during connection establishment*. All data messages during +an ongoing connection do not contain a Called or Calling Party +Address. Instead, they are routed only by the MTP label, which is +constructed from point code information saved at the time the +connection is established. + +This means that connection-oriented SCCP can not be routed across MTP +network boundaries the same way as connectionless SCCP messages. +Instead, an STP would have to perform _connection coupling_, whic is +basically the equivalent of an application-level proxy between two +SCCP connections, each over one of the two MTP networks. + +This is probably mostly of theoretical relevance, as +connection-oriented SCCP is primarily used between RAN and CN of +cellular network inside one operator, i.e. not across multiple MTP +networks. + +=== SIGTRAN - SS7 over IP Networks + +At some point, IP based networks became more dominant than classic +ISDN networks, and 3GPP as well as IETF were working out methods in +which telecom signaling traffic can be adapted over IP based +networks. + +Initially, only the edge of the network (i.e. the applications talking +to the network, such as HLR or MSC) were attached to the existing old +SS7 backbone by means as SUA and M3UA. Over time, even the links of +the actual network backbone networks became more and more IP based. + +In order to replace existing TDM-based SS7 links/liksets with SIGTRAN, +the M2UA or M2PA variants are used as a kind of drop-in replacement +for physical links. + +All SIGTRAN share that while they use IP, they don't use TCP or UDP +but operate over a (then) newly-introduced Layer 4 transport protocol +on top of IP: SCTP (Stream Control Transmission Protocol). + +Despite first being specified in October 2000 as IETF RFC 2960, it +took a long time until solid implementations of SCTP ended up in +general-purpose operating systems. SCTP is not used much outside the +context of SIGTAN, which means implementations often suffer from bugs, +and many parts of the public Internet do not carry SCTP traffic due to +restrictive firewalls and/or ignorant network administrators. + +==== SIGTRAN Concepts / Terminology + +Like every protocol or technology, SIGTRAN brings with it its own +terminology and concepts. This section tries to briefly introduce +them. For more information, please see the related IETF RFCs. + +===== Signaling Gateway (SG) + +The Signaling Gateway (SG) interconnects the SS7 network wit external +applications. It translates (parts of) the SS7 protocol stack into an +IP based SIGTRAN protocol stack. Which parts at which level of the +protocol stack are translated to what depends on the specific SIGTRAN +dialect. + +A SG is traditionally attached to the TDM-Based SS7 network and offers +SIGTRAN/IP based applications a way to remotely attach to the SS7 +network. + +A SG typically has STP functionality built-in, but it is not +mandatory. + +===== Application Server (AS) + +An Application Server is basically a logical entity representing one +particular external application (from the SS7 point of view) which is +interfaced with the SS7 network by means of one of the SIGTRAN +protocols. + +An Application Server can have one or more Application Server Processes +associated with it. This functionality (currently not implemented in +Osmocom) can be used for load-balancing or fail-over scenarios. + +===== Application Server Process (ASP) + +An Application Server Process represents one particular SCTP +connection used for SIGTRAN signaling between an external application +(e.g. a BSC) and the Signaling Gateway (SG). + +One Application Server Process can route traffic for multiple +Application Servers. In order to differentiate traffic for different +Application Servers, the Routing Context header is used. + +==== SIGTRAN variants / stackings + +SIGTRAN is the name of an IETF working group, which has released an +entire group of different protocol specifications. So rather than one +way of transporting classic telecom signaling over IP, there are now +half a dozen different ones, and all can claim to be an official IETF +standard. + +FIXME: Overview picture comparing the different stackings + +===== MTP3 User Adaptation (M3UA) + +M3UA basically "chops off" everything up to and including the MTP3 +protocol layer of the SS7 protocol stack and replaces it with a stack +comprised of M3UA over SCTP over IP. + +M3UA is specified in <>. + +===== SCCP User Adaptation (SUA) + +SUA basically "chops off" everything up to and including the SCCP +protocol layer of the SS7 protocol stack and replaces it with a stack +comprised of SUA over SCTP over IP. + +This means that SUA can only be used for SCCP based signaling, but not +for other SS7 protocols like e.g. TUP and ISUP. + +SUA is specified in <>. + +===== MTP2 User Adaptation (M2UA) + +M2UA is specified in <>. + +NOTE:: M2UA is not supported in Osmocom SIGTRAN up to this point. Let +us know if we can implement it for you! + +===== MTP2-User Peer-to-Peer Adaptation (M2PA) + +M2PA is specified in <>. + +NOTE:: M2PA is not supported in Osmocom SIGTRAN up to this point. Let +us know if we can implement it for you! + + +==== SIGTRAN security + +There simply is none. There are some hints that TLS shall be used +over SCTP in order to provide authenticity and/or confidentiality for +SIGTRAN, but this is not widely used. + +As telecom signaling is not generally carried over public networks, +private networks/links by means of MPLS, VLANs or VPNs such as IPsec +are often used to isolate and/or secure SIGTRAN. + +Under no circumstances should you use unsecured SIGTRAN with +production data over the public internet! + +==== IPv6 support + +SCTP (and thus all the higher layer protocols of the various SIGTRAN +stackings) operates on top of both IPv4 and IPv6. As the entire +underlying IP transport is transparent to the SS7/SCCP applications, +there is no restriction on whether to use SIGTRAN over IPv4 or IPv6. -- To view, visit https://gerrit.osmocom.org/2371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:35:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:35:10 +0000 Subject: libosmo-sccp[master]: ipa: Fix endianness of pseud-M3UA header In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4784 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:39:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:39:24 +0000 Subject: osmo-gsm-manuals[master]: First step towards an OsmoSTP manual In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:39:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:39:26 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: First step towards an OsmoSTP manual In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: First step towards an OsmoSTP manual ...................................................................... First step towards an OsmoSTP manual Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31 --- M Makefile A OsmoSTP/Makefile A OsmoSTP/chapters/overview.adoc A OsmoSTP/osmostp-usermanual-docinfo.xml A OsmoSTP/osmostp-usermanual.adoc A OsmoSTP/osmostp-vty-reference.xml A OsmoSTP/vty/stp_vty_reference.xml M common/chapters/bibliography.adoc M common/chapters/glossary.adoc A common/chapters/sigtran-osmocom.adoc A common/chapters/sigtran-simple-2g.dot A common/chapters/sigtran-simple-3g.dot A common/chapters/sigtran.adoc 13 files changed, 989 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile b/Makefile index 8f8d9b6..cd1b10e 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ cd OsmoGSMTester; $(MAKE) cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) + cd OsmoSTP; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -23,6 +24,7 @@ cd OsmoGSMTester; $(MAKE) clean cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean + cd OsmoSTP; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -36,6 +38,7 @@ cd OsmoGSMTester; $(MAKE) upload cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload + cd OsmoSTP; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -44,12 +47,14 @@ cd OsmoSGSN; $(MAKE) check cd OsmoGGSN; $(MAKE) check cd OsmoPCU; $(MAKE) check + cd OsmoSTP; $(MAKE) check # These don't use asciidoc, so they have no 'make check' target: #cd OsmoMGCP; $(MAKE) check #cd OsmoNAT; $(MAKE) check cd OsmoGSMTester; $(MAKE) check cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check + cd OsmoSTP; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmoSTP/Makefile b/OsmoSTP/Makefile new file mode 100644 index 0000000..6832dd4 --- /dev/null +++ b/OsmoSTP/Makefile @@ -0,0 +1,11 @@ +TOPDIR = .. + +ASCIIDOC = osmostp-usermanual.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc +osmostp-usermanual.pdf: chapters/*.adoc +aoip-mgw-options.pdf: aoip-mgw-options.adoc mgw/*.msc + +VTY_REFERENCE = osmostp-vty-reference.xml +include $(TOPDIR)/build/Makefile.vty-reference.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmoSTP/chapters/overview.adoc b/OsmoSTP/chapters/overview.adoc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/OsmoSTP/chapters/overview.adoc diff --git a/OsmoSTP/osmostp-usermanual-docinfo.xml b/OsmoSTP/osmostp-usermanual-docinfo.xml new file mode 100644 index 0000000..4253957 --- /dev/null +++ b/OsmoSTP/osmostp-usermanual-docinfo.xml @@ -0,0 +1,47 @@ + + + 1 + April 16, 2017 + HW + + Initial OsmoSTP manual + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + + + 2012-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with the Invariant Sections being just 'Foreword', + 'Acknowledgements' and 'Preface', with no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmoSTP/osmostp-usermanual.adoc b/OsmoSTP/osmostp-usermanual.adoc new file mode 100644 index 0000000..6dc1d08 --- /dev/null +++ b/OsmoSTP/osmostp-usermanual.adoc @@ -0,0 +1,34 @@ +OsmoSTP User Manual +=================== +Harald Welte + + +include::../common/chapters/preface.adoc[] + +// include::chapters/overview.adoc[] + +include::../common/chapters/sigtran.adoc[] + +include::../common/chapters/sigtran-osmocom.adoc[] + +//include::chapters/running.adoc[] +// include::chapters/control.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + +//include::../common/chapters/bts.adoc[] + +//include::../OsmoNITB/chapters/bts-examples.adoc[] + +//include::../common/chapters/control_if.adoc[] + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] + diff --git a/OsmoSTP/osmostp-vty-reference.xml b/OsmoSTP/osmostp-vty-reference.xml new file mode 100644 index 0000000..807d427 --- /dev/null +++ b/OsmoSTP/osmostp-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + April 16, 2017 + h2 + Initial + + + + OsmoSTP VTY Reference + + + 2012-2017 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoSTP/vty/stp_vty_reference.xml b/OsmoSTP/vty/stp_vty_reference.xml new file mode 100644 index 0000000..a4c675e --- /dev/null +++ b/OsmoSTP/vty/stp_vty_reference.xml @@ -0,0 +1,2 @@ + + diff --git a/common/chapters/bibliography.adoc b/common/chapters/bibliography.adoc index 129758f..12115c6 100644 --- a/common/chapters/bibliography.adoc +++ b/common/chapters/bibliography.adoc @@ -116,11 +116,29 @@ https://tools.ietf.org/html/rfc1350 - [[[ietf-rfc2131]]] IETF RFC 2131: Dynamic Host Configuration Protocol https://tools.ietf.org/html/rfc2131 +- [[[ietf-rfc2719]]] IETF RFC 2719: Signal Transport over IP + https://tools.ietf.org/html/rfc2719 +- [[[ietf-rfc3331]]] IETF RFC 3331: Message Transfer Part 2 User Adaptation Layer + https://tools.ietf.org/html/rfc3331 - [[[ietf-rfc3550]]] IETF RFC 3550: RTP: A Transport protocol for Real-Time Applications https://tools.ietf.org/html/rfc3550 +- [[[ietf-rfc3868]]] IETF RFC 3868: SCCP User Adaptation Layer + https://tools.ietf.org/html/rfc3868 +- [[[ietf-rfc4165]]] IETF RFC 4165: Message Transfer Part 2 Peer-to-Peeer Adaptation Layer + https://tools.ietf.org/html/rfc4165 - [[[ietf-rfc4251]]] IETF RFC 4251: The Secure Shell (SSH) Protocol Architecture https://tools.ietf.org/html/rfc4251 +- [[[ietf-rfc4666]]] IETF RFC 4666: Message Transfer Part 3 User Adaptation Layer + https://tools.ietf.org/html/rfc4666 +- [[[itu-t-q701]]] ITU-T Q.701: Functional Description of the Message Transfer Part (MTP) + https://www.itu.int/rec/T-REC-Q.701/en/ +- [[[itu-t-q711]]] ITU-T Q.711: Functional Description of the Signalling Connection Control Part + https://www.itu.int/rec/T-REC-Q.711/en/ +- [[[itu-t-q713]]] ITU-T Q.713: Signalling connection control part formats and codes + https://www.itu.int/rec/T-REC-Q.713/en/ +- [[[itu-t-q714]]] ITU-T Q.714: Signalling connection control part procedures + https://www.itu.int/rec/T-REC-Q.714/en/ - [[[itu-t-q921]]] ITU-T Q.921: ISDN user-network interface - Data link layer specification https://www.itu.int/rec/T-REC-Q.921/en diff --git a/common/chapters/glossary.adoc b/common/chapters/glossary.adoc index 2a0d3c4..74973b3 100644 --- a/common/chapters/glossary.adoc +++ b/common/chapters/glossary.adoc @@ -117,6 +117,8 @@ GSMTAP:: GSM tap; pseudo standard for encapsulating GSM protocol layers over UDP/IP for analysis +GT:: + Global Title; an address in SCCP GTP:: GPRS Tunnel Protocol; used between SGSN and GGSN HLR:: @@ -145,6 +147,12 @@ 44.064_ <<3gpp-ts-44-064>>) Location Area:: Location Area; a geographic area containing multiple BTS +M2PA:: + MTP2 Peer-to-Peer Adaptation; a SIGTRAN Variant (_RFC 4165_ <>) +M2UA:: + MTP2 User Adaptation; a SIGTRAN Variant (_RFC 3331_ <>) +M3UA:: + MTP3 User Adaptation; a SIGTRAN Variant (_RFC 4666_ <>) MCC:: Mobile Country Code; unique identifier of a country, e.g. 262 for Germany MFF:: @@ -165,6 +173,8 @@ core network MSISDN:: Mobile Subscriber ISDN Number; telephone number of the subscriber +MTP:: + Message Transfer Part; SS7 signaling protocol (_ITU-T Q.701_ <>) MVNO:: Mobile Virtual Network Operator; Operator without physical radio network NCC:: @@ -208,6 +218,8 @@ OTA:: Over-The-Air; Capability of operators to remotely reconfigure/reprogram ISM/USIM cards +PC:: + Point Code; an address in MTP PCH:: Paging Channel on downlink Um interface; used by network to page an MS PCU:: @@ -251,11 +263,15 @@ SACCH:: Slow Associate Control Channel on Um interface; bundled to a TCH or SDCCH, used for signalling in parallel to active dedicated channel +SCCP:: + Signaling Connection Control Part; SS7 signaling protocol (_ITU-T Q.711_ <>) SDCCH:: Slow Dedicated Control Channel on Um interface; used for signalling and SMS transport in GSM SDK:: Software Development Kit +SIGTRAN:: + Signaling Transport over IP (_IETF RFC 2719_ <>) SIM:: Subscriber Identity Module; small chip card storing subscriber identity Site:: @@ -266,8 +282,16 @@ entities with an SMSC SMSC:: Short Message Service Center; store-and-forward relay for short messages +SS7:: + Signaling System No. 7; Classic digital telephony signaling system SSH:: Secure Shell; _IETF RFC 4250_ <> to 4254 +SSN:: + Sub-System Number; identifies a given SCCP Service such as MSC, HLR +STP:: + Signaling Transfer Point; A Router in SS7 Networks +SUA:: + SCCP User Adaptation; a SIGTRAN Variant (_RFC 3868_ <>) syslog:: System logging service of UNIX-like operating systems System Information:: diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc new file mode 100644 index 0000000..82ee2ac --- /dev/null +++ b/common/chapters/sigtran-osmocom.adoc @@ -0,0 +1,432 @@ +== Osmocom SS7 + SIGTRAN support + +=== History / Background + +If you're upgrading from earlier releases of the Osmocom stack, this +section will give you some background about the evolution. + +==== The Past (before 2017) + +In the original implementation of the GSM BSC inside Osmocom (the +OsmoBSC program, part of OpenBSC), no SS7 support was included. + +This is despite the fact that ETSI/3GPP mandated the use of SCCP over +MTP over E1/T1 TDM lines for the A interface at that time. + +Instead of going down to the TDM based legacy physical layers, OsmoBSC +implemented someting called an IPA multiplex, which apparently some +people also refer to as SCCPlite. We have never seen any +specifications for this interface, but implemented it from scratch +using protocol traces. + +The IPA protocol stack is based on a minimal sub-set of SCCP +(including connection oriented SCCP) wrapped into a 3-byte header to +packetize a TCP stream. + +The IPA/SCCPlite based A interface existed at a time when the +ETSI/3GPP specifications did not offer any IP based transport for the +A interface. An official as added only in Release FIXME of the 3GPP +specifications. + +The A interface BSSMAP protocol refers to voice circuits (E1/T1 +timeslots) using circuit identity codes (CICs). As there are no +physical timeslots on a TCP/IP based transport layer, the CICs get +mapped to RTP streams for circuit-switched data using out-of-band +signaling via MGCP, the IETF-standardized Media Gateway Control +Protocol. + +==== The present (2017) + +In 2017, sysmocom was tasked with implementing a 3GPP AoIP compliant A +interface. This meant that lot of things had to change in the +existing code: + +* removal of the existing hard-wired SCCPlite/IPA code from OsmoBSC +* introduction of a formal SCCP User SAP at the lower boundary of + BSSMAP +* introduction of libosmo-sigtran, a comprehensive SS7 and SIGTRAN + library which includes a SCCP implementation for connectionless and + connection-oriented procedures, offering the SCCP User SAP towards + BSSAP +* introduction of an A interface in OsmoMSC (which so far offered Iu + only) +* port of the existing SUA-baesd IuCS and IuPS over to the SCCP User + SAP of libosmo-sigtran. +* Implementation of ETSI M3UA as preferred/primary transport layer for + SCCP +* Implementation of an IPA transport layer inside libosmo-sigtran, in + order to keep backwards-compatibility. + +This work enables the Osmocom universe to become more compliant +with modern Releases of 3GPP specifications, which enables +interoperability with other MSCs or even BSCs. However, this comes at +a price: Increased complexity in set-up and configuration. + +Using SS7 or SIGTRAN based transport of the A interface adds an +entirely new domain that needs to be understood by system and network +administrators setting up cellular networks based on Osmocom. + +One of the key advantages of the Osmocom architecture with OsmoNITB +was exactly this simplification and reduction of complexity, enabling +more people to set-up and operate cellular networks. + +So we have put some thought into how we can achieve compatibility with +SS7/SIGTRAN and the 3GPP specifications, while at the same time +enabling some degree of auto-configuration where a small network can +be set up without too many configuration related to the signaling +network. We have achieved this by "abusing" (or extending) the M3UA +Routing Key Management slightly. + +=== Osmocom extensions to SIGTRAN + +Osmocom has implemented some extensions to the SIGTRAN protocol suite. +Those extensions will be documented below. + +==== Osmocom M3UA Routing Key Management Extensions + +In classic M3UA, a peer identifies its remote peer based on IP address +and port details. So once an ASP connects to an SG, the SG will check +if there is any configuration that matches the source IP (and possibly +source port) of that connection in order to understand which routing +context is used - and subsequently which traffic is to be routed to +this M3UA peer. + +This is quite inflexible, as it means that every BSC in a GSM network +needs to be manually pre-configured at the SG/STP, and that +configuration on the BSC and MSC must match to enable communication. + +M3UA specifies an optional Routing Key Management (RKM) sub-protocol. +Using RKM, an ASP can dynamically tell the SG/STP, which traffic it +wants to receive. However, the idea is still that the SG has some +matching configuration. + +In OsmoSTP based on libosmo-sigtran, we decided to (optionally) enable +fully dynamic registration. This means that any ASP can simply +connect to the SG and request the dynamic creation of an ASP and AS +with a corresponding routing key for a given point code. As long as +the SG doesn't already have a route to this requested point code, The +SG will simply trust any ASP and set a corresponding route. + +This is of course highly insecure and can only be used in trusted, +internal networks. However, it is quite elegant in reducing the +amount of configuration complexity. All that is needed, is that an +unique point code is configured at each of the ASPs (application +programs) that connect to the STP. + +To put things more concretely: Each BSC and MSC connecting to OsmoSTP +simply needs to be configured to have a different point code, and to +know to which IP/port of the STP to connect. There's no other +configuration required for a small, autonomous, self-contained +network. OsmoSTP will automatically install ASP, AS and route +definitions on demand, and route messages between all connected +entities. + +The same above of course also applies to HNB-GW and OsmoSGSN in the +case of Iu interfaces. + +==== IPA / SCCPlite backwards compatibility + +The fundamental problem with IPA/SCCPlite is that there's no MTP +routing label surrounding the SCCP message. This is generally +problematic in the context of connection-oriented SCCP, as there is no +addressing information inside the SCCP messages after the connection +has been established. Instead, the messages are routed based on the +MTP label, containing point codes established during connection set-up +time. + +This means that even if the SCCP messages did contain Called/Calling +Party Addresses with point codes or global titles, it would only help +us for routing connectionless SCCP. The A interface, however, is +connection-oriented. + +So in order to integrate IPA/SCCPlite with a new full-blown +SS7/SIGTRAN stack, there are the following options: + +. implement SCCP connection coupling. This is something like a proxy + for connection-oriented SCCP, and is what is used in SS7 to route + beyond a given MTP netwokr (e.g. at gateways between different MTP + networks) + +. consider all SCCP messages to be destined for the local point code + of the receiver. This then means that the SG functionality must be + included inside the MSC, and the MSC be bound to the SSN on the + local point code. + +. hard-code some DPC when receiving a message from an IPA connection. + It could be any remote PC and we'd simply route the message towards + that point code. + +But then we also have the return direction: + +. We could "assign" a unique SPC to each connected IPA client (BSC), + and then announce that PC towards the SS7 side. Return packets + would then end up at our IPA-server-bearing STP, which forwards them + to the respective IPA connection and thus BSC. On the transmit + side, we'd simply strip the MTP routing label and send the raw SCCP + message over IPA. + +. If the IPA server / SGW resides within the MSC, one could also have + some kind of handle/reference to the specific TCP connection through + which the BSC connected. All responses for a given peer would then + have to be routed back to the same connection. This is quite ugly + as it completely breaks the concepts of the SCCP User SAP, where a + user has no information (nor to worry about ) any "physical" + signaling links. + + +=== Minimal Osmocom SIGTRAN configurations for small networks + +If you're not an SS7 expert, and all you want is to run your own small +self-contained cellular network, this section explains what you need +to do. + +In general, you can consider OsmoSTP as something like an IP router. +On the application layer (in our case the BSSAP/BSSMAP or RANAP +protocols between Radio Access Network and Core Network), it is +completely invisible/transparent. The BSC connects via SCCP to the +MSC. It doesn't know that there's an STP in between, and that this +STP is performing some routing function. Compares this to your web +browser not knowing about IP routers, it just establishes an http +connection to a web server. + +This is also why most GSM nework architecture diagrams will not +explicitly show an STP. It is not part of the cellular network. +Rather, one or many STPs are part of the underlying SS7 signaling +transport network, on top of which the cellular network elements are +built. + +==== A minimal 2G configuration to get started + +You will be running the following programs: + +* OsmoBSC as the base-station controller between your BTS (possibly + running OsmoBTS) and the MSC +* OsmoMSC as the mobile switching center providing SMS and telephony + service to your subscribers +* OsmoSTP as the signal transfer point, routing messages between one + or more BSCs and the MSC + +[[fig-sigtran-simple-2g]] +.Simple signaling network for 2G (GSM) +[graphviz] +---- +include::sigtran-simple-2g.dot[] +---- + +You can use the OsmoSTP fully dynamic registration feature, so the BSCs +and the MSC will simply register with their point codes to the STP, +and the STP will create most configuration on the fly. + +All you need to make sure is: + +* to assign one unique point code to each BSC and MSC +* to point all BSCs and the MSC to connect to the IP+Port of the STP +* to configure the point code of the MSC in the BSCs + +==== A minimaal 3G configuration to get started + +You will be running the following programs: + +* OsmoHNBGW as the homeNodeB Gateway between your femtocells / small + cells and the MSC+SGSN +* OsmoMSC as the mobile switching center providing SMS and telephony + service to your subscribers +* OsmoSGSN as the Serving GPRS Support Node, providing packet data + (internet) services to your subscribers +* OsmoSTP as the signal transfer point, routing messages between one + or more HNBGWs and the MSC and SGSN + +[[fig-sigtran-simple-3g]] +.Simple signaling network for 3G (UMTS) +[graphviz] +---- +include::sigtran-simple-3g.dot[] +---- + +You can use the OsmoSTP fully dynamic registration feature, so the +HNBGWs, the SMC and the SGSNwill simply register with their point +codes to the STP, and the STP will create most configuration on the +fly. + +All you need to make sure is: + +* to assign one unique point code to each HNBGW, MSC and SGSN +* to point all HNBGWs and the MSC and SGSN to connect to the IP+Port of STP +* to configure the point code of the MSC in the HNBGWs +* to configure the point code of the SGSN in the HNBGWs + +=== Osmocom SS7 Instances + +The entire SS7 stack can be operated multiple times within one +application/program by means of so-called SS7 Instances. + +There can be any number of SS7 Instances, and each instance has its +own set of XUA Servers, ASPs, ASs, Routes, etc. + +Each SS7 Instance can have different point code formats / lengths. + +.Major Attributes of an Osmocom SS7 Instance +[options="header",cols="25%,35%,40%"] +|==== +|Name|VTY Command|Description +|ID|(config)# cs7 instance ID|The numeric identifier of this instance +|Name|(config-cs7)# name NAME|A human-readable name for this instance +|Description|(cnfig-cs7)# description DESC| More verbose description +|Primary PC|(config-cs7)# point-code PC|Primary local point code +|Network Indicator|(config-cs7)# network-indicator|Network Indicator used in MTP3 Routing Label +|Point Code Format|(config-cs7)# point-code format|Point Code Format (Default: 3.8.3) +|Point Code Delimiter|(config-cs7)# point-code delimiter|Point Code Delimiter: . or - +|==== + +=== Osmocom SS7 xUA Server + +A *xUA Server* is a server that binds + listens to a given SCTP +(SIGTRAN) or TCP (IPA) port and accepts connections from remote peers +(ASPs). + +There can be any number of xUA Servers within one SS7 Instance, as +long as they all run on a different combination of IP address and +port. + +.Major Attributes of an Osmocom SS7 xUA Server +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Local IP|Local Port Number to which the server shall bind/listen +|Local Port|Local IP Address to which the server shall bind/listen +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Accept Dynamic ASPs|Should we accept connections from ASPs that are not explicitly pre-configured with their source IP and port? +|==== + + +=== Osmocom SS7 Users + +A SS7 User is part of a program that binds to a given MTP-Layer +Service Indicator (SI). The Osmocom SS7 stack offers an API to +register SS7 Users, as well as the VTY command ``show cs7 instance +<0-15> users'' to list the currently registered users. + +=== Osmocom SS7 Links + +TBD. + +=== Osmocom SS7 Linksets + +TBD. + +=== Osmocom SS7 Application Servers + +This corresponds 1:1 to the SIGTRAN concept of an Application Server, +i.e. a given external Application that interfaces the SS7 network via +a SS7 protocol variant such as M3UA. + +In the context of Osmocom, for each program connecting to a STP (like +a BSC or MSC), you will have one Application Server definition. + +An AS has the following properties: + +.Major Attributes of an Osmocom SS7 Application Server +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Name|A human-readable name for this instance +|Description|More verbose description (for human user only) +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Routing Key|Routing Key (mostly Point Code) routed to this AS +|Traffic Mode|Theoretically Bradcast, Load-Balance. Currently only Ovverride +|Recovery Timeout|Duration of the AS T(r) recovery timer. During this time, + outgoing messages are queued. If the AS is ACTIVE + before timer expiration, the queue is drained. At + expriation, the queue is flushed. +|State|Application Server State (Down, Inactive, Active, Pending) +|ASPs|Which ASPs are permitted to transfer traffic for this AS +|==== + +=== Osmocom SS7 Application Server Processes + +An Application Server Process corresponds to a given SCTP (or TCP) +connection. From the STP/SG (Server) point-of-view, those are +incoming connections from Application Servers such as the BSCs. From +the ASP (Client) Point of view, it has one ``osmo_ss7_asp'' object for +each outbound SIGTARN connection. + +An ASP has the following properties: + +.Major Attributes of an Osmocom SS7 Application Server Process +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Name|A human-readable name for this instance +|Description|More verbose description (for human user only) +|Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server +|Role|Server (SG) or Client (ASP)? +|Local Port|Port Number of the local end of the connection +|Local IP|IP Address of the local end of the connection +|Remote Port|Port Number of the remote end of the connection +|Remote IP|IP Address of the remote end of the connection +|State|ASP State (Down, Inactive, Active) +|==== + +=== Osmocom SS7 Routes + +An Osmocom SS7 Route routes traffic with a matching destination point +code and point code mask (similar to IP Address + Netmask) towards a +specified SS7 Linkset or Application Server. The Linkset or +Application Servers are identified by their name. + +.Major Attributes of an Osmocom SS7 Application Server Process +[options="header",cols="25%,75%"] +|==== +|Name|Description +|Point Code|Destination Point Code for this route +|Mask|Destination Mask for this route (like an IP netmask) +|Linkset/AS Name|Destination Linkset or AS, identified by name +|==== + + +=== Osmocom SCCP Instances + +An Osmocom SS7 Instance can be bound to an Osmocom SS7 Instance. It +will register/bind for the ITU-standard Service Indicator (SI). + +=== Osmocom SCCP User + +An Program (like a BSC) will _bind_ itself to a given well-known +sub-system number (SSN) in order to receive SCCP messages destined for +this SSN. + +There is an API to bind a program to a SSN, which implicitly generates +an SCCP User object. + +The ``show cs7 instance <0-15> sccp users'' command can be used on the +VTY to obtain a list of currently bound SCCP users, as well as their +corresponding SSNs. + +=== Osmocom SCCP Connection + +This is how Osmocom represents each individual connection of +connection-oriented SCCP. + +To illustrate the practical applicaiton: For the common use case of +the A or Iu interfaces, this means that every dedicated radio channel +that is currently active to any UE/MS has one SCCP connection to the +MSC and/or SGSN. + +The ``show cs7 instance <0-15> sccp connections'' command can be used +on the VTY to obtain a list of currently active SCCP connections, as +well as their source/destination and current state. + + +=== Osmocom SCCP User SAP + +The Osmocom SCCP User SAP (Service Access Point) is the programming +interface between the SCCP Provider (libosmo-sigtran) and the SCCP +User. It follows primitives as laid out in <>, encapsulated +in ``osmo_prim'' structures. + +=== Osmocom MTP User SAP + +The Osmocom MTP User SAP (Service Access Point) is the programming +interface between the MTP Provider and the MTP User (e.g. SCCP). It +follows primitives as laid out in <>, encapsulated in +``osmo_prim'' structures. diff --git a/common/chapters/sigtran-simple-2g.dot b/common/chapters/sigtran-simple-2g.dot new file mode 100644 index 0000000..28098fd --- /dev/null +++ b/common/chapters/sigtran-simple-2g.dot @@ -0,0 +1,22 @@ +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC"]; + MSC [label="OsmoMSC"]; + STP [label="OsmoSTP"]; + + MS0 -> BTS0; + MS1 -> BTS0; + MS2 -> BTS1; + MS3 -> BTS1; + BTS0 -> BSC [label="Abis/IP"]; + BTS1 -> BSC [label="Abis/IP"]; + BSC -> STP [label="SCCP/M3UA"]; + STP -> MSC [label="SCCP/M3UA", dir="back"]; +} + diff --git a/common/chapters/sigtran-simple-3g.dot b/common/chapters/sigtran-simple-3g.dot new file mode 100644 index 0000000..eac363d --- /dev/null +++ b/common/chapters/sigtran-simple-3g.dot @@ -0,0 +1,24 @@ +digraph G { + rankdir=LR; + UE0 [label="UE"]; + UE1 [label="UE"]; + UE2 [label="UE"]; + UE3 [label="UE"]; + HNB0 [label="hNodeB"]; + HNB1 [label="hNodeB"]; + HNBGW [label="OsmoHNBGW"]; + MSC [label="OsmoMSC"]; + SGSN [label="OsmoSGSN"]; + STP [label="OsmoSTP"]; + + UE0 -> HNB0; + UE1 -> HNB0; + UE2 -> HNB1; + UE3 -> HNB1; + HNB0 -> HNBGW [label="Iuh (RUA)"]; + HNB1 -> HNBGW [label="Iuh (RUA)"]; + HNBGW -> STP [label="Iu (SCCP/M3UA)"]; + STP -> MSC [label="Iu (SCCP/M3UA)", dir="back"]; + STP -> SGSN [label="Iu (SCCP/M3UA)", dir="back"]; +} + diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc new file mode 100644 index 0000000..fc5c725 --- /dev/null +++ b/common/chapters/sigtran.adoc @@ -0,0 +1,332 @@ +== Signaling Networks: SS7 and SIGTRAN + +Classic digital telephony networks (whether wired or wireless) use the +ITU-T SS7 (Signaling System 7) to exchange signaling information +between network elements. + +Most of the ETSI/3GPP interfaces in the GSM and UMTS network are also +based on top of [parts of] SS7. This includes, among others, the +following interfaces: + +* _A_ interface between BSC and MSC +* _IuCS_ interface between RNC (or HNB-GW) and MSC +* _IuPS_ interface between RNC (or HNB-GW) and SGSN + +NOTE:: This does not include the A-bis interface between BTS and BSC. +While Abis traditionally is spoken over the same physical TDM circuits +as SS7, the protocol stack from L2 upwards is quite different (Abis +uses LAPD, while SS7 uses MTP)! + +=== Physical Layer + +The traditional physical layer of SS7 is based on TDM (time division +multiplex) links of the PDH/SDH family, as they were common in ISDN +networks. Some people may know their smallest incarnation as +so-called E1/T1 links. It can run either on individual 64kBps +timeslots of such a link, or on entire 2Mbps/1.5MBps E1/T1 links. + +There are also specifications for SS7 over ATM, though it is unclear +to the author if this is actually still used anywhere. + +On top of the Physical Layer is the Message Transfer Part (MTP). + +=== Message Transfer Part (MTP) + +MTP is the lower layer of the SS7 protocol stack. It is comprised of +two sub-layes, called MTP2 and MTP3. + +Nodes in a MTP network are addressed by their unique PC (Point Code). + +A _MTP Routing Label_ is in the MTP header and indicates the +_Originationg Point Code_ (OPC) as well as the _Destination Point +Code_ (DPC) and the _Service Indicator Octet_ (SIO). The SIO is used +to de-multiplex between different upper-layer protocol such as ISUP, +TUP or SCCP. + +Routing is performed by means of routers with routing tables, similar +to routing is performed in IP networks. Even the concept of a _point +code mask_ analogous to the _netmask_ exists. + +Routers are connected with one another over one or more _Link Sets_, +each comprised of one or multiple _Links_. Multiple Links in a +Linkset exist both for load sharing as well as for fail over purposes. + +==== Point Codes + +The length of point codes depends on the particular MTP dialect that +is used. In the 1980ies, when international telephony signaling +networks were established, most countries had their own national +dialects with certain specifics. + +Today, mostly the ITU and ANSI variants survive. The ITU variant uses +14bit point codes, while the ANSI variant uses 24 bit point code +length. + +Point Codes can be represented either as unsigned integers, or +grouped. Unfortunately there is no standard as to their +representation. In ITU networks, the _3.8.3_ notation is commonly +used, i.e. one decimal for the first 3 bits, followed by one decimal +for the center 8 bits, followed by another decimal for the final 3 +bits. + +Example:: The Point Code *1.5.3* (in 3.8.3 notation) is 1*2^11^ + 5*2^3^ + 3 = *2091 decimal*. + +=== Higher-Layer Protocols + +There are various higher-layer protocols used on top of MTP3, such as +TUP, ISUP, BICC as well as SCCP. Those protocols exist side-by-side +on top of MTP3, similar to e.g. ICMP, TCP and UDP existing +side-by-side on top of IP. + +In the context of cellular networks, SCCP is the most relevant part. + +=== Signaling Connection Control Part (SCCP) + +SCCP runs on top of MTP3 and creates something like an overlay network +on top of it. SCCP communication can e.g. span multiple different +isolated MTP networks, each with their own MTP dialect and addressing. + +SCCP provides both connectionless (datagram) and connection-oriented +services. Both are used in the context of cellular networks. + +==== SCCP Adresses + +SCCP Adresses are quite complex. This is due to the fact that it is +not simply one address format, but in fact a choice of one or multiple +different types of addresses. + +SCCP Addresses exist as _Calling Party_ and _Called Party_ addresses. +In the context of connectionless datagram services, the sender is +always the Calling Party, and the receiver the Called Party. In +connection-oriented SCCP, they resemble the initiator and recipient of +the connection. + +.SCCP Address Parts +[options="header",cols="10%,20%,70%"] +|==== +|Acronym|Name|Description +|SSN|Sub-System Number|Describes a given application such as e.g. a + GSM MSC, BSC or HLR. Can be compared to port + numbers on the Internet +|PC|Point Code |The Point Code of the underlying MTP network +|GT|Global Title |What most people would call a "phone number". + However, Global Titles come in many different + numbering plans, and only one of them (E.164) + resembles actual phone numbers. +|RI|Routing Indicator |Determines if message shall be routed on PC+SSN + or on GT basis +|==== + +==== Global Titles + +A Global Title is a (typically) globally unique address in the global +telephony network. The body of the Global Title consists of a series +of BCD-encoded digits similar to what everyone knows as phone numbers. + +A GT is however not only the digits of the "phone number", but also +some other equally important information, such as the _Numbering Plan_ +as well as the _Nature of Address Indication_. + +.Global Title Parts +[options="header",cols="10%,20%,70%"] +|==== +|Acronym|Name|Description +|GTI|Global Title Indicator|Determines the GT Format. Ranges from no + GT (0) to GT+TT+NP+ES+NAI (4) +|NAI|Nature of Address Indicator|Exists in GTI=1 and is sort of a mixture of TON + NPI +|TT|Translation Type |Used as a look-up key in Global Title Translation Tables +|NP|Numbering Plan |Indicates ITU Numbering Plan, such as E.164, E.212, E.214 +|ES|Encoding Scheme |Just a peculiar way to idicate the length of the digits +|- |Signals |The actual "phone number digits" +|==== + +For more information about SCCP Adresses and Global Titles, please +refer to <> + + +==== Global Title Translation (GTT) + +Global Title Translation is a process of re-writing the Global Title +on-the-fly while a signaling message passes a STP. + +Basically, a SCCP message is first transported by MTP3 on the MTP +level to the Destination Point Code indicated in the MTP Routing +Label. This process uses MTP routing and is transparent to SCCP. + +Once the SCCP message arrives at the MTP End-Node identified by the +Destination Point Code, the message is handed up to the local SCCP +stack, which then may implement Global Title Translation. + +The input to the GTT process is + +* the destination address of the SCCP message +* a local list/database of Global Title Translation Rules + +The successful output of he GTT includes + +* A new Routing Indicator +* The Destination Point Code to which the message is forwarded on MTP + level +* a Sub-system Number (if RI is set to "Route on SSN") +* a new Global Title (if RI is set to "Route on GT"), e.g. with translated digits. + +Between sender and recipient of a signaling message, there can be many +instances of Global Title Translation (up to 15 as per the hop +counter). + +For more information on Global Title Translation, please refer to +<>. + + +==== Peculiarities of Connection Oriented SCCP + +Interestingly, Connection-Oriented SCCP messages carry SCCP Addresses +*only during connection establishment*. All data messages during +an ongoing connection do not contain a Called or Calling Party +Address. Instead, they are routed only by the MTP label, which is +constructed from point code information saved at the time the +connection is established. + +This means that connection-oriented SCCP can not be routed across MTP +network boundaries the same way as connectionless SCCP messages. +Instead, an STP would have to perform _connection coupling_, whic is +basically the equivalent of an application-level proxy between two +SCCP connections, each over one of the two MTP networks. + +This is probably mostly of theoretical relevance, as +connection-oriented SCCP is primarily used between RAN and CN of +cellular network inside one operator, i.e. not across multiple MTP +networks. + +=== SIGTRAN - SS7 over IP Networks + +At some point, IP based networks became more dominant than classic +ISDN networks, and 3GPP as well as IETF were working out methods in +which telecom signaling traffic can be adapted over IP based +networks. + +Initially, only the edge of the network (i.e. the applications talking +to the network, such as HLR or MSC) were attached to the existing old +SS7 backbone by means as SUA and M3UA. Over time, even the links of +the actual network backbone networks became more and more IP based. + +In order to replace existing TDM-based SS7 links/liksets with SIGTRAN, +the M2UA or M2PA variants are used as a kind of drop-in replacement +for physical links. + +All SIGTRAN share that while they use IP, they don't use TCP or UDP +but operate over a (then) newly-introduced Layer 4 transport protocol +on top of IP: SCTP (Stream Control Transmission Protocol). + +Despite first being specified in October 2000 as IETF RFC 2960, it +took a long time until solid implementations of SCTP ended up in +general-purpose operating systems. SCTP is not used much outside the +context of SIGTAN, which means implementations often suffer from bugs, +and many parts of the public Internet do not carry SCTP traffic due to +restrictive firewalls and/or ignorant network administrators. + +==== SIGTRAN Concepts / Terminology + +Like every protocol or technology, SIGTRAN brings with it its own +terminology and concepts. This section tries to briefly introduce +them. For more information, please see the related IETF RFCs. + +===== Signaling Gateway (SG) + +The Signaling Gateway (SG) interconnects the SS7 network wit external +applications. It translates (parts of) the SS7 protocol stack into an +IP based SIGTRAN protocol stack. Which parts at which level of the +protocol stack are translated to what depends on the specific SIGTRAN +dialect. + +A SG is traditionally attached to the TDM-Based SS7 network and offers +SIGTRAN/IP based applications a way to remotely attach to the SS7 +network. + +A SG typically has STP functionality built-in, but it is not +mandatory. + +===== Application Server (AS) + +An Application Server is basically a logical entity representing one +particular external application (from the SS7 point of view) which is +interfaced with the SS7 network by means of one of the SIGTRAN +protocols. + +An Application Server can have one or more Application Server Processes +associated with it. This functionality (currently not implemented in +Osmocom) can be used for load-balancing or fail-over scenarios. + +===== Application Server Process (ASP) + +An Application Server Process represents one particular SCTP +connection used for SIGTRAN signaling between an external application +(e.g. a BSC) and the Signaling Gateway (SG). + +One Application Server Process can route traffic for multiple +Application Servers. In order to differentiate traffic for different +Application Servers, the Routing Context header is used. + +==== SIGTRAN variants / stackings + +SIGTRAN is the name of an IETF working group, which has released an +entire group of different protocol specifications. So rather than one +way of transporting classic telecom signaling over IP, there are now +half a dozen different ones, and all can claim to be an official IETF +standard. + +FIXME: Overview picture comparing the different stackings + +===== MTP3 User Adaptation (M3UA) + +M3UA basically "chops off" everything up to and including the MTP3 +protocol layer of the SS7 protocol stack and replaces it with a stack +comprised of M3UA over SCTP over IP. + +M3UA is specified in <>. + +===== SCCP User Adaptation (SUA) + +SUA basically "chops off" everything up to and including the SCCP +protocol layer of the SS7 protocol stack and replaces it with a stack +comprised of SUA over SCTP over IP. + +This means that SUA can only be used for SCCP based signaling, but not +for other SS7 protocols like e.g. TUP and ISUP. + +SUA is specified in <>. + +===== MTP2 User Adaptation (M2UA) + +M2UA is specified in <>. + +NOTE:: M2UA is not supported in Osmocom SIGTRAN up to this point. Let +us know if we can implement it for you! + +===== MTP2-User Peer-to-Peer Adaptation (M2PA) + +M2PA is specified in <>. + +NOTE:: M2PA is not supported in Osmocom SIGTRAN up to this point. Let +us know if we can implement it for you! + + +==== SIGTRAN security + +There simply is none. There are some hints that TLS shall be used +over SCTP in order to provide authenticity and/or confidentiality for +SIGTRAN, but this is not widely used. + +As telecom signaling is not generally carried over public networks, +private networks/links by means of MPLS, VLANs or VPNs such as IPsec +are often used to isolate and/or secure SIGTRAN. + +Under no circumstances should you use unsecured SIGTRAN with +production data over the public internet! + +==== IPv6 support + +SCTP (and thus all the higher layer protocols of the various SIGTRAN +stackings) operates on top of both IPv4 and IPv6. As the entire +underlying IP transport is transparent to the SS7/SCCP applications, +there is no restriction on whether to use SIGTRAN over IPv4 or IPv6. -- To view, visit https://gerrit.osmocom.org/2371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:41:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:41:39 +0000 Subject: [PATCH] libosmo-sccp[master]: initialize msg->l2h in sccp_msgb_alloc() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4785 to look at the new patch set (#2). initialize msg->l2h in sccp_msgb_alloc() Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 --- M src/sua.c M tests/xua/xua_test.ok 2 files changed, 18 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/4785/2 diff --git a/src/sua.c b/src/sua.c index fb7545e..7575021 100644 --- a/src/sua.c +++ b/src/sua.c @@ -60,10 +60,15 @@ struct msgb *sccp_msgb_alloc(const char *name) { + struct msgb *msg; if (!name) name = "SCCP"; - return msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, - SCCP_MSG_HEADROOM, name); + msg = msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, + SCCP_MSG_HEADROOM, name); + if (!msg) + return NULL; + msg->l2h = msg->tail; + return msg; } /*********************************************************************** diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index 6b0cb33..472c02b 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -24,7 +24,7 @@ PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=6,D=000430040120) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 +SCCP Output: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 => BSSMAP-RESET-ACK SCCP Input: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 @@ -35,7 +35,7 @@ PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=3,D=000131) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 +SCCP Output: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 => BSSMAP-PAGING SCCP Input: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 @@ -46,7 +46,7 @@ PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 +SCCP Output: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 => BSSMAP-UDT SCCP Input: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 @@ -57,7 +57,7 @@ PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 +SCCP Output: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 => BSSMAP-CR SCCP Input: [L2]> 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 @@ -68,7 +68,7 @@ PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) Re-Encoding decoded SUA to SCCP -SCCP Output: 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 +SCCP Output: [L2]> 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 => BSSMAP-CC SCCP Input: [L2]> 02 01 02 03 00 00 03 02 01 00 @@ -78,7 +78,7 @@ PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP -SCCP Output: 02 01 02 03 00 00 03 02 01 00 +SCCP Output: [L2]> 02 01 02 03 00 00 03 02 01 00 => BSSMAP-DTAP SCCP Input: [L2]> 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 @@ -88,7 +88,7 @@ PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=15,D=01000c03055c0811813366021345f4) Re-Encoding decoded SUA to SCCP -SCCP Output: 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 +SCCP Output: [L2]> 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 => BSSMAP-CLEAR SCCP Input: [L2]> 06 00 00 03 00 01 06 00 04 20 04 01 09 @@ -98,7 +98,7 @@ PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=6,D=000420040109) Re-Encoding decoded SUA to SCCP -SCCP Output: 06 00 00 03 00 01 06 00 04 20 04 01 09 +SCCP Output: [L2]> 06 00 00 03 00 01 06 00 04 20 04 01 09 => BSSMAP-RELEASED SCCP Input: [L2]> 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 @@ -109,7 +109,7 @@ PART(T=Cause,L=4,D=00000300), PART(T=Data,L=2,D=2342) Re-Encoding decoded SUA to SCCP -SCCP Output: 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 +SCCP Output: [L2]> 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 => BSSMAP-RELEASE_COMPLETE SCCP Input: [L2]> 05 01 02 03 00 00 03 @@ -118,7 +118,7 @@ PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP -SCCP Output: 05 01 02 03 00 00 03 +SCCP Output: [L2]> 05 01 02 03 00 00 03 => TCAP SCCP Input: [L2]> 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 @@ -129,7 +129,7 @@ PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 +SCCP Output: [L2]> 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 Parsing M3UA Message Parsing Nested M3UA Routing Key IE Testing SCCP Address Encode/Decode -- To view, visit https://gerrit.osmocom.org/4785 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:14 +0000 Subject: libosmo-sccp[master]: initialize msg->l2h in sccp_msgb_alloc() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4785 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:17 +0000 Subject: libosmo-sccp[master]: ipa: Patch DPC/OPC information into SCCP Calling/Called Part... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4786 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:20 +0000 Subject: libosmo-sccp[master]: ipa: Automatically create / destroy route on IPA connect/dis... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4787 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:27 +0000 Subject: [MERGED] libosmo-sccp[master]: ipa: Automatically create / destroy route on IPA connect/dis... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ipa: Automatically create / destroy route on IPA connect/disconnect ...................................................................... ipa: Automatically create / destroy route on IPA connect/disconnect >From the STP point of view: In order to be able to route messages back to an IPA client, we need to create a route at the time we have successfully identified the AS for this client based on the name presented in the IPA CCM ACK "name" field. Once the IPA client is destroyed, the route must be deleted again. With this commit present, we can have an IPA client (such as osmo-bsc-sccplite) connect to OsmoSTP and exchange BSS[M]AP with an M3UA-speaking osmo-msc. Basically, the STP reaches the point where it can translate between IPA-style SCCPlite and proper M3UA/SUA on the other side. Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66 --- M src/xua_asp_fsm.c 1 file changed, 33 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index d54d45e..823402e 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -835,11 +835,22 @@ /* Server: We're waiting for an ID ACK */ static void ipa_asp_fsm_wait_id_ack2(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct osmo_ss7_asp *asp = iafp->asp; + struct osmo_ss7_instance *inst = asp->inst; + struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0); + + OSMO_ASSERT(as); + switch (event) { case IPA_ASP_E_ID_ACK: /* ACK received, we can go to active state now. The * ACTIVE onenter function will inform the AS */ osmo_fsm_inst_state_chg(fi, IPA_ASP_S_ACTIVE, 0, 0); + /* As opposed to M3UA, there is no RKM and we have to implicitly automatically add + * a route once an IPA connection has come up */ + osmo_ss7_route_create(inst->rtable_system, as->cfg.routing_key.pc, 0xffffff, + as->cfg.name); break; } } @@ -1007,6 +1018,27 @@ }, }; +static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct osmo_ss7_asp *asp = iafp->asp; + struct osmo_ss7_instance *inst = asp->inst; + struct osmo_ss7_as *as = osmo_ss7_as_find_by_rctx(inst, 0); + struct osmo_ss7_route *rt; + + OSMO_ASSERT(as); + + /* find the route which we have created if we ever reached ipa_asp_fsm_wait_id_ack2 */ + rt = osmo_ss7_route_find_dpc_mask(inst->rtable_system, as->cfg.routing_key.pc, 0xffffff); + /* no route found, bail out */ + if (!rt) + return; + /* route points to different AS, bail out */ + if (rt->dest.as != as) + return; + + osmo_ss7_route_destroy(rt); +} struct osmo_fsm ipa_asp_fsm = { .name = "IPA_ASP", @@ -1020,6 +1052,7 @@ S(XUA_ASP_E_ASPSM_BEAT) | S(XUA_ASP_E_ASPSM_BEAT_ACK), .allstate_action = ipa_asp_allstate, + .cleanup = ipa_asp_fsm_cleanup, }; -- To view, visit https://gerrit.osmocom.org/4787 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:27 +0000 Subject: [MERGED] libosmo-sccp[master]: ipa: Patch DPC/OPC information into SCCP Calling/Called Part... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ipa: Patch DPC/OPC information into SCCP Calling/Called Party Address ...................................................................... ipa: Patch DPC/OPC information into SCCP Calling/Called Party Address When we receive a SCCPlite message from an IPA peer, it may simply contain a SSN number but no point codes. Similarly to creating a fake MTP routing label from override DPC and routing key OPC, we can also add that point code information to the SCCP header. This way the rest of the SS7 network can handle the message and route it accordingly. Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b --- M src/ipa.c 1 file changed, 93 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipa.c b/src/ipa.c index 36fbd38..2671896 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -38,8 +38,10 @@ #include #include +#include #include #include +#include #include #include "xua_internal.h" @@ -134,11 +136,74 @@ return NULL; } +/* Patch a SCCP message and add point codes to Called/Calling Party (if missing) */ +static struct msgb *patch_sccp_with_pc(struct osmo_ss7_asp *asp, struct msgb *sccp_msg_in, + uint32_t opc, uint32_t dpc) +{ + struct osmo_sccp_addr addr; + struct msgb *sccp_msg_out; + struct xua_msg *sua; + int rc; + + /* start by converting SCCP to SUA */ + sua = osmo_sccp_to_xua(sccp_msg_in); + if (!sua) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "Couldn't convert SCCP to SUA: %s\n", + msgb_hexdump(sccp_msg_in)); + msgb_free(sccp_msg_in); + return NULL; + } + /* free the input message and work with SUA version instead */ + msgb_free(sccp_msg_in); + + rc = sua_addr_parse(&addr, sua, SUA_IEI_DEST_ADDR); + switch (rc) { + case 0: + if (addr.presence & OSMO_SCCP_ADDR_T_PC) + break; + /* if there's no point code in dest_addr, add one */ + addr.presence |= OSMO_SCCP_ADDR_T_PC; + addr.pc = dpc; + xua_msg_free_tag(sua, SUA_IEI_DEST_ADDR); + xua_msg_add_sccp_addr(sua, SUA_IEI_DEST_ADDR, &addr); + break; + case -ENODEV: /* no destination address in message */ + break; + default: /* some other error */ + xua_msg_free(sua); + return NULL; + } + + rc = sua_addr_parse(&addr, sua, SUA_IEI_SRC_ADDR); + switch (rc) { + case 0: + if (addr.presence & OSMO_SCCP_ADDR_T_PC) + break; + /* if there's no point code in src_addr, add one */ + addr.presence |= OSMO_SCCP_ADDR_T_PC; + addr.pc = opc; + xua_msg_free_tag(sua, SUA_IEI_SRC_ADDR); + xua_msg_add_sccp_addr(sua, SUA_IEI_SRC_ADDR, &addr); + break; + case -ENODEV: /* no source address in message */ + break; + default: /* some other error */ + xua_msg_free(sua); + return NULL; + } + + /* re-encode SUA to SCCP and return */ + sccp_msg_out = osmo_sua_to_sccp(sua); + xua_msg_free(sua); + return sccp_msg_out; +} + static int ipa_rx_msg_sccp(struct osmo_ss7_asp *asp, struct msgb *msg) { struct m3ua_data_hdr data_hdr; struct xua_msg *xua = xua_msg_alloc(); struct osmo_ss7_as *as = find_as_for_asp(asp); + uint32_t opc, dpc; if (!as) { LOGPASP(asp, DLSS7, LOGL_ERROR, "Rx message for IPA ASP without AS?!\n"); @@ -150,13 +215,15 @@ msgb_pull_to_l2(msg); /* We have received an IPA-encapsulated SCCP message, without - * any MTP routing label. This means we have no real idea where - * it came from, nor where it goes to. We could simply treat it - * as being for the local point code, but then this means that - * we would have to implement SCCP connection coupling in order - * to route the connections to any other point code. The reason - * for this is the lack of addressing information inside the - * non-CR/CC connection oriented messages. + * any MTP routing label. Furthermore, the SCCP Called/Calling + * Party are SSN-only, with no GT or PC. This means we have no + * real idea where it came from, nor where it goes to. We could + * simply treat it as being for the local point code, but then + * this means that we would have to implement SCCP connection + * coupling in order to route the connections to any other point + * code. The reason for this is the lack of addressing + * information inside the non-CR/CC connection oriented + * messages. * * The only other alternative we have is to simply have a * STP (server) side configuration that specifies which point @@ -166,23 +233,33 @@ * to us. This is all quite ugly, but then what can we do :/ */ - memset(&data_hdr, 0, sizeof(data_hdr)); - data_hdr.si = MTP_SI_SCCP; + /* First, determine the DPC and OPC to use */ if (asp->cfg.is_server) { /* Source: the PC of the routing key */ - data_hdr.opc = osmo_htonl(as->cfg.routing_key.pc); + opc = as->cfg.routing_key.pc; /* Destination: Based on VTY config */ - data_hdr.dpc = osmo_htonl(as->cfg.pc_override.dpc); + dpc = as->cfg.pc_override.dpc; } else { /* Source: Based on VTY config */ - data_hdr.opc = osmo_htonl(as->cfg.pc_override.dpc); + opc = as->cfg.pc_override.dpc; /* Destination: PC of the routing key */ - data_hdr.dpc = osmo_htonl(as->cfg.routing_key.pc); + dpc = as->cfg.routing_key.pc; } - xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); - xua->mtp.opc = osmo_ntohl(data_hdr.opc); - xua->mtp.dpc = osmo_ntohl(data_hdr.dpc); + /* Second, patch this into the SCCP message */ + msg = patch_sccp_with_pc(asp, msg, opc, dpc); + + /* Third, create a MTP3/M3UA label with those point codes */ + memset(&data_hdr, 0, sizeof(data_hdr)); + data_hdr.si = MTP_SI_SCCP; + data_hdr.opc = osmo_htonl(opc); + data_hdr.dpc = osmo_htonl(dpc); + /* Create M3UA message in XUA structure */ + xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); + /* Update xua->mtp with values from data_hdr */ + m3ua_dh_to_xfer_param(&xua->mtp, &data_hdr); + + /* Pass on as if we had received it from an M3UA ASP */ return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4786 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:28 +0000 Subject: [MERGED] libosmo-sccp[master]: initialize msg->l2h in sccp_msgb_alloc() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: initialize msg->l2h in sccp_msgb_alloc() ...................................................................... initialize msg->l2h in sccp_msgb_alloc() Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 --- M src/sua.c M tests/xua/xua_test.ok 2 files changed, 18 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index fb7545e..7575021 100644 --- a/src/sua.c +++ b/src/sua.c @@ -60,10 +60,15 @@ struct msgb *sccp_msgb_alloc(const char *name) { + struct msgb *msg; if (!name) name = "SCCP"; - return msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, - SCCP_MSG_HEADROOM, name); + msg = msgb_alloc_headroom(SCCP_MSG_SIZE+SCCP_MSG_HEADROOM, + SCCP_MSG_HEADROOM, name); + if (!msg) + return NULL; + msg->l2h = msg->tail; + return msg; } /*********************************************************************** diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index 6b0cb33..472c02b 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -24,7 +24,7 @@ PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=6,D=000430040120) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 +SCCP Output: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 => BSSMAP-RESET-ACK SCCP Input: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 @@ -35,7 +35,7 @@ PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=3,D=000131) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 +SCCP Output: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 03 00 01 31 => BSSMAP-PAGING SCCP Input: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 @@ -46,7 +46,7 @@ PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 +SCCP Output: [L2]> 09 00 03 07 0b 04 43 01 00 fe 04 43 5c 00 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 => BSSMAP-UDT SCCP Input: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 @@ -57,7 +57,7 @@ PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 +SCCP Output: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 10 00 0e 52 08 08 29 47 10 02 01 31 97 61 1a 01 06 => BSSMAP-CR SCCP Input: [L2]> 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 @@ -68,7 +68,7 @@ PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) Re-Encoding decoded SUA to SCCP -SCCP Output: 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 +SCCP Output: [L2]> 01 01 02 03 02 02 04 02 42 fe 0f 1f 00 1d 57 05 08 00 72 f4 80 20 12 c3 50 17 10 05 24 11 03 33 19 a2 08 29 47 10 02 01 31 97 61 00 => BSSMAP-CC SCCP Input: [L2]> 02 01 02 03 00 00 03 02 01 00 @@ -78,7 +78,7 @@ PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP -SCCP Output: 02 01 02 03 00 00 03 02 01 00 +SCCP Output: [L2]> 02 01 02 03 00 00 03 02 01 00 => BSSMAP-DTAP SCCP Input: [L2]> 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 @@ -88,7 +88,7 @@ PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=15,D=01000c03055c0811813366021345f4) Re-Encoding decoded SUA to SCCP -SCCP Output: 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 +SCCP Output: [L2]> 06 00 00 03 00 01 0f 01 00 0c 03 05 5c 08 11 81 33 66 02 13 45 f4 => BSSMAP-CLEAR SCCP Input: [L2]> 06 00 00 03 00 01 06 00 04 20 04 01 09 @@ -98,7 +98,7 @@ PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=6,D=000420040109) Re-Encoding decoded SUA to SCCP -SCCP Output: 06 00 00 03 00 01 06 00 04 20 04 01 09 +SCCP Output: [L2]> 06 00 00 03 00 01 06 00 04 20 04 01 09 => BSSMAP-RELEASED SCCP Input: [L2]> 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 @@ -109,7 +109,7 @@ PART(T=Cause,L=4,D=00000300), PART(T=Data,L=2,D=2342) Re-Encoding decoded SUA to SCCP -SCCP Output: 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 +SCCP Output: [L2]> 04 00 00 03 01 02 03 00 01 0f 02 23 42 00 => BSSMAP-RELEASE_COMPLETE SCCP Input: [L2]> 05 01 02 03 00 00 03 @@ -118,7 +118,7 @@ PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP -SCCP Output: 05 01 02 03 00 00 03 +SCCP Output: [L2]> 05 01 02 03 00 00 03 => TCAP SCCP Input: [L2]> 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 @@ -129,7 +129,7 @@ PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) Re-Encoding decoded SUA to SCCP -SCCP Output: 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 +SCCP Output: [L2]> 09 81 03 0d 18 0a 12 07 00 12 04 53 84 09 00 17 0b 12 06 00 12 04 44 87 20 00 20 65 9a 65 81 97 48 04 26 00 01 98 49 04 51 01 03 df 6c 81 88 a1 81 85 02 01 44 02 01 07 30 80 a7 80 a0 80 04 01 2b 30 80 30 12 83 01 10 84 01 07 85 07 91 44 57 76 67 16 97 86 01 20 30 06 82 01 18 84 01 04 00 00 00 00 a3 06 04 01 42 84 01 05 a3 06 04 01 51 84 01 05 a3 06 04 01 31 84 01 05 a3 09 04 01 12 84 01 05 82 01 02 a3 09 04 01 11 84 01 05 81 01 01 a3 06 04 01 14 84 01 00 a3 0b 04 01 41 84 01 04 30 03 83 01 10 a3 0b 04 01 41 84 01 04 30 03 82 01 18 00 00 00 00 Parsing M3UA Message Parsing Nested M3UA Routing Key IE Testing SCCP Address Encode/Decode -- To view, visit https://gerrit.osmocom.org/4785 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 19:52:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 19:52:29 +0000 Subject: [MERGED] libosmo-sccp[master]: ipa: Fix endianness of pseud-M3UA header In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ipa: Fix endianness of pseud-M3UA header ...................................................................... ipa: Fix endianness of pseud-M3UA header Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73 --- M src/ipa.c 1 file changed, 7 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipa.c b/src/ipa.c index 11ff422..36fbd38 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -169,18 +170,18 @@ data_hdr.si = MTP_SI_SCCP; if (asp->cfg.is_server) { /* Source: the PC of the routing key */ - data_hdr.opc = as->cfg.routing_key.pc; + data_hdr.opc = osmo_htonl(as->cfg.routing_key.pc); /* Destination: Based on VTY config */ - data_hdr.dpc = as->cfg.pc_override.dpc; + data_hdr.dpc = osmo_htonl(as->cfg.pc_override.dpc); } else { /* Source: Based on VTY config */ - data_hdr.opc = as->cfg.pc_override.dpc; + data_hdr.opc = osmo_htonl(as->cfg.pc_override.dpc); /* Destination: PC of the routing key */ - data_hdr.dpc = as->cfg.routing_key.pc; + data_hdr.dpc = osmo_htonl(as->cfg.routing_key.pc); } xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); - xua->mtp.opc = data_hdr.opc; - xua->mtp.dpc = data_hdr.dpc; + xua->mtp.opc = osmo_ntohl(data_hdr.opc); + xua->mtp.dpc = osmo_ntohl(data_hdr.dpc); return m3ua_hmdc_rx_from_l2(asp->inst, xua); } -- To view, visit https://gerrit.osmocom.org/4784 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:02:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:02:19 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: STP: cosmetic fixes/improvements Message-ID: Review at https://gerrit.osmocom.org/4789 STP: cosmetic fixes/improvements Change-Id: I1c1c7bb122e9cf9b707feb8e6617a03d15043089 --- M common/chapters/sigtran-osmocom.adoc M common/chapters/sigtran.adoc 2 files changed, 16 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/4789/1 diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index 82ee2ac..69de0cc 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -303,16 +303,18 @@ A SS7 User is part of a program that binds to a given MTP-Layer Service Indicator (SI). The Osmocom SS7 stack offers an API to -register SS7 Users, as well as the VTY command ``show cs7 instance -<0-15> users'' to list the currently registered users. +register SS7 Users, as well as the VTY command `show cs7 instance <0-15> +users` to list the currently registered users. === Osmocom SS7 Links -TBD. +Conceptually, SS7 links are on the same level as SIGTRAN ASPs. The +details of SS7 Links in the Osmocom implementation are TBD. === Osmocom SS7 Linksets -TBD. +Conceptually, SS7 Linksets are on the same level as SIGTRAN ASs. The +details of SS7 Links in the Osmocom implementation are TBD. === Osmocom SS7 Application Servers @@ -347,7 +349,7 @@ An Application Server Process corresponds to a given SCTP (or TCP) connection. From the STP/SG (Server) point-of-view, those are incoming connections from Application Servers such as the BSCs. From -the ASP (Client) Point of view, it has one ``osmo_ss7_asp'' object for +the ASP (Client) Point of view, it has one `osmo_ss7_asp` object for each outbound SIGTARN connection. An ASP has the following properties: @@ -398,7 +400,7 @@ There is an API to bind a program to a SSN, which implicitly generates an SCCP User object. -The ``show cs7 instance <0-15> sccp users'' command can be used on the +The `show cs7 instance <0-15> sccp users` command can be used on the VTY to obtain a list of currently bound SCCP users, as well as their corresponding SSNs. @@ -412,7 +414,7 @@ that is currently active to any UE/MS has one SCCP connection to the MSC and/or SGSN. -The ``show cs7 instance <0-15> sccp connections'' command can be used +The `show cs7 instance <0-15> sccp connections` command can be used on the VTY to obtain a list of currently active SCCP connections, as well as their source/destination and current state. @@ -421,12 +423,13 @@ The Osmocom SCCP User SAP (Service Access Point) is the programming interface between the SCCP Provider (libosmo-sigtran) and the SCCP -User. It follows primitives as laid out in <>, encapsulated -in ``osmo_prim'' structures. +User (such as osmo-bsc, osmo-msc, osmo-hnbgw, etc.). It follows +primitives as laid out in <>, encapsulated in `osmo_prim` +structures. === Osmocom MTP User SAP The Osmocom MTP User SAP (Service Access Point) is the programming interface between the MTP Provider and the MTP User (e.g. SCCP). It follows primitives as laid out in <>, encapsulated in -``osmo_prim'' structures. +`osmo_prim` structures. diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index fc5c725..371801a 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -12,7 +12,7 @@ * _IuCS_ interface between RNC (or HNB-GW) and MSC * _IuPS_ interface between RNC (or HNB-GW) and SGSN -NOTE:: This does not include the A-bis interface between BTS and BSC. +NOTE: This does not include the A-bis interface between BTS and BSC. While Abis traditionally is spoken over the same physical TDM circuits as SS7, the protocol stack from L2 upwards is quite different (Abis uses LAPD, while SS7 uses MTP)! @@ -300,14 +300,14 @@ M2UA is specified in <>. -NOTE:: M2UA is not supported in Osmocom SIGTRAN up to this point. Let +NOTE: M2UA is not supported in Osmocom SIGTRAN up to this point. Let us know if we can implement it for you! ===== MTP2-User Peer-to-Peer Adaptation (M2PA) M2PA is specified in <>. -NOTE:: M2PA is not supported in Osmocom SIGTRAN up to this point. Let +NOTE: M2PA is not supported in Osmocom SIGTRAN up to this point. Let us know if we can implement it for you! -- To view, visit https://gerrit.osmocom.org/4789 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c1c7bb122e9cf9b707feb8e6617a03d15043089 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:02:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:02:19 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: STP: State actual vty commands for dynamic RKM registration Message-ID: Review at https://gerrit.osmocom.org/4790 STP: State actual vty commands for dynamic RKM registration Change-Id: I639dc271dd7f5bea1f6cb8b070990c7c15a39dba --- M common/chapters/sigtran-osmocom.adoc 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/90/4790/1 diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index 69de0cc..eddd70a 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -107,6 +107,14 @@ the SG doesn't already have a route to this requested point code, The SG will simply trust any ASP and set a corresponding route. +To enable dynamic creation of ASPs within an AS from any source IP/port, +the corresponding xUA Server (<>) must be configured with +`accept-asp-connections dynamic-permitted`. + +To enable dynamic registration of routing keys via RKM, the +corresponding SS7 Instance (<>) must be confgured with +`xua rkm routing-key-allocation dynamic-permitted`. + This is of course highly insecure and can only be used in trusted, internal networks. However, it is quite elegant in reducing the amount of configuration complexity. All that is needed, is that an @@ -255,6 +263,7 @@ * to configure the point code of the MSC in the HNBGWs * to configure the point code of the SGSN in the HNBGWs +[[ss7-instance]] === Osmocom SS7 Instances The entire SS7 stack can be operated multiple times within one @@ -278,6 +287,7 @@ |Point Code Delimiter|(config-cs7)# point-code delimiter|Point Code Delimiter: . or - |==== +[[xua-server]] === Osmocom SS7 xUA Server A *xUA Server* is a server that binds + listens to a given SCTP -- To view, visit https://gerrit.osmocom.org/4790 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I639dc271dd7f5bea1f6cb8b070990c7c15a39dba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:19:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:19:43 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: STP: Update vty reference XML file Message-ID: Review at https://gerrit.osmocom.org/4791 STP: Update vty reference XML file This ensures useful content in the STP vty reference manual Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d --- A OsmoSTP/vty/osmo-stp_vty_reference.xml D OsmoSTP/vty/stp_vty_reference.xml 2 files changed, 1,742 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/91/4791/1 diff --git a/OsmoSTP/vty/osmo-stp_vty_reference.xml b/OsmoSTP/vty/osmo-stp_vty_reference.xml new file mode 100644 index 0000000..9d25d44 --- /dev/null +++ b/OsmoSTP/vty/osmo-stp_vty_reference.xml @@ -0,0 +1,1742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmoSTP/vty/stp_vty_reference.xml b/OsmoSTP/vty/stp_vty_reference.xml deleted file mode 100644 index a4c675e..0000000 --- a/OsmoSTP/vty/stp_vty_reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - -- To view, visit https://gerrit.osmocom.org/4791 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:22:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:22:32 +0000 Subject: [PATCH] libosmo-sccp[master]: osmo-stp: Align prompt formatting with other Osmocom programs Message-ID: Review at https://gerrit.osmocom.org/4792 osmo-stp: Align prompt formatting with other Osmocom programs In all other Programs we have the VTY like OsmoBSC, OsmoMSC, etc. so let's make sure osmo-stp also uses OsmoSTP and not osmo-stp. Change-Id: Ic91010779ad22c41e28ed4cf43c2e3ab679214b5 --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/92/4792/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index a33045a..69d26b5 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -65,7 +65,7 @@ "Free Software lives by contribution. If you use this, please contribute!\r\n"; static struct vty_app_info vty_info = { - .name = "osmo-stp", + .name = "OsmoSTP", .copyright = stp_copyright, .version = PACKAGE_VERSION, .go_parent_cb = osmo_ss7_vty_go_parent, -- To view, visit https://gerrit.osmocom.org/4792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic91010779ad22c41e28ed4cf43c2e3ab679214b5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:22:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:22:33 +0000 Subject: [PATCH] libosmo-sccp[master]: STP: Add osmoappdesc.py Message-ID: Review at https://gerrit.osmocom.org/4793 STP: Add osmoappdesc.py Change-Id: I60362d78b5db3ed5bc96c84a8523c391ff7f8125 --- M Makefile.am A osmoappdesc.py 2 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/4793/1 diff --git a/Makefile.am b/Makefile.am index d1c3c21..1ac8e11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmo-sccp.pc libosmo-mtp.pc libosmo-sigtran.pc libosmo-xua.pc -EXTRA_DIST = .version doc/examples/osmo-stp.cfg +EXTRA_DIST = .version git-version-gen osmoappdesc.py doc/examples/osmo-stp.cfg @RELMAKE@ diff --git a/osmoappdesc.py b/osmoappdesc.py new file mode 100644 index 0000000..02ccda6 --- /dev/null +++ b/osmoappdesc.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +app_configs = { + "osmo-stp": ["doc/examples/osmo-stp.cfg"], +} + +apps = [(4239, "stp/osmo-stp", "OsmoSTP", "osmo-stp"), + ] + +vty_command = ["./stp/osmo-stp", "-c", "doc/examples/osmo-stp.cfg"] + +vty_app = apps[0] -- To view, visit https://gerrit.osmocom.org/4793 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60362d78b5db3ed5bc96c84a8523c391ff7f8125 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:17 +0000 Subject: osmo-gsm-manuals[master]: STP: Update vty reference XML file In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4791 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:21 +0000 Subject: osmo-gsm-manuals[master]: STP: State actual vty commands for dynamic RKM registration In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4790 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I639dc271dd7f5bea1f6cb8b070990c7c15a39dba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:27 +0000 Subject: osmo-gsm-manuals[master]: STP: cosmetic fixes/improvements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4789 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1c1c7bb122e9cf9b707feb8e6617a03d15043089 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: STP: cosmetic fixes/improvements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: STP: cosmetic fixes/improvements ...................................................................... STP: cosmetic fixes/improvements Change-Id: I1c1c7bb122e9cf9b707feb8e6617a03d15043089 --- M common/chapters/sigtran-osmocom.adoc M common/chapters/sigtran.adoc 2 files changed, 16 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index 82ee2ac..69de0cc 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -303,16 +303,18 @@ A SS7 User is part of a program that binds to a given MTP-Layer Service Indicator (SI). The Osmocom SS7 stack offers an API to -register SS7 Users, as well as the VTY command ``show cs7 instance -<0-15> users'' to list the currently registered users. +register SS7 Users, as well as the VTY command `show cs7 instance <0-15> +users` to list the currently registered users. === Osmocom SS7 Links -TBD. +Conceptually, SS7 links are on the same level as SIGTRAN ASPs. The +details of SS7 Links in the Osmocom implementation are TBD. === Osmocom SS7 Linksets -TBD. +Conceptually, SS7 Linksets are on the same level as SIGTRAN ASs. The +details of SS7 Links in the Osmocom implementation are TBD. === Osmocom SS7 Application Servers @@ -347,7 +349,7 @@ An Application Server Process corresponds to a given SCTP (or TCP) connection. From the STP/SG (Server) point-of-view, those are incoming connections from Application Servers such as the BSCs. From -the ASP (Client) Point of view, it has one ``osmo_ss7_asp'' object for +the ASP (Client) Point of view, it has one `osmo_ss7_asp` object for each outbound SIGTARN connection. An ASP has the following properties: @@ -398,7 +400,7 @@ There is an API to bind a program to a SSN, which implicitly generates an SCCP User object. -The ``show cs7 instance <0-15> sccp users'' command can be used on the +The `show cs7 instance <0-15> sccp users` command can be used on the VTY to obtain a list of currently bound SCCP users, as well as their corresponding SSNs. @@ -412,7 +414,7 @@ that is currently active to any UE/MS has one SCCP connection to the MSC and/or SGSN. -The ``show cs7 instance <0-15> sccp connections'' command can be used +The `show cs7 instance <0-15> sccp connections` command can be used on the VTY to obtain a list of currently active SCCP connections, as well as their source/destination and current state. @@ -421,12 +423,13 @@ The Osmocom SCCP User SAP (Service Access Point) is the programming interface between the SCCP Provider (libosmo-sigtran) and the SCCP -User. It follows primitives as laid out in <>, encapsulated -in ``osmo_prim'' structures. +User (such as osmo-bsc, osmo-msc, osmo-hnbgw, etc.). It follows +primitives as laid out in <>, encapsulated in `osmo_prim` +structures. === Osmocom MTP User SAP The Osmocom MTP User SAP (Service Access Point) is the programming interface between the MTP Provider and the MTP User (e.g. SCCP). It follows primitives as laid out in <>, encapsulated in -``osmo_prim'' structures. +`osmo_prim` structures. diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index fc5c725..371801a 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -12,7 +12,7 @@ * _IuCS_ interface between RNC (or HNB-GW) and MSC * _IuPS_ interface between RNC (or HNB-GW) and SGSN -NOTE:: This does not include the A-bis interface between BTS and BSC. +NOTE: This does not include the A-bis interface between BTS and BSC. While Abis traditionally is spoken over the same physical TDM circuits as SS7, the protocol stack from L2 upwards is quite different (Abis uses LAPD, while SS7 uses MTP)! @@ -300,14 +300,14 @@ M2UA is specified in <>. -NOTE:: M2UA is not supported in Osmocom SIGTRAN up to this point. Let +NOTE: M2UA is not supported in Osmocom SIGTRAN up to this point. Let us know if we can implement it for you! ===== MTP2-User Peer-to-Peer Adaptation (M2PA) M2PA is specified in <>. -NOTE:: M2PA is not supported in Osmocom SIGTRAN up to this point. Let +NOTE: M2PA is not supported in Osmocom SIGTRAN up to this point. Let us know if we can implement it for you! -- To view, visit https://gerrit.osmocom.org/4789 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c1c7bb122e9cf9b707feb8e6617a03d15043089 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: STP: State actual vty commands for dynamic RKM registration In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: STP: State actual vty commands for dynamic RKM registration ...................................................................... STP: State actual vty commands for dynamic RKM registration Change-Id: I639dc271dd7f5bea1f6cb8b070990c7c15a39dba --- M common/chapters/sigtran-osmocom.adoc 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index 69de0cc..eddd70a 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -107,6 +107,14 @@ the SG doesn't already have a route to this requested point code, The SG will simply trust any ASP and set a corresponding route. +To enable dynamic creation of ASPs within an AS from any source IP/port, +the corresponding xUA Server (<>) must be configured with +`accept-asp-connections dynamic-permitted`. + +To enable dynamic registration of routing keys via RKM, the +corresponding SS7 Instance (<>) must be confgured with +`xua rkm routing-key-allocation dynamic-permitted`. + This is of course highly insecure and can only be used in trusted, internal networks. However, it is quite elegant in reducing the amount of configuration complexity. All that is needed, is that an @@ -255,6 +263,7 @@ * to configure the point code of the MSC in the HNBGWs * to configure the point code of the SGSN in the HNBGWs +[[ss7-instance]] === Osmocom SS7 Instances The entire SS7 stack can be operated multiple times within one @@ -278,6 +287,7 @@ |Point Code Delimiter|(config-cs7)# point-code delimiter|Point Code Delimiter: . or - |==== +[[xua-server]] === Osmocom SS7 xUA Server A *xUA Server* is a server that binds + listens to a given SCTP -- To view, visit https://gerrit.osmocom.org/4790 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I639dc271dd7f5bea1f6cb8b070990c7c15a39dba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: STP: Update vty reference XML file In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: STP: Update vty reference XML file ...................................................................... STP: Update vty reference XML file This ensures useful content in the STP vty reference manual Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d --- A OsmoSTP/vty/osmo-stp_vty_reference.xml D OsmoSTP/vty/stp_vty_reference.xml 2 files changed, 1,742 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSTP/vty/osmo-stp_vty_reference.xml b/OsmoSTP/vty/osmo-stp_vty_reference.xml new file mode 100644 index 0000000..9d25d44 --- /dev/null +++ b/OsmoSTP/vty/osmo-stp_vty_reference.xml @@ -0,0 +1,1742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmoSTP/vty/stp_vty_reference.xml b/OsmoSTP/vty/stp_vty_reference.xml deleted file mode 100644 index a4c675e..0000000 --- a/OsmoSTP/vty/stp_vty_reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - -- To view, visit https://gerrit.osmocom.org/4791 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:37 +0000 Subject: openbsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4782 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8ecb1d2134f9c6a96f29e145fa0430880e971168 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:38 +0000 Subject: [MERGED] openbsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT ...................................................................... osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT When we receive unimplemented/unhandled message types, we shouldn't simply silently discard them, but print a log message for the benefit of the user. Change-Id: I8ecb1d2134f9c6a96f29e145fa0430880e971168 --- M openbsc/src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 100f664..9c549c3 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -407,6 +407,10 @@ case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; + default: + LOGP(DMSC, LOGL_NOTICE, "Received unimplemented BSSMAP UDT %s\n", + gsm0808_bssmap_name(msg->l4h[0])); + break; } return ret; -- To view, visit https://gerrit.osmocom.org/4782 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ecb1d2134f9c6a96f29e145fa0430880e971168 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:41 +0000 Subject: openbsc[master]: osmo-bsc-sccplite: Implement incoming RESET procedure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4783 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iceb8278deb36d6103662a704f489ba0d685e04d3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:56 +0000 Subject: libosmo-sccp[master]: osmo-stp: Align prompt formatting with other Osmocom programs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic91010779ad22c41e28ed4cf43c2e3ab679214b5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:23:58 +0000 Subject: [MERGED] libosmo-sccp[master]: osmo-stp: Align prompt formatting with other Osmocom programs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-stp: Align prompt formatting with other Osmocom programs ...................................................................... osmo-stp: Align prompt formatting with other Osmocom programs In all other Programs we have the VTY like OsmoBSC, OsmoMSC, etc. so let's make sure osmo-stp also uses OsmoSTP and not osmo-stp. Change-Id: Ic91010779ad22c41e28ed4cf43c2e3ab679214b5 --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/stp/stp_main.c b/stp/stp_main.c index a33045a..69d26b5 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -65,7 +65,7 @@ "Free Software lives by contribution. If you use this, please contribute!\r\n"; static struct vty_app_info vty_info = { - .name = "osmo-stp", + .name = "OsmoSTP", .copyright = stp_copyright, .version = PACKAGE_VERSION, .go_parent_cb = osmo_ss7_vty_go_parent, -- To view, visit https://gerrit.osmocom.org/4792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic91010779ad22c41e28ed4cf43c2e3ab679214b5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:24:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:24:09 +0000 Subject: osmo-bsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4788 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:24:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:24:16 +0000 Subject: [MERGED] osmo-bsc[master]: configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 ...................................................................... configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0 We recently started to use some symbols that were not available in libosmo-mgcp-client-dev 1.0.0 or even 1.1.0. Let's depend on a newly tagged version of libosmo-mgcp-client. Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c --- M configure.ac M debian/control 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 4ec903a..f741441 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) -PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.2.0) PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) dnl checks for header files diff --git a/debian/control b/debian/control index 963d664..5e9ad60 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), libosmo-legacy-mgcp-dev (>= 1.0.0), - libosmo-mgcp-client-dev (>= 1.0.0) + libosmo-mgcp-client-dev (>= 1.2.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4767 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:24:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:24:46 +0000 Subject: osmo-gsm-manuals[master]: GGSN: don't say 'NITB' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4781 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:24:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:24:48 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: GGSN: don't say 'NITB' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: GGSN: don't say 'NITB' ...................................................................... GGSN: don't say 'NITB' Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc --- M OsmoGGSN/chapters/running.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index cff3f8d..a242e36 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -1,4 +1,4 @@ -== Running OsmoNITB +== Running OsmoGGSN The OsmoGGSN executable (`osmo-ggsn`) offers the following command-line arguments: -- To view, visit https://gerrit.osmocom.org/4781 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:25:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:25:07 +0000 Subject: [MERGED] osmo-hlr[master]: cosmetic: add comment on ignored return value In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: add comment on ignored return value ...................................................................... cosmetic: add comment on ignored return value Coverity wants us to evaluate sqlite3_reset, but it is of no use to do so. Related: coverity CID#178653 Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 --- M src/db.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/db.c b/src/db.c index 8733cf5..d16f8ec 100644 --- a/src/db.c +++ b/src/db.c @@ -99,6 +99,8 @@ void db_remove_reset(sqlite3_stmt *stmt) { sqlite3_clear_bindings(stmt); + /* sqlite3_reset() just repeats an error code already evaluated during sqlite3_step(). */ + /* coverity[CHECKED_RETURN] */ sqlite3_reset(stmt); } -- To view, visit https://gerrit.osmocom.org/4715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:25:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:25:12 +0000 Subject: libosmo-sccp[master]: STP: Add osmoappdesc.py In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4793 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60362d78b5db3ed5bc96c84a8523c391ff7f8125 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 11 23:25:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 Nov 2017 23:25:13 +0000 Subject: [MERGED] libosmo-sccp[master]: STP: Add osmoappdesc.py In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: STP: Add osmoappdesc.py ...................................................................... STP: Add osmoappdesc.py Change-Id: I60362d78b5db3ed5bc96c84a8523c391ff7f8125 --- M Makefile.am A osmoappdesc.py 2 files changed, 13 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index d1c3c21..1ac8e11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmo-sccp.pc libosmo-mtp.pc libosmo-sigtran.pc libosmo-xua.pc -EXTRA_DIST = .version doc/examples/osmo-stp.cfg +EXTRA_DIST = .version git-version-gen osmoappdesc.py doc/examples/osmo-stp.cfg @RELMAKE@ diff --git a/osmoappdesc.py b/osmoappdesc.py new file mode 100644 index 0000000..02ccda6 --- /dev/null +++ b/osmoappdesc.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +app_configs = { + "osmo-stp": ["doc/examples/osmo-stp.cfg"], +} + +apps = [(4239, "stp/osmo-stp", "OsmoSTP", "osmo-stp"), + ] + +vty_command = ["./stp/osmo-stp", "-c", "doc/examples/osmo-stp.cfg"] + +vty_app = apps[0] -- To view, visit https://gerrit.osmocom.org/4793 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60362d78b5db3ed5bc96c84a8523c391ff7f8125 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:14:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 12 Nov 2017 13:14:31 +0000 Subject: osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Patch Set 1: The rationale in here is indeed to make the code more reachable for newcomers, as well as more organized for people like me who works a lot with this code. SuiteRun in suite.py is already quite big, and having the Test class in there make it unnecessarily more big, and makes it difficult to find stuff. At the same time, having a test.py which does actually not contain the Test class but other stuff, makes it even more confusing. -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:19:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 12 Nov 2017 13:19:24 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem, process: Remove unneeded test import In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem, process: Remove unneeded test import ...................................................................... modem, process: Remove unneeded test import Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c --- M src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/process.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index cb4a8de..ca8387b 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from . import log, test, util, event_loop, sms +from . import log, util, event_loop, sms from pydbus import SystemBus, Variant import time diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 4b68ef5..4c55fe9 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -23,7 +23,7 @@ import signal from datetime import datetime -from . import log, test, event_loop +from . import log, event_loop from .util import Dir class Process(log.Origin): -- To view, visit https://gerrit.osmocom.org/4762 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:19:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 12 Nov 2017 13:19:24 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suite: Remove unneeded import copy In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suite: Remove unneeded import copy ...................................................................... suite: Remove unneeded import copy Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145 --- M src/osmo_gsm_tester/suite.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index e1bb11a..1a96b1e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -20,7 +20,6 @@ import os import sys import time -import copy import traceback import pprint from . import config, log, template, util, resource, schema, event_loop -- To view, visit https://gerrit.osmocom.org/4761 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:19:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 12 Nov 2017 13:19:24 +0000 Subject: [MERGED] osmo-gsm-tester[master]: event_loop: Remove unneeded commented import line and explan... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: event_loop: Remove unneeded commented import line and explanation ...................................................................... event_loop: Remove unneeded commented import line and explanation Those lines come most probably from copy+paste using test.py header when creating the file. Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296 --- M src/osmo_gsm_tester/event_loop.py 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/event_loop.py b/src/osmo_gsm_tester/event_loop.py index 6f64ef9..ebe6afb 100644 --- a/src/osmo_gsm_tester/event_loop.py +++ b/src/osmo_gsm_tester/event_loop.py @@ -17,9 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# These will be initialized before each test run. -# A test script can thus establish its context by doing: -# from osmo_gsm_tester.test import * import time from . import log -- To view, visit https://gerrit.osmocom.org/4760 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:19:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 12 Nov 2017 13:19:25 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suite: Separate better internal imports and the ones aimed a... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suite: Separate better internal imports and the ones aimed at tests ...................................................................... suite: Separate better internal imports and the ones aimed at tests Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a --- M src/osmo_gsm_tester/suite.py 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index dd1baf8..e1bb11a 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -23,9 +23,8 @@ import copy import traceback import pprint -from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms -from . import osmo_nitb -from . import osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp +from . import config, log, template, util, resource, schema, event_loop +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms from . import test class Timeout(Exception): -- To view, visit https://gerrit.osmocom.org/4759 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:27:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:27:04 +0000 Subject: [PATCH] libgtpnl[master]: gtp_build_payload(): Support absent peer and SGSN address Message-ID: Review at https://gerrit.osmocom.org/4794 gtp_build_payload(): Support absent peer and SGSN address When deleting a PDP context via "gtp-tunnel delete", we specify only the gtp netdevice, the gtp version and the TID/TEI. However, the gtp_build_payload() function unconditionally created the netlink attributes for GTPA_PEER_ADDRESS and GTPA_MS_ADDRESS, having their addresses set to zero. The kernel then tried to find a PDP context with MS and PEER address of 0.0.0.0, and always failed with ENOENT. The same problem also occurred with OsmoGGSN and OpenGGSN: PDP contexts could be added but never removed. The corresponding kernel change that requires this userland change is the following commit introduced in 4.12-rc1: commit d9e2dd122637034a0697bf268eed9233701b9dca Author: Andreas Schultz Date: Thu Mar 9 17:43:00 2017 +0100 gtp: unify genl_find_pdp and prepare for per socket lookup Older kernels will work with libgtpnl both before and after this commit, as they internally will simply disregard any attributes beyond TID/TEI. Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 --- M src/gtp-genl.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/94/4794/1 diff --git a/src/gtp-genl.c b/src/gtp-genl.c index 1e48020..f12f872 100644 --- a/src/gtp-genl.c +++ b/src/gtp-genl.c @@ -48,8 +48,10 @@ if (t->ifns >= 0) mnl_attr_put_u32(nlh, GTPA_NET_NS_FD, t->ifns); mnl_attr_put_u32(nlh, GTPA_LINK, t->ifidx); - mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); - mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); + if (t->sgsn_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); + if (t->ms_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); if (t->gtp_version == GTP_V0) { mnl_attr_put_u64(nlh, GTPA_TID, t->u.v0.tid); mnl_attr_put_u16(nlh, GTPA_FLOW, t->u.v0.flowid); -- To view, visit https://gerrit.osmocom.org/4794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:38:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:38:12 +0000 Subject: [PATCH] libgtpnl[master]: Add contrib/jenkins.sh for jenkins build verification Message-ID: Review at https://gerrit.osmocom.org/4795 Add contrib/jenkins.sh for jenkins build verification Change-Id: I88a52f4adb08826f714bd32b1dfddd249f780c99 --- A contrib/jenkins.sh 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/95/4795/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..4e21fd7 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -ex + +osmo-clean-workspace.sh + +autoreconf --install --force +./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +$MAKE $PARALLEL_MAKE +$MAKE distcheck + +osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/4795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88a52f4adb08826f714bd32b1dfddd249f780c99 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:46:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:46:30 +0000 Subject: [PATCH] libgtpnl[master]: Add '--enable-sanitize' from other osmocom projects Message-ID: Review at https://gerrit.osmocom.org/4796 Add '--enable-sanitize' from other osmocom projects Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 --- M configure.ac M contrib/jenkins.sh 2 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/96/4796/1 diff --git a/configure.ac b/configure.ac index dfcaa15..459fab1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,18 @@ *) AC_MSG_ERROR([Linux only, dude!]);; esac +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wshadow -Wstrict-prototypes \ diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e21fd7..ebdc6ea 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4796 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:47:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:47:22 +0000 Subject: libgtpnl[master]: Add '--enable-sanitize' from other osmocom projects In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4796 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:47:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:47:26 +0000 Subject: libgtpnl[master]: gtp_build_payload(): Support absent peer and SGSN address In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 Gerrit-PatchSet: 4 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:47:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:47:41 +0000 Subject: libgtpnl[master]: Add contrib/jenkins.sh for jenkins build verification In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88a52f4adb08826f714bd32b1dfddd249f780c99 Gerrit-PatchSet: 2 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:47:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:47:54 +0000 Subject: [MERGED] libgtpnl[master]: Add contrib/jenkins.sh for jenkins build verification In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add contrib/jenkins.sh for jenkins build verification ...................................................................... Add contrib/jenkins.sh for jenkins build verification Change-Id: I88a52f4adb08826f714bd32b1dfddd249f780c99 --- A contrib/jenkins.sh 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..4e21fd7 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -ex + +osmo-clean-workspace.sh + +autoreconf --install --force +./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +$MAKE $PARALLEL_MAKE +$MAKE distcheck + +osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/4795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88a52f4adb08826f714bd32b1dfddd249f780c99 Gerrit-PatchSet: 2 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:48:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:48:18 +0000 Subject: [PATCH] libgtpnl[master]: gtp_build_payload(): Support absent peer and SGSN address In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4794 to look at the new patch set (#5). gtp_build_payload(): Support absent peer and SGSN address When deleting a PDP context via "gtp-tunnel delete", we specify only the gtp netdevice, the gtp version and the TID/TEI. However, the gtp_build_payload() function unconditionally created the netlink attributes for GTPA_PEER_ADDRESS and GTPA_MS_ADDRESS, having their addresses set to zero. The kernel then tried to find a PDP context with MS and PEER address of 0.0.0.0, and always failed with ENOENT. The same problem also occurred with OsmoGGSN and OpenGGSN: PDP contexts could be added but never removed. The corresponding kernel change that requires this userland change is the following commit introduced in 4.12-rc1: commit d9e2dd122637034a0697bf268eed9233701b9dca Author: Andreas Schultz Date: Thu Mar 9 17:43:00 2017 +0100 gtp: unify genl_find_pdp and prepare for per socket lookup Older kernels will work with libgtpnl both before and after this commit, as they internally will simply disregard any attributes beyond TID/TEI. Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 --- M src/gtp-genl.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/94/4794/5 diff --git a/src/gtp-genl.c b/src/gtp-genl.c index 1e48020..f12f872 100644 --- a/src/gtp-genl.c +++ b/src/gtp-genl.c @@ -48,8 +48,10 @@ if (t->ifns >= 0) mnl_attr_put_u32(nlh, GTPA_NET_NS_FD, t->ifns); mnl_attr_put_u32(nlh, GTPA_LINK, t->ifidx); - mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); - mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); + if (t->sgsn_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); + if (t->ms_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); if (t->gtp_version == GTP_V0) { mnl_attr_put_u64(nlh, GTPA_TID, t->u.v0.tid); mnl_attr_put_u16(nlh, GTPA_FLOW, t->u.v0.flowid); -- To view, visit https://gerrit.osmocom.org/4794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 Gerrit-PatchSet: 5 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:48:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:48:18 +0000 Subject: [PATCH] libgtpnl[master]: Add '--enable-sanitize' from other osmocom projects In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4796 to look at the new patch set (#2). Add '--enable-sanitize' from other osmocom projects Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 --- M configure.ac M contrib/jenkins.sh 2 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/96/4796/2 diff --git a/configure.ac b/configure.ac index dfcaa15..459fab1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,18 @@ *) AC_MSG_ERROR([Linux only, dude!]);; esac +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wshadow -Wstrict-prototypes \ diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e21fd7..ebdc6ea 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4796 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 Gerrit-PatchSet: 2 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:49:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:49:11 +0000 Subject: [MERGED] libgtpnl[master]: Add '--enable-sanitize' from other osmocom projects In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add '--enable-sanitize' from other osmocom projects ...................................................................... Add '--enable-sanitize' from other osmocom projects Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 --- M configure.ac M contrib/jenkins.sh 2 files changed, 13 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index dfcaa15..459fab1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,18 @@ *) AC_MSG_ERROR([Linux only, dude!]);; esac +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wshadow -Wstrict-prototypes \ diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e21fd7..ebdc6ea 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4796 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156 Gerrit-PatchSet: 2 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 13:49:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 13:49:11 +0000 Subject: [MERGED] libgtpnl[master]: gtp_build_payload(): Support absent peer and SGSN address In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp_build_payload(): Support absent peer and SGSN address ...................................................................... gtp_build_payload(): Support absent peer and SGSN address When deleting a PDP context via "gtp-tunnel delete", we specify only the gtp netdevice, the gtp version and the TID/TEI. However, the gtp_build_payload() function unconditionally created the netlink attributes for GTPA_PEER_ADDRESS and GTPA_MS_ADDRESS, having their addresses set to zero. The kernel then tried to find a PDP context with MS and PEER address of 0.0.0.0, and always failed with ENOENT. The same problem also occurred with OsmoGGSN and OpenGGSN: PDP contexts could be added but never removed. The corresponding kernel change that requires this userland change is the following commit introduced in 4.12-rc1: commit d9e2dd122637034a0697bf268eed9233701b9dca Author: Andreas Schultz Date: Thu Mar 9 17:43:00 2017 +0100 gtp: unify genl_find_pdp and prepare for per socket lookup Older kernels will work with libgtpnl both before and after this commit, as they internally will simply disregard any attributes beyond TID/TEI. Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 --- M src/gtp-genl.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gtp-genl.c b/src/gtp-genl.c index 1e48020..f12f872 100644 --- a/src/gtp-genl.c +++ b/src/gtp-genl.c @@ -48,8 +48,10 @@ if (t->ifns >= 0) mnl_attr_put_u32(nlh, GTPA_NET_NS_FD, t->ifns); mnl_attr_put_u32(nlh, GTPA_LINK, t->ifidx); - mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); - mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); + if (t->sgsn_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_PEER_ADDRESS, t->sgsn_addr.s_addr); + if (t->ms_addr.s_addr) + mnl_attr_put_u32(nlh, GTPA_MS_ADDRESS, t->ms_addr.s_addr); if (t->gtp_version == GTP_V0) { mnl_attr_put_u64(nlh, GTPA_TID, t->u.v0.tid); mnl_attr_put_u16(nlh, GTPA_FLOW, t->u.v0.flowid); -- To view, visit https://gerrit.osmocom.org/4794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619 Gerrit-PatchSet: 5 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:15:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:15:05 +0000 Subject: [PATCH] osmo-ci[master]: jenkins: Add gerrit verification job for libgtpnl Message-ID: Review at https://gerrit.osmocom.org/4797 jenkins: Add gerrit verification job for libgtpnl Change-Id: I9dfe4a619f75574cc0a61ab978f4450252b6c171 --- M jobs/gerrit-verifications.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/97/4797/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 3f6264b..4e8aab4 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -35,6 +35,7 @@ osmocom:amd64 /build/contrib/jenkins.sh - libasn1c + - libgtpnl - libosmo-abis - libosmo-netif - libosmo-sccp -- To view, visit https://gerrit.osmocom.org/4797 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dfe4a619f75574cc0a61ab978f4450252b6c171 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:19:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:19:37 +0000 Subject: osmo-ci[master]: jenkins: Add gerrit verification job for libgtpnl In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4797 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dfe4a619f75574cc0a61ab978f4450252b6c171 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:19:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:19:38 +0000 Subject: [MERGED] osmo-ci[master]: jenkins: Add gerrit verification job for libgtpnl In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jenkins: Add gerrit verification job for libgtpnl ...................................................................... jenkins: Add gerrit verification job for libgtpnl Change-Id: I9dfe4a619f75574cc0a61ab978f4450252b6c171 --- M jobs/gerrit-verifications.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 3f6264b..4e8aab4 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -35,6 +35,7 @@ osmocom:amd64 /build/contrib/jenkins.sh - libasn1c + - libgtpnl - libosmo-abis - libosmo-netif - libosmo-sccp -- To view, visit https://gerrit.osmocom.org/4797 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dfe4a619f75574cc0a61ab978f4450252b6c171 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:20:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:20:06 +0000 Subject: [MERGED] osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vlr: auth_fsm_start: check return value of fsm alloc ...................................................................... vlr: auth_fsm_start: check return value of fsm alloc Fixes: coverity CID#178663 Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 --- M src/libvlr/vlr_auth_fsm.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index f07e60f..1376c82 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -583,7 +583,10 @@ fi = osmo_fsm_inst_alloc_child(&vlr_auth_fsm, parent, parent_term_event); - + if (!fi) { + osmo_fsm_inst_dispatch(parent, parent_term_event, 0); + return NULL; + } afp = talloc_zero(fi, struct auth_fsm_priv); if (!afp) { -- To view, visit https://gerrit.osmocom.org/4714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:20:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:20:42 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Use a more up-to-date resources.conf example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:16 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Improve Trial section content ...................................................................... OsmoGSMTester: Improve Trial section content Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc --- M OsmoGSMTester/chapters/trial.adoc 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/trial.adoc b/OsmoGSMTester/chapters/trial.adoc index 86bf12b..bc9fe05 100644 --- a/OsmoGSMTester/chapters/trial.adoc +++ b/OsmoGSMTester/chapters/trial.adoc @@ -18,5 +18,14 @@ * the rendered configuration files used to run the binaries * stdout and stderr outputs of the binaries +* pcap files for processes doing relevant network communication * a test log -* *TODO*: jenkins parsable XML reports +* jenkins parsable XML (Junit) reports + +The script in 'contrib/jenkins-run.sh' takes care of related tasks such as + +* creating the dir structure, +* generating md5 sums for the various tar.gz containing software builds to be tested, +* cleaning up after the build, +* saving extra logs such as journalctl output from ofonod, +* generating a final .tar.gz file with all the logs and reports. -- To view, visit https://gerrit.osmocom.org/4666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:16 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update defaults.conf example In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update defaults.conf example ...................................................................... OsmoGSMTester: Update defaults.conf example Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 31 insertions(+), 14 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 8176b45..3f8cb44 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -217,31 +217,50 @@ channel combinations are in fact not resources (only the nitb's interface address is). These additional settings may be provided by the scenario configurations, but in case the provided scenarios leave some values unset, -they are taken from this 'defaults.conf'. (A 'scenario.conf' providing a -similar setting always has precedence over the values given in a -'defaults.conf'). - -*TODO* better match this format with 'resources.conf'? +they are taken from this 'defaults.conf'. (A 'scenario.conf' or a +'resources.conf' providing a similar setting always has precedence over the +values given in a 'defaults.conf'). Example of a 'defaults.conf': ---- nitb: net: - mcc: 1 - mnc: 868 - short_name: osmo-gsm-tester - long_name: osmo-gsm-tester + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-nitb + long_name: osmo-gsm-tester-nitb auth_policy: closed - encryption: a5 0 + encryption: a5_0 -nitb_bts: +bsc: + net: + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-msc + long_name: osmo-gsm-tester-msc + auth_policy: closed + encryption: a5_0 + authentication: optional + +msc: + net: + mcc: 901 + mnc: 70 + short_name: osmo-gsm-tester-msc + long_name: osmo-gsm-tester-msc + auth_policy: closed + encryption: a5_0 + authentication: optional + +bsc_bts: location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts trx_list: - - max_power_red: 22 + - nominal_power: 23 + max_power_red: 0 arfcn: 868 timeslot_list: - phys_chan_config: CCCH+SDCCH4 @@ -253,5 +272,3 @@ - phys_chan_config: TCH/F_TCH/H_PDCH - phys_chan_config: TCH/F_TCH/H_PDCH ---- - -*TODO*: detailed descriptions -- To view, visit https://gerrit.osmocom.org/4665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Remove resolved TODO ...................................................................... OsmoGSMTester: Remove resolved TODO Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 335a603..8176b45 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -205,8 +205,6 @@ - voice:trx+dyn_ts ---- -*TODO*: voice is not actually implemented yet - === 'defaults.conf' (optional) Each binary run by osmo-gsm-tester, e.g. 'osmo-nitb' or 'osmo-bts-sysmo', -- To view, visit https://gerrit.osmocom.org/4664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update resources cfg documentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update resources cfg documentation ...................................................................... OsmoGSMTester: Update resources cfg documentation Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 38 insertions(+), 11 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 7c06392..335a603 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -92,9 +92,11 @@ - 'osmo-bts-trx' - 'osmo-bts-octphy' - 'ipa-nanobts' + 'ipa_unit_id'::: + ip.access unit id to be used by the BTS, written into BTS and BSC config. 'addr'::: - remote IP address of the BTS, used to start the BTS and tell it where - to find the OsmoNITB. + Remote IP address of the BTS for BTS like sysmoBTS, and local IP address + to bind to for locally run BTS such as osmo-bts-trx. 'band'::: GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of: - 'GSM-1800' @@ -109,8 +111,11 @@ only used for osmo-bts-octphy. (*TODO*: and nanobts??) 'net_device':::: Local network device to reach the TRX's 'hw_addr' at, only used for - osmo-bts-octphy. - + osmo-bts-octphy. Example: 'eth0'. + 'nominal_power':::: + Nominal power to be used by the TRX. + 'max_power_red':::: + Max power reduction to apply to the nominal power of the TRX. 'arfcn':: List of ARFCNs to use for running BTSes, which defines the actual RF frequency bands used. @@ -118,24 +123,46 @@ ARFCN number, see e.g. https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number (note that the resource type 'arfcn' contains an item trait also named - 'arfcn') + 'arfcn'). 'band'::: GSM band name to use this ARFCN for, same as for 'bts:band' above. 'modem':: List of modems reachable via ofono and information on the inserted SIM - card. (Note: the MSISDN is allocated dynamically in test scripts) + card. (Note: the MSISDN is allocated dynamically in test scripts). 'label'::: - human readable label for your own reference + Human readable label for your own reference, which also appears in logs. 'path'::: - ofono's path for this modem, like '/modemkind_99' + Ofono's path for this modem, like '/modemkind_99'. 'imsi'::: - IMSI of the inserted SIM card, like '"123456789012345"' + IMSI of the inserted SIM card, like '"123456789012345"'. 'ki'::: 16 byte authentication/encryption KI of the inserted SIM card, in hexadecimal notation (32 characters) like + - '"00112233445566778899aabbccddeeff"' (*TODO*: authentication algorithm, - currently always comp128v1) + '"00112233445566778899aabbccddeeff"'. + 'auth_algo'::: + Authentication algorithm to be used with the SIM card. One of: + - 'none' + - 'xor' + - 'comp128v1' + 'ciphers'::: + List of ciphers that this modem supports, used to match + requirements in suites or scenarios. Any combination of: + - 'a5_0' + - 'a5_1' + - 'a5_2' + - 'a5_3' + - 'a5_4' + - 'a5_5' + - 'a5_6' + - 'a5_7' + 'features'::: + List of features that this modem supports, used to match requirements in + suites or scenarios. Any combination of: + - 'sms' + - 'gprs' + - 'voice' + - 'ussd' Side note: at first sight it might make sense to the reader to rather structure e.g. the 'ip_address' or 'arfcn' configuration as + -- To view, visit https://gerrit.osmocom.org/4663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Document how to setup main unit to set CAP_NE... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Document how to setup main unit to set CAP_NET_RAW as non-root ...................................................................... OsmoGSMTester: Document how to setup main unit to set CAP_NET_RAW as non-root Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index aaf4d39..146dae1 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -486,6 +486,36 @@ gpasswd -a jenkins usrp ---- +==== Allow CAP_NET_RAW capability + +Certain binaries require 'CAP_NET_RAW' to be set, like 'osmo-bts-octphy' as it +uses a 'AF_PACKET' socket. + +To be able to set the following capability without being root, osmo-gsm-tester +uses sudo to gain permissions to set the capability. + +This is the script that osmo-gsm-tester expects on the main unit: + +---- +echo /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh < /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw +chmod 0440 /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw +---- + +The script file name 'osmo-gsm-tester_setcap_net_raw.sh' is important, as +osmo-gsm-tester expects to find a script with this name in '$PATH' at run time. + + ==== Log Rotation To avoid clogging up /var/log, it makes sense to choose a sane maximum log size: -- To view, visit https://gerrit.osmocom.org/4662 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:17 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Move TODO comment to a redmine task In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Move TODO comment to a redmine task ...................................................................... OsmoGSMTester: Move TODO comment to a redmine task Following task has been created: OS#2612 Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 5f6f1bc..aaf4d39 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -444,8 +444,6 @@ your terminal is in turn is picked up in the tcpdump trace, and so forth. When testing 'tcpdump' access, make sure to have proper filter expressions in place. -TODO: allow skipping pcaps by configuration if access to tcpdump is not wanted - ==== Allow Core Files In case a binary run for the test crashes, a core file of the crash should be -- To view, visit https://gerrit.osmocom.org/4661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:18 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Installation: change some confusing terminology In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Installation: change some confusing terminology ...................................................................... OsmoGSMTester: Installation: change some confusing terminology It's difficult to understand when it referrs to jenkins job in general and when it talks about specific jenkins jobs that builds binaries required for osmo-gsm-tester and the ones which run osmo-gsm-tester. As a result, it's difficult to understand which sections apply to each host in case more than one host is used. Change-Id: I5c882e77b469629028b8d773053783e18f3d1737 --- M OsmoGSMTester/chapters/install.adoc M OsmoGSMTester/chapters/trial.adoc 2 files changed, 12 insertions(+), 13 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 112d4f9..5f6f1bc 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -9,7 +9,7 @@ for manual test runs and/or a different user name is identical, simply replace the user name or group. -=== Dependencies +=== Osmo-gsm-tester Dependencies On a Debian/Ubuntu based system, these commands install the packages needed to run the osmo-gsm-tester.py code, i.e. install these on your main unit: @@ -46,7 +46,7 @@ ---- [[jenkins_deps]] -==== Jenkins Build Dependencies +==== Osmocom Build Dependencies Each of the jenkins builds requires individual dependencies. This is generally the same as for building the software outside of osmo-gsm-tester and will not @@ -57,8 +57,8 @@ should match the installed sysmoBTS firmware. -[[configure_build_slave]] -=== Jenkins Build Slave +[[configure_jenkins_slave]] +=== Jenkins Build and Run Slave ==== Create 'jenkins' User on Main Unit @@ -140,8 +140,8 @@ exit ---- -[[install_add_build_slave]] -==== Add Build Slave +[[install_add_jenkins_slave]] +==== Add Jenkins Slave In the jenkins web UI, add a new build slave for the osmo-gsm-tester: @@ -253,10 +253,10 @@ ==== Add Run Job -This is the build job that actually runs the tests on the GSM hardware: +This is the jenkins job that runs the tests on the GSM hardware: -* It sources the artifacts from the build jobs. -* It runs on the osmo-gsm-tester main unit's build slave. +* It sources the artifacts from jenkins' build jobs. +* It runs on the osmo-gsm-tester main unit. Here is the configuration for the run job: @@ -265,7 +265,7 @@ Configure this to taste, for example: ** 'Max # of build to keep': "20" * 'Restrict where this project can be run': "osmo-gsm-tester" + - (to match the 'Label' configured in <>). + (to match the 'Label' configured in <>). * 'Source Code Management': ** 'Git' *** 'Repository URL': "git://git.osmocom.org/osmo-gsm-tester" @@ -332,7 +332,7 @@ === Install osmo-gsm-tester on Main Unit -This assumes you have already created the jenkins user (see <>). +This assumes you have already created the jenkins user (see <>). ==== User Permissions diff --git a/OsmoGSMTester/chapters/trial.adoc b/OsmoGSMTester/chapters/trial.adoc index 928ee28..86bf12b 100644 --- a/OsmoGSMTester/chapters/trial.adoc +++ b/OsmoGSMTester/chapters/trial.adoc @@ -3,7 +3,7 @@ A trial is a set of pre-built binaries to be tested. They are typically built by jenkins using the build scripts found in osmo-gsm-tester's source in the -'contrib/' dir, see <>. +'contrib/' dir, see <>. A trial comes in the form of a directory containing a number of '*.tgz' tar archives as well as a 'checksums.md5' file to verify the tar archives' @@ -20,4 +20,3 @@ * stdout and stderr outputs of the binaries * a test log * *TODO*: jenkins parsable XML reports - -- To view, visit https://gerrit.osmocom.org/4660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c882e77b469629028b8d773053783e18f3d1737 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:18 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add deps required for osmo-bts-octphy support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Add deps required for osmo-bts-octphy support ...................................................................... OsmoGSMTester: Add deps required for osmo-bts-octphy support Change-Id: I384ec8cd55cfaa68ee1f461de99ceac78c5d8414 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 8397459..112d4f9 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -24,6 +24,9 @@ python3-mako \ python3-gi \ ofono \ + patchelf \ + sudo \ + libcap2-bin \ python3-pip pip3 install pydbus pip3 install git+git://github.com/podshumok/python-smpplib.git -- To view, visit https://gerrit.osmocom.org/4659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I384ec8cd55cfaa68ee1f461de99ceac78c5d8414 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:18 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OSmoGsmTester: Specify group in Main unit intro In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OSmoGsmTester: Specify group in Main unit intro ...................................................................... OSmoGsmTester: Specify group in Main unit intro Change-Id: I132bf7681a1a435c161c4048e41c28dc75c1fa28 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 6eef2fa..8397459 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -4,9 +4,10 @@ runs the core network components, controls the modems and so on. This can be anything from a dedicated production rack unit to your laptop at home. -This manual will assume that tests are run from a jenkins build slave, by a -user named 'jenkins'. The user configuration for manual test runs and/or a -different user name is identical, simply replace the user name. +This manual will assume that tests are run from a jenkins build slave, by a user +named 'jenkins' that belong to group 'osmo-gsm-tester'. The user configuration +for manual test runs and/or a different user name is identical, simply replace +the user name or group. === Dependencies -- To view, visit https://gerrit.osmocom.org/4658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I132bf7681a1a435c161c4048e41c28dc75c1fa28 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:18 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Explain patchelf is used sometimes to modify ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Explain patchelf is used sometimes to modify RPATH ...................................................................... OsmoGSMTester: Explain patchelf is used sometimes to modify RPATH Change-Id: I7bb811bc984c8d576984b038b391cf8130cc465e --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 6e377da..55f1a5e 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -385,7 +385,11 @@ Also, the binaries from a trial are never installed system-wide, but are run with a specific 'LD_LIBRARY_PATH' pointing at the trial's 'inst', so that -several trials can run consecutively without conflicting binary versions. +several trials can run consecutively without conflicting binary versions. For +some specific binaries which require extra permissions (such as osmo-bts-octphy +requiring 'CAP_NET_RAW'), 'patchelf' program is used to modify the binary +'RPATH' field instead because the OS dynamic linker skips 'LD_LIBRARY_PATH' for +binaries with special permissions. Once a test suite run is complete, all its reserved resources are torn down (if the test scripts have not done so already), and the reservations are released -- To view, visit https://gerrit.osmocom.org/4657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7bb811bc984c8d576984b038b391cf8130cc465e Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:18 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update suite.conf example In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update suite.conf example ...................................................................... OsmoGSMTester: Update suite.conf example This is the one we are usig nowadays in suite.conf, which explicitly asks to be run with modems supporting sms features. Change-Id: If5dbc3b4689b282db6fae4668e2838be59e88da8 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 8c106b7..6e377da 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -316,6 +316,8 @@ - times: 1 modem: - times: 2 + features: + - sms ---- It may also request e.g. specific BTS models, but this is typically left to -- To view, visit https://gerrit.osmocom.org/4656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5dbc3b4689b282db6fae4668e2838be59e88da8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:19 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Use a more up-to-date resources.conf example In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Use a more up-to-date resources.conf example ...................................................................... OsmoGSMTester: Use a more up-to-date resources.conf example It showcases new features such as osmo-trx support, cipher support, modem features support, etc. Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 59 insertions(+), 32 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index e2156df..8c106b7 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -218,62 +218,89 @@ ---- ip_address: -- addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 +- addr: 10.42.42.4 +- addr: 10.42.42.5 +- addr: 10.42.42.6 bts: - label: sysmoBTS 1002 type: osmo-bts-sysmo + ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + ciphers: + - a5_0 + - a5_1 + - a5_3 -- label: octBTS 3000 - type: osmo-bts-octphy - addr: 10.42.42.115 - band: GSM-1800 - trx_list: - - hw_addr: 00:0c:90:32:b5:8a - net_device: eth0.2342 - -- label: Ettus B210 +- label: Ettus B200 type: osmo-bts-trx - addr: 10.42.42.116 + ipa_unit_id: 6 + addr: 10.42.42.50 band: GSM-1800 + launch_trx: true + ciphers: + - a5_0 + - a5_1 -- label: nanoBTS 1900 - type: nanobts - addr: 10.42.42.190 - band: GSM-1900 +- label: sysmoCell 5000 + type: osmo-bts-trx + ipa_unit_id: 7 + addr: 10.42.42.51 + band: GSM-1800 + trx_remote_ip: 10.42.42.112 + ciphers: + - a5_0 + - a5_1 + +- label: OCTBTS 3500 + type: osmo-bts-octphy + ipa_unit_id: 8 + addr: 10.42.42.52 + band: GSM-1800 trx_list: - - hw_addr: 00:02:95:00:41:b3 + - hw_addr: 00:0c:90:2e:80:1e + net_device: eth1 + - hw_addr: 00:0c:90:2e:87:52 + net_device: eth1 arfcn: - arfcn: 512 band: GSM-1800 - arfcn: 514 band: GSM-1800 - - - arfcn: 540 + - arfcn: 516 + band: GSM-1800 + - arfcn: 546 band: GSM-1900 - - arfcn: 542 + - arfcn: 548 band: GSM-1900 modem: -- label: m7801 - path: '/wavecom_0' - imsi: 901700000007801 - ki: D620F48487B1B782DA55DF6717F08FF9 +- label: sierra_1 + path: '/sierra_1' + imsi: '901700000009031' + ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' + auth_algo: 'xor' + ciphers: + - a5_0 + - a5_1 + features: + - 'sms' + - 'voice' -- label: m7802 - path: '/wavecom_1' - imsi: 901700000007802 - ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 - -- label: m7803 - path: '/wavecom_2' - imsi: 901700000007803 - ki: ABBED4C91417DF710F60675B6EE2C8D2 +- label: gobi_0 + path: '/gobi_0' + imsi: '901700000009030' + ki: 'BB70807226393CDBAC8DD3439FF54252' + auth_algo: 'xor' + ciphers: + - a5_0 + - a5_1 + features: + - 'sms' ---- === Typical 'suites/*/suite.conf' -- To view, visit https://gerrit.osmocom.org/4655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66bbcd028f03290797c2c467271d0f0982698b47 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:19 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Resource Resolution section content In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Improve Resource Resolution section content ...................................................................... OsmoGSMTester: Improve Resource Resolution section content Change-Id: Ice37093dc9f8e03a2a9f5e3f7df79d1b589b6991 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index b405e1f..e2156df 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -202,12 +202,12 @@ === Resource Resolution -- A global configuration defines which hardware is connected to the +- A global configuration 'resources.conf' defines which hardware is connected to the osmo-gsm-tester main unit. - Each suite contains a number of test scripts. The amount of resources a test may use is defined by the test suite's 'suite.conf'. - Which specific modems, BTS models, NITB IP addresses etc. are made available - to a test run is typically determined by a combination of scenario + to a test run is typically determined by 'suite.conf' and a combination of scenario configurations -- or picked automatically if not. [[resources_conf_example]] -- To view, visit https://gerrit.osmocom.org/4654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice37093dc9f8e03a2a9f5e3f7df79d1b589b6991 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:19 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update sample test script with an AoIP example In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update sample test script with an AoIP example ...................................................................... OsmoGSMTester: Update sample test script with an AoIP example Change-Id: I7978c7e96c8f1d43837271c94dd64893649974e0 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 23 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index cc37e88..b405e1f 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -163,26 +163,38 @@ #!/usr/bin/env python3 from osmo_gsm_tester.test import * -nitb = suite.nitb() +hlr = suite.hlr() bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() ms_mo = suite.modem() ms_mt = suite.modem() -print('start nitb and bts...') -nitb.bts_add(bts) -nitb.start() +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + bts.start() -nitb.subscriber_add(ms_mo) -nitb.subscriber_add(ms_mt) +hlr.subscriber_add(ms_mo) +hlr.subscriber_add(ms_mt) -ms_mo.connect(nitb.mcc_mnc()) -ms_mt.connect(nitb.mcc_mnc()) +ms_mo.connect(msc.mcc_mnc()) +ms_mt.connect(msc.mcc_mnc()) + +ms_mo.log_info() +ms_mt.log_info() print('waiting for modems to attach...') -wait(ms_mo.is_connected, nitb.mcc_mnc()) -wait(ms_mt.is_connected, nitb.mcc_mnc()) -wait(nitb.subscriber_attached, ms_mo, ms_mt) +wait(ms_mo.is_connected, msc.mcc_mnc()) +wait(ms_mt.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms_mo, ms_mt) sms = ms_mo.sms_send(ms_mt) wait(ms_mt.sms_was_received, sms) -- To view, visit https://gerrit.osmocom.org/4653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7978c7e96c8f1d43837271c94dd64893649974e0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:20 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update trial graph with current data In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update trial graph with current data ...................................................................... OsmoGSMTester: Update trial graph with current data The osmo-bts-trx tgz doesn't exist anymore and it does not contain osmo-trx, which comes in its own tgz. Change-Id: Id803eca3791137b04bc24d195119d5c511fcfc49 --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 557c2f3..cc37e88 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -146,7 +146,7 @@ subgraph cluster_trial { label = "Trial (binaries)" sysmo [label="osmo-bts-sysmo.build-23.tgz\n(osmo-bts-sysmo\n+ deps\ncompiled for sysmoBTS)"] - trx [label="osmo-bts-trx.build-5.tgz\n(osmo-trx + osmo-bts-trx\n+ deps\ncompiled for main unit)"] + trx [label="osmo-bts.build-5.tgz\n(osmo-bts-octphy + osmo-bts-trx\n+ deps\ncompiled for main unit)"] nitb [label="osmo-nitb.build-42.tgz\n(osmo-nitb\n+ deps\ncompiled for main unit)"] checksums [label="checksums.md5"] -- To view, visit https://gerrit.osmocom.org/4652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id803eca3791137b04bc24d195119d5c511fcfc49 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:20 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Improve setup graph In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Improve setup graph ...................................................................... OsmoGSMTester: Improve setup graph * Add sysmocell5000 * Remove 1 modem, showing 2 of them is enough * Split osmo-bts-trx from osmo-trx node as sysmocell500 doesn't use the later. * Update OsmoNITB node to show we also support split openbsc.git components. Change-Id: I893beb114d47edd3f67183dd9ea5acc19462496c --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 12 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 50b6dff..557c2f3 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -37,14 +37,14 @@ modem0 [shape=box label="Modems..."] modem1 [shape=box label="Modems..."] - modem2 [shape=box label="Modems..."] osmo_bts_sysmo [label="sysmocom sysmoBTS\nrunning osmo-bts-sysmo" shape=box] B200 [label="Ettus B200" shape=box] + sysmoCell5K [label="sysmocom sysmoCell5000" shape=box] octphy [label="Octasic octphy BTS" shape=box] nanoBTS [label="ip.access nanoBTS" shape=box] rf_distribution [label="RF distribution"] - {modem0 modem1 modem2 osmo_bts_sysmo B200 octphy nanoBTS}->rf_distribution [dir=both arrowhead="curve" arrowtail="curve"] + {modem0 modem1 osmo_bts_sysmo B200 octphy nanoBTS sysmoCell5K}->rf_distribution [dir=both arrowhead="curve" arrowtail="curve"] } subgraph cluster_main_unit { label = "Main Unit" @@ -52,22 +52,24 @@ subgraph { rank=same ofono [label="ofono daemon"] - OsmoNITB - osmo_bts_trx [label="osmo-bts-trx\n+ osmo-trx"] + osmo_trx [label="osmo-trx"] + osmo_bts_trx [label="osmo-bts-trx"] osmo_bts_octphy [label="osmo-bts-octphy"] + OsmoNITB [label="BSC + Core Network\n(Osmo{NITB,MSC,BSC,HLR,...})"] } } jenkins->osmo_gsm_tester [label="trial\n(binaries)"] osmo_gsm_tester->jenkins [label="results"] - ofono->{modem0 modem1 modem2} [label="USB"] - osmo_gsm_tester-> {OsmoNITB osmo_bts_trx osmo_bts_octphy} - osmo_gsm_tester-> osmo_bts_sysmo [taillabel="SSH"] - osmo_gsm_tester-> ofono [taillabel="DBus"] - osmo_bts_trx->B200 [label="USB"] + ofono->{modem0 modem1} [label="USB"] + osmo_gsm_tester->{OsmoNITB osmo_bts_trx osmo_bts_octphy} + osmo_gsm_tester->osmo_bts_sysmo [taillabel="SSH"] + osmo_gsm_tester->ofono [taillabel="DBus"] + osmo_trx->B200 [label="USB"] + osmo_bts_trx->{osmo_trx sysmoCell5K} [dir=both label="UDP"] osmo_bts_octphy->octphy [label="raw eth"] - {osmo_bts_sysmo nanoBTS}->OsmoNITB [label="eth"] + {osmo_bts_sysmo nanoBTS}->OsmoNITB [label="IP"] {B200 octphy}->OsmoNITB [label="eth" style=invis] {osmo_bts_trx osmo_bts_octphy}->OsmoNITB } -- To view, visit https://gerrit.osmocom.org/4651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I893beb114d47edd3f67183dd9ea5acc19462496c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:43 +0000 Subject: osmo-hlr[master]: db-tool: add command 'create' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4776 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:50 +0000 Subject: osmo-hlr[master]: db-tool: cosmetic: tweak printf output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4777 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:21:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:21:59 +0000 Subject: osmo-hlr[master]: db-tool: error-exit on too many arguments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4778 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:01 +0000 Subject: [MERGED] osmo-hlr[master]: db-tool: error-exit on too many arguments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: db-tool: error-exit on too many arguments ...................................................................... db-tool: error-exit on too many arguments Each arg parsing should increment optind, so if there are any surplus args in the end, that's an error. Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961 --- M src/hlr_db_tool.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index fb10f3e..d8a3584 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -159,6 +159,12 @@ print_help(); exit(EXIT_FAILURE); } + + if (argc - optind > 0) { + fprintf(stderr, "Too many arguments: '%s'\n", argv[optind]); + print_help(); + exit(EXIT_FAILURE); + } } static void signal_hdlr(int signal) -- To view, visit https://gerrit.osmocom.org/4778 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:01 +0000 Subject: [MERGED] osmo-hlr[master]: db-tool: cosmetic: tweak printf output In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: db-tool: cosmetic: tweak printf output ...................................................................... db-tool: cosmetic: tweak printf output Say to indicate a filename. No need to print the cmd and arg count, really. Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b --- M src/hlr_db_tool.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index 13281f2..fb10f3e 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -66,7 +66,7 @@ printf(" create Create an empty OsmoHLR database.\n"); printf(" (All commands imply this if none exists yet.)\n"); printf("\n"); - printf(" import-nitb-db db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); + printf(" import-nitb-db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); printf(" Be aware that the import is lossy, only the\n"); printf(" IMSI, MSISDN, nam_cs/ps and 2G auth data are set.\n"); } @@ -143,7 +143,6 @@ } cmd = argv[optind++]; - printf("command '%s', %d extra arguments\n", cmd, argc - optind); if (!strcmp(cmd, "create")) { /* Nothing to do, just run the main program to open the database without running any -- To view, visit https://gerrit.osmocom.org/4777 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:01 +0000 Subject: [MERGED] osmo-hlr[master]: db-tool: add command 'create' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: db-tool: add command 'create' ...................................................................... db-tool: add command 'create' Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12 --- M src/hlr_db_tool.c 1 file changed, 12 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index eb82c92..13281f2 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -51,8 +51,7 @@ static void print_help() { printf("\n"); - printf("Usage: osmo-hlr-db-tool [-l ] import-nitb-db ]\n"); - printf("Call without arguments to create a new empty ./hlr.db.\n"); + printf("Usage: osmo-hlr-db-tool [-l ] [create|import-nitb-db ]\n"); printf(" -l --database db-name The OsmoHLR database to use, default '%s'.\n", cmdline_opts.db_file); printf(" -h --help This text.\n"); @@ -61,6 +60,11 @@ printf(" -T --timestamp Prefix every log line with a timestamp.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -V --version Print the version of OsmoHLR-db-tool.\n"); + printf("\n"); + printf("Commands:\n"); + printf("\n"); + printf(" create Create an empty OsmoHLR database.\n"); + printf(" (All commands imply this if none exists yet.)\n"); printf("\n"); printf(" import-nitb-db db Add OsmoNITB db's subscribers to OsmoHLR db.\n"); printf(" Be aware that the import is lossy, only the\n"); @@ -141,7 +145,10 @@ cmd = argv[optind++]; printf("command '%s', %d extra arguments\n", cmd, argc - optind); - if (!strcmp(cmd, "import-nitb-db")) { + if (!strcmp(cmd, "create")) { + /* Nothing to do, just run the main program to open the database without running any + * action, which will bootstrap all tables. */ + } else if (!strcmp(cmd, "import-nitb-db")) { if (argc - optind < 1) { fprintf(stderr, "You must specify an input db file\n"); print_help(); @@ -387,7 +394,8 @@ goto too_many_actions; main_action = import_nitb_db; } - /* Future: add more main_actions, besides --import-nitb-db, here. */ + /* Future: add more main_actions, besides import-nitb-db, here. + * For command 'create', no action is required. */ /* Just in case any db actions need randomness */ rc = rand_init(); -- To view, visit https://gerrit.osmocom.org/4776 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:23 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: remove prefix "net" from rtp related vty commands ...................................................................... cosmetic: remove prefix "net" from rtp related vty commands There the prefix "net" is a leftover from the time when there was a bts and a net side. Now we do not distinguish anymore between the two. remove prefix "net" Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 28 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Objections: Neels Hofmeyr: I would prefer this is not merged as is diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index a7d9e4a..06420dd 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -67,11 +67,11 @@ vty_out(vty, " local ip %s%s", g_cfg->local_ip, VTY_NEWLINE); vty_out(vty, " bind ip %s%s", g_cfg->source_addr, VTY_NEWLINE); vty_out(vty, " bind port %u%s", g_cfg->source_port, VTY_NEWLINE); - vty_out(vty, " rtp net-range %u %u%s", + vty_out(vty, " rtp port-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr) - vty_out(vty, " rtp net-bind-ip %s%s", + vty_out(vty, " rtp bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr_probe) vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); @@ -292,28 +292,37 @@ #define RANGE_START_STR "Start of the range of ports\n" #define RANGE_END_STR "End of the range of ports\n" -DEFUN(cfg_mgcp_rtp_net_range, - cfg_mgcp_rtp_net_range_cmd, - "rtp net-range <0-65534> <0-65534>", +DEFUN(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_port_range_cmd, + "rtp port-range <0-65534> <0-65534>", RTP_STR "Range of ports to use for the NET side\n" RANGE_START_STR RANGE_END_STR) { parse_range(&g_cfg->net_ports, argv); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_net_range_cmd, + "rtp net-range <0-65534> <0-65534>", + RTP_STR "Range of ports to use for the NET side\n" + RANGE_START_STR RANGE_END_STR) -DEFUN(cfg_mgcp_rtp_net_bind_ip, - cfg_mgcp_rtp_net_bind_ip_cmd, - "rtp net-bind-ip A.B.C.D", +DEFUN(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_bind_ip_cmd, + "rtp bind-ip A.B.C.D", RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { osmo_talloc_replace_string(g_cfg, &g_cfg->net_ports.bind_addr, argv[0]); return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_net_bind_ip_cmd, + "rtp net-bind-ip A.B.C.D", + RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") -DEFUN(cfg_mgcp_rtp_no_net_bind_ip, - cfg_mgcp_rtp_no_net_bind_ip_cmd, - "no rtp net-bind-ip", +DEFUN(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_bind_ip_cmd, + "no rtp bind-ip", NO_STR RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { @@ -321,6 +330,11 @@ g_cfg->net_ports.bind_addr = NULL; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_net_bind_ip_cmd, + "no rtp net-bind-ip", + NO_STR RTP_STR "Bind endpoints facing the Network\n" + "Address to bind to\n") DEFUN(cfg_mgcp_rtp_net_bind_ip_probing, cfg_mgcp_rtp_net_bind_ip_probing_cmd, @@ -1182,8 +1196,11 @@ install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_early_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_port_range_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:23 +0000 Subject: [MERGED] osmo-mgw[master]: doc: update sample config file In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: doc: update sample config file ...................................................................... doc: update sample config file The current example configuration is out of date. Add a recent configuration file Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 --- M doc/examples/osmo-mgw/osmo-mgw.cfg 1 file changed, 14 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-mgw/osmo-mgw.cfg b/doc/examples/osmo-mgw/osmo-mgw.cfg index d8ea3a5..3057369 100644 --- a/doc/examples/osmo-mgw/osmo-mgw.cfg +++ b/doc/examples/osmo-mgw/osmo-mgw.cfg @@ -2,12 +2,17 @@ ! MGCP configuration example ! mgcp - !local ip 10.23.24.2 - !bts ip 10.24.24.1 - !bind ip 10.23.24.1 - bind port 2427 - rtp force-ptime 20 - sdp audio payload number 98 - sdp audio payload name AMR/8000 - number endpoints 31 - no rtcp-omit + bind ip 127.0.0.1 + rtp port-range 4002 16000 + rtp bind-ip 10.9.1.122 + rtp ip-probing + rtp ip-tos 184 + bind port 2427 + sdp audio payload number 98 + sdp audio payload name GSM + number endpoints 31 + loop 0 + force-realloc 1 + rtcp-omit + rtp-patch ssrc + rtp-patch timestamp -- To view, visit https://gerrit.osmocom.org/4739 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:46 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: remove unused variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: remove unused variable ...................................................................... mgcp: remove unused variable The function handle_error asserts mgcp_ctx->conn to be non null, but it does not access it otherwise. remove unused variable conn Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index aa008a8..f0c31df 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -151,12 +151,8 @@ static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) { struct osmo_fsm_inst *fi; - struct osmo_bsc_sccp_con *conn; OSMO_ASSERT(mgcp_ctx); - conn = mgcp_ctx->conn; - OSMO_ASSERT(conn); - fi = mgcp_ctx->fsm; OSMO_ASSERT(fi); -- To view, visit https://gerrit.osmocom.org/4746 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:46 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: add missing out state In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: add missing out state ...................................................................... mgcp: add missing out state Even in the very early ST_CRCX_BTS phase, the error handler may decide to go to ST_CALL in order to initate the termination of a possibly half open connection. Add ST_CALL to the out state list in ST_CRCX_BTS Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 3115422..aa008a8 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -903,7 +903,7 @@ /* Startup state machine, send CRCX to BTS. */ [ST_CRCX_BTS] = { .in_event_mask = (1 << EV_INIT), - .out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_PROC), .name = "ST_CRCX_BTS", .action = fsm_crcx_bts_cb, }, -- To view, visit https://gerrit.osmocom.org/4745 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:47 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: replace term MGCP-GW with MGW In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: replace term MGCP-GW with MGW ...................................................................... cosmetic: replace term MGCP-GW with MGW The term MGCP-GW is deprecated, use now MGW Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f4acc39..3115422 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -469,7 +469,7 @@ /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE * parser/generator uses sockaddr_storage for the AoIP transport - * identifier. However, the MGCP-GW does not support IPv6 yet. This is + * identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { @@ -872,7 +872,7 @@ mgcp_ctx->resp = NULL; if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { - /* Note: We were unable to communicate with the MGCP-GW, + /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); @@ -886,7 +886,7 @@ } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) /* Note: If the logic that controls the BSS is unable to * negotiate a connection, we presumably still have a - * working connection to the MGCP-GW, we will try to + * working connection to the MGW, we will try to * shut down gracefully. */ handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); else { @@ -949,7 +949,7 @@ }, /* When the call ends, remove all RTP connections from the - * MGCP-GW by sending a wildcarded DLCX. In case of a handover, + * MGW by sending a wildcarded DLCX. In case of a handover, * go for an extra MDCX to update the connection and land in * this state again when done. */ [ST_CALL] = { @@ -969,7 +969,7 @@ .action = fsm_complete_handover, }, - /* When the MGCP_GW confirms that the connections are terminated, + /* When the MGW confirms that the connections are terminated, * then halt the state machine. */ [ST_HALT] = { .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), @@ -989,7 +989,7 @@ }; /* Notify that the a new call begins. This will create a connection for the - * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * BTS on the MGW and set up the port numbers in struct osmo_bsc_sccp_con. * After that gsm0808_assign_req() to proceed. * Parameter: * ctx: talloc context @@ -1037,7 +1037,7 @@ return mgcp_ctx; } -/* Notify that the call has ended, remove all connections from the MGCP-GW, +/* Notify that the call has ended, remove all connections from the MGW, * then send the clear complete message and destroy the FSM instance * Parameter: * mgcp_ctx: context information (FSM, and pointer to external system data) -- To view, visit https://gerrit.osmocom.org/4744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:47 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: reorder case list In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: reorder case list ...................................................................... cosmetic: reorder case list the switch statement in fsm_send_assignment_complete() has the default case at the beginning. Move the default case to the end to match common coding style rules Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index a7b6b41..f4acc39 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -575,11 +575,11 @@ get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { + case EV_CRCX_NET_RESP: + break; default: handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); return; - case EV_CRCX_NET_RESP: - break; } lchan = mgcp_ctx->lchan; -- To view, visit https://gerrit.osmocom.org/4743 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:22:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:22:47 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: remove distracting newline In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: remove distracting newline ...................................................................... cosmetic: remove distracting newline Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db --- M include/osmocom/bsc/osmo_bsc_mgcp.h 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index ddcba0f..dd26d40 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -31,7 +31,6 @@ /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; - struct osmo_bsc_sccp_con *conn; enum gsm48_chan_mode chan_mode; bool full_rate; -- To view, visit https://gerrit.osmocom.org/4742 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:34:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:34:08 +0000 Subject: [PATCH] libgtpnl[master]: Use release helper from libosmocore Message-ID: Review at https://gerrit.osmocom.org/4798 Use release helper from libosmocore Change-Id: I3b22a026ee61e88ed6d785182990cfcba0487bfe Related: OS#1861 --- M Makefile.am M configure.ac 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/98/4798/1 diff --git a/Makefile.am b/Makefile.am index cb72faf..deb3299 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,3 +9,5 @@ pkgconfig_DATA = libgtpnl.pc ${pkgconfig_DATA}: ${top_builddir}/config.status + + at RELMAKE@ diff --git a/configure.ac b/configure.ac index 459fab1..15eb998 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,10 @@ dnl Dependencies PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.0]) +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + AC_PROG_CC AM_PROG_CC_C_O AC_EXEEXT -- To view, visit https://gerrit.osmocom.org/4798 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b22a026ee61e88ed6d785182990cfcba0487bfe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:34:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:34:13 +0000 Subject: [PATCH] libgtpnl[master]: add 'm4' subdirectory to .gitignore Message-ID: Review at https://gerrit.osmocom.org/4799 add 'm4' subdirectory to .gitignore Change-Id: I0207549ed00ad9c95ed64978046bb53ffe2634fe --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/99/4799/1 diff --git a/.gitignore b/.gitignore index 041cf24..7289d72 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ libgtpnl.pc libtool build-aux +m4 # Debian package build temporary files build-stamp -- To view, visit https://gerrit.osmocom.org/4799 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0207549ed00ad9c95ed64978046bb53ffe2634fe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:34:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:34:13 +0000 Subject: [PATCH] libgtpnl[master]: Tag/Release v1.1.0 Message-ID: Review at https://gerrit.osmocom.org/4800 Tag/Release v1.1.0 Change-Id: I18ac475c1591c4dc4c2953957a8bce8e73007251 --- M Make_global.am M TODO-RELEASE M configure.ac M debian/changelog M debian/control R debian/libgtpnl1.install 6 files changed, 16 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/00/4800/1 diff --git a/Make_global.am b/Make_global.am index 1654f10..4037ac1 100644 --- a/Make_global.am +++ b/Make_global.am @@ -18,7 +18,7 @@ # set age to 0. # # -LIBVERSION=0:0:0 +LIBVERSION=1:0:1 AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_srcdir}/include ${LIBMNL_CFLAGS} AM_CFLAGS = ${regular_CFLAGS} ${GCC_FVISIBILITY_HIDDEN} diff --git a/TODO-RELEASE b/TODO-RELEASE index 24da897..e69de29 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1 +0,0 @@ -* new genl_socket_close() function diff --git a/configure.ac b/configure.ac index 15eb998..f70ead0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to create configure. -AC_INIT([libgtpnl], [1.0.1]) +AC_INIT([libgtpnl], [1.1.0]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) diff --git a/debian/changelog b/debian/changelog index 57f1600..69b49ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +libgtpnl (1.1.0) UNRELEASED; urgency=medium + + * Add genl_socket_close() function + * Add contrib/jenkins.sh for jenkins build verification + * Add '--enable-sanitize' from other osmocom projects + * gtp_build_payload(): Support absent peer and SGSN address + * Use release helper from libosmocore + * add 'm4' subdirectory to .gitignore + + -- Harald Welte Sun, 12 Nov 2017 23:31:27 +0900 + libgtpnl (1.0.1) unstable; urgency=medium * Initial release. diff --git a/debian/control b/debian/control index 3128f3e..af83842 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Vcs-Browser: http://git.osmocom.org/gitweb?p=libgtpnl.git;a=summary Homepage: https://projects.osmocom.org/projects/openggsn -Package: libgtpnl0 +Package: libgtpnl1 Section: libs Architecture: any Multi-Arch: same @@ -29,7 +29,7 @@ Multi-Arch: same Section: libdevel Depends: libmnl-dev, - libgtpnl0 (= ${binary:Version}), + libgtpnl1 (= ${binary:Version}), ${misc:Depends} Description: Development headers for Linux kernel GTP-U netlink library The header files provided by this package may be used to develop @@ -40,6 +40,6 @@ Multi-Arch: same Section: debug Priority: extra -Depends: libgtpnl0 (= ${binary:Version}), +Depends: libgtpnl1 (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for Linux kernel GTP-U netlink library diff --git a/debian/libgtpnl0.install b/debian/libgtpnl1.install similarity index 100% rename from debian/libgtpnl0.install rename to debian/libgtpnl1.install -- To view, visit https://gerrit.osmocom.org/4800 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18ac475c1591c4dc4c2953957a8bce8e73007251 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:19 +0000 Subject: libgtpnl[master]: Use release helper from libosmocore In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4798 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b22a026ee61e88ed6d785182990cfcba0487bfe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:21 +0000 Subject: libgtpnl[master]: add 'm4' subdirectory to .gitignore In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4799 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0207549ed00ad9c95ed64978046bb53ffe2634fe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:23 +0000 Subject: libgtpnl[master]: Tag/Release v1.1.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4800 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18ac475c1591c4dc4c2953957a8bce8e73007251 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:24 +0000 Subject: [MERGED] libgtpnl[master]: Tag/Release v1.1.0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Tag/Release v1.1.0 ...................................................................... Tag/Release v1.1.0 Change-Id: I18ac475c1591c4dc4c2953957a8bce8e73007251 --- M Make_global.am M TODO-RELEASE M configure.ac M debian/changelog M debian/control R debian/libgtpnl1.install 6 files changed, 16 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Make_global.am b/Make_global.am index 1654f10..4037ac1 100644 --- a/Make_global.am +++ b/Make_global.am @@ -18,7 +18,7 @@ # set age to 0. # # -LIBVERSION=0:0:0 +LIBVERSION=1:0:1 AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_srcdir}/include ${LIBMNL_CFLAGS} AM_CFLAGS = ${regular_CFLAGS} ${GCC_FVISIBILITY_HIDDEN} diff --git a/TODO-RELEASE b/TODO-RELEASE index 24da897..e69de29 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1 +0,0 @@ -* new genl_socket_close() function diff --git a/configure.ac b/configure.ac index 15eb998..f70ead0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to create configure. -AC_INIT([libgtpnl], [1.0.1]) +AC_INIT([libgtpnl], [1.1.0]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) diff --git a/debian/changelog b/debian/changelog index 57f1600..69b49ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +libgtpnl (1.1.0) UNRELEASED; urgency=medium + + * Add genl_socket_close() function + * Add contrib/jenkins.sh for jenkins build verification + * Add '--enable-sanitize' from other osmocom projects + * gtp_build_payload(): Support absent peer and SGSN address + * Use release helper from libosmocore + * add 'm4' subdirectory to .gitignore + + -- Harald Welte Sun, 12 Nov 2017 23:31:27 +0900 + libgtpnl (1.0.1) unstable; urgency=medium * Initial release. diff --git a/debian/control b/debian/control index 3128f3e..af83842 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Vcs-Browser: http://git.osmocom.org/gitweb?p=libgtpnl.git;a=summary Homepage: https://projects.osmocom.org/projects/openggsn -Package: libgtpnl0 +Package: libgtpnl1 Section: libs Architecture: any Multi-Arch: same @@ -29,7 +29,7 @@ Multi-Arch: same Section: libdevel Depends: libmnl-dev, - libgtpnl0 (= ${binary:Version}), + libgtpnl1 (= ${binary:Version}), ${misc:Depends} Description: Development headers for Linux kernel GTP-U netlink library The header files provided by this package may be used to develop @@ -40,6 +40,6 @@ Multi-Arch: same Section: debug Priority: extra -Depends: libgtpnl0 (= ${binary:Version}), +Depends: libgtpnl1 (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for Linux kernel GTP-U netlink library diff --git a/debian/libgtpnl0.install b/debian/libgtpnl1.install similarity index 100% rename from debian/libgtpnl0.install rename to debian/libgtpnl1.install -- To view, visit https://gerrit.osmocom.org/4800 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18ac475c1591c4dc4c2953957a8bce8e73007251 Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:25 +0000 Subject: [MERGED] libgtpnl[master]: add 'm4' subdirectory to .gitignore In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add 'm4' subdirectory to .gitignore ...................................................................... add 'm4' subdirectory to .gitignore Change-Id: I0207549ed00ad9c95ed64978046bb53ffe2634fe --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 041cf24..7289d72 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ libgtpnl.pc libtool build-aux +m4 # Debian package build temporary files build-stamp -- To view, visit https://gerrit.osmocom.org/4799 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0207549ed00ad9c95ed64978046bb53ffe2634fe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:35:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:35:25 +0000 Subject: [MERGED] libgtpnl[master]: Use release helper from libosmocore In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Use release helper from libosmocore ...................................................................... Use release helper from libosmocore Change-Id: I3b22a026ee61e88ed6d785182990cfcba0487bfe Related: OS#1861 --- M Makefile.am M configure.ac 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index cb72faf..deb3299 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,3 +9,5 @@ pkgconfig_DATA = libgtpnl.pc ${pkgconfig_DATA}: ${top_builddir}/config.status + + at RELMAKE@ diff --git a/configure.ac b/configure.ac index 459fab1..15eb998 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,10 @@ dnl Dependencies PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.0]) +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + AC_PROG_CC AM_PROG_CC_C_O AC_EXEEXT -- To view, visit https://gerrit.osmocom.org/4798 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b22a026ee61e88ed6d785182990cfcba0487bfe Gerrit-PatchSet: 1 Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 14:36:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 14:36:11 +0000 Subject: [MERGED] osmo-bsc[master]: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT ...................................................................... osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDT When we receive unimplemented/unhandled message types, we shouldn't simply silently discard them, but print a log message for the benefit of the user. Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 9f8032e..59c2979 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -645,6 +645,10 @@ case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; + default: + LOGP(DMSC, LOGL_NOTICE, "Received unimplemented BSSMAP UDT %s\n", + gsm0808_bssmap_name(msg->l4h[0])); + break; } return ret; -- To view, visit https://gerrit.osmocom.org/4788 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:01:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:01:53 +0000 Subject: [PATCH] libosmocore[master]: Fix/Update copyright notices; Add SPDX annotation Message-ID: Review at https://gerrit.osmocom.org/4801 Fix/Update copyright notices; Add SPDX annotation Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af --- M debian/copyright M include/osmocom/core/bitcomp.h M include/osmocom/core/bitvec.h M include/osmocom/core/stats.h M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/gsup.h M include/osmocom/gsm/oap.h M src/application.c M src/backtrace.c M src/bitcomp.c M src/bits.c M src/bitvec.c M src/codec/gsm610.c M src/codec/gsm620.c M src/codec/gsm660.c M src/codec/gsm690.c M src/coding/gsm0503_coding.c M src/coding/gsm0503_interleaving.c M src/coding/gsm0503_mapping.c M src/coding/gsm0503_parity.c M src/coding/gsm0503_tables.c M src/conv.c M src/conv_acc.c M src/conv_acc_generic.c M src/conv_acc_sse.c M src/conv_acc_sse_avx.c M src/conv_acc_sse_impl.h M src/counter.c M src/crc16.c M src/crcXXgen.c.tpl M src/ctrl/control_cmd.c M src/ctrl/control_if.c M src/ctrl/control_vty.c M src/ctrl/fsm_ctrl_commands.c M src/fsm.c M src/gb/common_vty.c M src/gb/gprs_bssgp.c M src/gb/gprs_bssgp_bss.c M src/gb/gprs_bssgp_util.c M src/gb/gprs_bssgp_vty.c M src/gb/gprs_ns.c M src/gb/gprs_ns_frgre.c M src/gb/gprs_ns_vty.c M src/gsm/a5.c M src/gsm/abis_nm.c M src/gsm/apn.c M src/gsm/auth_comp128v1.c M src/gsm/auth_comp128v23.c M src/gsm/auth_core.c M src/gsm/auth_milenage.c M src/gsm/comp128.c M src/gsm/comp128v23.c M src/gsm/gan.c M src/gsm/gea.c M src/gsm/gprs_cipher_core.c M src/gsm/gprs_gea.c M src/gsm/gprs_rlc.c M src/gsm/gsm0341.c M src/gsm/gsm0411_smc.c M src/gsm/gsm0411_smr.c M src/gsm/gsm0411_utils.c M src/gsm/gsm0480.c M src/gsm/gsm0502.c M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/gsm23003.c M src/gsm/gsm48.c M src/gsm/gsm48_ie.c M src/gsm/gsm_04_08_gprs.c M src/gsm/gsm_utils.c M src/gsm/gsup.c M src/gsm/ipa.c M src/gsm/kasumi.c M src/gsm/lapd_core.c M src/gsm/lapdm.c M src/gsm/milenage/aes-encblock.c M src/gsm/milenage/aes-internal-enc.c M src/gsm/milenage/aes-internal.c M src/gsm/milenage/aes.h M src/gsm/milenage/aes_i.h M src/gsm/milenage/aes_wrap.h M src/gsm/milenage/milenage.c M src/gsm/milenage/milenage.h M src/gsm/oap.c M src/gsm/rsl.c M src/gsm/rxlev_stat.c M src/gsm/sysinfo.c M src/gsm/tlv_parser.c M src/gsmtap_util.c M src/logging.c M src/logging_gsmtap.c M src/logging_syslog.c M src/loggingrb.c M src/macaddr.c M src/msgb.c M src/msgfile.c M src/panic.c M src/plugin.c M src/prbs.c M src/prim.c M src/pseudotalloc/pseudotalloc.c M src/pseudotalloc/talloc.h M src/rate_ctr.c M src/rbtree.c M src/select.c M src/sercomm.c M src/serial.c M src/signal.c M src/sim/card_fs_isim.c M src/sim/card_fs_sim.c M src/sim/card_fs_tetra.c M src/sim/card_fs_uicc.c M src/sim/class_tables.c M src/sim/core.c M src/sim/reader.c M src/sim/reader_pcsc.c M src/socket.c M src/stat_item.c M src/stats.c M src/stats_statsd.c M src/strrb.c M src/timer.c M src/timer_gettimeofday.c M src/utils.c M src/vty/buffer.c M src/vty/command.c M src/vty/fsm_vty.c M src/vty/logging_vty.c M src/vty/stats_vty.c M src/vty/talloc_ctx_vty.c M src/vty/telnet_interface.c M src/vty/utils.c M src/vty/vector.c M src/vty/vty.c M src/write_queue.c M tests/abis/abis_test.c M tests/codec/codec_test.c M tests/gb/gprs_bssgp_test.c M tests/gb/gprs_ns_test.c M tests/gsm23003/gsm23003_test.c M tests/lapd/lapd_test.c M tests/oap/oap_test.c M tests/stats/stats_test.c M tests/strrb/strrb_test.c M tests/vty/vty_test.c 145 files changed, 424 insertions(+), 101 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/4801/1 diff --git a/debian/copyright b/debian/copyright index 2991c85..e763039 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,11 +11,6 @@ 2010 Nico Golde License: GPL-2+ -Files: src/talloc.c include/osmocom/core/talloc.h -Copyright: 2004 Andrew Tridgell - 2006 Stefan Metzmacher -License: LGPL-3+ - Files: include/osmocom/core/loggingrb.h include/osmocom/core/strrb.h src/strrb.c @@ -30,8 +25,9 @@ License: GPL-2+ Files: include/osmocom/core/crc16.h + src/crc16.c Copyright: 2005 Ben Gardner -License: GPL-2+ +License: GPL-2 Files: src/utils.c Copyright: 2011 Harald Welte @@ -110,7 +106,7 @@ tests/stats/stats_test.c Copyright: 2009-2010 by Harald Welte 2009-2014 by Holger Hans Peter Freyther - 2015 Sysmocom s.f.m.c. GmbH + 2015 sysmocom - s.f.m.c. GmbH License: GPL-2+ Files: tests/gb/gprs_ns_test.c @@ -176,25 +172,6 @@ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - - -License: LGPL-3+ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - . - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see . - . - On Debian systems, the complete text of the GNU Lesser General - Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". - License: AGPL-3+ This program is free software; you can redistribute it and/or modify diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h index dc356bd..5faa5ea 100644 --- a/include/osmocom/core/bitcomp.h +++ b/include/osmocom/core/bitcomp.h @@ -1,10 +1,12 @@ /*! \file bitcomp.h * Osmocom bit compression routines. */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev - * + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 19466ab..c9bab39 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -1,6 +1,6 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 Sysmocom s.f.m.c. GmbH + * (C) 2015 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index f50796c..e4d46ba 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -1,5 +1,5 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index db15666..7432164 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -2,22 +2,22 @@ * @{ * \file gsm0808_utils.h */ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 8daf460..5cfe1ec 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -16,10 +16,12 @@ * \file gsup.h * Osmocom Generic Subscriber Update Protocol message encoder/decoder. */ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH, Author: Jacob Erlbeck + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/gsm/oap.h b/include/osmocom/gsm/oap.h index ce1e151..f33cb50 100644 --- a/include/osmocom/gsm/oap.h +++ b/include/osmocom/gsm/oap.h @@ -8,10 +8,11 @@ * * \file oap.h */ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/application.c b/src/application.c index 538ac45..2d237e2 100644 --- a/src/application.c +++ b/src/application.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/backtrace.c b/src/backtrace.c index 5ce7482..a18bde0 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitcomp.c b/src/bitcomp.c index 94f60eb..d5a9310 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -1,10 +1,13 @@ /*! \file bitcomp.c * Osmocom bit compression routines */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bits.c b/src/bits.c index fa917b0..8837c1f 100644 --- a/src/bits.c +++ b/src/bits.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitvec.c b/src/bitvec.c index e86315c..884eb02 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -1,9 +1,11 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index d5a2110..a05eaba 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index b1a0b31..282781f 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index 2f5c6a2..4f7bb09 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 1ee74d0..1955716 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 639d2df..cacc612 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c index b42f242..d5008d0 100644 --- a/src/coding/gsm0503_interleaving.c +++ b/src/coding/gsm0503_interleaving.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c index d414769..1e37fce 100644 --- a/src/coding/gsm0503_mapping.c +++ b/src/coding/gsm0503_mapping.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_parity.c b/src/coding/gsm0503_parity.c index b57caa3..874114f 100644 --- a/src/coding/gsm0503_parity.c +++ b/src/coding/gsm0503_parity.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_tables.c b/src/coding/gsm0503_tables.c index dda8cad..5fe634b 100644 --- a/src/coding/gsm0503_tables.c +++ b/src/coding/gsm0503_tables.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv.c b/src/conv.c index 420acca..a2c13de 100644 --- a/src/conv.c +++ b/src/conv.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc.c b/src/conv_acc.c index 048bbb1..33fe264 100644 --- a/src/conv_acc.c +++ b/src/conv_acc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_generic.c b/src/conv_acc_generic.c index 228f3e2..2887673 100644 --- a/src/conv_acc_generic.c +++ b/src/conv_acc_generic.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c index e9bbde1..a9679ef 100644 --- a/src/conv_acc_sse.c +++ b/src/conv_acc_sse.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c index c399719..5b6e704 100644 --- a/src/conv_acc_sse_avx.c +++ b/src/conv_acc_sse_avx.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_impl.h b/src/conv_acc_sse_impl.h index 560af62..9ebbfe9 100644 --- a/src/conv_acc_sse_impl.h +++ b/src/conv_acc_sse_impl.h @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/counter.c b/src/counter.c index 2963777..0fa84c8 100644 --- a/src/counter.c +++ b/src/counter.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/crc16.c b/src/crc16.c index c03c008..29dace2 100644 --- a/src/crc16.c +++ b/src/crc16.c @@ -8,6 +8,8 @@ * * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. + * + * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/src/crcXXgen.c.tpl b/src/crcXXgen.c.tpl index befba4d..74e6d52 100644 --- a/src/crcXXgen.c.tpl +++ b/src/crcXXgen.c.tpl @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index 24b388b..f616479 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 9b8a194..07b17c9 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c index a968bc0..ef98889 100644 --- a/src/ctrl/control_vty.c +++ b/src/ctrl/control_vty.c @@ -1,10 +1,12 @@ /*! \file control_vty.c * VTY configuration for Control interface. */ /* - * (C) 2016 by sysmocom s.m.f.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c index 38fbd1e..3c7e1bd 100644 --- a/src/ctrl/fsm_ctrl_commands.c +++ b/src/ctrl/fsm_ctrl_commands.c @@ -1,5 +1,11 @@ /*! \file fsm_ctrl_commands.c */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + */ + #include #include diff --git a/src/fsm.c b/src/fsm.c index 3f8de9c..827e8b3 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/common_vty.c b/src/gb/common_vty.c index 16f3bbd..a47294b 100644 --- a/src/gb/common_vty.c +++ b/src/gb/common_vty.c @@ -5,6 +5,8 @@ * (C) 2009-2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b906643..520868e 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index d9f04c5..3939e25 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_util.c b/src/gb/gprs_bssgp_util.c index 4553da8..669dfb8 100644 --- a/src/gb/gprs_bssgp_util.c +++ b/src/gb/gprs_bssgp_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index f787846..6131e6b 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index a00c8e5..47d170d 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -2,10 +2,13 @@ * GPRS Networks Service (NS) messages on the Gb interface. * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2012 by Harald Welte + * (C) 2009-2017 by Harald Welte + * (C) 2016-2017 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_frgre.c b/src/gb/gprs_ns_frgre.c index 52145ff..483fdb6 100644 --- a/src/gb/gprs_ns_frgre.c +++ b/src/gb/gprs_ns_frgre.c @@ -3,10 +3,12 @@ * GPRS Networks Service (NS) messages on the Gb interface, * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2010,2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index e8ef2a2..667db7d 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -1,10 +1,13 @@ /*! \file gprs_ns_vty.c * VTY interface for our GPRS Networks Service (NS) implementation. */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/a5.c b/src/gsm/a5.c index ea09e17..223d3ad 100644 --- a/src/gsm/a5.c +++ b/src/gsm/a5.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 7207fb9..8a3886d 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -1,8 +1,10 @@ /* - * (C) 2008-2011 by Harald Welte + * (C) 2008-2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/apn.c b/src/gsm/apn.c index f8303db..e6632dd 100644 --- a/src/gsm/apn.c +++ b/src/gsm/apn.c @@ -1,4 +1,24 @@ -/*! \file apn.c */ +/*! \file apn.c + * + * (C) 2014 by Harald Welte + * (C) 2015,2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c index 1dddef3..493ebfd 100644 --- a/src/gsm/auth_comp128v1.c +++ b/src/gsm/auth_comp128v1.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_comp128v23.c b/src/gsm/auth_comp128v23.c index 4d23769..279d2b7 100644 --- a/src/gsm/auth_comp128v23.c +++ b/src/gsm/auth_comp128v23.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 738e860..9e3b2c0 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c index 2ddf712..9589100 100644 --- a/src/gsm/auth_milenage.c +++ b/src/gsm/auth_milenage.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c index 0fcc67d..b28a843 100644 --- a/src/gsm/comp128.c +++ b/src/gsm/comp128.c @@ -46,6 +46,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128v23.c b/src/gsm/comp128v23.c index 12f8a4c..68f4b2a 100644 --- a/src/gsm/comp128v23.c +++ b/src/gsm/comp128v23.c @@ -9,6 +9,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gan.c b/src/gsm/gan.c index fae93f1..8cd4f78 100644 --- a/src/gsm/gan.c +++ b/src/gsm/gan.c @@ -4,6 +4,8 @@ * (C) 2012 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gea.c b/src/gsm/gea.c index 70f08ad..5756bb0 100644 --- a/src/gsm/gea.c +++ b/src/gsm/gea.c @@ -1,11 +1,11 @@ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index fc68c40..6fa25d6 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gprs_gea.c b/src/gsm/gprs_gea.c index db3f2cc..7314788 100644 --- a/src/gsm/gprs_gea.c +++ b/src/gsm/gprs_gea.c @@ -1,13 +1,15 @@ /*! \file gprs_gea.c * GEA 3 & 4 plugin */ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_rlc.c b/src/gsm/gprs_rlc.c index d2c05b7..bdfc8ea 100644 --- a/src/gsm/gprs_rlc.c +++ b/src/gsm/gprs_rlc.c @@ -1,5 +1,12 @@ /*! \file gsm/gprs_rlc.c * helper functions for (E)GPRS RLC according to 3GPP TS 44.060. + * + * (C) 2016 by Thomas Thou + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ */ #include diff --git a/src/gsm/gsm0341.c b/src/gsm/gsm0341.c index 485023f..89f5de3 100644 --- a/src/gsm/gsm0341.c +++ b/src/gsm/gsm0341.c @@ -2,6 +2,8 @@ * (C) 2014 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smc.c b/src/gsm/gsm0411_smc.c index f7c536b..28287e4 100644 --- a/src/gsm/gsm0411_smc.c +++ b/src/gsm/gsm0411_smc.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smr.c b/src/gsm/gsm0411_smr.c index 0a25c7c..892b7f0 100644 --- a/src/gsm/gsm0411_smr.c +++ b/src/gsm/gsm0411_smr.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index acf7e23..53d37a4 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 557aa14..71470e5 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c index 6b69893..53259a4 100644 --- a/src/gsm/gsm0502.c +++ b/src/gsm/gsm0502.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index ee5eda4..2396a10 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -3,6 +3,8 @@ * (C) 2009,2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 798a122..93e6074 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -1,20 +1,20 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 3c09aca..95ac9f8 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -1,10 +1,11 @@ /*! \file gsm23003.c * Utility function implementations related to 3GPP TS 23.003 */ /* - * (C) 2017 sysmocom s.f.m.c. GmbH + * (C) 2017 sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 10e2b80..a7daea4 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 105acba..1baf287 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_04_08_gprs.c b/src/gsm/gsm_04_08_gprs.c index 43da27e..608fa8c 100644 --- a/src/gsm/gsm_04_08_gprs.c +++ b/src/gsm/gsm_04_08_gprs.c @@ -2,10 +2,12 @@ /* * (C) 2009-2016 by Harald Welte * (C) 2010 by On-Waves - * (C) 2014-2015 by Sysmocom s.f.m.c. GmbH + * (C) 2014-2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 134b475..8464090 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index e5b0a66..eb829f7 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -1,10 +1,11 @@ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH + * Author: Jacob Erlbeck * (C) 2015 by Holger Hans Peter Freyther * (C) 2016 by Harald Welte * All Rights Reserved * - * Author: Jacob Erlbeck + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index fef73c3..e00e2d0 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/kasumi.c b/src/gsm/kasumi.c index c3a028b..7de5cd0 100644 --- a/src/gsm/kasumi.c +++ b/src/gsm/kasumi.c @@ -2,9 +2,10 @@ * Kasumi cipher and KGcore functions. */ /* * (C) 2013 by Max - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 6b58006..d14063e 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index db950a6..5efe755 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -1,11 +1,14 @@ /*! \file lapdm.c * GSM LAPDm (TS 04.06) implementation. */ /* - * (C) 2010-2011 by Harald Welte + * (C) 2010-2017 by Harald Welte * (C) 2010-2011 by Andreas Eversberg + * (C) 2014-2016 by sysmocom - s.f.m.c GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/milenage/aes-encblock.c b/src/gsm/milenage/aes-encblock.c index c4aa260..9fd73f6 100644 --- a/src/gsm/milenage/aes-encblock.c +++ b/src/gsm/milenage/aes-encblock.c @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal-enc.c b/src/gsm/milenage/aes-internal-enc.c index 4c00f96..6de9992 100644 --- a/src/gsm/milenage/aes-internal-enc.c +++ b/src/gsm/milenage/aes-internal-enc.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal.c b/src/gsm/milenage/aes-internal.c index 60c520c..c46654a 100644 --- a/src/gsm/milenage/aes-internal.c +++ b/src/gsm/milenage/aes-internal.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes.h b/src/gsm/milenage/aes.h index ce42b20..5410c36 100644 --- a/src/gsm/milenage/aes.h +++ b/src/gsm/milenage/aes.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_i.h b/src/gsm/milenage/aes_i.h index 6df019a..3e0fd21 100644 --- a/src/gsm/milenage/aes_i.h +++ b/src/gsm/milenage/aes_i.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_wrap.h b/src/gsm/milenage/aes_wrap.h index 7d4d5d9..b644d4c 100644 --- a/src/gsm/milenage/aes_wrap.h +++ b/src/gsm/milenage/aes_wrap.h @@ -17,6 +17,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 012b399..7cf3312 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -12,6 +12,8 @@ * * See README and COPYING for more details. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * This file implements an example authentication algorithm defined for 3GPP * AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow * EAP-AKA to be tested properly with real USIM cards. diff --git a/src/gsm/milenage/milenage.h b/src/gsm/milenage/milenage.h index 1a4364d..ea93fda 100644 --- a/src/gsm/milenage/milenage.h +++ b/src/gsm/milenage/milenage.h @@ -11,6 +11,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/oap.c b/src/gsm/oap.c index aab5cac..a133889 100644 --- a/src/gsm/oap.c +++ b/src/gsm/oap.c @@ -1,8 +1,9 @@ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 2a2af1f..abda932 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -1,8 +1,12 @@ /* - * (C) 2008-2010 by Harald Welte + * (C) 2008-2017 by Harald Welte + * (C) 2013 by Holger Freyther + * (C) 2014-2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/rxlev_stat.c b/src/gsm/rxlev_stat.c index 2ff0ac8..9c650cc 100644 --- a/src/gsm/rxlev_stat.c +++ b/src/gsm/rxlev_stat.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/sysinfo.c b/src/gsm/sysinfo.c index b73bb0c..b615871 100644 --- a/src/gsm/sysinfo.c +++ b/src/gsm/sysinfo.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b1b1034..ead856c 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -1,7 +1,10 @@ -/* (C) 2008-2010 by Harald Welte +/* (C) 2008-2017 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 28149c0..8f9496a 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging.c b/src/logging.c index fa733cd..20ec443 100644 --- a/src/logging.c +++ b/src/logging.c @@ -5,6 +5,8 @@ * (C) 2008 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c index d0aa47b..ec6757c 100644 --- a/src/logging_gsmtap.c +++ b/src/logging_gsmtap.c @@ -9,6 +9,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_syslog.c b/src/logging_syslog.c index d0d6a96..f980689 100644 --- a/src/logging_syslog.c +++ b/src/logging_syslog.c @@ -4,6 +4,8 @@ * (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/loggingrb.c b/src/loggingrb.c index d3dd254..4a80cc8 100644 --- a/src/loggingrb.c +++ b/src/loggingrb.c @@ -4,6 +4,8 @@ * (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/macaddr.c b/src/macaddr.c index 5c68d05..afa7c93 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgb.c b/src/msgb.c index 6fcbe53..faef09e 100644 --- a/src/msgb.c +++ b/src/msgb.c @@ -2,6 +2,8 @@ * (C) 2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgfile.c b/src/msgfile.c index 8517099..278b9a7 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -5,6 +5,8 @@ * (C) 2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/panic.c b/src/panic.c index 2a8b1ae..a08f89f 100644 --- a/src/panic.c +++ b/src/panic.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/plugin.c b/src/plugin.c index 264171c..40de4f8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/prbs.c b/src/prbs.c index be52fd4..8fa04bb 100644 --- a/src/prbs.c +++ b/src/prbs.c @@ -1,5 +1,9 @@ /* Osmocom implementation of pseudo-random bit sequence generation */ -/* (C) 2017 by Harald Welte */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include #include diff --git a/src/prim.c b/src/prim.c index d18dbd7..3c8a7f1 100644 --- a/src/prim.c +++ b/src/prim.c @@ -1,4 +1,10 @@ -/*! \addtogroup prim +/*! + * (C) 2015-2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * \addtogroup prim * @{ * \file prim.c */ diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index b77ffe9..2a99066 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -1,7 +1,26 @@ /*! \file pseudotalloc.c * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "talloc.h" #include diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index 3ce9f37..ae2e1fc 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -1,7 +1,25 @@ /*! \file talloc.h * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 296cc16..5464490 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/rbtree.c b/src/rbtree.c index f0ebb8c..211978f 100644 --- a/src/rbtree.c +++ b/src/rbtree.c @@ -2,7 +2,9 @@ Red Black Trees (C) 1999 Andrea Arcangeli (C) 2002 David Woodhouse - + + SPDX-License-Identifier: GPL-2.0+ + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or diff --git a/src/select.c b/src/select.c index 4b98b62..1c62e01 100644 --- a/src/select.c +++ b/src/select.c @@ -5,6 +5,9 @@ * of the linux 2.4 netfilter subsystem. */ /* * (C) 2000-2009 by Harald Welte + * All Rights Reserverd. + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/sercomm.c b/src/sercomm.c index 07b1aa0..2639bf8 100644 --- a/src/sercomm.c +++ b/src/sercomm.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/serial.c b/src/serial.c index 8ddd38e..1b5a4cf 100644 --- a/src/serial.c +++ b/src/serial.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/signal.c b/src/signal.c index 0c56465..745d7c3 100644 --- a/src/signal.c +++ b/src/signal.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c index 1073429..e6ba0d0 100644 --- a/src/sim/card_fs_isim.c +++ b/src/sim/card_fs_isim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c index 1411129..f66e391 100644 --- a/src/sim/card_fs_sim.c +++ b/src/sim/card_fs_sim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c index 80f3284..7bf0279 100644 --- a/src/sim/card_fs_tetra.c +++ b/src/sim/card_fs_tetra.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_uicc.c b/src/sim/card_fs_uicc.c index 8ff8936..af6061c 100644 --- a/src/sim/card_fs_uicc.c +++ b/src/sim/card_fs_uicc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/class_tables.c b/src/sim/class_tables.c index fcf67f0..593b2e8 100644 --- a/src/sim/class_tables.c +++ b/src/sim/class_tables.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, or * any later version as published by the Free Software Foundation. diff --git a/src/sim/core.c b/src/sim/core.c index 8da839c..a78cecc 100644 --- a/src/sim/core.c +++ b/src/sim/core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader.c b/src/sim/reader.c index f39829b..d1a9ae6 100644 --- a/src/sim/reader.c +++ b/src/sim/reader.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader_pcsc.c b/src/sim/reader_pcsc.c index 5b29638..f22103f 100644 --- a/src/sim/reader_pcsc.c +++ b/src/sim/reader_pcsc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/socket.c b/src/socket.c index b516abf..82ccfed 100644 --- a/src/socket.c +++ b/src/socket.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stat_item.c b/src/stat_item.c index cbcdebc..cb9b90f 100644 --- a/src/stat_item.c +++ b/src/stat_item.c @@ -1,11 +1,13 @@ /*! \file stat_item.c * utility routines for keeping statistical values */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH * (C) 2009-2010 by Harald Welte + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats.c b/src/stats.c index ff31ff6..b5adbf2 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,11 +1,11 @@ /*! \file stats.c */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats_statsd.c b/src/stats_statsd.c index 5145bf7..c11c013 100644 --- a/src/stats_statsd.c +++ b/src/stats_statsd.c @@ -1,10 +1,10 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/strrb.c b/src/strrb.c index 6bfb179..461fdec 100644 --- a/src/strrb.c +++ b/src/strrb.c @@ -19,6 +19,8 @@ * (C) 2012-2013, Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer.c b/src/timer.c index bf46c24..9ec7a00 100644 --- a/src/timer.c +++ b/src/timer.c @@ -7,6 +7,8 @@ * Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer_gettimeofday.c b/src/timer_gettimeofday.c index 4298805..15b5e31 100644 --- a/src/timer_gettimeofday.c +++ b/src/timer_gettimeofday.c @@ -1,8 +1,9 @@ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Authors: Neels Hofmeyr * All Rights Reserved * - * Authors: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/utils.c b/src/utils.c index a62f5e9..f63ff89 100644 --- a/src/utils.c +++ b/src/utils.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/buffer.c b/src/vty/buffer.c index 1935aa1..e68e3a2 100644 --- a/src/vty/buffer.c +++ b/src/vty/buffer.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1998 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify diff --git a/src/vty/command.c b/src/vty/command.c index 98d86d2..5f7a42c 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -3,6 +3,12 @@ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + Copyright (C) 2010-2011 Holger Hans Peter Freyther + Copyright (C) 2012 Sylvain Munaut + Copyright (C) 2013,2015 Harald Welte + Copyright (C) 2013,2017 sysmocom - s.f.m.c. GmbH + + SPDX-License-Identifier: GPL-2.0+ This file is part of GNU Zebra. diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c index 50c7fd5..8abb9c9 100644 --- a/src/vty/fsm_vty.c +++ b/src/vty/fsm_vty.c @@ -2,6 +2,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 9b7d10a..215394f 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -3,6 +3,8 @@ * (C) 2009-2014 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 2ccbf66..6c09c38 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -1,9 +1,11 @@ /* * (C) 2009-2010 by Harald Welte * (C) 2009-2014 by Holger Hans Peter Freyther - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c index 136a1b4..601b696 100644 --- a/src/vty/talloc_ctx_vty.c +++ b/src/vty/talloc_ctx_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 40154fe..0ccf8dc 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -1,6 +1,9 @@ -/* (C) 2009 by Holger Hans Peter Freyther +/* (C) 2009-2010 by Holger Hans Peter Freyther + * (C) 2010 by Sylvain Munaut * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/utils.c b/src/vty/utils.c index e7aeb88..cdd2c8f 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -2,8 +2,11 @@ * Utility routines for printing common objects in the Osmocom world. */ /* * (C) 2009-2010 by Harald Welte + * (C) 2013,2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -251,4 +254,4 @@ return str; } -/*! @} */ +t/*! @} */ diff --git a/src/vty/vector.c b/src/vty/vector.c index ee07cbd..f9e5ec3 100644 --- a/src/vty/vector.c +++ b/src/vty/vector.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1997 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify it diff --git a/src/vty/vty.c b/src/vty/vty.c index aef73b3..e741a66 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -22,7 +22,7 @@ * * \section sec_copyright Copyright and License * Copyright ? 1997-2007 - Kuninhiro Ishiguro\n - * Copyright ? 2008-2011 - Harald Welte, Holger Freyther and contributors\n + * Copyright ? 2008-2012 - Harald Welte, Holger Freyther and contributors\n * All rights reserved. \n\n * The source code of libosmovty is licensed under the terms of the GNU * General Public License as published by the Free Software Foundation; @@ -46,6 +46,7 @@ * */ +/* SPDX-License-Identifier: GPL-2.0+ */ #include #include diff --git a/src/write_queue.c b/src/write_queue.c index 203815b..fb6839a 100644 --- a/src/write_queue.c +++ b/src/write_queue.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index cb88b01..a631712 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -1,6 +1,6 @@ /* * (C) 2012 by Holger Hans Peter Freyther - * (C) 2017 by sysmocom s.m.f.c. GmbH + * (C) 2017 by sysmocom - s.m.f.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c index b204d77..7a10fc5 100644 --- a/tests/codec/codec_test.c +++ b/tests/codec/codec_test.c @@ -1,10 +1,12 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -12,7 +14,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/tests/gb/gprs_bssgp_test.c b/tests/gb/gprs_bssgp_test.c index 3de05dd..1624a31 100644 --- a/tests/gb/gprs_bssgp_test.c +++ b/tests/gb/gprs_bssgp_test.c @@ -1,10 +1,12 @@ /* Test routines for the BSSGP implementation in libosmogb * - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck * * Skeleton based on bssgp_fc_test.c * (C) 2012 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gb/gprs_ns_test.c b/tests/gb/gprs_ns_test.c index fac3c36..7e6b85c 100644 --- a/tests/gb/gprs_ns_test.c +++ b/tests/gb/gprs_ns_test.c @@ -1,6 +1,8 @@ /* test routines for NS connection handling - * (C) 2013 by sysmocom s.f.m.c. GmbH + * (C) 2013 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gsm23003/gsm23003_test.c b/tests/gsm23003/gsm23003_test.c index a408b73..64d756d 100644 --- a/tests/gsm23003/gsm23003_test.c +++ b/tests/gsm23003/gsm23003_test.c @@ -1,8 +1,9 @@ /* * (C) 2017 by sysmocom s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 0dccaa4..d6c0495 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -1,9 +1,11 @@ /* * (C) 2011 by Holger Hans Peter Freyther * (C) 2011 by On-Waves - * (C) 2014 by Daniel Willmann + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Daniel Willmann * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index 0c4c16e..dea5c11 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -1,9 +1,9 @@ /* Test Osmocom Authentication Protocol */ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 59fc449..b302b37 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -1,9 +1,11 @@ /* tests for statistics */ /* - * (C) 2015 Sysmocom s.m.f.c. GmbH + * (C) 2015 sysmocom - s.m.f.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/strrb/strrb_test.c b/tests/strrb/strrb_test.c index 6140ac9..4282d1a 100644 --- a/tests/strrb/strrb_test.c +++ b/tests/strrb/strrb_test.c @@ -1,6 +1,8 @@ /* (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-3.0+ + * * This program is iree software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 2542baf..42646eb 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -1,9 +1,11 @@ -/* (C) 2013 by Jacob Erlbeck +/* (C) 2013 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * All Rights Reserved * - * This program is iree software; you can redistribute it and/or modify + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- To view, visit https://gerrit.osmocom.org/4801 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:09:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:09:34 +0000 Subject: [PATCH] libosmo-abis[master]: debian/copyright: fix upstream-name Message-ID: Review at https://gerrit.osmocom.org/4802 debian/copyright: fix upstream-name Change-Id: Ia7b07524f9c3e6013992ee4ba5151d951b7d9eda --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/02/4802/1 diff --git a/debian/copyright b/debian/copyright index fdcf686..d6ebceb 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libosmocore +Upstream-Name: libosmo-abis Source: git://git.osmocom.org/libosmo-abis.git Files: * -- To view, visit https://gerrit.osmocom.org/4802 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7b07524f9c3e6013992ee4ba5151d951b7d9eda Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:09:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:09:37 +0000 Subject: [PATCH] libosmo-abis[master]: Add SPDX-License-Identifier to all source files Message-ID: Review at https://gerrit.osmocom.org/4803 Add SPDX-License-Identifier to all source files Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7 --- M debian/copyright M src/e1_input.c M src/e1_input_vty.c M src/init.c M src/input/dahdi.c M src/input/ipaccess.c M src/input/lapd.c M src/input/lapd_pcap.c M src/input/misdn.c M src/input/rs232.c M src/input/unixsocket.c M src/subchan_demux.c M src/trau/osmo_ortp.c M src/trau_frame.c M tests/ipa_recv/ipa_recv_test.c 15 files changed, 31 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/03/4803/1 diff --git a/debian/copyright b/debian/copyright index d6ebceb..41573fe 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,7 +9,7 @@ 2010,2014 On-Waves 2011-2014 Pablo Neira Ayuso 2012 Tobias Engel - 2014 Sysmocom s.f.m.c. GmBH + 2014 sysmocom - s.f.m.c. GmBH License: AGPL-3+ Files: src/input/lapd.c diff --git a/src/e1_input.c b/src/e1_input.c index 3cf810f..29ba440 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index 2bd56a4..0e4575f 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -2,6 +2,8 @@ /* (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/init.c b/src/init.c index 73453c4..b522592 100644 --- a/src/init.c +++ b/src/init.c @@ -1,6 +1,8 @@ /* (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 911f862..47276a7 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 63ee167..acb2db0 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/lapd.c b/src/input/lapd.c index 4b5077b..a72a19b 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -8,6 +8,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/input/lapd_pcap.c b/src/input/lapd_pcap.c index 7374694..77d4971 100644 --- a/src/input/lapd_pcap.c +++ b/src/input/lapd_pcap.c @@ -5,6 +5,8 @@ * Author: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/misdn.c b/src/input/misdn.c index 347b7bf..bdca9d5 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/rs232.c b/src/input/rs232.c index 9da01a3..c801ab2 100644 --- a/src/input/rs232.c +++ b/src/input/rs232.c @@ -7,6 +7,8 @@ * Authors: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 63bd796..03e2909 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -1,12 +1,13 @@ /* OpenBSC Abis receive lapd over a unix socket */ -/* (C) 2016 by sysmocom s.f.m.c. GmbH - * +/* (C) 2016 by sysmocom - s.f.m.c. GmbH * Author: Alexander Couzens * Based on other e1_input drivers. * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/subchan_demux.c b/src/subchan_demux.c index 238056c..d15c4b8 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -3,6 +3,8 @@ /* (C) 2009 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index c49a23d..fab020d 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -2,6 +2,8 @@ * (C) 2011 by On-Waves e.h.f * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/trau_frame.c b/src/trau_frame.c index 2f5a003..717bc32 100644 --- a/src/trau_frame.c +++ b/src/trau_frame.c @@ -3,6 +3,8 @@ /* (C) 2009 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/tests/ipa_recv/ipa_recv_test.c b/tests/ipa_recv/ipa_recv_test.c index 0f56926..33cdcea 100644 --- a/tests/ipa_recv/ipa_recv_test.c +++ b/tests/ipa_recv/ipa_recv_test.c @@ -2,10 +2,12 @@ /* * (C) 2014 by On-Waves - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or -- To view, visit https://gerrit.osmocom.org/4803 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:21:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:21:20 +0000 Subject: [PATCH] libosmo-netif[master]: debian/control: Fix upstream-name Message-ID: Review at https://gerrit.osmocom.org/4804 debian/control: Fix upstream-name Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/04/4804/1 diff --git a/debian/copyright b/debian/copyright index 1c1eb91..bc4ec7c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libosmocore +Upstream-Name: libosmo-netif Source: git://git.osmocom.org/libosmo-netif.git Files: * -- To view, visit https://gerrit.osmocom.org/4804 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:21:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:21:21 +0000 Subject: [PATCH] libosmo-netif[master]: debian/copyright: There are no AGPL licensed files left Message-ID: Review at https://gerrit.osmocom.org/4805 debian/copyright: There are no AGPL licensed files left Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0 --- M debian/copyright 1 file changed, 0 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/05/4805/1 diff --git a/debian/copyright b/debian/copyright index bc4ec7c..57fe8c0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -7,11 +7,6 @@ 2012-2013 Pablo Neira Ayuso License: GPL-2+ -Files: src/rs232.c -Copyright: 2008-2011 Harald Welte - Pablo Neira Ayuso -License: AGPL-3+ - Files: debian/* Copyright: 2013-2015 Holger Hans Peter Freyther 2015 Ruben Undheim @@ -34,18 +29,3 @@ . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - - -License: AGPL-3+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -- To view, visit https://gerrit.osmocom.org/4805 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:21:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:21:21 +0000 Subject: [PATCH] libosmo-netif[master]: src/rs232.c: Fix accidential reference to GPLv3+ instead of ... Message-ID: Review at https://gerrit.osmocom.org/4806 src/rs232.c: Fix accidential reference to GPLv3+ instead of GPLv2+ Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7 --- M src/rs232.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/06/4806/1 diff --git a/src/rs232.c b/src/rs232.c index df73452..294d5a2 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -9,7 +9,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- To view, visit https://gerrit.osmocom.org/4806 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:21:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:21:21 +0000 Subject: [PATCH] libosmo-netif[master]: Add SPDX-License-Identifier + Copyright statements Message-ID: Review at https://gerrit.osmocom.org/4807 Add SPDX-License-Identifier + Copyright statements Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec --- M src/amr.c M src/channel.c M src/channel/abis/ipa_stream_client.c M src/channel/abis/ipa_stream_server.c M src/datagram.c M src/ipa.c M src/ipa_unit.c M src/osmux.c M src/rs232.c M src/rtp.c M src/stream.c 11 files changed, 164 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/07/4807/1 diff --git a/src/amr.c b/src/amr.c index 16c81ac..6f94a69 100644 --- a/src/amr.c +++ b/src/amr.c @@ -2,6 +2,8 @@ * (C) 2012 by Pablo Neira Ayuso * (C) 2012 by On Waves ehf * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/channel.c b/src/channel.c index 2cae973..2784f22 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1,3 +1,22 @@ +/* (C) 2011-2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/channel/abis/ipa_stream_client.c b/src/channel/abis/ipa_stream_client.c index 555c9ca..c610730 100644 --- a/src/channel/abis/ipa_stream_client.c +++ b/src/channel/abis/ipa_stream_client.c @@ -1,3 +1,22 @@ +/* (C) 2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/src/channel/abis/ipa_stream_server.c b/src/channel/abis/ipa_stream_server.c index 07610df..1cd889c 100644 --- a/src/channel/abis/ipa_stream_server.c +++ b/src/channel/abis/ipa_stream_server.c @@ -1,3 +1,22 @@ +/* (C) 2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/src/datagram.c b/src/datagram.c index 89643b8..634e702 100644 --- a/src/datagram.c +++ b/src/datagram.c @@ -1,3 +1,23 @@ +/* (C) 2011 by Pablo Neira Ayuso + * (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/ipa.c b/src/ipa.c index 0ba33ce..c924382 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -1,3 +1,22 @@ +/* (C) 2011-2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/ipa_unit.c b/src/ipa_unit.c index 807beba..b5400ed 100644 --- a/src/ipa_unit.c +++ b/src/ipa_unit.c @@ -1,3 +1,23 @@ +/* (C) 2012-2013 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include diff --git a/src/osmux.c b/src/osmux.c index 70e220d..88674a7 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -1,6 +1,9 @@ /* - * (C) 2012 by Pablo Neira Ayuso + * (C) 2012-2017 by Pablo Neira Ayuso * (C) 2012 by On Waves ehf + * (C) 2015-2017 by sysmocom - s.f.m.c. GmbH + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/rs232.c b/src/rs232.c index 294d5a2..da5b56b 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -7,6 +7,8 @@ * Authors: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/rtp.c b/src/rtp.c index 48cb9b0..5718c5f 100644 --- a/src/rtp.c +++ b/src/rtp.c @@ -1,3 +1,22 @@ +/* (C) 2012,2017 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/stream.c b/src/stream.c index 1abe657..71c9b17 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1,3 +1,24 @@ +/* (C) 2011 by Pablo Neira Ayuso + * (C) 2015-2016 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/4807 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:26:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:26:07 +0000 Subject: [PATCH] libosmo-sccp[master]: debian/copyright: Fix upstream-name Message-ID: Review at https://gerrit.osmocom.org/4808 debian/copyright: Fix upstream-name Change-Id: I0ee80d9d6ffe7936849c23942498fe9b7058a88a --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/08/4808/1 diff --git a/debian/copyright b/debian/copyright index 436675c..ecf19e8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libopen-sccp +Upstream-Name: libosmo-sccp Source: http://cgit.osmocom.org/libosmo-sccp/ Files: * -- To view, visit https://gerrit.osmocom.org/4808 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ee80d9d6ffe7936849c23942498fe9b7058a88a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:26:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:26:07 +0000 Subject: [PATCH] libosmo-sccp[master]: Add SPDX-License-Identifier + missing copyright statements Message-ID: Review at https://gerrit.osmocom.org/4809 Add SPDX-License-Identifier + missing copyright statements Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534 --- M debian/copyright M src/ipa.c M src/m3ua.c M src/mtp_pcap.c M src/osmo_ss7.c M src/osmo_ss7_hmrt.c M src/osmo_ss7_vty.c M src/sccp.c M src/sccp2sua.c M src/sccp_helpers.c M src/sccp_sap.c M src/sccp_sclc.c M src/sccp_scoc.c M src/sccp_scrc.c M src/sccp_user.c M src/sccp_vty.c M src/sua.c M src/xua_as_fsm.c M src/xua_asp_fsm.c M src/xua_default_lm_fsm.c M src/xua_msg.c M src/xua_rkm.c 22 files changed, 61 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/09/4809/1 diff --git a/debian/copyright b/debian/copyright index ecf19e8..b33ae7d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,7 +5,7 @@ Files: * Copyright: 2009-2010,2013 On-Waves 2009-2011,2013 Holger Hans Peter Freyther - 2010 Harald Welte + 2010,2016-2017 Harald Welte License: GPL-2+ Files: tests/m2ua/m2ua_test.c diff --git a/src/ipa.c b/src/ipa.c index 2671896..9f04746 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/m3ua.c b/src/m3ua.c index c43dfa4..f1fe3f1 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/mtp_pcap.c b/src/mtp_pcap.c index 052813f..e83e6f7 100644 --- a/src/mtp_pcap.c +++ b/src/mtp_pcap.c @@ -4,6 +4,8 @@ * (C) 2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7b0b0e4..86fb45c 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 8165a36..51875b1 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -2,6 +2,26 @@ * MTP Level 3 - Signalling message handling (SMH) Figure 23/Q.704 ***********************************************************************/ +/* (C) 2015-2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include #include diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 61f9747..4c67508 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp.c b/src/sccp.c index 6c77cc4..a15a84b 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp2sua.c b/src/sccp2sua.c index d97906e..afc38c7 100644 --- a/src/sccp2sua.c +++ b/src/sccp2sua.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * based on my 2011 Erlang implementation osmo_ss7/src/sua_sccp_conv.erl * * References: ITU-T Q.713 and IETF RFC 3868 diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index f752e2a..078ca2b 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -4,6 +4,8 @@ * (C) 2016 by sysmocom s.m.f.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_sap.c b/src/sccp_sap.c index 3646685..526179e 100644 --- a/src/sccp_sap.c +++ b/src/sccp_sap.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c index 8f9e577..e4dbae6 100644 --- a/src/sccp_sclc.c +++ b/src/sccp_sclc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index 74fb0e7..e0742f9 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index 2afd696..dca5645 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_user.c b/src/sccp_user.c index 21b2eed..d9de8d7 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * based on my 2011 Erlang implementation osmo_ss7/src/sua_sccp_conv.erl * * References: ITU-T Q.713 and IETF RFC 3868 diff --git a/src/sccp_vty.c b/src/sccp_vty.c index 7f0a0de..bcedbb6 100644 --- a/src/sccp_vty.c +++ b/src/sccp_vty.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sua.c b/src/sua.c index 7575021..4835665 100644 --- a/src/sua.c +++ b/src/sua.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 8f764f1..59a71ba 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -3,6 +3,8 @@ * * All Rights reserved. * + * SPDX-License-Identifier: GPL-2.0+ + * * Based on Erlang implementation xua_as_fsm.erl in osmo-ss7.git */ diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 823402e..1b802ce 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -3,6 +3,8 @@ * * All Rights reserved. * + * SPDX-License-Identifier: GPL-2.0+ + * * Based on my earlier Erlang implementation xua_asp_fsm.erl in * osmo-ss7.git */ diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 64f26c3..eba89c2 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -2,6 +2,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_msg.c b/src/xua_msg.c index 05430a4..d56009f 100644 --- a/src/xua_msg.c +++ b/src/xua_msg.c @@ -2,6 +2,8 @@ /* (C) 2011 by Holger Hans Peter Freyther * (C) 2016-2017 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_rkm.c b/src/xua_rkm.c index d2971bc..b3c5be7 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -2,6 +2,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or -- To view, visit https://gerrit.osmocom.org/4809 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:31:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:31:44 +0000 Subject: libosmo-abis[master]: debian/copyright: fix upstream-name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4802 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia7b07524f9c3e6013992ee4ba5151d951b7d9eda Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:31:49 +0000 Subject: libosmo-abis[master]: Add SPDX-License-Identifier to all source files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4803 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:31:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:31:50 +0000 Subject: [MERGED] libosmo-abis[master]: Add SPDX-License-Identifier to all source files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add SPDX-License-Identifier to all source files ...................................................................... Add SPDX-License-Identifier to all source files Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7 --- M debian/copyright M src/e1_input.c M src/e1_input_vty.c M src/init.c M src/input/dahdi.c M src/input/ipaccess.c M src/input/lapd.c M src/input/lapd_pcap.c M src/input/misdn.c M src/input/rs232.c M src/input/unixsocket.c M src/subchan_demux.c M src/trau/osmo_ortp.c M src/trau_frame.c M tests/ipa_recv/ipa_recv_test.c 15 files changed, 31 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index d6ebceb..41573fe 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,7 +9,7 @@ 2010,2014 On-Waves 2011-2014 Pablo Neira Ayuso 2012 Tobias Engel - 2014 Sysmocom s.f.m.c. GmBH + 2014 sysmocom - s.f.m.c. GmBH License: AGPL-3+ Files: src/input/lapd.c diff --git a/src/e1_input.c b/src/e1_input.c index 3cf810f..29ba440 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index 2bd56a4..0e4575f 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -2,6 +2,8 @@ /* (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/init.c b/src/init.c index 73453c4..b522592 100644 --- a/src/init.c +++ b/src/init.c @@ -1,6 +1,8 @@ /* (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 911f862..47276a7 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 63ee167..acb2db0 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/lapd.c b/src/input/lapd.c index 4b5077b..a72a19b 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -8,6 +8,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/input/lapd_pcap.c b/src/input/lapd_pcap.c index 7374694..77d4971 100644 --- a/src/input/lapd_pcap.c +++ b/src/input/lapd_pcap.c @@ -5,6 +5,8 @@ * Author: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/misdn.c b/src/input/misdn.c index 347b7bf..bdca9d5 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/rs232.c b/src/input/rs232.c index 9da01a3..c801ab2 100644 --- a/src/input/rs232.c +++ b/src/input/rs232.c @@ -7,6 +7,8 @@ * Authors: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 63bd796..03e2909 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -1,12 +1,13 @@ /* OpenBSC Abis receive lapd over a unix socket */ -/* (C) 2016 by sysmocom s.f.m.c. GmbH - * +/* (C) 2016 by sysmocom - s.f.m.c. GmbH * Author: Alexander Couzens * Based on other e1_input drivers. * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/subchan_demux.c b/src/subchan_demux.c index 238056c..d15c4b8 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -3,6 +3,8 @@ /* (C) 2009 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index c49a23d..fab020d 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -2,6 +2,8 @@ * (C) 2011 by On-Waves e.h.f * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/trau_frame.c b/src/trau_frame.c index 2f5a003..717bc32 100644 --- a/src/trau_frame.c +++ b/src/trau_frame.c @@ -3,6 +3,8 @@ /* (C) 2009 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/tests/ipa_recv/ipa_recv_test.c b/tests/ipa_recv/ipa_recv_test.c index 0f56926..33cdcea 100644 --- a/tests/ipa_recv/ipa_recv_test.c +++ b/tests/ipa_recv/ipa_recv_test.c @@ -2,10 +2,12 @@ /* * (C) 2014 by On-Waves - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: AGPL-3.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation; either version 3 of the License, or -- To view, visit https://gerrit.osmocom.org/4803 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:31:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:31:51 +0000 Subject: [MERGED] libosmo-abis[master]: debian/copyright: fix upstream-name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/copyright: fix upstream-name ...................................................................... debian/copyright: fix upstream-name Change-Id: Ia7b07524f9c3e6013992ee4ba5151d951b7d9eda --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index fdcf686..d6ebceb 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libosmocore +Upstream-Name: libosmo-abis Source: git://git.osmocom.org/libosmo-abis.git Files: * -- To view, visit https://gerrit.osmocom.org/4802 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7b07524f9c3e6013992ee4ba5151d951b7d9eda Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:01 +0000 Subject: libosmo-sccp[master]: debian/copyright: Fix upstream-name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4808 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ee80d9d6ffe7936849c23942498fe9b7058a88a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:11 +0000 Subject: libosmo-sccp[master]: Add SPDX-License-Identifier + missing copyright statements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4809 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:13 +0000 Subject: [MERGED] libosmo-sccp[master]: Add SPDX-License-Identifier + missing copyright statements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add SPDX-License-Identifier + missing copyright statements ...................................................................... Add SPDX-License-Identifier + missing copyright statements Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534 --- M debian/copyright M src/ipa.c M src/m3ua.c M src/mtp_pcap.c M src/osmo_ss7.c M src/osmo_ss7_hmrt.c M src/osmo_ss7_vty.c M src/sccp.c M src/sccp2sua.c M src/sccp_helpers.c M src/sccp_sap.c M src/sccp_sclc.c M src/sccp_scoc.c M src/sccp_scrc.c M src/sccp_user.c M src/sccp_vty.c M src/sua.c M src/xua_as_fsm.c M src/xua_asp_fsm.c M src/xua_default_lm_fsm.c M src/xua_msg.c M src/xua_rkm.c 22 files changed, 61 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index ecf19e8..b33ae7d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,7 +5,7 @@ Files: * Copyright: 2009-2010,2013 On-Waves 2009-2011,2013 Holger Hans Peter Freyther - 2010 Harald Welte + 2010,2016-2017 Harald Welte License: GPL-2+ Files: tests/m2ua/m2ua_test.c diff --git a/src/ipa.c b/src/ipa.c index 2671896..9f04746 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/m3ua.c b/src/m3ua.c index c43dfa4..f1fe3f1 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/mtp_pcap.c b/src/mtp_pcap.c index 052813f..e83e6f7 100644 --- a/src/mtp_pcap.c +++ b/src/mtp_pcap.c @@ -4,6 +4,8 @@ * (C) 2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7b0b0e4..86fb45c 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 8165a36..51875b1 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -2,6 +2,26 @@ * MTP Level 3 - Signalling message handling (SMH) Figure 23/Q.704 ***********************************************************************/ +/* (C) 2015-2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include #include diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 61f9747..4c67508 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp.c b/src/sccp.c index 6c77cc4..a15a84b 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp2sua.c b/src/sccp2sua.c index d97906e..afc38c7 100644 --- a/src/sccp2sua.c +++ b/src/sccp2sua.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * based on my 2011 Erlang implementation osmo_ss7/src/sua_sccp_conv.erl * * References: ITU-T Q.713 and IETF RFC 3868 diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index f752e2a..078ca2b 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -4,6 +4,8 @@ * (C) 2016 by sysmocom s.m.f.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_sap.c b/src/sccp_sap.c index 3646685..526179e 100644 --- a/src/sccp_sap.c +++ b/src/sccp_sap.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c index 8f9e577..e4dbae6 100644 --- a/src/sccp_sclc.c +++ b/src/sccp_sclc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index 74fb0e7..e0742f9 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index 2afd696..dca5645 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sccp_user.c b/src/sccp_user.c index 21b2eed..d9de8d7 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -3,6 +3,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * based on my 2011 Erlang implementation osmo_ss7/src/sua_sccp_conv.erl * * References: ITU-T Q.713 and IETF RFC 3868 diff --git a/src/sccp_vty.c b/src/sccp_vty.c index 7f0a0de..bcedbb6 100644 --- a/src/sccp_vty.c +++ b/src/sccp_vty.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sua.c b/src/sua.c index 7575021..4835665 100644 --- a/src/sua.c +++ b/src/sua.c @@ -3,6 +3,8 @@ /* (C) 2015-2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 8f764f1..59a71ba 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -3,6 +3,8 @@ * * All Rights reserved. * + * SPDX-License-Identifier: GPL-2.0+ + * * Based on Erlang implementation xua_as_fsm.erl in osmo-ss7.git */ diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 823402e..1b802ce 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -3,6 +3,8 @@ * * All Rights reserved. * + * SPDX-License-Identifier: GPL-2.0+ + * * Based on my earlier Erlang implementation xua_asp_fsm.erl in * osmo-ss7.git */ diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 64f26c3..eba89c2 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -2,6 +2,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_msg.c b/src/xua_msg.c index 05430a4..d56009f 100644 --- a/src/xua_msg.c +++ b/src/xua_msg.c @@ -2,6 +2,8 @@ /* (C) 2011 by Holger Hans Peter Freyther * (C) 2016-2017 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/xua_rkm.c b/src/xua_rkm.c index d2971bc..b3c5be7 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -2,6 +2,8 @@ /* (C) 2017 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or -- To view, visit https://gerrit.osmocom.org/4809 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:13 +0000 Subject: [MERGED] libosmo-sccp[master]: debian/copyright: Fix upstream-name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/copyright: Fix upstream-name ...................................................................... debian/copyright: Fix upstream-name Change-Id: I0ee80d9d6ffe7936849c23942498fe9b7058a88a --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index 436675c..ecf19e8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libopen-sccp +Upstream-Name: libosmo-sccp Source: http://cgit.osmocom.org/libosmo-sccp/ Files: * -- To view, visit https://gerrit.osmocom.org/4808 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ee80d9d6ffe7936849c23942498fe9b7058a88a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:27 +0000 Subject: libosmo-netif[master]: debian/control: Fix upstream-name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4804 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:33 +0000 Subject: libosmo-netif[master]: debian/copyright: There are no AGPL licensed files left In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4805 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:39 +0000 Subject: libosmo-netif[master]: src/rs232.c: Fix accidential reference to GPLv3+ instead of ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4806 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:49 +0000 Subject: libosmo-netif[master]: Add SPDX-License-Identifier + Copyright statements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4807 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:50 +0000 Subject: [MERGED] libosmo-netif[master]: Add SPDX-License-Identifier + Copyright statements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add SPDX-License-Identifier + Copyright statements ...................................................................... Add SPDX-License-Identifier + Copyright statements Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec --- M src/amr.c M src/channel.c M src/channel/abis/ipa_stream_client.c M src/channel/abis/ipa_stream_server.c M src/datagram.c M src/ipa.c M src/ipa_unit.c M src/osmux.c M src/rs232.c M src/rtp.c M src/stream.c 11 files changed, 164 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/amr.c b/src/amr.c index 16c81ac..6f94a69 100644 --- a/src/amr.c +++ b/src/amr.c @@ -2,6 +2,8 @@ * (C) 2012 by Pablo Neira Ayuso * (C) 2012 by On Waves ehf * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/channel.c b/src/channel.c index 2cae973..2784f22 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1,3 +1,22 @@ +/* (C) 2011-2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/channel/abis/ipa_stream_client.c b/src/channel/abis/ipa_stream_client.c index 555c9ca..c610730 100644 --- a/src/channel/abis/ipa_stream_client.c +++ b/src/channel/abis/ipa_stream_client.c @@ -1,3 +1,22 @@ +/* (C) 2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/src/channel/abis/ipa_stream_server.c b/src/channel/abis/ipa_stream_server.c index 07610df..1cd889c 100644 --- a/src/channel/abis/ipa_stream_server.c +++ b/src/channel/abis/ipa_stream_server.c @@ -1,3 +1,22 @@ +/* (C) 2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include #include #include diff --git a/src/datagram.c b/src/datagram.c index 89643b8..634e702 100644 --- a/src/datagram.c +++ b/src/datagram.c @@ -1,3 +1,23 @@ +/* (C) 2011 by Pablo Neira Ayuso + * (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/ipa.c b/src/ipa.c index 0ba33ce..c924382 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -1,3 +1,22 @@ +/* (C) 2011-2012 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/ipa_unit.c b/src/ipa_unit.c index 807beba..b5400ed 100644 --- a/src/ipa_unit.c +++ b/src/ipa_unit.c @@ -1,3 +1,23 @@ +/* (C) 2012-2013 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include diff --git a/src/osmux.c b/src/osmux.c index 70e220d..88674a7 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -1,6 +1,9 @@ /* - * (C) 2012 by Pablo Neira Ayuso + * (C) 2012-2017 by Pablo Neira Ayuso * (C) 2012 by On Waves ehf + * (C) 2015-2017 by sysmocom - s.f.m.c. GmbH + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/rs232.c b/src/rs232.c index 294d5a2..da5b56b 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -7,6 +7,8 @@ * Authors: Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/rtp.c b/src/rtp.c index 48cb9b0..5718c5f 100644 --- a/src/rtp.c +++ b/src/rtp.c @@ -1,3 +1,22 @@ +/* (C) 2012,2017 by Pablo Neira Ayuso + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #include #include #include diff --git a/src/stream.c b/src/stream.c index 1abe657..71c9b17 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1,3 +1,24 @@ +/* (C) 2011 by Pablo Neira Ayuso + * (C) 2015-2016 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/4807 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:50 +0000 Subject: [MERGED] libosmo-netif[master]: src/rs232.c: Fix accidential reference to GPLv3+ instead of ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: src/rs232.c: Fix accidential reference to GPLv3+ instead of GPLv2+ ...................................................................... src/rs232.c: Fix accidential reference to GPLv3+ instead of GPLv2+ Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7 --- M src/rs232.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rs232.c b/src/rs232.c index df73452..294d5a2 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -9,7 +9,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- To view, visit https://gerrit.osmocom.org/4806 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:50 +0000 Subject: [MERGED] libosmo-netif[master]: debian/copyright: There are no AGPL licensed files left In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/copyright: There are no AGPL licensed files left ...................................................................... debian/copyright: There are no AGPL licensed files left Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0 --- M debian/copyright 1 file changed, 0 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index bc4ec7c..57fe8c0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -7,11 +7,6 @@ 2012-2013 Pablo Neira Ayuso License: GPL-2+ -Files: src/rs232.c -Copyright: 2008-2011 Harald Welte - Pablo Neira Ayuso -License: AGPL-3+ - Files: debian/* Copyright: 2013-2015 Holger Hans Peter Freyther 2015 Ruben Undheim @@ -34,18 +29,3 @@ . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - - -License: AGPL-3+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -- To view, visit https://gerrit.osmocom.org/4805 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:32:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:32:51 +0000 Subject: [MERGED] libosmo-netif[master]: debian/control: Fix upstream-name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/control: Fix upstream-name ...................................................................... debian/control: Fix upstream-name Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca --- M debian/copyright 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index 1c1eb91..bc4ec7c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libosmocore +Upstream-Name: libosmo-netif Source: git://git.osmocom.org/libosmo-netif.git Files: * -- To view, visit https://gerrit.osmocom.org/4804 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:35:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:35:20 +0000 Subject: [PATCH] libosmocore[master]: Fix/Update copyright notices; Add SPDX annotation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4801 to look at the new patch set (#2). Fix/Update copyright notices; Add SPDX annotation Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af --- M debian/copyright M include/osmocom/core/bitcomp.h M include/osmocom/core/bitvec.h M include/osmocom/core/stats.h M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/gsup.h M include/osmocom/gsm/oap.h M src/application.c M src/backtrace.c M src/bitcomp.c M src/bits.c M src/bitvec.c M src/codec/gsm610.c M src/codec/gsm620.c M src/codec/gsm660.c M src/codec/gsm690.c M src/coding/gsm0503_coding.c M src/coding/gsm0503_interleaving.c M src/coding/gsm0503_mapping.c M src/coding/gsm0503_parity.c M src/coding/gsm0503_tables.c M src/conv.c M src/conv_acc.c M src/conv_acc_generic.c M src/conv_acc_sse.c M src/conv_acc_sse_avx.c M src/conv_acc_sse_impl.h M src/counter.c M src/crc16.c M src/crcXXgen.c.tpl M src/ctrl/control_cmd.c M src/ctrl/control_if.c M src/ctrl/control_vty.c M src/ctrl/fsm_ctrl_commands.c M src/fsm.c M src/gb/common_vty.c M src/gb/gprs_bssgp.c M src/gb/gprs_bssgp_bss.c M src/gb/gprs_bssgp_util.c M src/gb/gprs_bssgp_vty.c M src/gb/gprs_ns.c M src/gb/gprs_ns_frgre.c M src/gb/gprs_ns_vty.c M src/gsm/a5.c M src/gsm/abis_nm.c M src/gsm/apn.c M src/gsm/auth_comp128v1.c M src/gsm/auth_comp128v23.c M src/gsm/auth_core.c M src/gsm/auth_milenage.c M src/gsm/comp128.c M src/gsm/comp128v23.c M src/gsm/gan.c M src/gsm/gea.c M src/gsm/gprs_cipher_core.c M src/gsm/gprs_gea.c M src/gsm/gprs_rlc.c M src/gsm/gsm0341.c M src/gsm/gsm0411_smc.c M src/gsm/gsm0411_smr.c M src/gsm/gsm0411_utils.c M src/gsm/gsm0480.c M src/gsm/gsm0502.c M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/gsm23003.c M src/gsm/gsm48.c M src/gsm/gsm48_ie.c M src/gsm/gsm_04_08_gprs.c M src/gsm/gsm_utils.c M src/gsm/gsup.c M src/gsm/ipa.c M src/gsm/kasumi.c M src/gsm/lapd_core.c M src/gsm/lapdm.c M src/gsm/milenage/aes-encblock.c M src/gsm/milenage/aes-internal-enc.c M src/gsm/milenage/aes-internal.c M src/gsm/milenage/aes.h M src/gsm/milenage/aes_i.h M src/gsm/milenage/aes_wrap.h M src/gsm/milenage/milenage.c M src/gsm/milenage/milenage.h M src/gsm/oap.c M src/gsm/rsl.c M src/gsm/rxlev_stat.c M src/gsm/sysinfo.c M src/gsm/tlv_parser.c M src/gsmtap_util.c M src/logging.c M src/logging_gsmtap.c M src/logging_syslog.c M src/loggingrb.c M src/macaddr.c M src/msgb.c M src/msgfile.c M src/panic.c M src/plugin.c M src/prbs.c M src/prim.c M src/pseudotalloc/pseudotalloc.c M src/pseudotalloc/talloc.h M src/rate_ctr.c M src/rbtree.c M src/select.c M src/sercomm.c M src/serial.c M src/signal.c M src/sim/card_fs_isim.c M src/sim/card_fs_sim.c M src/sim/card_fs_tetra.c M src/sim/card_fs_uicc.c M src/sim/class_tables.c M src/sim/core.c M src/sim/reader.c M src/sim/reader_pcsc.c M src/socket.c M src/stat_item.c M src/stats.c M src/stats_statsd.c M src/strrb.c M src/timer.c M src/timer_gettimeofday.c M src/utils.c M src/vty/buffer.c M src/vty/command.c M src/vty/fsm_vty.c M src/vty/logging_vty.c M src/vty/stats_vty.c M src/vty/talloc_ctx_vty.c M src/vty/telnet_interface.c M src/vty/utils.c M src/vty/vector.c M src/vty/vty.c M src/write_queue.c M tests/abis/abis_test.c M tests/codec/codec_test.c M tests/gb/gprs_bssgp_test.c M tests/gb/gprs_ns_test.c M tests/gsm23003/gsm23003_test.c M tests/lapd/lapd_test.c M tests/oap/oap_test.c M tests/stats/stats_test.c M tests/strrb/strrb_test.c M tests/vty/vty_test.c 145 files changed, 423 insertions(+), 100 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/4801/2 diff --git a/debian/copyright b/debian/copyright index 2991c85..e763039 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,11 +11,6 @@ 2010 Nico Golde License: GPL-2+ -Files: src/talloc.c include/osmocom/core/talloc.h -Copyright: 2004 Andrew Tridgell - 2006 Stefan Metzmacher -License: LGPL-3+ - Files: include/osmocom/core/loggingrb.h include/osmocom/core/strrb.h src/strrb.c @@ -30,8 +25,9 @@ License: GPL-2+ Files: include/osmocom/core/crc16.h + src/crc16.c Copyright: 2005 Ben Gardner -License: GPL-2+ +License: GPL-2 Files: src/utils.c Copyright: 2011 Harald Welte @@ -110,7 +106,7 @@ tests/stats/stats_test.c Copyright: 2009-2010 by Harald Welte 2009-2014 by Holger Hans Peter Freyther - 2015 Sysmocom s.f.m.c. GmbH + 2015 sysmocom - s.f.m.c. GmbH License: GPL-2+ Files: tests/gb/gprs_ns_test.c @@ -176,25 +172,6 @@ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - - -License: LGPL-3+ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - . - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see . - . - On Debian systems, the complete text of the GNU Lesser General - Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". - License: AGPL-3+ This program is free software; you can redistribute it and/or modify diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h index dc356bd..5faa5ea 100644 --- a/include/osmocom/core/bitcomp.h +++ b/include/osmocom/core/bitcomp.h @@ -1,10 +1,12 @@ /*! \file bitcomp.h * Osmocom bit compression routines. */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev - * + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 19466ab..c9bab39 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -1,6 +1,6 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 Sysmocom s.f.m.c. GmbH + * (C) 2015 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index f50796c..e4d46ba 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -1,5 +1,5 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index db15666..7432164 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -2,22 +2,22 @@ * @{ * \file gsm0808_utils.h */ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 8daf460..5cfe1ec 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -16,10 +16,12 @@ * \file gsup.h * Osmocom Generic Subscriber Update Protocol message encoder/decoder. */ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH, Author: Jacob Erlbeck + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/gsm/oap.h b/include/osmocom/gsm/oap.h index ce1e151..f33cb50 100644 --- a/include/osmocom/gsm/oap.h +++ b/include/osmocom/gsm/oap.h @@ -8,10 +8,11 @@ * * \file oap.h */ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/application.c b/src/application.c index 538ac45..2d237e2 100644 --- a/src/application.c +++ b/src/application.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/backtrace.c b/src/backtrace.c index 5ce7482..a18bde0 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitcomp.c b/src/bitcomp.c index 94f60eb..d5a9310 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -1,10 +1,13 @@ /*! \file bitcomp.c * Osmocom bit compression routines */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bits.c b/src/bits.c index fa917b0..8837c1f 100644 --- a/src/bits.c +++ b/src/bits.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitvec.c b/src/bitvec.c index e86315c..884eb02 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -1,9 +1,11 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index d5a2110..a05eaba 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index b1a0b31..282781f 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index 2f5c6a2..4f7bb09 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 1ee74d0..1955716 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 639d2df..cacc612 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c index b42f242..d5008d0 100644 --- a/src/coding/gsm0503_interleaving.c +++ b/src/coding/gsm0503_interleaving.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c index d414769..1e37fce 100644 --- a/src/coding/gsm0503_mapping.c +++ b/src/coding/gsm0503_mapping.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_parity.c b/src/coding/gsm0503_parity.c index b57caa3..874114f 100644 --- a/src/coding/gsm0503_parity.c +++ b/src/coding/gsm0503_parity.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_tables.c b/src/coding/gsm0503_tables.c index dda8cad..5fe634b 100644 --- a/src/coding/gsm0503_tables.c +++ b/src/coding/gsm0503_tables.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv.c b/src/conv.c index 420acca..a2c13de 100644 --- a/src/conv.c +++ b/src/conv.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc.c b/src/conv_acc.c index 048bbb1..33fe264 100644 --- a/src/conv_acc.c +++ b/src/conv_acc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_generic.c b/src/conv_acc_generic.c index 228f3e2..2887673 100644 --- a/src/conv_acc_generic.c +++ b/src/conv_acc_generic.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c index e9bbde1..a9679ef 100644 --- a/src/conv_acc_sse.c +++ b/src/conv_acc_sse.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c index c399719..5b6e704 100644 --- a/src/conv_acc_sse_avx.c +++ b/src/conv_acc_sse_avx.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_impl.h b/src/conv_acc_sse_impl.h index 560af62..9ebbfe9 100644 --- a/src/conv_acc_sse_impl.h +++ b/src/conv_acc_sse_impl.h @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/counter.c b/src/counter.c index 2963777..0fa84c8 100644 --- a/src/counter.c +++ b/src/counter.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/crc16.c b/src/crc16.c index c03c008..29dace2 100644 --- a/src/crc16.c +++ b/src/crc16.c @@ -8,6 +8,8 @@ * * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. + * + * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/src/crcXXgen.c.tpl b/src/crcXXgen.c.tpl index befba4d..74e6d52 100644 --- a/src/crcXXgen.c.tpl +++ b/src/crcXXgen.c.tpl @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index 24b388b..f616479 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 9b8a194..07b17c9 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c index a968bc0..ef98889 100644 --- a/src/ctrl/control_vty.c +++ b/src/ctrl/control_vty.c @@ -1,10 +1,12 @@ /*! \file control_vty.c * VTY configuration for Control interface. */ /* - * (C) 2016 by sysmocom s.m.f.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c index 38fbd1e..3c7e1bd 100644 --- a/src/ctrl/fsm_ctrl_commands.c +++ b/src/ctrl/fsm_ctrl_commands.c @@ -1,5 +1,11 @@ /*! \file fsm_ctrl_commands.c */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + */ + #include #include diff --git a/src/fsm.c b/src/fsm.c index 3f8de9c..827e8b3 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/common_vty.c b/src/gb/common_vty.c index 16f3bbd..a47294b 100644 --- a/src/gb/common_vty.c +++ b/src/gb/common_vty.c @@ -5,6 +5,8 @@ * (C) 2009-2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b906643..520868e 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index d9f04c5..3939e25 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_util.c b/src/gb/gprs_bssgp_util.c index 4553da8..669dfb8 100644 --- a/src/gb/gprs_bssgp_util.c +++ b/src/gb/gprs_bssgp_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index f787846..6131e6b 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index a00c8e5..47d170d 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -2,10 +2,13 @@ * GPRS Networks Service (NS) messages on the Gb interface. * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2012 by Harald Welte + * (C) 2009-2017 by Harald Welte + * (C) 2016-2017 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_frgre.c b/src/gb/gprs_ns_frgre.c index 52145ff..483fdb6 100644 --- a/src/gb/gprs_ns_frgre.c +++ b/src/gb/gprs_ns_frgre.c @@ -3,10 +3,12 @@ * GPRS Networks Service (NS) messages on the Gb interface, * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2010,2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index e8ef2a2..667db7d 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -1,10 +1,13 @@ /*! \file gprs_ns_vty.c * VTY interface for our GPRS Networks Service (NS) implementation. */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/a5.c b/src/gsm/a5.c index ea09e17..223d3ad 100644 --- a/src/gsm/a5.c +++ b/src/gsm/a5.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 7207fb9..8a3886d 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -1,8 +1,10 @@ /* - * (C) 2008-2011 by Harald Welte + * (C) 2008-2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/apn.c b/src/gsm/apn.c index f8303db..e6632dd 100644 --- a/src/gsm/apn.c +++ b/src/gsm/apn.c @@ -1,4 +1,24 @@ -/*! \file apn.c */ +/*! \file apn.c + * + * (C) 2014 by Harald Welte + * (C) 2015,2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c index 1dddef3..493ebfd 100644 --- a/src/gsm/auth_comp128v1.c +++ b/src/gsm/auth_comp128v1.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_comp128v23.c b/src/gsm/auth_comp128v23.c index 4d23769..279d2b7 100644 --- a/src/gsm/auth_comp128v23.c +++ b/src/gsm/auth_comp128v23.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 738e860..9e3b2c0 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c index 2ddf712..9589100 100644 --- a/src/gsm/auth_milenage.c +++ b/src/gsm/auth_milenage.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c index 0fcc67d..b28a843 100644 --- a/src/gsm/comp128.c +++ b/src/gsm/comp128.c @@ -46,6 +46,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128v23.c b/src/gsm/comp128v23.c index 12f8a4c..68f4b2a 100644 --- a/src/gsm/comp128v23.c +++ b/src/gsm/comp128v23.c @@ -9,6 +9,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gan.c b/src/gsm/gan.c index fae93f1..8cd4f78 100644 --- a/src/gsm/gan.c +++ b/src/gsm/gan.c @@ -4,6 +4,8 @@ * (C) 2012 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gea.c b/src/gsm/gea.c index 70f08ad..5756bb0 100644 --- a/src/gsm/gea.c +++ b/src/gsm/gea.c @@ -1,11 +1,11 @@ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index fc68c40..6fa25d6 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gprs_gea.c b/src/gsm/gprs_gea.c index db3f2cc..7314788 100644 --- a/src/gsm/gprs_gea.c +++ b/src/gsm/gprs_gea.c @@ -1,13 +1,15 @@ /*! \file gprs_gea.c * GEA 3 & 4 plugin */ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_rlc.c b/src/gsm/gprs_rlc.c index d2c05b7..bdfc8ea 100644 --- a/src/gsm/gprs_rlc.c +++ b/src/gsm/gprs_rlc.c @@ -1,5 +1,12 @@ /*! \file gsm/gprs_rlc.c * helper functions for (E)GPRS RLC according to 3GPP TS 44.060. + * + * (C) 2016 by Thomas Thou + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ */ #include diff --git a/src/gsm/gsm0341.c b/src/gsm/gsm0341.c index 485023f..89f5de3 100644 --- a/src/gsm/gsm0341.c +++ b/src/gsm/gsm0341.c @@ -2,6 +2,8 @@ * (C) 2014 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smc.c b/src/gsm/gsm0411_smc.c index f7c536b..28287e4 100644 --- a/src/gsm/gsm0411_smc.c +++ b/src/gsm/gsm0411_smc.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smr.c b/src/gsm/gsm0411_smr.c index 0a25c7c..892b7f0 100644 --- a/src/gsm/gsm0411_smr.c +++ b/src/gsm/gsm0411_smr.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index acf7e23..53d37a4 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 557aa14..71470e5 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c index 6b69893..53259a4 100644 --- a/src/gsm/gsm0502.c +++ b/src/gsm/gsm0502.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index ee5eda4..2396a10 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -3,6 +3,8 @@ * (C) 2009,2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 798a122..93e6074 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -1,20 +1,20 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 3c09aca..95ac9f8 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -1,10 +1,11 @@ /*! \file gsm23003.c * Utility function implementations related to 3GPP TS 23.003 */ /* - * (C) 2017 sysmocom s.f.m.c. GmbH + * (C) 2017 sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 10e2b80..a7daea4 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 105acba..1baf287 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_04_08_gprs.c b/src/gsm/gsm_04_08_gprs.c index 43da27e..608fa8c 100644 --- a/src/gsm/gsm_04_08_gprs.c +++ b/src/gsm/gsm_04_08_gprs.c @@ -2,10 +2,12 @@ /* * (C) 2009-2016 by Harald Welte * (C) 2010 by On-Waves - * (C) 2014-2015 by Sysmocom s.f.m.c. GmbH + * (C) 2014-2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 134b475..8464090 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index e5b0a66..eb829f7 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -1,10 +1,11 @@ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH + * Author: Jacob Erlbeck * (C) 2015 by Holger Hans Peter Freyther * (C) 2016 by Harald Welte * All Rights Reserved * - * Author: Jacob Erlbeck + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index fef73c3..e00e2d0 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/kasumi.c b/src/gsm/kasumi.c index c3a028b..7de5cd0 100644 --- a/src/gsm/kasumi.c +++ b/src/gsm/kasumi.c @@ -2,9 +2,10 @@ * Kasumi cipher and KGcore functions. */ /* * (C) 2013 by Max - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 6b58006..d14063e 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index db950a6..5efe755 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -1,11 +1,14 @@ /*! \file lapdm.c * GSM LAPDm (TS 04.06) implementation. */ /* - * (C) 2010-2011 by Harald Welte + * (C) 2010-2017 by Harald Welte * (C) 2010-2011 by Andreas Eversberg + * (C) 2014-2016 by sysmocom - s.f.m.c GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/milenage/aes-encblock.c b/src/gsm/milenage/aes-encblock.c index c4aa260..9fd73f6 100644 --- a/src/gsm/milenage/aes-encblock.c +++ b/src/gsm/milenage/aes-encblock.c @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal-enc.c b/src/gsm/milenage/aes-internal-enc.c index 4c00f96..6de9992 100644 --- a/src/gsm/milenage/aes-internal-enc.c +++ b/src/gsm/milenage/aes-internal-enc.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal.c b/src/gsm/milenage/aes-internal.c index 60c520c..c46654a 100644 --- a/src/gsm/milenage/aes-internal.c +++ b/src/gsm/milenage/aes-internal.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes.h b/src/gsm/milenage/aes.h index ce42b20..5410c36 100644 --- a/src/gsm/milenage/aes.h +++ b/src/gsm/milenage/aes.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_i.h b/src/gsm/milenage/aes_i.h index 6df019a..3e0fd21 100644 --- a/src/gsm/milenage/aes_i.h +++ b/src/gsm/milenage/aes_i.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_wrap.h b/src/gsm/milenage/aes_wrap.h index 7d4d5d9..b644d4c 100644 --- a/src/gsm/milenage/aes_wrap.h +++ b/src/gsm/milenage/aes_wrap.h @@ -17,6 +17,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 012b399..7cf3312 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -12,6 +12,8 @@ * * See README and COPYING for more details. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * This file implements an example authentication algorithm defined for 3GPP * AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow * EAP-AKA to be tested properly with real USIM cards. diff --git a/src/gsm/milenage/milenage.h b/src/gsm/milenage/milenage.h index 1a4364d..ea93fda 100644 --- a/src/gsm/milenage/milenage.h +++ b/src/gsm/milenage/milenage.h @@ -11,6 +11,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/oap.c b/src/gsm/oap.c index aab5cac..a133889 100644 --- a/src/gsm/oap.c +++ b/src/gsm/oap.c @@ -1,8 +1,9 @@ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 2a2af1f..abda932 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -1,8 +1,12 @@ /* - * (C) 2008-2010 by Harald Welte + * (C) 2008-2017 by Harald Welte + * (C) 2013 by Holger Freyther + * (C) 2014-2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/rxlev_stat.c b/src/gsm/rxlev_stat.c index 2ff0ac8..9c650cc 100644 --- a/src/gsm/rxlev_stat.c +++ b/src/gsm/rxlev_stat.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/sysinfo.c b/src/gsm/sysinfo.c index b73bb0c..b615871 100644 --- a/src/gsm/sysinfo.c +++ b/src/gsm/sysinfo.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b1b1034..ead856c 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -1,7 +1,10 @@ -/* (C) 2008-2010 by Harald Welte +/* (C) 2008-2017 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 28149c0..8f9496a 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging.c b/src/logging.c index fa733cd..20ec443 100644 --- a/src/logging.c +++ b/src/logging.c @@ -5,6 +5,8 @@ * (C) 2008 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c index d0aa47b..ec6757c 100644 --- a/src/logging_gsmtap.c +++ b/src/logging_gsmtap.c @@ -9,6 +9,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_syslog.c b/src/logging_syslog.c index d0d6a96..f980689 100644 --- a/src/logging_syslog.c +++ b/src/logging_syslog.c @@ -4,6 +4,8 @@ * (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/loggingrb.c b/src/loggingrb.c index d3dd254..4a80cc8 100644 --- a/src/loggingrb.c +++ b/src/loggingrb.c @@ -4,6 +4,8 @@ * (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/macaddr.c b/src/macaddr.c index 5c68d05..afa7c93 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgb.c b/src/msgb.c index 6fcbe53..faef09e 100644 --- a/src/msgb.c +++ b/src/msgb.c @@ -2,6 +2,8 @@ * (C) 2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgfile.c b/src/msgfile.c index 8517099..278b9a7 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -5,6 +5,8 @@ * (C) 2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/panic.c b/src/panic.c index 2a8b1ae..a08f89f 100644 --- a/src/panic.c +++ b/src/panic.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/plugin.c b/src/plugin.c index 264171c..40de4f8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/prbs.c b/src/prbs.c index be52fd4..8fa04bb 100644 --- a/src/prbs.c +++ b/src/prbs.c @@ -1,5 +1,9 @@ /* Osmocom implementation of pseudo-random bit sequence generation */ -/* (C) 2017 by Harald Welte */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include #include diff --git a/src/prim.c b/src/prim.c index d18dbd7..3c8a7f1 100644 --- a/src/prim.c +++ b/src/prim.c @@ -1,4 +1,10 @@ -/*! \addtogroup prim +/*! + * (C) 2015-2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * \addtogroup prim * @{ * \file prim.c */ diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index b77ffe9..2a99066 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -1,7 +1,26 @@ /*! \file pseudotalloc.c * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "talloc.h" #include diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index 3ce9f37..ae2e1fc 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -1,7 +1,25 @@ /*! \file talloc.h * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 296cc16..5464490 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/rbtree.c b/src/rbtree.c index f0ebb8c..211978f 100644 --- a/src/rbtree.c +++ b/src/rbtree.c @@ -2,7 +2,9 @@ Red Black Trees (C) 1999 Andrea Arcangeli (C) 2002 David Woodhouse - + + SPDX-License-Identifier: GPL-2.0+ + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or diff --git a/src/select.c b/src/select.c index 4b98b62..1c62e01 100644 --- a/src/select.c +++ b/src/select.c @@ -5,6 +5,9 @@ * of the linux 2.4 netfilter subsystem. */ /* * (C) 2000-2009 by Harald Welte + * All Rights Reserverd. + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/sercomm.c b/src/sercomm.c index 07b1aa0..2639bf8 100644 --- a/src/sercomm.c +++ b/src/sercomm.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/serial.c b/src/serial.c index 8ddd38e..1b5a4cf 100644 --- a/src/serial.c +++ b/src/serial.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/signal.c b/src/signal.c index 0c56465..745d7c3 100644 --- a/src/signal.c +++ b/src/signal.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c index 1073429..e6ba0d0 100644 --- a/src/sim/card_fs_isim.c +++ b/src/sim/card_fs_isim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c index 1411129..f66e391 100644 --- a/src/sim/card_fs_sim.c +++ b/src/sim/card_fs_sim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c index 80f3284..7bf0279 100644 --- a/src/sim/card_fs_tetra.c +++ b/src/sim/card_fs_tetra.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_uicc.c b/src/sim/card_fs_uicc.c index 8ff8936..af6061c 100644 --- a/src/sim/card_fs_uicc.c +++ b/src/sim/card_fs_uicc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/class_tables.c b/src/sim/class_tables.c index fcf67f0..593b2e8 100644 --- a/src/sim/class_tables.c +++ b/src/sim/class_tables.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, or * any later version as published by the Free Software Foundation. diff --git a/src/sim/core.c b/src/sim/core.c index 8da839c..a78cecc 100644 --- a/src/sim/core.c +++ b/src/sim/core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader.c b/src/sim/reader.c index f39829b..d1a9ae6 100644 --- a/src/sim/reader.c +++ b/src/sim/reader.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader_pcsc.c b/src/sim/reader_pcsc.c index 5b29638..f22103f 100644 --- a/src/sim/reader_pcsc.c +++ b/src/sim/reader_pcsc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/socket.c b/src/socket.c index b516abf..82ccfed 100644 --- a/src/socket.c +++ b/src/socket.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stat_item.c b/src/stat_item.c index cbcdebc..cb9b90f 100644 --- a/src/stat_item.c +++ b/src/stat_item.c @@ -1,11 +1,13 @@ /*! \file stat_item.c * utility routines for keeping statistical values */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH * (C) 2009-2010 by Harald Welte + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats.c b/src/stats.c index ff31ff6..b5adbf2 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,11 +1,11 @@ /*! \file stats.c */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats_statsd.c b/src/stats_statsd.c index 5145bf7..c11c013 100644 --- a/src/stats_statsd.c +++ b/src/stats_statsd.c @@ -1,10 +1,10 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/strrb.c b/src/strrb.c index 6bfb179..461fdec 100644 --- a/src/strrb.c +++ b/src/strrb.c @@ -19,6 +19,8 @@ * (C) 2012-2013, Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer.c b/src/timer.c index bf46c24..9ec7a00 100644 --- a/src/timer.c +++ b/src/timer.c @@ -7,6 +7,8 @@ * Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer_gettimeofday.c b/src/timer_gettimeofday.c index 4298805..15b5e31 100644 --- a/src/timer_gettimeofday.c +++ b/src/timer_gettimeofday.c @@ -1,8 +1,9 @@ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Authors: Neels Hofmeyr * All Rights Reserved * - * Authors: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/utils.c b/src/utils.c index a62f5e9..f63ff89 100644 --- a/src/utils.c +++ b/src/utils.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/buffer.c b/src/vty/buffer.c index 1935aa1..e68e3a2 100644 --- a/src/vty/buffer.c +++ b/src/vty/buffer.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1998 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify diff --git a/src/vty/command.c b/src/vty/command.c index 98d86d2..5f7a42c 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -3,6 +3,12 @@ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + Copyright (C) 2010-2011 Holger Hans Peter Freyther + Copyright (C) 2012 Sylvain Munaut + Copyright (C) 2013,2015 Harald Welte + Copyright (C) 2013,2017 sysmocom - s.f.m.c. GmbH + + SPDX-License-Identifier: GPL-2.0+ This file is part of GNU Zebra. diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c index 50c7fd5..8abb9c9 100644 --- a/src/vty/fsm_vty.c +++ b/src/vty/fsm_vty.c @@ -2,6 +2,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 9b7d10a..215394f 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -3,6 +3,8 @@ * (C) 2009-2014 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 2ccbf66..6c09c38 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -1,9 +1,11 @@ /* * (C) 2009-2010 by Harald Welte * (C) 2009-2014 by Holger Hans Peter Freyther - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c index 136a1b4..601b696 100644 --- a/src/vty/talloc_ctx_vty.c +++ b/src/vty/talloc_ctx_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 40154fe..0ccf8dc 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -1,6 +1,9 @@ -/* (C) 2009 by Holger Hans Peter Freyther +/* (C) 2009-2010 by Holger Hans Peter Freyther + * (C) 2010 by Sylvain Munaut * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/utils.c b/src/vty/utils.c index e7aeb88..8cd0b35 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -2,9 +2,12 @@ * Utility routines for printing common objects in the Osmocom world. */ /* * (C) 2009-2010 by Harald Welte + * (C) 2013,2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/vector.c b/src/vty/vector.c index ee07cbd..f9e5ec3 100644 --- a/src/vty/vector.c +++ b/src/vty/vector.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1997 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify it diff --git a/src/vty/vty.c b/src/vty/vty.c index aef73b3..e741a66 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -22,7 +22,7 @@ * * \section sec_copyright Copyright and License * Copyright ? 1997-2007 - Kuninhiro Ishiguro\n - * Copyright ? 2008-2011 - Harald Welte, Holger Freyther and contributors\n + * Copyright ? 2008-2012 - Harald Welte, Holger Freyther and contributors\n * All rights reserved. \n\n * The source code of libosmovty is licensed under the terms of the GNU * General Public License as published by the Free Software Foundation; @@ -46,6 +46,7 @@ * */ +/* SPDX-License-Identifier: GPL-2.0+ */ #include #include diff --git a/src/write_queue.c b/src/write_queue.c index 203815b..fb6839a 100644 --- a/src/write_queue.c +++ b/src/write_queue.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index cb88b01..a631712 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -1,6 +1,6 @@ /* * (C) 2012 by Holger Hans Peter Freyther - * (C) 2017 by sysmocom s.m.f.c. GmbH + * (C) 2017 by sysmocom - s.m.f.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c index b204d77..7a10fc5 100644 --- a/tests/codec/codec_test.c +++ b/tests/codec/codec_test.c @@ -1,10 +1,12 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -12,7 +14,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/tests/gb/gprs_bssgp_test.c b/tests/gb/gprs_bssgp_test.c index 3de05dd..1624a31 100644 --- a/tests/gb/gprs_bssgp_test.c +++ b/tests/gb/gprs_bssgp_test.c @@ -1,10 +1,12 @@ /* Test routines for the BSSGP implementation in libosmogb * - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck * * Skeleton based on bssgp_fc_test.c * (C) 2012 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gb/gprs_ns_test.c b/tests/gb/gprs_ns_test.c index fac3c36..7e6b85c 100644 --- a/tests/gb/gprs_ns_test.c +++ b/tests/gb/gprs_ns_test.c @@ -1,6 +1,8 @@ /* test routines for NS connection handling - * (C) 2013 by sysmocom s.f.m.c. GmbH + * (C) 2013 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gsm23003/gsm23003_test.c b/tests/gsm23003/gsm23003_test.c index a408b73..64d756d 100644 --- a/tests/gsm23003/gsm23003_test.c +++ b/tests/gsm23003/gsm23003_test.c @@ -1,8 +1,9 @@ /* * (C) 2017 by sysmocom s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 0dccaa4..d6c0495 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -1,9 +1,11 @@ /* * (C) 2011 by Holger Hans Peter Freyther * (C) 2011 by On-Waves - * (C) 2014 by Daniel Willmann + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Daniel Willmann * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index 0c4c16e..dea5c11 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -1,9 +1,9 @@ /* Test Osmocom Authentication Protocol */ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 59fc449..b302b37 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -1,9 +1,11 @@ /* tests for statistics */ /* - * (C) 2015 Sysmocom s.m.f.c. GmbH + * (C) 2015 sysmocom - s.m.f.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/strrb/strrb_test.c b/tests/strrb/strrb_test.c index 6140ac9..4282d1a 100644 --- a/tests/strrb/strrb_test.c +++ b/tests/strrb/strrb_test.c @@ -1,6 +1,8 @@ /* (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-3.0+ + * * This program is iree software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 2542baf..42646eb 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -1,9 +1,11 @@ -/* (C) 2013 by Jacob Erlbeck +/* (C) 2013 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * All Rights Reserved * - * This program is iree software; you can redistribute it and/or modify + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- To view, visit https://gerrit.osmocom.org/4801 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:40:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:40:27 +0000 Subject: libosmocore[master]: Fix/Update copyright notices; Add SPDX annotation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4801 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 12 16:40:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 16:40:29 +0000 Subject: [MERGED] libosmocore[master]: Fix/Update copyright notices; Add SPDX annotation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix/Update copyright notices; Add SPDX annotation ...................................................................... Fix/Update copyright notices; Add SPDX annotation Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af --- M debian/copyright M include/osmocom/core/bitcomp.h M include/osmocom/core/bitvec.h M include/osmocom/core/stats.h M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/gsup.h M include/osmocom/gsm/oap.h M src/application.c M src/backtrace.c M src/bitcomp.c M src/bits.c M src/bitvec.c M src/codec/gsm610.c M src/codec/gsm620.c M src/codec/gsm660.c M src/codec/gsm690.c M src/coding/gsm0503_coding.c M src/coding/gsm0503_interleaving.c M src/coding/gsm0503_mapping.c M src/coding/gsm0503_parity.c M src/coding/gsm0503_tables.c M src/conv.c M src/conv_acc.c M src/conv_acc_generic.c M src/conv_acc_sse.c M src/conv_acc_sse_avx.c M src/conv_acc_sse_impl.h M src/counter.c M src/crc16.c M src/crcXXgen.c.tpl M src/ctrl/control_cmd.c M src/ctrl/control_if.c M src/ctrl/control_vty.c M src/ctrl/fsm_ctrl_commands.c M src/fsm.c M src/gb/common_vty.c M src/gb/gprs_bssgp.c M src/gb/gprs_bssgp_bss.c M src/gb/gprs_bssgp_util.c M src/gb/gprs_bssgp_vty.c M src/gb/gprs_ns.c M src/gb/gprs_ns_frgre.c M src/gb/gprs_ns_vty.c M src/gsm/a5.c M src/gsm/abis_nm.c M src/gsm/apn.c M src/gsm/auth_comp128v1.c M src/gsm/auth_comp128v23.c M src/gsm/auth_core.c M src/gsm/auth_milenage.c M src/gsm/comp128.c M src/gsm/comp128v23.c M src/gsm/gan.c M src/gsm/gea.c M src/gsm/gprs_cipher_core.c M src/gsm/gprs_gea.c M src/gsm/gprs_rlc.c M src/gsm/gsm0341.c M src/gsm/gsm0411_smc.c M src/gsm/gsm0411_smr.c M src/gsm/gsm0411_utils.c M src/gsm/gsm0480.c M src/gsm/gsm0502.c M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/gsm23003.c M src/gsm/gsm48.c M src/gsm/gsm48_ie.c M src/gsm/gsm_04_08_gprs.c M src/gsm/gsm_utils.c M src/gsm/gsup.c M src/gsm/ipa.c M src/gsm/kasumi.c M src/gsm/lapd_core.c M src/gsm/lapdm.c M src/gsm/milenage/aes-encblock.c M src/gsm/milenage/aes-internal-enc.c M src/gsm/milenage/aes-internal.c M src/gsm/milenage/aes.h M src/gsm/milenage/aes_i.h M src/gsm/milenage/aes_wrap.h M src/gsm/milenage/milenage.c M src/gsm/milenage/milenage.h M src/gsm/oap.c M src/gsm/rsl.c M src/gsm/rxlev_stat.c M src/gsm/sysinfo.c M src/gsm/tlv_parser.c M src/gsmtap_util.c M src/logging.c M src/logging_gsmtap.c M src/logging_syslog.c M src/loggingrb.c M src/macaddr.c M src/msgb.c M src/msgfile.c M src/panic.c M src/plugin.c M src/prbs.c M src/prim.c M src/pseudotalloc/pseudotalloc.c M src/pseudotalloc/talloc.h M src/rate_ctr.c M src/rbtree.c M src/select.c M src/sercomm.c M src/serial.c M src/signal.c M src/sim/card_fs_isim.c M src/sim/card_fs_sim.c M src/sim/card_fs_tetra.c M src/sim/card_fs_uicc.c M src/sim/class_tables.c M src/sim/core.c M src/sim/reader.c M src/sim/reader_pcsc.c M src/socket.c M src/stat_item.c M src/stats.c M src/stats_statsd.c M src/strrb.c M src/timer.c M src/timer_gettimeofday.c M src/utils.c M src/vty/buffer.c M src/vty/command.c M src/vty/fsm_vty.c M src/vty/logging_vty.c M src/vty/stats_vty.c M src/vty/talloc_ctx_vty.c M src/vty/telnet_interface.c M src/vty/utils.c M src/vty/vector.c M src/vty/vty.c M src/write_queue.c M tests/abis/abis_test.c M tests/codec/codec_test.c M tests/gb/gprs_bssgp_test.c M tests/gb/gprs_ns_test.c M tests/gsm23003/gsm23003_test.c M tests/lapd/lapd_test.c M tests/oap/oap_test.c M tests/stats/stats_test.c M tests/strrb/strrb_test.c M tests/vty/vty_test.c 145 files changed, 423 insertions(+), 100 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index 2991c85..e763039 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,11 +11,6 @@ 2010 Nico Golde License: GPL-2+ -Files: src/talloc.c include/osmocom/core/talloc.h -Copyright: 2004 Andrew Tridgell - 2006 Stefan Metzmacher -License: LGPL-3+ - Files: include/osmocom/core/loggingrb.h include/osmocom/core/strrb.h src/strrb.c @@ -30,8 +25,9 @@ License: GPL-2+ Files: include/osmocom/core/crc16.h + src/crc16.c Copyright: 2005 Ben Gardner -License: GPL-2+ +License: GPL-2 Files: src/utils.c Copyright: 2011 Harald Welte @@ -110,7 +106,7 @@ tests/stats/stats_test.c Copyright: 2009-2010 by Harald Welte 2009-2014 by Holger Hans Peter Freyther - 2015 Sysmocom s.f.m.c. GmbH + 2015 sysmocom - s.f.m.c. GmbH License: GPL-2+ Files: tests/gb/gprs_ns_test.c @@ -176,25 +172,6 @@ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - - -License: LGPL-3+ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - . - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see . - . - On Debian systems, the complete text of the GNU Lesser General - Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". - License: AGPL-3+ This program is free software; you can redistribute it and/or modify diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h index dc356bd..5faa5ea 100644 --- a/include/osmocom/core/bitcomp.h +++ b/include/osmocom/core/bitcomp.h @@ -1,10 +1,12 @@ /*! \file bitcomp.h * Osmocom bit compression routines. */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev - * + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 19466ab..c9bab39 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -1,6 +1,6 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 Sysmocom s.f.m.c. GmbH + * (C) 2015 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index f50796c..e4d46ba 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -1,5 +1,5 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index db15666..7432164 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -2,22 +2,22 @@ * @{ * \file gsm0808_utils.h */ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 8daf460..5cfe1ec 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -16,10 +16,12 @@ * \file gsup.h * Osmocom Generic Subscriber Update Protocol message encoder/decoder. */ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH, Author: Jacob Erlbeck + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/include/osmocom/gsm/oap.h b/include/osmocom/gsm/oap.h index ce1e151..f33cb50 100644 --- a/include/osmocom/gsm/oap.h +++ b/include/osmocom/gsm/oap.h @@ -8,10 +8,11 @@ * * \file oap.h */ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/application.c b/src/application.c index 538ac45..2d237e2 100644 --- a/src/application.c +++ b/src/application.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/backtrace.c b/src/backtrace.c index 5ce7482..a18bde0 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitcomp.c b/src/bitcomp.c index 94f60eb..d5a9310 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -1,10 +1,13 @@ /*! \file bitcomp.c * Osmocom bit compression routines */ /* - * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Max Suraev * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bits.c b/src/bits.c index fa917b0..8837c1f 100644 --- a/src/bits.c +++ b/src/bits.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bitvec.c b/src/bitvec.c index e86315c..884eb02 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -1,9 +1,11 @@ /* (C) 2009 by Harald Welte * (C) 2012 Ivan Klyuchnikov - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index d5a2110..a05eaba 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index b1a0b31..282781f 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index 2f5c6a2..4f7bb09 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 1ee74d0..1955716 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 639d2df..cacc612 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c index b42f242..d5008d0 100644 --- a/src/coding/gsm0503_interleaving.c +++ b/src/coding/gsm0503_interleaving.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c index d414769..1e37fce 100644 --- a/src/coding/gsm0503_mapping.c +++ b/src/coding/gsm0503_mapping.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_parity.c b/src/coding/gsm0503_parity.c index b57caa3..874114f 100644 --- a/src/coding/gsm0503_parity.c +++ b/src/coding/gsm0503_parity.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/coding/gsm0503_tables.c b/src/coding/gsm0503_tables.c index dda8cad..5fe634b 100644 --- a/src/coding/gsm0503_tables.c +++ b/src/coding/gsm0503_tables.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv.c b/src/conv.c index 420acca..a2c13de 100644 --- a/src/conv.c +++ b/src/conv.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc.c b/src/conv_acc.c index 048bbb1..33fe264 100644 --- a/src/conv_acc.c +++ b/src/conv_acc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_generic.c b/src/conv_acc_generic.c index 228f3e2..2887673 100644 --- a/src/conv_acc_generic.c +++ b/src/conv_acc_generic.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c index e9bbde1..a9679ef 100644 --- a/src/conv_acc_sse.c +++ b/src/conv_acc_sse.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c index c399719..5b6e704 100644 --- a/src/conv_acc_sse_avx.c +++ b/src/conv_acc_sse_avx.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/conv_acc_sse_impl.h b/src/conv_acc_sse_impl.h index 560af62..9ebbfe9 100644 --- a/src/conv_acc_sse_impl.h +++ b/src/conv_acc_sse_impl.h @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/counter.c b/src/counter.c index 2963777..0fa84c8 100644 --- a/src/counter.c +++ b/src/counter.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/crc16.c b/src/crc16.c index c03c008..29dace2 100644 --- a/src/crc16.c +++ b/src/crc16.c @@ -8,6 +8,8 @@ * * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. + * + * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/src/crcXXgen.c.tpl b/src/crcXXgen.c.tpl index befba4d..74e6d52 100644 --- a/src/crcXXgen.c.tpl +++ b/src/crcXXgen.c.tpl @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index 24b388b..f616479 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 9b8a194..07b17c9 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -3,9 +3,13 @@ /* * (C) 2010-2011 by Daniel Willmann * (C) 2010-2011 by On-Waves + * (C) 2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c index a968bc0..ef98889 100644 --- a/src/ctrl/control_vty.c +++ b/src/ctrl/control_vty.c @@ -1,10 +1,12 @@ /*! \file control_vty.c * VTY configuration for Control interface. */ /* - * (C) 2016 by sysmocom s.m.f.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c index 38fbd1e..3c7e1bd 100644 --- a/src/ctrl/fsm_ctrl_commands.c +++ b/src/ctrl/fsm_ctrl_commands.c @@ -1,5 +1,11 @@ /*! \file fsm_ctrl_commands.c */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + */ + #include #include diff --git a/src/fsm.c b/src/fsm.c index 3f8de9c..827e8b3 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/common_vty.c b/src/gb/common_vty.c index 16f3bbd..a47294b 100644 --- a/src/gb/common_vty.c +++ b/src/gb/common_vty.c @@ -5,6 +5,8 @@ * (C) 2009-2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b906643..520868e 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index d9f04c5..3939e25 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_util.c b/src/gb/gprs_bssgp_util.c index 4553da8..669dfb8 100644 --- a/src/gb/gprs_bssgp_util.c +++ b/src/gb/gprs_bssgp_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index f787846..6131e6b 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index a00c8e5..47d170d 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -2,10 +2,13 @@ * GPRS Networks Service (NS) messages on the Gb interface. * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2012 by Harald Welte + * (C) 2009-2017 by Harald Welte + * (C) 2016-2017 sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_frgre.c b/src/gb/gprs_ns_frgre.c index 52145ff..483fdb6 100644 --- a/src/gb/gprs_ns_frgre.c +++ b/src/gb/gprs_ns_frgre.c @@ -3,10 +3,12 @@ * GPRS Networks Service (NS) messages on the Gb interface, * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2010,2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index e8ef2a2..667db7d 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -1,10 +1,13 @@ /*! \file gprs_ns_vty.c * VTY interface for our GPRS Networks Service (NS) implementation. */ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2014 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/a5.c b/src/gsm/a5.c index ea09e17..223d3ad 100644 --- a/src/gsm/a5.c +++ b/src/gsm/a5.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 7207fb9..8a3886d 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -1,8 +1,10 @@ /* - * (C) 2008-2011 by Harald Welte + * (C) 2008-2014,2017 by Harald Welte * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/apn.c b/src/gsm/apn.c index f8303db..e6632dd 100644 --- a/src/gsm/apn.c +++ b/src/gsm/apn.c @@ -1,4 +1,24 @@ -/*! \file apn.c */ +/*! \file apn.c + * + * (C) 2014 by Harald Welte + * (C) 2015,2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include #include diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c index 1dddef3..493ebfd 100644 --- a/src/gsm/auth_comp128v1.c +++ b/src/gsm/auth_comp128v1.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_comp128v23.c b/src/gsm/auth_comp128v23.c index 4d23769..279d2b7 100644 --- a/src/gsm/auth_comp128v23.c +++ b/src/gsm/auth_comp128v23.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 738e860..9e3b2c0 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c index 2ddf712..9589100 100644 --- a/src/gsm/auth_milenage.c +++ b/src/gsm/auth_milenage.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c index 0fcc67d..b28a843 100644 --- a/src/gsm/comp128.c +++ b/src/gsm/comp128.c @@ -46,6 +46,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/comp128v23.c b/src/gsm/comp128v23.c index 12f8a4c..68f4b2a 100644 --- a/src/gsm/comp128v23.c +++ b/src/gsm/comp128v23.c @@ -9,6 +9,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gan.c b/src/gsm/gan.c index fae93f1..8cd4f78 100644 --- a/src/gsm/gan.c +++ b/src/gsm/gan.c @@ -4,6 +4,8 @@ * (C) 2012 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gea.c b/src/gsm/gea.c index 70f08ad..5756bb0 100644 --- a/src/gsm/gea.c +++ b/src/gsm/gea.c @@ -1,11 +1,11 @@ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index fc68c40..6fa25d6 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gprs_gea.c b/src/gsm/gprs_gea.c index db3f2cc..7314788 100644 --- a/src/gsm/gprs_gea.c +++ b/src/gsm/gprs_gea.c @@ -1,13 +1,15 @@ /*! \file gprs_gea.c * GEA 3 & 4 plugin */ /* - * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH + * Copyright (C) 2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/src/gsm/gprs_rlc.c b/src/gsm/gprs_rlc.c index d2c05b7..bdfc8ea 100644 --- a/src/gsm/gprs_rlc.c +++ b/src/gsm/gprs_rlc.c @@ -1,5 +1,12 @@ /*! \file gsm/gprs_rlc.c * helper functions for (E)GPRS RLC according to 3GPP TS 44.060. + * + * (C) 2016 by Thomas Thou + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ */ #include diff --git a/src/gsm/gsm0341.c b/src/gsm/gsm0341.c index 485023f..89f5de3 100644 --- a/src/gsm/gsm0341.c +++ b/src/gsm/gsm0341.c @@ -2,6 +2,8 @@ * (C) 2014 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smc.c b/src/gsm/gsm0411_smc.c index f7c536b..28287e4 100644 --- a/src/gsm/gsm0411_smc.c +++ b/src/gsm/gsm0411_smc.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_smr.c b/src/gsm/gsm0411_smr.c index 0a25c7c..892b7f0 100644 --- a/src/gsm/gsm0411_smr.c +++ b/src/gsm/gsm0411_smr.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index acf7e23..53d37a4 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -10,6 +10,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 557aa14..71470e5 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c index 6b69893..53259a4 100644 --- a/src/gsm/gsm0502.c +++ b/src/gsm/gsm0502.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index ee5eda4..2396a10 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -3,6 +3,8 @@ * (C) 2009,2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 798a122..93e6074 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -1,20 +1,20 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * - * Author: Philipp Maier + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 3c09aca..95ac9f8 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -1,10 +1,11 @@ /*! \file gsm23003.c * Utility function implementations related to 3GPP TS 23.003 */ /* - * (C) 2017 sysmocom s.f.m.c. GmbH + * (C) 2017 sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 10e2b80..a7daea4 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 105acba..1baf287 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_04_08_gprs.c b/src/gsm/gsm_04_08_gprs.c index 43da27e..608fa8c 100644 --- a/src/gsm/gsm_04_08_gprs.c +++ b/src/gsm/gsm_04_08_gprs.c @@ -2,10 +2,12 @@ /* * (C) 2009-2016 by Harald Welte * (C) 2010 by On-Waves - * (C) 2014-2015 by Sysmocom s.f.m.c. GmbH + * (C) 2014-2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 134b475..8464090 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index e5b0a66..eb829f7 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -1,10 +1,11 @@ /* - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH + * Author: Jacob Erlbeck * (C) 2015 by Holger Hans Peter Freyther * (C) 2016 by Harald Welte * All Rights Reserved * - * Author: Jacob Erlbeck + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index fef73c3..e00e2d0 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -7,6 +7,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/kasumi.c b/src/gsm/kasumi.c index c3a028b..7de5cd0 100644 --- a/src/gsm/kasumi.c +++ b/src/gsm/kasumi.c @@ -2,9 +2,10 @@ * Kasumi cipher and KGcore functions. */ /* * (C) 2013 by Max - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 6b58006..d14063e 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index db950a6..5efe755 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -1,11 +1,14 @@ /*! \file lapdm.c * GSM LAPDm (TS 04.06) implementation. */ /* - * (C) 2010-2011 by Harald Welte + * (C) 2010-2017 by Harald Welte * (C) 2010-2011 by Andreas Eversberg + * (C) 2014-2016 by sysmocom - s.f.m.c GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/milenage/aes-encblock.c b/src/gsm/milenage/aes-encblock.c index c4aa260..9fd73f6 100644 --- a/src/gsm/milenage/aes-encblock.c +++ b/src/gsm/milenage/aes-encblock.c @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal-enc.c b/src/gsm/milenage/aes-internal-enc.c index 4c00f96..6de9992 100644 --- a/src/gsm/milenage/aes-internal-enc.c +++ b/src/gsm/milenage/aes-internal-enc.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes-internal.c b/src/gsm/milenage/aes-internal.c index 60c520c..c46654a 100644 --- a/src/gsm/milenage/aes-internal.c +++ b/src/gsm/milenage/aes-internal.c @@ -19,6 +19,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes.h b/src/gsm/milenage/aes.h index ce42b20..5410c36 100644 --- a/src/gsm/milenage/aes.h +++ b/src/gsm/milenage/aes.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_i.h b/src/gsm/milenage/aes_i.h index 6df019a..3e0fd21 100644 --- a/src/gsm/milenage/aes_i.h +++ b/src/gsm/milenage/aes_i.h @@ -10,6 +10,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/aes_wrap.h b/src/gsm/milenage/aes_wrap.h index 7d4d5d9..b644d4c 100644 --- a/src/gsm/milenage/aes_wrap.h +++ b/src/gsm/milenage/aes_wrap.h @@ -17,6 +17,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 012b399..7cf3312 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -12,6 +12,8 @@ * * See README and COPYING for more details. * + * SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + * * This file implements an example authentication algorithm defined for 3GPP * AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow * EAP-AKA to be tested properly with real USIM cards. diff --git a/src/gsm/milenage/milenage.h b/src/gsm/milenage/milenage.h index 1a4364d..ea93fda 100644 --- a/src/gsm/milenage/milenage.h +++ b/src/gsm/milenage/milenage.h @@ -11,6 +11,8 @@ * Alternatively, this software may be distributed under the terms of BSD * license. * + * SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause + * * See README and COPYING for more details. */ diff --git a/src/gsm/oap.c b/src/gsm/oap.c index aab5cac..a133889 100644 --- a/src/gsm/oap.c +++ b/src/gsm/oap.c @@ -1,8 +1,9 @@ /* - * (C) 2015-2016 by sysmocom s.f.m.c. GmbH + * (C) 2015-2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 2a2af1f..abda932 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -1,8 +1,12 @@ /* - * (C) 2008-2010 by Harald Welte + * (C) 2008-2017 by Harald Welte + * (C) 2013 by Holger Freyther + * (C) 2014-2016 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/rxlev_stat.c b/src/gsm/rxlev_stat.c index 2ff0ac8..9c650cc 100644 --- a/src/gsm/rxlev_stat.c +++ b/src/gsm/rxlev_stat.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/sysinfo.c b/src/gsm/sysinfo.c index b73bb0c..b615871 100644 --- a/src/gsm/sysinfo.c +++ b/src/gsm/sysinfo.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b1b1034..ead856c 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -1,7 +1,10 @@ -/* (C) 2008-2010 by Harald Welte +/* (C) 2008-2017 by Harald Welte + * (C) 2016-2017 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 28149c0..8f9496a 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging.c b/src/logging.c index fa733cd..20ec443 100644 --- a/src/logging.c +++ b/src/logging.c @@ -5,6 +5,8 @@ * (C) 2008 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c index d0aa47b..ec6757c 100644 --- a/src/logging_gsmtap.c +++ b/src/logging_gsmtap.c @@ -9,6 +9,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/logging_syslog.c b/src/logging_syslog.c index d0d6a96..f980689 100644 --- a/src/logging_syslog.c +++ b/src/logging_syslog.c @@ -4,6 +4,8 @@ * (C) 2011 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/loggingrb.c b/src/loggingrb.c index d3dd254..4a80cc8 100644 --- a/src/loggingrb.c +++ b/src/loggingrb.c @@ -4,6 +4,8 @@ * (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/macaddr.c b/src/macaddr.c index 5c68d05..afa7c93 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -6,6 +6,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgb.c b/src/msgb.c index 6fcbe53..faef09e 100644 --- a/src/msgb.c +++ b/src/msgb.c @@ -2,6 +2,8 @@ * (C) 2010 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/msgfile.c b/src/msgfile.c index 8517099..278b9a7 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -5,6 +5,8 @@ * (C) 2010 by On-Waves * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/panic.c b/src/panic.c index 2a8b1ae..a08f89f 100644 --- a/src/panic.c +++ b/src/panic.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/plugin.c b/src/plugin.c index 264171c..40de4f8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/prbs.c b/src/prbs.c index be52fd4..8fa04bb 100644 --- a/src/prbs.c +++ b/src/prbs.c @@ -1,5 +1,9 @@ /* Osmocom implementation of pseudo-random bit sequence generation */ -/* (C) 2017 by Harald Welte */ +/* (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include #include diff --git a/src/prim.c b/src/prim.c index d18dbd7..3c8a7f1 100644 --- a/src/prim.c +++ b/src/prim.c @@ -1,4 +1,10 @@ -/*! \addtogroup prim +/*! + * (C) 2015-2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * \addtogroup prim * @{ * \file prim.c */ diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index b77ffe9..2a99066 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -1,7 +1,26 @@ /*! \file pseudotalloc.c * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "talloc.h" #include diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index 3ce9f37..ae2e1fc 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -1,7 +1,25 @@ /*! \file talloc.h * overly simplistic talloc replacement for deeply embedded * microcontrollers. Obviously this has none of the properties of real - * talloc, it is particualrly not hierarchical at all. */ + * talloc, it is particualrly not hierarchical at all. + * + * (C) 2017 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 296cc16..5464490 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/rbtree.c b/src/rbtree.c index f0ebb8c..211978f 100644 --- a/src/rbtree.c +++ b/src/rbtree.c @@ -2,7 +2,9 @@ Red Black Trees (C) 1999 Andrea Arcangeli (C) 2002 David Woodhouse - + + SPDX-License-Identifier: GPL-2.0+ + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or diff --git a/src/select.c b/src/select.c index 4b98b62..1c62e01 100644 --- a/src/select.c +++ b/src/select.c @@ -5,6 +5,9 @@ * of the linux 2.4 netfilter subsystem. */ /* * (C) 2000-2009 by Harald Welte + * All Rights Reserverd. + * + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/sercomm.c b/src/sercomm.c index 07b1aa0..2639bf8 100644 --- a/src/sercomm.c +++ b/src/sercomm.c @@ -2,6 +2,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/serial.c b/src/serial.c index 8ddd38e..1b5a4cf 100644 --- a/src/serial.c +++ b/src/serial.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/signal.c b/src/signal.c index 0c56465..745d7c3 100644 --- a/src/signal.c +++ b/src/signal.c @@ -4,6 +4,8 @@ * (C) 2009 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c index 1073429..e6ba0d0 100644 --- a/src/sim/card_fs_isim.c +++ b/src/sim/card_fs_isim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c index 1411129..f66e391 100644 --- a/src/sim/card_fs_sim.c +++ b/src/sim/card_fs_sim.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c index 80f3284..7bf0279 100644 --- a/src/sim/card_fs_tetra.c +++ b/src/sim/card_fs_tetra.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/card_fs_uicc.c b/src/sim/card_fs_uicc.c index 8ff8936..af6061c 100644 --- a/src/sim/card_fs_uicc.c +++ b/src/sim/card_fs_uicc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/class_tables.c b/src/sim/class_tables.c index fcf67f0..593b2e8 100644 --- a/src/sim/class_tables.c +++ b/src/sim/class_tables.c @@ -3,6 +3,8 @@ /* * (C) 2016 by Harald Welte * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, or * any later version as published by the Free Software Foundation. diff --git a/src/sim/core.c b/src/sim/core.c index 8da839c..a78cecc 100644 --- a/src/sim/core.c +++ b/src/sim/core.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader.c b/src/sim/reader.c index f39829b..d1a9ae6 100644 --- a/src/sim/reader.c +++ b/src/sim/reader.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/sim/reader_pcsc.c b/src/sim/reader_pcsc.c index 5b29638..f22103f 100644 --- a/src/sim/reader_pcsc.c +++ b/src/sim/reader_pcsc.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/socket.c b/src/socket.c index b516abf..82ccfed 100644 --- a/src/socket.c +++ b/src/socket.c @@ -3,6 +3,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stat_item.c b/src/stat_item.c index cbcdebc..cb9b90f 100644 --- a/src/stat_item.c +++ b/src/stat_item.c @@ -1,11 +1,13 @@ /*! \file stat_item.c * utility routines for keeping statistical values */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH * (C) 2009-2010 by Harald Welte + * (C) 2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats.c b/src/stats.c index ff31ff6..b5adbf2 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,11 +1,11 @@ /*! \file stats.c */ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/stats_statsd.c b/src/stats_statsd.c index 5145bf7..c11c013 100644 --- a/src/stats_statsd.c +++ b/src/stats_statsd.c @@ -1,10 +1,10 @@ /* - * (C) 2015 by Sysmocom s.f.m.c. GmbH - * + * (C) 2015 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck - * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/strrb.c b/src/strrb.c index 6bfb179..461fdec 100644 --- a/src/strrb.c +++ b/src/strrb.c @@ -19,6 +19,8 @@ * (C) 2012-2013, Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer.c b/src/timer.c index bf46c24..9ec7a00 100644 --- a/src/timer.c +++ b/src/timer.c @@ -7,6 +7,8 @@ * Harald Welte * Pablo Neira Ayuso * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/timer_gettimeofday.c b/src/timer_gettimeofday.c index 4298805..15b5e31 100644 --- a/src/timer_gettimeofday.c +++ b/src/timer_gettimeofday.c @@ -1,8 +1,9 @@ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Authors: Neels Hofmeyr * All Rights Reserved * - * Authors: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/utils.c b/src/utils.c index a62f5e9..f63ff89 100644 --- a/src/utils.c +++ b/src/utils.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/buffer.c b/src/vty/buffer.c index 1935aa1..e68e3a2 100644 --- a/src/vty/buffer.c +++ b/src/vty/buffer.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1998 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify diff --git a/src/vty/command.c b/src/vty/command.c index 98d86d2..5f7a42c 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -3,6 +3,12 @@ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + Copyright (C) 2010-2011 Holger Hans Peter Freyther + Copyright (C) 2012 Sylvain Munaut + Copyright (C) 2013,2015 Harald Welte + Copyright (C) 2013,2017 sysmocom - s.f.m.c. GmbH + + SPDX-License-Identifier: GPL-2.0+ This file is part of GNU Zebra. diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c index 50c7fd5..8abb9c9 100644 --- a/src/vty/fsm_vty.c +++ b/src/vty/fsm_vty.c @@ -2,6 +2,8 @@ * (C) 2016 by Harald Welte * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 9b7d10a..215394f 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -3,6 +3,8 @@ * (C) 2009-2014 by Holger Hans Peter Freyther * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 2ccbf66..6c09c38 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -1,9 +1,11 @@ /* * (C) 2009-2010 by Harald Welte * (C) 2009-2014 by Holger Hans Peter Freyther - * (C) 2015 by Sysmocom s.f.m.c. GmbH + * (C) 2015 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c index 136a1b4..601b696 100644 --- a/src/vty/talloc_ctx_vty.c +++ b/src/vty/talloc_ctx_vty.c @@ -5,6 +5,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 40154fe..0ccf8dc 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -1,6 +1,9 @@ -/* (C) 2009 by Holger Hans Peter Freyther +/* (C) 2009-2010 by Holger Hans Peter Freyther + * (C) 2010 by Sylvain Munaut * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/utils.c b/src/vty/utils.c index e7aeb88..8cd0b35 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -2,9 +2,12 @@ * Utility routines for printing common objects in the Osmocom world. */ /* * (C) 2009-2010 by Harald Welte + * (C) 2013,2015 by sysmocom - s.f.m.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/vty/vector.c b/src/vty/vector.c index ee07cbd..f9e5ec3 100644 --- a/src/vty/vector.c +++ b/src/vty/vector.c @@ -3,6 +3,8 @@ /* * Copyright (C) 1997 Kunihiro Ishiguro * + * SPDX-License-Identifier: GPL-2.0+ + * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify it diff --git a/src/vty/vty.c b/src/vty/vty.c index aef73b3..e741a66 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -22,7 +22,7 @@ * * \section sec_copyright Copyright and License * Copyright ? 1997-2007 - Kuninhiro Ishiguro\n - * Copyright ? 2008-2011 - Harald Welte, Holger Freyther and contributors\n + * Copyright ? 2008-2012 - Harald Welte, Holger Freyther and contributors\n * All rights reserved. \n\n * The source code of libosmovty is licensed under the terms of the GNU * General Public License as published by the Free Software Foundation; @@ -46,6 +46,7 @@ * */ +/* SPDX-License-Identifier: GPL-2.0+ */ #include #include diff --git a/src/write_queue.c b/src/write_queue.c index 203815b..fb6839a 100644 --- a/src/write_queue.c +++ b/src/write_queue.c @@ -4,6 +4,8 @@ * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index cb88b01..a631712 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -1,6 +1,6 @@ /* * (C) 2012 by Holger Hans Peter Freyther - * (C) 2017 by sysmocom s.m.f.c. GmbH + * (C) 2017 by sysmocom - s.m.f.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c index b204d77..7a10fc5 100644 --- a/tests/codec/codec_test.c +++ b/tests/codec/codec_test.c @@ -1,10 +1,12 @@ /* - * (C) 2016 by Sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -12,7 +14,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ diff --git a/tests/gb/gprs_bssgp_test.c b/tests/gb/gprs_bssgp_test.c index 3de05dd..1624a31 100644 --- a/tests/gb/gprs_bssgp_test.c +++ b/tests/gb/gprs_bssgp_test.c @@ -1,10 +1,12 @@ /* Test routines for the BSSGP implementation in libosmogb * - * (C) 2014 by sysmocom s.f.m.c. GmbH + * (C) 2014 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck * * Skeleton based on bssgp_fc_test.c * (C) 2012 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gb/gprs_ns_test.c b/tests/gb/gprs_ns_test.c index fac3c36..7e6b85c 100644 --- a/tests/gb/gprs_ns_test.c +++ b/tests/gb/gprs_ns_test.c @@ -1,6 +1,8 @@ /* test routines for NS connection handling - * (C) 2013 by sysmocom s.f.m.c. GmbH + * (C) 2013 by sysmocom - s.f.m.c. GmbH * Author: Jacob Erlbeck + * + * SPDX-License-Identifier: GPL-2.0+ */ #undef _GNU_SOURCE diff --git a/tests/gsm23003/gsm23003_test.c b/tests/gsm23003/gsm23003_test.c index a408b73..64d756d 100644 --- a/tests/gsm23003/gsm23003_test.c +++ b/tests/gsm23003/gsm23003_test.c @@ -1,8 +1,9 @@ /* * (C) 2017 by sysmocom s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr + * SPDX-License-Identifier: GPL-2.0+ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 0dccaa4..d6c0495 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -1,9 +1,11 @@ /* * (C) 2011 by Holger Hans Peter Freyther * (C) 2011 by On-Waves - * (C) 2014 by Daniel Willmann + * (C) 2014 by sysmocom - s.f.m.c. GmbH, Author: Daniel Willmann * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index 0c4c16e..dea5c11 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -1,9 +1,9 @@ /* Test Osmocom Authentication Protocol */ /* - * (C) 2016 by sysmocom s.f.m.c. GmbH + * (C) 2016 by sysmocom - s.f.m.c. GmbH + * Author: Neels Hofmeyr * All Rights Reserved * - * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 59fc449..b302b37 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -1,9 +1,11 @@ /* tests for statistics */ /* - * (C) 2015 Sysmocom s.m.f.c. GmbH + * (C) 2015 sysmocom - s.m.f.c. GmbH * * All Rights Reserved * + * SPDX-License-Identifier: GPL-2.0+ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/tests/strrb/strrb_test.c b/tests/strrb/strrb_test.c index 6140ac9..4282d1a 100644 --- a/tests/strrb/strrb_test.c +++ b/tests/strrb/strrb_test.c @@ -1,6 +1,8 @@ /* (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved * + * SPDX-License-Identifier: GPL-3.0+ + * * This program is iree software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 2542baf..42646eb 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -1,9 +1,11 @@ -/* (C) 2013 by Jacob Erlbeck +/* (C) 2013 by sysmocom - s.f.m.c. GmbH, Author: Jacob Erlbeck * All Rights Reserved * - * This program is iree software; you can redistribute it and/or modify + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- To view, visit https://gerrit.osmocom.org/4801 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:54 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp_kernel: Change gtp_kernel_init() function signature Message-ID: Review at https://gerrit.osmocom.org/4810 gtp_kernel: Change gtp_kernel_init() function signature Rather than taking an explicit in_addr, prefix_length and a string-formatted prefix, let's pass in an in46_prefix and derive the other representations from it. Also, don't refer to a no-longer-existing global 'ipup' variable but add it as a function argument. Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/10/4810/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 916b92f..a5708fc 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -57,9 +57,18 @@ /* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ #define GTP_DEVNAME "gtp0" -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { + struct in_addr net; + const char *net_arg; + + if (prefix->addr.len != 4) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "we only support IPv4 in this path :/"); + return -1; + } + net = prefix->addr.v4; + if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", @@ -83,10 +92,12 @@ SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + net_arg = in46p_ntoa(prefix); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, GTP_DEVNAME); - if (gtp_dev_config(GTP_DEVNAME, net, prefixlen) < 0) { + if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 34fd7bf..7ab51b1 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,8 +7,7 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg); +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); void gtp_kernel_stop(void); int gtp_kernel_tunnel_add(struct pdp_t *pdp); @@ -17,8 +16,7 @@ int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; -- To view, visit https://gerrit.osmocom.org/4810 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:54 +0000 Subject: [PATCH] osmo-ggsn[master]: WIP: Re-add support for kernel GTP-U acceleration Message-ID: Review at https://gerrit.osmocom.org/4811 WIP: Re-add support for kernel GTP-U acceleration When we branched off osmo-ggsn from the old openggsn code base, the support for kernel-gtp got temporarily removed. This patch re-introduces support for handling the GTP-U plane in the Linux kernel by means of libgtpnl + the kernel GTP-U driver. This only works for IPv4 at the moment, until the kernel GTP-U code gains IPv6 support. Kernel GTP currently also is restricted to a single APN per GSN. Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 --- M ggsn/ggsn.c M ggsn/gtp-kernel.h 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/11/4811/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 8b576ab..999bc3a 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -255,12 +255,16 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: - LOGPAPN(LOGL_ERROR, apn, "FIXME: Kernel GTP\n"); -#if 0 + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); + apn_stop(apn, false); + return -1; + } + LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(gsn, &net.v4, prefixlen, net_arg) < 0) - goto err; -#endif + if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + return -1; + } break; default: LOGPAPN(LOGL_ERROR, apn, "Unknown GTPU Mode %d\n", apn->cfg.gtpu_mode); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 7ab51b1..ce57994 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -16,7 +16,7 @@ int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; -- To view, visit https://gerrit.osmocom.org/4811 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:54 +0000 Subject: [PATCH] osmo-ggsn[master]: remove unused argument to alloc_ippool_blacklist() Message-ID: Review at https://gerrit.osmocom.org/4812 remove unused argument to alloc_ippool_blacklist() Change-Id: I4d3ea077ba46446e537ec9a6de6f4080fcaa428c --- M ggsn/ggsn.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/12/4812/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 999bc3a..9d55ffb 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -147,7 +147,7 @@ } -static int alloc_ippool_blacklist(struct apn_ctx *apn, const struct tun_t *tun, struct in46_prefix **blacklist, bool ipv6) +static int alloc_ippool_blacklist(struct apn_ctx *apn, struct in46_prefix **blacklist, bool ipv6) { int flags, len, len2, i; @@ -275,7 +275,7 @@ if (apn->v4.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv4 pool %s\n", in46p_ntoa(&apn->v4.cfg.dynamic_prefix)); - if ((blacklist_size = alloc_ippool_blacklist(apn, apn->tun.tun, &blacklist, false)) < 0) + if ((blacklist_size = alloc_ippool_blacklist(apn, &blacklist, false)) < 0) LOGPAPN(LOGL_ERROR, apn, "Failed obtaining IPv4 tun IPs\n"); if (ippool_new(&apn->v4.pool, &apn->v4.cfg.dynamic_prefix, &apn->v4.cfg.static_prefix, ippool_flags, @@ -292,7 +292,7 @@ if (apn->v6.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv6 pool %s\n", in46p_ntoa(&apn->v6.cfg.dynamic_prefix)); - if ((blacklist_size = alloc_ippool_blacklist(apn, apn->tun.tun, &blacklist, true)) < 0) + if ((blacklist_size = alloc_ippool_blacklist(apn, &blacklist, true)) < 0) LOGPAPN(LOGL_ERROR, apn, "Failed obtaining IPv6 tun IPs\n"); if (ippool_new(&apn->v6.pool, &apn->v6.cfg.dynamic_prefix, &apn->v6.cfg.static_prefix, ippool_flags, -- To view, visit https://gerrit.osmocom.org/4812 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d3ea077ba46446e537ec9a6de6f4080fcaa428c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:55 +0000 Subject: [PATCH] osmo-ggsn[master]: Get rid of hard-coded kernel GTP device name Message-ID: Review at https://gerrit.osmocom.org/4813 Get rid of hard-coded kernel GTP device name The existing kernel GTP support code inherited from OpenGGSN was overly simplistic and didn't support multiple GTP devices or user-defined GTP device names. Let's remove that restriction in this patch Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 --- M ggsn/ggsn.c M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 3 files changed, 25 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/13/4813/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 9d55ffb..2785c2c 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -262,7 +262,8 @@ } LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, + &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { return -1; } break; @@ -330,6 +331,7 @@ { struct gsn_t *gsn = pdp->gsn; struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; + struct apn_ctx *apn = pdp->priv; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; @@ -340,7 +342,7 @@ } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); - if (gtp_kernel_tunnel_del(pdp)) { + if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", strerror(errno)); } @@ -563,7 +565,7 @@ in46a_to_eua(&member->addr, &pdp->eua); /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ - if (gtp_kernel_tunnel_add(pdp) < 0) { + if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; @@ -592,6 +594,7 @@ pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ + pdp->priv = apn; member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a5708fc..102f0f7 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -54,10 +54,7 @@ bool enabled; } gtp_nl; -/* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ -#define GTP_DEVNAME "gtp0" - -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; @@ -69,7 +66,7 @@ } net = prefix->addr.v4; - if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { + if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", strerror(errno)); @@ -94,10 +91,9 @@ net_arg = in46p_ntoa(prefix); - DEBUGP(DGGSN, "Setting route to reach %s via %s\n", - net_arg, GTP_DEVNAME); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); - if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { + if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); @@ -113,8 +109,7 @@ int err; /* eg. /home/ggsn/ipup gtp0 10.0.0.0/8 */ - snprintf(cmd, sizeof(cmd), "%s %s %s", - ipup, GTP_DEVNAME, net_arg); + snprintf(cmd, sizeof(cmd), "%s %s %s", ipup, devname, net_arg); cmd[sizeof(cmd)-1] = '\0'; err = system(cmd); @@ -129,15 +124,15 @@ return 0; } -void gtp_kernel_stop(void) +void gtp_kernel_stop(const char *devname) { if (!gtp_nl.enabled) return; - gtp_dev_destroy(GTP_DEVNAME); + gtp_dev_destroy(devname); } -int gtp_kernel_tunnel_add(struct pdp_t *pdp) +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { struct in_addr ms, sgsn; struct gtp_tunnel *t; @@ -155,7 +150,7 @@ memcpy(&ms, &pdp->eua.v[2], sizeof(struct in_addr)); memcpy(&sgsn, &pdp->gsnrc.v[0], sizeof(struct in_addr)); - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); gtp_tunnel_set_ms_ip4(t, &ms); gtp_tunnel_set_sgsn_ip4(t, &sgsn); @@ -175,7 +170,7 @@ return ret; } -int gtp_kernel_tunnel_del(struct pdp_t *pdp) +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { struct gtp_tunnel *t; int ret; @@ -189,7 +184,7 @@ if (t == NULL) return -1; - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); if (pdp->version == 0) { gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi)); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index ce57994..79cdae7 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,29 +7,29 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); -void gtp_kernel_stop(void); +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup); +void gtp_kernel_stop(const char *devname); -int gtp_kernel_tunnel_add(struct pdp_t *pdp); -int gtp_kernel_tunnel_del(struct pdp_t *pdp); +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; } -static inline void gtp_kernel_stop(void) {} +static inline void gtp_kernel_stop(const char *devname) {} -static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); { return 0; } -static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); { return 0; } -- To view, visit https://gerrit.osmocom.org/4813 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:55 +0000 Subject: [PATCH] osmo-ggsn[master]: factor out netdev_ip_local_get() from tun_ip_local_get() Message-ID: Review at https://gerrit.osmocom.org/4814 factor out netdev_ip_local_get() from tun_ip_local_get() netdev_ip_local_get() is a generalized version of tun_ip_local_get() which supports the net device as argument, rather than a tun_t. Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6 --- M lib/tun.c M lib/tun.h 2 files changed, 25 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/14/4814/1 diff --git a/lib/tun.c b/lib/tun.c index 3c293a2..fcd04f3 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -750,8 +750,8 @@ #include -/*! Obtain the local address of the tun device. - * \param[in] tun Target device owning the IP +/*! Obtain the local address of a network device + * \param[in] devname Target device owning the IP * \param[out] prefix_list List of prefix structures to fill with each IPv4/6 and prefix length found. * \param[in] prefix_size Amount of elements allowed to be fill in the prefix_list array. * \param[in] flags Specify which kind of IP to look for: IP_TYPE_IPv4, IP_TYPE_IPv6_LINK, IP_TYPE_IPv6_NONLINK @@ -763,7 +763,7 @@ * prefix_size. It can be used with prefix_size=0 to get an estimate of the size * needed for prefix_list. */ -int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags) +int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, size_t prefix_size, int flags) { static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; struct ifaddrs *ifaddr, *ifa; @@ -779,7 +779,7 @@ if (ifa->ifa_addr == NULL) continue; - if (strcmp(ifa->ifa_name, tun->devname)) + if (strcmp(ifa->ifa_name, devname)) continue; if (ifa->ifa_addr->sa_family == AF_INET && (flags & IP_TYPE_IPv4)) { @@ -820,3 +820,21 @@ freeifaddrs(ifaddr); return count; } + +/*! Obtain the local address of the tun device. + * \param[in] tun Target device owning the IP + * \param[out] prefix_list List of prefix structures to fill with each IPv4/6 and prefix length found. + * \param[in] prefix_size Amount of elements allowed to be fill in the prefix_list array. + * \param[in] flags Specify which kind of IP to look for: IP_TYPE_IPv4, IP_TYPE_IPv6_LINK, IP_TYPE_IPv6_NONLINK + * \returns The number of ips found following the criteria specified by flags, -1 on error. + * + * This function will fill prefix_list with up to prefix_size IPs following the + * criteria specified by flags parameter. It returns the number of IPs matching + * the criteria. As a result, the number returned can be bigger than + * prefix_size. It can be used with prefix_size=0 to get an estimate of the size + * needed for prefix_list. + */ +int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags) +{ + return netdev_ip_local_get(tun->devname, prefix_list, prefix_size, flags); +} diff --git a/lib/tun.h b/lib/tun.h index 0b960e5..411deea 100644 --- a/lib/tun.h +++ b/lib/tun.h @@ -95,6 +95,9 @@ extern int tun_runscript(struct tun_t *tun, char *script); +int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, + size_t prefix_size, int flags); + int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags); -- To view, visit https://gerrit.osmocom.org/4814 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:56 +0000 Subject: [PATCH] osmo-ggsn[master]: Properly NULL-out blacklist in alloc_ippool_blacklist() Message-ID: Review at https://gerrit.osmocom.org/4815 Properly NULL-out blacklist in alloc_ippool_blacklist() This ensures that in case of error, any caller can still safely call talloc_free() on the blacklist pointerm as free on NULL is well-defined. With the code prior to this patch we fear a double-free. Change-Id: Idc511cb3f0dfb922920aba8f88ea77df1722ecdc --- M ggsn/ggsn.c 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4815/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2785c2c..6aa4210 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -152,26 +152,30 @@ int flags, len, len2, i; + *blacklist = NULL; + if (ipv6) flags = IP_TYPE_IPv6_NONLINK; else flags = IP_TYPE_IPv4; while (1) { - len = tun_ip_local_get(apn->tun.tun, NULL, 0, flags); + len = netdev_ip_local_get(apn->tun.cfg.dev_name, NULL, 0, flags); if (len < 1) return len; *blacklist = talloc_zero_size(apn, len * sizeof(struct in46_prefix)); - len2 = tun_ip_local_get(apn->tun.tun, *blacklist, len, flags); + len2 = netdev_ip_local_get(apn->tun.cfg.dev_name, *blacklist, len, flags); if (len2 < 1) { talloc_free(*blacklist); + *blacklist = NULL; return len2; } - if (len2 > len) /* iface was added between 2 calls, repeat operation */ + if (len2 > len) { /* iface was added between 2 calls, repeat operation */ talloc_free(*blacklist); - else + *blacklist = NULL; + } else break; } -- To view, visit https://gerrit.osmocom.org/4815 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc511cb3f0dfb922920aba8f88ea77df1722ecdc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:56 +0000 Subject: [PATCH] osmo-ggsn[master]: shut down kernel GTP device in apn_down() Message-ID: Review at https://gerrit.osmocom.org/4816 shut down kernel GTP device in apn_down() When we take the APN down, we should also take the GTP device down. Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/4816/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6aa4210..1d4e592 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -130,6 +130,7 @@ tun_free(apn->tun.tun); apn->tun.tun = NULL; } + gtp_kernel_stop(apn->tun.cfg.dev_name); if (apn->v4.pool) { LOGPAPN(LOGL_INFO, apn, "Releasing IPv4 pool\n"); -- To view, visit https://gerrit.osmocom.org/4816 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:56 +0000 Subject: [PATCH] osmo-ggsn[master]: Align logging for APN start in kernel-gtp case with that of TUN Message-ID: Review at https://gerrit.osmocom.org/4817 Align logging for APN start in kernel-gtp case with that of TUN Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/17/4817/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1d4e592..0beaef7 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -260,12 +260,12 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: + LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); apn_stop(apn, false); return -1; } - LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { -- To view, visit https://gerrit.osmocom.org/4817 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:56 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Avoid global state variable Message-ID: Review at https://gerrit.osmocom.org/4818 gtp-kernel: Avoid global state variable Whether or not GTP kernel support is enabled is the property of a given APN, and not a global state variable. Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/18/4818/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 102f0f7..e1553bd 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -51,7 +51,6 @@ static struct { int genl_id; struct mnl_socket *nl; - bool enabled; } gtp_nl; int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) @@ -72,7 +71,6 @@ strerror(errno)); return -1; } - gtp_nl.enabled = true; gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { @@ -126,9 +124,6 @@ void gtp_kernel_stop(const char *devname) { - if (!gtp_nl.enabled) - return; - gtp_dev_destroy(devname); } @@ -137,9 +132,6 @@ struct in_addr ms, sgsn; struct gtp_tunnel *t; int ret; - - if (!gtp_nl.enabled) - return 0; pdp_debug(pdp); @@ -175,9 +167,6 @@ struct gtp_tunnel *t; int ret; - if (!gtp_nl.enabled) - return 0; - pdp_debug(pdp); t = gtp_tunnel_alloc(); @@ -197,9 +186,4 @@ gtp_tunnel_free(t); return ret; -} - -int gtp_kernel_enabled(void) -{ - return gtp_nl.enabled; } diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 79cdae7..a34d8e0 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -13,8 +13,6 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -int gtp_kernel_enabled(void); - #else static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { @@ -30,11 +28,6 @@ } static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -{ - return 0; -} - -static inline int gtp_kernel_enabled(void) { return 0; } -- To view, visit https://gerrit.osmocom.org/4818 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:57 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Make sure repeated calls to gtp_kernel_init() ar... Message-ID: Review at https://gerrit.osmocom.org/4819 gtp-kernel: Make sure repeated calls to gtp_kernel_init() are safe We have to factor out the "run once" code and make sure to really only run that once, while the per-device code remains in the gtp_kernel_init() function. Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 --- M ggsn/gtp-kernel.c 1 file changed, 25 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/19/4819/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index e1553bd..8f538a2 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -53,10 +53,35 @@ struct mnl_socket *nl; } gtp_nl; +static int gtp_kernel_init_once(void) +{ + /* only initialize once */ + if (gtp_nl.nl) + return 0; + + gtp_nl.nl = genl_socket_open(); + if (gtp_nl.nl == NULL) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + return -1; + } + gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); + if (gtp_nl.genl_id < 0) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "cannot lookup GTP genetlink ID\n"); + return -1; + } + SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + + return 0; +} + int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; + + if (!gtp_nl.nl) + gtp_kernel_init_once(); if (prefix->addr.len != 4) { SYS_ERR(DGGSN, LOGL_ERROR, 0, @@ -71,21 +96,6 @@ strerror(errno)); return -1; } - - gtp_nl.nl = genl_socket_open(); - if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create genetlink socket\n"); - return -1; - } - gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); - if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); - return -1; - } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, - "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); net_arg = in46p_ntoa(prefix); -- To view, visit https://gerrit.osmocom.org/4819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:57 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: proper cleanup in error path Message-ID: Review at https://gerrit.osmocom.org/4820 gtp-kernel: proper cleanup in error path When genl_socket_open() succeeds but genl_lookup_family() fails, we have to clean up the socket that we just opened. This requires a new version of libgtpnl :/ Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 --- M ggsn/gtp-kernel.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/20/4820/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 8f538a2..a35153e 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -68,6 +68,8 @@ if (gtp_nl.genl_id < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot lookup GTP genetlink ID\n"); + genl_socket_close(gtp_nl.nl); + gtp_nl.nl = NULL; return -1; } SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); -- To view, visit https://gerrit.osmocom.org/4820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:57 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel.c: Get rid of SYS_ERR where not applicable Message-ID: Review at https://gerrit.osmocom.org/4821 gtp-kernel.c: Get rid of SYS_ERR where not applicable SYS_ERR is for logging an error from the (operating) system including the errno value. For general logging, we have DEBUGP/LOGP. Let's convert the gtp-kernel logging over. This also fixes the related line ending mess-up as SYS_ERR adds a LF while LOGP/DEBUGP don't. Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae --- M ggsn/gtp-kernel.c 1 file changed, 8 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/4821/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a35153e..0f18002 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -61,18 +61,17 @@ gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot create genetlink socket\n"); return -1; } gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot lookup GTP genetlink ID\n"); genl_socket_close(gtp_nl.nl); gtp_nl.nl = NULL; return -1; } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + LOGP(DGGSN, LOGL_NOTICE, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); return 0; } @@ -86,15 +85,13 @@ gtp_kernel_init_once(); if (prefix->addr.len != 4) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "we only support IPv4 in this path :/"); + LOGP(DGGSN, LOGL_ERROR, "we only support IPv4 in this path :/"); return -1; } net = prefix->addr.v4; if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create GTP tunnel device: %s\n", + LOGP(DGGSN, LOGL_ERROR, "cannot create GTP tunnel device: %s\n", strerror(errno)); return -1; } @@ -104,9 +101,7 @@ DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Cannot add route to reach network %s\n", - net_arg); + LOGP(DGGSN, LOGL_ERROR, "Cannot add route to reach network %s\n", net_arg); } /* launch script if it is set to bring up the route to reach @@ -124,12 +119,11 @@ err = system(cmd); if (err < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Failed to launch script `%s'", ipup); + LOGP(DGGSN, LOGL_ERROR, "Failed to launch script `%s'\n", ipup); return -1; } } - SYS_ERR(DGGSN, LOGL_NOTICE, 0, "GTP kernel configured\n"); + LOGP(DGGSN, LOGL_NOTICE, "GTP kernel configured\n"); return 0; } -- To view, visit https://gerrit.osmocom.org/4821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:57 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Add function name to pdp_debug() function calls Message-ID: Review at https://gerrit.osmocom.org/4822 gtp-kernel: Add function name to pdp_debug() function calls This allows us to distinguish "add" from "del" operatons in the log Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 --- M ggsn/gtp-kernel.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/22/4822/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 0f18002..98d524b 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(struct pdp_t *pdp) +static void pdp_debug(const char *prefix, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,7 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +139,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +173,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4822 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Nov 12 22:13:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 Nov 2017 22:13:57 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Add device nime in pdp_debug() log statements Message-ID: Review at https://gerrit.osmocom.org/4823 gtp-kernel: Add device nime in pdp_debug() log statements Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e --- M ggsn/gtp-kernel.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/23/4823/1 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 98d524b..4564d9a 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(const char *prefix, struct pdp_t *pdp) +static void pdp_debug(const char *prefix, const char *devname, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,8 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s %s v%u TEID %"PRIx64" EUA=%s SGSN=%s\n", prefix, + devname, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +140,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +174,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4823 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Nov 13 01:52:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 13 Nov 2017 01:52:51 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation Message-ID: Review at https://gerrit.osmocom.org/4824 OsmoGGSN: more info on non-root operation / tun creation Add examples for 'ip addr add' and mention correspondence to config file, add examples for enabling masquerading and IP forwarding, place the non-root config in its own section and highlight the diffs. Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 --- M OsmoGGSN/chapters/configuration.adoc 1 file changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/24/4824/1 diff --git a/OsmoGGSN/chapters/configuration.adoc b/OsmoGGSN/chapters/configuration.adoc index 9a4c81b..b7b292b 100644 --- a/OsmoGGSN/chapters/configuration.adoc +++ b/OsmoGGSN/chapters/configuration.adoc @@ -266,8 +266,20 @@ Where _username_ and _groupname_ correspond to the User and Group that will have ownership over the device, i.e. the privileges which you intend to run osmo-ggsn under, and _apn0_ will be the name of the network device created. After creating the interface, you can configure its addresses -using standard means like `ip addr add` or your distribution-specific utilities/tools. +using standard means like `ip addr add` or your distribution-specific utilities/tools +to match the `ip prefix dynamic` config item, and activate the link, for example: +---- +# ip addr add 192.168.7.0/24 dev apn0 +# ip link set apn0 up +---- + +To manually enable IP forwarding and masquerading, you can do: + +---- +# sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" +# iptables -t nat -A POSTROUTING -o '*' -j MASQUERADE +---- ==== systemd based TUN device creation+configuration @@ -303,8 +315,13 @@ You may not want this if you have proper end-to-end routing set up, and want to have transparent inbound IP access to your GPRS-attached devices. -The pair of the configuration files above allows you to create and configure tun device which can be -used by OsmoGGSN as follows. +==== Config Changes + +With the tun device pre-configured in one of the ways outlined above, the main +changes in your osmo-ggsn.cfg file are: + +* remove `ip ifconfig` directive, +* add `no shutdown` under the `apn` section. .Example: using externally configured tun device as non-root ---- -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 13 01:52:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 13 Nov 2017 01:52:52 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: multiple instances: mention GTP port Message-ID: Review at https://gerrit.osmocom.org/4825 OsmoGGSN: multiple instances: mention GTP port Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32 --- M OsmoGGSN/chapters/running.adoc 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/25/4825/1 diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index a242e36..ef899b5 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -39,3 +39,12 @@ ctrl bind 127.0.0.2 ---- + +Also make sure to place each instance's GTP bind on a separate IP address (GTP +uses a port number that is fixed in the GTP specifications, so it will not be +possible to pick differing ports on the same IP address), like: + +---- +ggsn ggsn0 + gtp bind-ip 127.0.0.2 +---- -- To view, visit https://gerrit.osmocom.org/4825 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp_kernel: Change gtp_kernel_init() function signature In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4810 to look at the new patch set (#2). gtp_kernel: Change gtp_kernel_init() function signature Rather than taking an explicit in_addr, prefix_length and a string-formatted prefix, let's pass in an in46_prefix and derive the other representations from it. Also, don't refer to a no-longer-existing global 'ipup' variable but add it as a function argument. Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/10/4810/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 916b92f..a5708fc 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -57,9 +57,18 @@ /* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ #define GTP_DEVNAME "gtp0" -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { + struct in_addr net; + const char *net_arg; + + if (prefix->addr.len != 4) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "we only support IPv4 in this path :/"); + return -1; + } + net = prefix->addr.v4; + if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", @@ -83,10 +92,12 @@ SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + net_arg = in46p_ntoa(prefix); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, GTP_DEVNAME); - if (gtp_dev_config(GTP_DEVNAME, net, prefixlen) < 0) { + if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 34fd7bf..ce57994 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,8 +7,7 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg); +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); void gtp_kernel_stop(void); int gtp_kernel_tunnel_add(struct pdp_t *pdp); @@ -17,8 +16,7 @@ int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; -- To view, visit https://gerrit.osmocom.org/4810 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Re-add support for kernel GTP-U acceleration In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4811 to look at the new patch set (#2). gtp-kernel: Re-add support for kernel GTP-U acceleration When we branched off osmo-ggsn from the old openggsn code base, the support for kernel-gtp got temporarily removed. This patch re-introduces support for handling the GTP-U plane in the Linux kernel by means of libgtpnl + the kernel GTP-U driver. This only works for IPv4 at the moment, until the kernel GTP-U code gains IPv6 support. Kernel GTP currently also is restricted to a single APN per GSN. Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 --- M ggsn/ggsn.c 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/11/4811/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 4af044e..2937b04 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -259,12 +259,16 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: - LOGPAPN(LOGL_ERROR, apn, "FIXME: Kernel GTP\n"); -#if 0 + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); + apn_stop(apn, false); + return -1; + } + LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(gsn, &net.v4, prefixlen, net_arg) < 0) - goto err; -#endif + if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + return -1; + } break; default: LOGPAPN(LOGL_ERROR, apn, "Unknown GTPU Mode %d\n", apn->cfg.gtpu_mode); -- To view, visit https://gerrit.osmocom.org/4811 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Get rid of hard-coded kernel GTP device name In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4813 to look at the new patch set (#2). gtp-kernel: Get rid of hard-coded kernel GTP device name The existing kernel GTP support code inherited from OpenGGSN was overly simplistic and didn't support multiple GTP devices or user-defined GTP device names. Let's remove that restriction in this patch Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 --- M ggsn/ggsn.c M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 3 files changed, 25 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/13/4813/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2937b04..6aa4210 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -266,7 +266,8 @@ } LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, + &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { return -1; } break; @@ -334,6 +335,7 @@ { struct gsn_t *gsn = pdp->gsn; struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; + struct apn_ctx *apn = pdp->priv; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; @@ -344,7 +346,7 @@ } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); - if (gtp_kernel_tunnel_del(pdp)) { + if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", strerror(errno)); } @@ -567,7 +569,7 @@ in46a_to_eua(&member->addr, &pdp->eua); /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ - if (gtp_kernel_tunnel_add(pdp) < 0) { + if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; @@ -596,6 +598,7 @@ pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ + pdp->priv = apn; member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a5708fc..102f0f7 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -54,10 +54,7 @@ bool enabled; } gtp_nl; -/* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ -#define GTP_DEVNAME "gtp0" - -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; @@ -69,7 +66,7 @@ } net = prefix->addr.v4; - if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { + if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", strerror(errno)); @@ -94,10 +91,9 @@ net_arg = in46p_ntoa(prefix); - DEBUGP(DGGSN, "Setting route to reach %s via %s\n", - net_arg, GTP_DEVNAME); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); - if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { + if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); @@ -113,8 +109,7 @@ int err; /* eg. /home/ggsn/ipup gtp0 10.0.0.0/8 */ - snprintf(cmd, sizeof(cmd), "%s %s %s", - ipup, GTP_DEVNAME, net_arg); + snprintf(cmd, sizeof(cmd), "%s %s %s", ipup, devname, net_arg); cmd[sizeof(cmd)-1] = '\0'; err = system(cmd); @@ -129,15 +124,15 @@ return 0; } -void gtp_kernel_stop(void) +void gtp_kernel_stop(const char *devname) { if (!gtp_nl.enabled) return; - gtp_dev_destroy(GTP_DEVNAME); + gtp_dev_destroy(devname); } -int gtp_kernel_tunnel_add(struct pdp_t *pdp) +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { struct in_addr ms, sgsn; struct gtp_tunnel *t; @@ -155,7 +150,7 @@ memcpy(&ms, &pdp->eua.v[2], sizeof(struct in_addr)); memcpy(&sgsn, &pdp->gsnrc.v[0], sizeof(struct in_addr)); - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); gtp_tunnel_set_ms_ip4(t, &ms); gtp_tunnel_set_sgsn_ip4(t, &sgsn); @@ -175,7 +170,7 @@ return ret; } -int gtp_kernel_tunnel_del(struct pdp_t *pdp) +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { struct gtp_tunnel *t; int ret; @@ -189,7 +184,7 @@ if (t == NULL) return -1; - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); if (pdp->version == 0) { gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi)); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index ce57994..79cdae7 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,29 +7,29 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); -void gtp_kernel_stop(void); +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup); +void gtp_kernel_stop(const char *devname); -int gtp_kernel_tunnel_add(struct pdp_t *pdp); -int gtp_kernel_tunnel_del(struct pdp_t *pdp); +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; } -static inline void gtp_kernel_stop(void) {} +static inline void gtp_kernel_stop(const char *devname) {} -static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); { return 0; } -static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); { return 0; } -- To view, visit https://gerrit.osmocom.org/4813 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: shut down kernel GTP device in apn_down() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4816 to look at the new patch set (#2). gtp-kernel: shut down kernel GTP device in apn_down() When we take the APN down, we should also take the GTP device down. Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/4816/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6aa4210..1d4e592 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -130,6 +130,7 @@ tun_free(apn->tun.tun); apn->tun.tun = NULL; } + gtp_kernel_stop(apn->tun.cfg.dev_name); if (apn->v4.pool) { LOGPAPN(LOGL_INFO, apn, "Releasing IPv4 pool\n"); -- To view, visit https://gerrit.osmocom.org/4816 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Align logging for APN start in kernel-gtp case w... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4817 to look at the new patch set (#2). gtp-kernel: Align logging for APN start in kernel-gtp case with that of TUN Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/17/4817/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1d4e592..0beaef7 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -260,12 +260,12 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: + LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); apn_stop(apn, false); return -1; } - LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { -- To view, visit https://gerrit.osmocom.org/4817 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Avoid global state variable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4818 to look at the new patch set (#2). gtp-kernel: Avoid global state variable Whether or not GTP kernel support is enabled is the property of a given APN, and not a global state variable. Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/18/4818/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 102f0f7..e1553bd 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -51,7 +51,6 @@ static struct { int genl_id; struct mnl_socket *nl; - bool enabled; } gtp_nl; int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) @@ -72,7 +71,6 @@ strerror(errno)); return -1; } - gtp_nl.enabled = true; gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { @@ -126,9 +124,6 @@ void gtp_kernel_stop(const char *devname) { - if (!gtp_nl.enabled) - return; - gtp_dev_destroy(devname); } @@ -137,9 +132,6 @@ struct in_addr ms, sgsn; struct gtp_tunnel *t; int ret; - - if (!gtp_nl.enabled) - return 0; pdp_debug(pdp); @@ -175,9 +167,6 @@ struct gtp_tunnel *t; int ret; - if (!gtp_nl.enabled) - return 0; - pdp_debug(pdp); t = gtp_tunnel_alloc(); @@ -197,9 +186,4 @@ gtp_tunnel_free(t); return ret; -} - -int gtp_kernel_enabled(void) -{ - return gtp_nl.enabled; } diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 79cdae7..a34d8e0 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -13,8 +13,6 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -int gtp_kernel_enabled(void); - #else static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { @@ -30,11 +28,6 @@ } static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -{ - return 0; -} - -static inline int gtp_kernel_enabled(void) { return 0; } -- To view, visit https://gerrit.osmocom.org/4818 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Make sure repeated calls to gtp_kernel_init() ar... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4819 to look at the new patch set (#2). gtp-kernel: Make sure repeated calls to gtp_kernel_init() are safe We have to factor out the "run once" code and make sure to really only run that once, while the per-device code remains in the gtp_kernel_init() function. Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 --- M ggsn/gtp-kernel.c 1 file changed, 25 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/19/4819/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index e1553bd..8f538a2 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -53,10 +53,35 @@ struct mnl_socket *nl; } gtp_nl; +static int gtp_kernel_init_once(void) +{ + /* only initialize once */ + if (gtp_nl.nl) + return 0; + + gtp_nl.nl = genl_socket_open(); + if (gtp_nl.nl == NULL) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + return -1; + } + gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); + if (gtp_nl.genl_id < 0) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "cannot lookup GTP genetlink ID\n"); + return -1; + } + SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + + return 0; +} + int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; + + if (!gtp_nl.nl) + gtp_kernel_init_once(); if (prefix->addr.len != 4) { SYS_ERR(DGGSN, LOGL_ERROR, 0, @@ -71,21 +96,6 @@ strerror(errno)); return -1; } - - gtp_nl.nl = genl_socket_open(); - if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create genetlink socket\n"); - return -1; - } - gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); - if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); - return -1; - } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, - "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); net_arg = in46p_ntoa(prefix); -- To view, visit https://gerrit.osmocom.org/4819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: proper cleanup in error path In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4820 to look at the new patch set (#2). gtp-kernel: proper cleanup in error path When genl_socket_open() succeeds but genl_lookup_family() fails, we have to clean up the socket that we just opened. This requires a new version of libgtpnl :/ Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 --- M ggsn/gtp-kernel.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/20/4820/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 8f538a2..a35153e 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -68,6 +68,8 @@ if (gtp_nl.genl_id < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot lookup GTP genetlink ID\n"); + genl_socket_close(gtp_nl.nl); + gtp_nl.nl = NULL; return -1; } SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); -- To view, visit https://gerrit.osmocom.org/4820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Get rid of SYS_ERR where not applicable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4821 to look at the new patch set (#2). gtp-kernel: Get rid of SYS_ERR where not applicable SYS_ERR is for logging an error from the (operating) system including the errno value. For general logging, we have DEBUGP/LOGP. Let's convert the gtp-kernel logging over. This also fixes the related line ending mess-up as SYS_ERR adds a LF while LOGP/DEBUGP don't. Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae --- M ggsn/gtp-kernel.c 1 file changed, 8 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/4821/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a35153e..0f18002 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -61,18 +61,17 @@ gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot create genetlink socket\n"); return -1; } gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot lookup GTP genetlink ID\n"); genl_socket_close(gtp_nl.nl); gtp_nl.nl = NULL; return -1; } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + LOGP(DGGSN, LOGL_NOTICE, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); return 0; } @@ -86,15 +85,13 @@ gtp_kernel_init_once(); if (prefix->addr.len != 4) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "we only support IPv4 in this path :/"); + LOGP(DGGSN, LOGL_ERROR, "we only support IPv4 in this path :/"); return -1; } net = prefix->addr.v4; if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create GTP tunnel device: %s\n", + LOGP(DGGSN, LOGL_ERROR, "cannot create GTP tunnel device: %s\n", strerror(errno)); return -1; } @@ -104,9 +101,7 @@ DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Cannot add route to reach network %s\n", - net_arg); + LOGP(DGGSN, LOGL_ERROR, "Cannot add route to reach network %s\n", net_arg); } /* launch script if it is set to bring up the route to reach @@ -124,12 +119,11 @@ err = system(cmd); if (err < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Failed to launch script `%s'", ipup); + LOGP(DGGSN, LOGL_ERROR, "Failed to launch script `%s'\n", ipup); return -1; } } - SYS_ERR(DGGSN, LOGL_NOTICE, 0, "GTP kernel configured\n"); + LOGP(DGGSN, LOGL_NOTICE, "GTP kernel configured\n"); return 0; } -- To view, visit https://gerrit.osmocom.org/4821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Add function name to pdp_debug() function calls In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4822 to look at the new patch set (#2). gtp-kernel: Add function name to pdp_debug() function calls This allows us to distinguish "add" from "del" operatons in the log Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 --- M ggsn/gtp-kernel.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/22/4822/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 0f18002..98d524b 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(struct pdp_t *pdp) +static void pdp_debug(const char *prefix, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,7 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +139,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +173,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4822 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:00:50 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Add device nime in pdp_debug() log statements In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4823 to look at the new patch set (#2). gtp-kernel: Add device nime in pdp_debug() log statements Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e --- M ggsn/gtp-kernel.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/23/4823/2 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 98d524b..4564d9a 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(const char *prefix, struct pdp_t *pdp) +static void pdp_debug(const char *prefix, const char *devname, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,8 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s %s v%u TEID %"PRIx64" EUA=%s SGSN=%s\n", prefix, + devname, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +140,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +174,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4823 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:04:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:04:03 +0000 Subject: osmo-ggsn[master]: factor out netdev_ip_local_get() from tun_ip_local_get() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4814 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:04:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:04:12 +0000 Subject: osmo-ggsn[master]: gtp_kernel: Change gtp_kernel_init() function signature In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4810 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:04:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:04:17 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Re-add support for kernel GTP-U acceleration In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4811 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:04:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:04:47 +0000 Subject: osmo-ggsn[master]: remove unused argument to alloc_ippool_blacklist() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4812 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d3ea077ba46446e537ec9a6de6f4080fcaa428c Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:05:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:05:48 +0000 Subject: osmo-ggsn[master]: Properly NULL-out blacklist in alloc_ippool_blacklist() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4815 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc511cb3f0dfb922920aba8f88ea77df1722ecdc Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:09:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:09:09 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Avoid global state variable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4818 to look at the new patch set (#3). gtp-kernel: Avoid global state variable Whether or not GTP kernel support is enabled is the property of a given APN, and not a global state variable. Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/18/4818/3 diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 102f0f7..e1553bd 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -51,7 +51,6 @@ static struct { int genl_id; struct mnl_socket *nl; - bool enabled; } gtp_nl; int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) @@ -72,7 +71,6 @@ strerror(errno)); return -1; } - gtp_nl.enabled = true; gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { @@ -126,9 +124,6 @@ void gtp_kernel_stop(const char *devname) { - if (!gtp_nl.enabled) - return; - gtp_dev_destroy(devname); } @@ -137,9 +132,6 @@ struct in_addr ms, sgsn; struct gtp_tunnel *t; int ret; - - if (!gtp_nl.enabled) - return 0; pdp_debug(pdp); @@ -175,9 +167,6 @@ struct gtp_tunnel *t; int ret; - if (!gtp_nl.enabled) - return 0; - pdp_debug(pdp); t = gtp_tunnel_alloc(); @@ -197,9 +186,4 @@ gtp_tunnel_free(t); return ret; -} - -int gtp_kernel_enabled(void) -{ - return gtp_nl.enabled; } diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 62a0cd2..e2da55a 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -13,8 +13,6 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -int gtp_kernel_enabled(void); - #else static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { @@ -30,11 +28,6 @@ } static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) -{ - return 0; -} - -static inline int gtp_kernel_enabled(void) { return 0; } -- To view, visit https://gerrit.osmocom.org/4818 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:09:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:09:09 +0000 Subject: [PATCH] osmo-ggsn[master]: gtp-kernel: Get rid of hard-coded kernel GTP device name In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4813 to look at the new patch set (#3). gtp-kernel: Get rid of hard-coded kernel GTP device name The existing kernel GTP support code inherited from OpenGGSN was overly simplistic and didn't support multiple GTP devices or user-defined GTP device names. Let's remove that restriction in this patch Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 --- M ggsn/ggsn.c M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 3 files changed, 25 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/13/4813/3 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2937b04..6aa4210 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -266,7 +266,8 @@ } LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, + &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { return -1; } break; @@ -334,6 +335,7 @@ { struct gsn_t *gsn = pdp->gsn; struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; + struct apn_ctx *apn = pdp->priv; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; @@ -344,7 +346,7 @@ } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); - if (gtp_kernel_tunnel_del(pdp)) { + if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", strerror(errno)); } @@ -567,7 +569,7 @@ in46a_to_eua(&member->addr, &pdp->eua); /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ - if (gtp_kernel_tunnel_add(pdp) < 0) { + if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; @@ -596,6 +598,7 @@ pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ + pdp->priv = apn; member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a5708fc..102f0f7 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -54,10 +54,7 @@ bool enabled; } gtp_nl; -/* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ -#define GTP_DEVNAME "gtp0" - -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; @@ -69,7 +66,7 @@ } net = prefix->addr.v4; - if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { + if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", strerror(errno)); @@ -94,10 +91,9 @@ net_arg = in46p_ntoa(prefix); - DEBUGP(DGGSN, "Setting route to reach %s via %s\n", - net_arg, GTP_DEVNAME); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); - if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { + if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); @@ -113,8 +109,7 @@ int err; /* eg. /home/ggsn/ipup gtp0 10.0.0.0/8 */ - snprintf(cmd, sizeof(cmd), "%s %s %s", - ipup, GTP_DEVNAME, net_arg); + snprintf(cmd, sizeof(cmd), "%s %s %s", ipup, devname, net_arg); cmd[sizeof(cmd)-1] = '\0'; err = system(cmd); @@ -129,15 +124,15 @@ return 0; } -void gtp_kernel_stop(void) +void gtp_kernel_stop(const char *devname) { if (!gtp_nl.enabled) return; - gtp_dev_destroy(GTP_DEVNAME); + gtp_dev_destroy(devname); } -int gtp_kernel_tunnel_add(struct pdp_t *pdp) +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { struct in_addr ms, sgsn; struct gtp_tunnel *t; @@ -155,7 +150,7 @@ memcpy(&ms, &pdp->eua.v[2], sizeof(struct in_addr)); memcpy(&sgsn, &pdp->gsnrc.v[0], sizeof(struct in_addr)); - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); gtp_tunnel_set_ms_ip4(t, &ms); gtp_tunnel_set_sgsn_ip4(t, &sgsn); @@ -175,7 +170,7 @@ return ret; } -int gtp_kernel_tunnel_del(struct pdp_t *pdp) +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { struct gtp_tunnel *t; int ret; @@ -189,7 +184,7 @@ if (t == NULL) return -1; - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); if (pdp->version == 0) { gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi)); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index ce57994..62a0cd2 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,29 +7,29 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); -void gtp_kernel_stop(void); +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup); +void gtp_kernel_stop(const char *devname); -int gtp_kernel_tunnel_add(struct pdp_t *pdp); -int gtp_kernel_tunnel_del(struct pdp_t *pdp); +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; } -static inline void gtp_kernel_stop(void) {} +static inline void gtp_kernel_stop(const char *devname) {} -static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { return 0; } -static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { return 0; } -- To view, visit https://gerrit.osmocom.org/4813 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:22:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:22:57 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Get rid of hard-coded kernel GTP device name In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4813 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:00 +0000 Subject: osmo-ggsn[master]: gtp-kernel: shut down kernel GTP device in apn_down() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4816 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:04 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Align logging for APN start in kernel-gtp case w... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4817 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:07 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Avoid global state variable In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4818 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:10 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Make sure repeated calls to gtp_kernel_init() ar... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:13 +0000 Subject: osmo-ggsn[master]: gtp-kernel: proper cleanup in error path In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:15 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Get rid of SYS_ERR where not applicable In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:18 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Add function name to pdp_debug() function calls In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4822 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:24 +0000 Subject: osmo-ggsn[master]: gtp-kernel: Add device nime in pdp_debug() log statements In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4823 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:27 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Add device nime in pdp_debug() log statements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Add device nime in pdp_debug() log statements ...................................................................... gtp-kernel: Add device nime in pdp_debug() log statements Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e --- M ggsn/gtp-kernel.c 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 98d524b..4564d9a 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(const char *prefix, struct pdp_t *pdp) +static void pdp_debug(const char *prefix, const char *devname, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,8 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s %s v%u TEID %"PRIx64" EUA=%s SGSN=%s\n", prefix, + devname, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +140,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +174,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(__func__, pdp); + pdp_debug(__func__, devname, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4823 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad0e7a9fa48fcddc31b8d555244581efdbd61b4e Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:27 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Add function name to pdp_debug() function calls In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Add function name to pdp_debug() function calls ...................................................................... gtp-kernel: Add function name to pdp_debug() function calls This allows us to distinguish "add" from "del" operatons in the log Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 --- M ggsn/gtp-kernel.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 0f18002..98d524b 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -35,7 +35,7 @@ #include "gtp-kernel.h" -static void pdp_debug(struct pdp_t *pdp) +static void pdp_debug(const char *prefix, struct pdp_t *pdp) { struct in46_addr ia46; struct in_addr ia; @@ -43,7 +43,7 @@ in46a_from_eua(&pdp->eua, &ia46); gsna2in_addr(&ia, &pdp->gsnrc); - LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", pdp->version, + LOGPDPX(DGGSN, LOGL_DEBUG, pdp, "%s v%u TEID %"PRIu64"x EUA=%s SGSN=%s\n", prefix, pdp->version, pdp->version == 0 ? pdp_gettid(pdp->imsi, pdp->nsapi) : pdp->teid_gn, in46a_ntoa(&ia46), inet_ntoa(ia)); } @@ -139,7 +139,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) @@ -173,7 +173,7 @@ struct gtp_tunnel *t; int ret; - pdp_debug(pdp); + pdp_debug(__func__, pdp); t = gtp_tunnel_alloc(); if (t == NULL) -- To view, visit https://gerrit.osmocom.org/4822 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe2e76a6eecc7b5fa5f44ab2c1578597138e30b9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:27 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Get rid of SYS_ERR where not applicable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Get rid of SYS_ERR where not applicable ...................................................................... gtp-kernel: Get rid of SYS_ERR where not applicable SYS_ERR is for logging an error from the (operating) system including the errno value. For general logging, we have DEBUGP/LOGP. Let's convert the gtp-kernel logging over. This also fixes the related line ending mess-up as SYS_ERR adds a LF while LOGP/DEBUGP don't. Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae --- M ggsn/gtp-kernel.c 1 file changed, 8 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a35153e..0f18002 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -61,18 +61,17 @@ gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot create genetlink socket\n"); return -1; } gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); + LOGP(DGGSN, LOGL_ERROR, "cannot lookup GTP genetlink ID\n"); genl_socket_close(gtp_nl.nl); gtp_nl.nl = NULL; return -1; } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + LOGP(DGGSN, LOGL_NOTICE, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); return 0; } @@ -86,15 +85,13 @@ gtp_kernel_init_once(); if (prefix->addr.len != 4) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "we only support IPv4 in this path :/"); + LOGP(DGGSN, LOGL_ERROR, "we only support IPv4 in this path :/"); return -1; } net = prefix->addr.v4; if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create GTP tunnel device: %s\n", + LOGP(DGGSN, LOGL_ERROR, "cannot create GTP tunnel device: %s\n", strerror(errno)); return -1; } @@ -104,9 +101,7 @@ DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Cannot add route to reach network %s\n", - net_arg); + LOGP(DGGSN, LOGL_ERROR, "Cannot add route to reach network %s\n", net_arg); } /* launch script if it is set to bring up the route to reach @@ -124,12 +119,11 @@ err = system(cmd); if (err < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "Failed to launch script `%s'", ipup); + LOGP(DGGSN, LOGL_ERROR, "Failed to launch script `%s'\n", ipup); return -1; } } - SYS_ERR(DGGSN, LOGL_NOTICE, 0, "GTP kernel configured\n"); + LOGP(DGGSN, LOGL_NOTICE, "GTP kernel configured\n"); return 0; } -- To view, visit https://gerrit.osmocom.org/4821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb4069a28227b770e20d62bf306cd294f47146ae Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:28 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: proper cleanup in error path In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: proper cleanup in error path ...................................................................... gtp-kernel: proper cleanup in error path When genl_socket_open() succeeds but genl_lookup_family() fails, we have to clean up the socket that we just opened. This requires a new version of libgtpnl :/ Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 --- M ggsn/gtp-kernel.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 8f538a2..a35153e 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -68,6 +68,8 @@ if (gtp_nl.genl_id < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot lookup GTP genetlink ID\n"); + genl_socket_close(gtp_nl.nl); + gtp_nl.nl = NULL; return -1; } SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); -- To view, visit https://gerrit.osmocom.org/4820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31df046530347f88cb7b16c37a899b456ed1b080 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:28 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Make sure repeated calls to gtp_kernel_init() ar... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Make sure repeated calls to gtp_kernel_init() are safe ...................................................................... gtp-kernel: Make sure repeated calls to gtp_kernel_init() are safe We have to factor out the "run once" code and make sure to really only run that once, while the per-device code remains in the gtp_kernel_init() function. Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 --- M ggsn/gtp-kernel.c 1 file changed, 25 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index e1553bd..8f538a2 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -53,10 +53,35 @@ struct mnl_socket *nl; } gtp_nl; +static int gtp_kernel_init_once(void) +{ + /* only initialize once */ + if (gtp_nl.nl) + return 0; + + gtp_nl.nl = genl_socket_open(); + if (gtp_nl.nl == NULL) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create genetlink socket\n"); + return -1; + } + gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); + if (gtp_nl.genl_id < 0) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "cannot lookup GTP genetlink ID\n"); + return -1; + } + SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Initialized GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + + return 0; +} + int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; + + if (!gtp_nl.nl) + gtp_kernel_init_once(); if (prefix->addr.len != 4) { SYS_ERR(DGGSN, LOGL_ERROR, 0, @@ -71,21 +96,6 @@ strerror(errno)); return -1; } - - gtp_nl.nl = genl_socket_open(); - if (gtp_nl.nl == NULL) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot create genetlink socket\n"); - return -1; - } - gtp_nl.genl_id = genl_lookup_family(gtp_nl.nl, "gtp"); - if (gtp_nl.genl_id < 0) { - SYS_ERR(DGGSN, LOGL_ERROR, 0, - "cannot lookup GTP genetlink ID\n"); - return -1; - } - SYS_ERR(DGGSN, LOGL_DEBUG, 0, - "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); net_arg = in46p_ntoa(prefix); -- To view, visit https://gerrit.osmocom.org/4819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iba5bd71e4b725eef59fe4f233fbb965e396a06c3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:28 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Avoid global state variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Avoid global state variable ...................................................................... gtp-kernel: Avoid global state variable Whether or not GTP kernel support is enabled is the property of a given APN, and not a global state variable. Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 0 insertions(+), 23 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 102f0f7..e1553bd 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -51,7 +51,6 @@ static struct { int genl_id; struct mnl_socket *nl; - bool enabled; } gtp_nl; int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) @@ -72,7 +71,6 @@ strerror(errno)); return -1; } - gtp_nl.enabled = true; gtp_nl.nl = genl_socket_open(); if (gtp_nl.nl == NULL) { @@ -126,9 +124,6 @@ void gtp_kernel_stop(const char *devname) { - if (!gtp_nl.enabled) - return; - gtp_dev_destroy(devname); } @@ -137,9 +132,6 @@ struct in_addr ms, sgsn; struct gtp_tunnel *t; int ret; - - if (!gtp_nl.enabled) - return 0; pdp_debug(pdp); @@ -175,9 +167,6 @@ struct gtp_tunnel *t; int ret; - if (!gtp_nl.enabled) - return 0; - pdp_debug(pdp); t = gtp_tunnel_alloc(); @@ -197,9 +186,4 @@ gtp_tunnel_free(t); return ret; -} - -int gtp_kernel_enabled(void) -{ - return gtp_nl.enabled; } diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 62a0cd2..e2da55a 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -13,8 +13,6 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); -int gtp_kernel_enabled(void); - #else static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { @@ -30,11 +28,6 @@ } static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) -{ - return 0; -} - -static inline int gtp_kernel_enabled(void) { return 0; } -- To view, visit https://gerrit.osmocom.org/4818 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff3bd8a52bd6c20f9811ee41ff700486d08591f3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:28 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Align logging for APN start in kernel-gtp case w... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Align logging for APN start in kernel-gtp case with that of TUN ...................................................................... gtp-kernel: Align logging for APN start in kernel-gtp case with that of TUN Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1d4e592..0beaef7 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -260,12 +260,12 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: + LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); apn_stop(apn, false); return -1; } - LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { -- To view, visit https://gerrit.osmocom.org/4817 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie53d37f151e8b6448636a8cde5777b3841989d05 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:29 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: shut down kernel GTP device in apn_down() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: shut down kernel GTP device in apn_down() ...................................................................... gtp-kernel: shut down kernel GTP device in apn_down() When we take the APN down, we should also take the GTP device down. Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6aa4210..1d4e592 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -130,6 +130,7 @@ tun_free(apn->tun.tun); apn->tun.tun = NULL; } + gtp_kernel_stop(apn->tun.cfg.dev_name); if (apn->v4.pool) { LOGPAPN(LOGL_INFO, apn, "Releasing IPv4 pool\n"); -- To view, visit https://gerrit.osmocom.org/4816 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd250dd454a1603834d388884a24a63e044fdd7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:29 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Get rid of hard-coded kernel GTP device name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Get rid of hard-coded kernel GTP device name ...................................................................... gtp-kernel: Get rid of hard-coded kernel GTP device name The existing kernel GTP support code inherited from OpenGGSN was overly simplistic and didn't support multiple GTP devices or user-defined GTP device names. Let's remove that restriction in this patch Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 --- M ggsn/ggsn.c M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 3 files changed, 25 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2937b04..6aa4210 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -266,7 +266,8 @@ } LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, + &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { return -1; } break; @@ -334,6 +335,7 @@ { struct gsn_t *gsn = pdp->gsn; struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; + struct apn_ctx *apn = pdp->priv; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; @@ -344,7 +346,7 @@ } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); - if (gtp_kernel_tunnel_del(pdp)) { + if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", strerror(errno)); } @@ -567,7 +569,7 @@ in46a_to_eua(&member->addr, &pdp->eua); /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ - if (gtp_kernel_tunnel_add(pdp) < 0) { + if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; @@ -596,6 +598,7 @@ pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ + pdp->priv = apn; member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index a5708fc..102f0f7 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -54,10 +54,7 @@ bool enabled; } gtp_nl; -/* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ -#define GTP_DEVNAME "gtp0" - -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { struct in_addr net; const char *net_arg; @@ -69,7 +66,7 @@ } net = prefix->addr.v4; - if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { + if (gtp_dev_create(-1, devname, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", strerror(errno)); @@ -94,10 +91,9 @@ net_arg = in46p_ntoa(prefix); - DEBUGP(DGGSN, "Setting route to reach %s via %s\n", - net_arg, GTP_DEVNAME); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, devname); - if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { + if (gtp_dev_config(devname, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); @@ -113,8 +109,7 @@ int err; /* eg. /home/ggsn/ipup gtp0 10.0.0.0/8 */ - snprintf(cmd, sizeof(cmd), "%s %s %s", - ipup, GTP_DEVNAME, net_arg); + snprintf(cmd, sizeof(cmd), "%s %s %s", ipup, devname, net_arg); cmd[sizeof(cmd)-1] = '\0'; err = system(cmd); @@ -129,15 +124,15 @@ return 0; } -void gtp_kernel_stop(void) +void gtp_kernel_stop(const char *devname) { if (!gtp_nl.enabled) return; - gtp_dev_destroy(GTP_DEVNAME); + gtp_dev_destroy(devname); } -int gtp_kernel_tunnel_add(struct pdp_t *pdp) +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { struct in_addr ms, sgsn; struct gtp_tunnel *t; @@ -155,7 +150,7 @@ memcpy(&ms, &pdp->eua.v[2], sizeof(struct in_addr)); memcpy(&sgsn, &pdp->gsnrc.v[0], sizeof(struct in_addr)); - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); gtp_tunnel_set_ms_ip4(t, &ms); gtp_tunnel_set_sgsn_ip4(t, &sgsn); @@ -175,7 +170,7 @@ return ret; } -int gtp_kernel_tunnel_del(struct pdp_t *pdp) +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { struct gtp_tunnel *t; int ret; @@ -189,7 +184,7 @@ if (t == NULL) return -1; - gtp_tunnel_set_ifidx(t, if_nametoindex(GTP_DEVNAME)); + gtp_tunnel_set_ifidx(t, if_nametoindex(devname)); gtp_tunnel_set_version(t, pdp->version); if (pdp->version == 0) { gtp_tunnel_set_tid(t, pdp_gettid(pdp->imsi, pdp->nsapi)); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index ce57994..62a0cd2 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,29 +7,29 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); -void gtp_kernel_stop(void); +int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup); +void gtp_kernel_stop(const char *devname); -int gtp_kernel_tunnel_add(struct pdp_t *pdp); -int gtp_kernel_tunnel_del(struct pdp_t *pdp); +int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname); +int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname); int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, const char *devname, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; } -static inline void gtp_kernel_stop(void) {} +static inline void gtp_kernel_stop(const char *devname) {} -static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname) { return 0; } -static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp) +static inline int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname) { return 0; } -- To view, visit https://gerrit.osmocom.org/4813 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51df223788fd5b7cf8099463b8aa0ca4a4fd1c96 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:29 +0000 Subject: [MERGED] osmo-ggsn[master]: Properly NULL-out blacklist in alloc_ippool_blacklist() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Properly NULL-out blacklist in alloc_ippool_blacklist() ...................................................................... Properly NULL-out blacklist in alloc_ippool_blacklist() This ensures that in case of error, any caller can still safely call talloc_free() on the blacklist pointerm as free on NULL is well-defined. With the code prior to this patch we fear a double-free. Change-Id: Idc511cb3f0dfb922920aba8f88ea77df1722ecdc --- M ggsn/ggsn.c 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 45b3116..4af044e 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -152,26 +152,30 @@ int flags, len, len2, i; + *blacklist = NULL; + if (ipv6) flags = IP_TYPE_IPv6_NONLINK; else flags = IP_TYPE_IPv4; while (1) { - len = tun_ip_local_get(apn->tun.tun, NULL, 0, flags); + len = netdev_ip_local_get(apn->tun.cfg.dev_name, NULL, 0, flags); if (len < 1) return len; *blacklist = talloc_zero_size(apn, len * sizeof(struct in46_prefix)); - len2 = tun_ip_local_get(apn->tun.tun, *blacklist, len, flags); + len2 = netdev_ip_local_get(apn->tun.cfg.dev_name, *blacklist, len, flags); if (len2 < 1) { talloc_free(*blacklist); + *blacklist = NULL; return len2; } - if (len2 > len) /* iface was added between 2 calls, repeat operation */ + if (len2 > len) { /* iface was added between 2 calls, repeat operation */ talloc_free(*blacklist); - else + *blacklist = NULL; + } else break; } -- To view, visit https://gerrit.osmocom.org/4815 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc511cb3f0dfb922920aba8f88ea77df1722ecdc Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:29 +0000 Subject: [MERGED] osmo-ggsn[master]: remove unused argument to alloc_ippool_blacklist() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove unused argument to alloc_ippool_blacklist() ...................................................................... remove unused argument to alloc_ippool_blacklist() Change-Id: I4d3ea077ba46446e537ec9a6de6f4080fcaa428c --- M ggsn/ggsn.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 8b576ab..45b3116 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -147,7 +147,7 @@ } -static int alloc_ippool_blacklist(struct apn_ctx *apn, const struct tun_t *tun, struct in46_prefix **blacklist, bool ipv6) +static int alloc_ippool_blacklist(struct apn_ctx *apn, struct in46_prefix **blacklist, bool ipv6) { int flags, len, len2, i; @@ -271,7 +271,7 @@ if (apn->v4.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv4 pool %s\n", in46p_ntoa(&apn->v4.cfg.dynamic_prefix)); - if ((blacklist_size = alloc_ippool_blacklist(apn, apn->tun.tun, &blacklist, false)) < 0) + if ((blacklist_size = alloc_ippool_blacklist(apn, &blacklist, false)) < 0) LOGPAPN(LOGL_ERROR, apn, "Failed obtaining IPv4 tun IPs\n"); if (ippool_new(&apn->v4.pool, &apn->v4.cfg.dynamic_prefix, &apn->v4.cfg.static_prefix, ippool_flags, @@ -288,7 +288,7 @@ if (apn->v6.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv6 pool %s\n", in46p_ntoa(&apn->v6.cfg.dynamic_prefix)); - if ((blacklist_size = alloc_ippool_blacklist(apn, apn->tun.tun, &blacklist, true)) < 0) + if ((blacklist_size = alloc_ippool_blacklist(apn, &blacklist, true)) < 0) LOGPAPN(LOGL_ERROR, apn, "Failed obtaining IPv6 tun IPs\n"); if (ippool_new(&apn->v6.pool, &apn->v6.cfg.dynamic_prefix, &apn->v6.cfg.static_prefix, ippool_flags, -- To view, visit https://gerrit.osmocom.org/4812 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d3ea077ba46446e537ec9a6de6f4080fcaa428c Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:29 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp-kernel: Re-add support for kernel GTP-U acceleration In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp-kernel: Re-add support for kernel GTP-U acceleration ...................................................................... gtp-kernel: Re-add support for kernel GTP-U acceleration When we branched off osmo-ggsn from the old openggsn code base, the support for kernel-gtp got temporarily removed. This patch re-introduces support for handling the GTP-U plane in the Linux kernel by means of libgtpnl + the kernel GTP-U driver. This only works for IPv4 at the moment, until the kernel GTP-U code gains IPv6 support. Kernel GTP currently also is restricted to a single APN per GSN. Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 --- M ggsn/ggsn.c 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 4af044e..2937b04 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -259,12 +259,16 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: - LOGPAPN(LOGL_ERROR, apn, "FIXME: Kernel GTP\n"); -#if 0 + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); + apn_stop(apn, false); + return -1; + } + LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(gsn, &net.v4, prefixlen, net_arg) < 0) - goto err; -#endif + if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + return -1; + } break; default: LOGPAPN(LOGL_ERROR, apn, "Unknown GTPU Mode %d\n", apn->cfg.gtpu_mode); -- To view, visit https://gerrit.osmocom.org/4811 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:30 +0000 Subject: [MERGED] osmo-ggsn[master]: gtp_kernel: Change gtp_kernel_init() function signature In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gtp_kernel: Change gtp_kernel_init() function signature ...................................................................... gtp_kernel: Change gtp_kernel_init() function signature Rather than taking an explicit in_addr, prefix_length and a string-formatted prefix, let's pass in an in46_prefix and derive the other representations from it. Also, don't refer to a no-longer-existing global 'ipup' variable but add it as a function argument. Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 --- M ggsn/gtp-kernel.c M ggsn/gtp-kernel.h 2 files changed, 16 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/gtp-kernel.c b/ggsn/gtp-kernel.c index 916b92f..a5708fc 100644 --- a/ggsn/gtp-kernel.c +++ b/ggsn/gtp-kernel.c @@ -57,9 +57,18 @@ /* Always forces the kernel to allocate gtp0. If it exists it hits EEXIST */ #define GTP_DEVNAME "gtp0" -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { + struct in_addr net; + const char *net_arg; + + if (prefix->addr.len != 4) { + SYS_ERR(DGGSN, LOGL_ERROR, 0, + "we only support IPv4 in this path :/"); + return -1; + } + net = prefix->addr.v4; + if (gtp_dev_create(-1, GTP_DEVNAME, gsn->fd0, gsn->fd1u) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "cannot create GTP tunnel device: %s\n", @@ -83,10 +92,12 @@ SYS_ERR(DGGSN, LOGL_DEBUG, 0, "Using the GTP kernel mode (genl ID is %d)\n", gtp_nl.genl_id); + net_arg = in46p_ntoa(prefix); + DEBUGP(DGGSN, "Setting route to reach %s via %s\n", net_arg, GTP_DEVNAME); - if (gtp_dev_config(GTP_DEVNAME, net, prefixlen) < 0) { + if (gtp_dev_config(GTP_DEVNAME, &net, prefix->prefixlen) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add route to reach network %s\n", net_arg); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 34fd7bf..ce57994 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -7,8 +7,7 @@ extern char *ipup; #ifdef GTP_KERNEL -int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg); +int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup); void gtp_kernel_stop(void); int gtp_kernel_tunnel_add(struct pdp_t *pdp); @@ -17,8 +16,7 @@ int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in_addr *net, - size_t prefixlen, const char *net_arg) +static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; -- To view, visit https://gerrit.osmocom.org/4810 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife87142c86589b4fa4062d62afe3670467548589 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 13 15:23:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 Nov 2017 15:23:30 +0000 Subject: [MERGED] osmo-ggsn[master]: factor out netdev_ip_local_get() from tun_ip_local_get() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: factor out netdev_ip_local_get() from tun_ip_local_get() ...................................................................... factor out netdev_ip_local_get() from tun_ip_local_get() netdev_ip_local_get() is a generalized version of tun_ip_local_get() which supports the net device as argument, rather than a tun_t. Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6 --- M lib/tun.c M lib/tun.h 2 files changed, 25 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index 3c293a2..fcd04f3 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -750,8 +750,8 @@ #include -/*! Obtain the local address of the tun device. - * \param[in] tun Target device owning the IP +/*! Obtain the local address of a network device + * \param[in] devname Target device owning the IP * \param[out] prefix_list List of prefix structures to fill with each IPv4/6 and prefix length found. * \param[in] prefix_size Amount of elements allowed to be fill in the prefix_list array. * \param[in] flags Specify which kind of IP to look for: IP_TYPE_IPv4, IP_TYPE_IPv6_LINK, IP_TYPE_IPv6_NONLINK @@ -763,7 +763,7 @@ * prefix_size. It can be used with prefix_size=0 to get an estimate of the size * needed for prefix_list. */ -int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags) +int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, size_t prefix_size, int flags) { static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; struct ifaddrs *ifaddr, *ifa; @@ -779,7 +779,7 @@ if (ifa->ifa_addr == NULL) continue; - if (strcmp(ifa->ifa_name, tun->devname)) + if (strcmp(ifa->ifa_name, devname)) continue; if (ifa->ifa_addr->sa_family == AF_INET && (flags & IP_TYPE_IPv4)) { @@ -820,3 +820,21 @@ freeifaddrs(ifaddr); return count; } + +/*! Obtain the local address of the tun device. + * \param[in] tun Target device owning the IP + * \param[out] prefix_list List of prefix structures to fill with each IPv4/6 and prefix length found. + * \param[in] prefix_size Amount of elements allowed to be fill in the prefix_list array. + * \param[in] flags Specify which kind of IP to look for: IP_TYPE_IPv4, IP_TYPE_IPv6_LINK, IP_TYPE_IPv6_NONLINK + * \returns The number of ips found following the criteria specified by flags, -1 on error. + * + * This function will fill prefix_list with up to prefix_size IPs following the + * criteria specified by flags parameter. It returns the number of IPs matching + * the criteria. As a result, the number returned can be bigger than + * prefix_size. It can be used with prefix_size=0 to get an estimate of the size + * needed for prefix_list. + */ +int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags) +{ + return netdev_ip_local_get(tun->devname, prefix_list, prefix_size, flags); +} diff --git a/lib/tun.h b/lib/tun.h index 0b960e5..411deea 100644 --- a/lib/tun.h +++ b/lib/tun.h @@ -95,6 +95,9 @@ extern int tun_runscript(struct tun_t *tun, char *script); +int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, + size_t prefix_size, int flags); + int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags); -- To view, visit https://gerrit.osmocom.org/4814 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I072aa1a55e7bf110706e9207021b776d9b977fb6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Tue Nov 14 01:13:41 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 14 Nov 2017 01:13:41 +0000 Subject: Build failure of network:osmocom:latest/osmo-hlr in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0a435394edd_a94d30f7c173115f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-hlr/Debian_9.0/armv7l Package network:osmocom:latest/osmo-hlr failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-hlr Last lines of build log: [ 69s] [ 12.531406] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 69s] [ 12.532367] CPU3: stopping [ 69s] [ 12.532761] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 69s] [ 12.533655] Hardware name: Generic DT based system [ 69s] [ 12.534330] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 69s] [ 12.535464] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 69s] [ 12.536536] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 69s] [ 12.537614] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 69s] [ 12.538714] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 69s] [ 12.539743] Exception stack(0xee08beb8 to 0xee08bf00) [ 69s] [ 12.540430] bea0: 00000000 00000003 [ 69s] [ 12.541531] bec0: 00000003 ee08a000 00000082 00000000 00000000 00000001 ee005000 ee08a000 [ 69s] [ 12.542637] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200b0113 ffffffff [ 69s] [ 12.543753] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 69s] [ 12.544758] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 69s] [ 12.545746] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 69s] [ 12.546811] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 69s] [ 12.568148] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 69s] [ 12.569264] Exception stack(0xee08bf88 to 0xee08bfd0) [ 69s] [ 12.570015] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 69s] [ 12.571128] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 69s] [ 12.572232] bfc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 69s] [ 12.572925] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 69s] [ 12.573930] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 69s] [ 12.575135] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 71s] [ 12.586931] Rebooting in 1 seconds..### VM INTERACTION END ### [ 72s] /var/run/obs/worker/3/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 72s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 72s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 14 01:46:15 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 14 Nov 2017 01:46:15 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0a4af288017_a94d30f7c1734574@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_9.0/armv7l Package network:osmocom:latest/osmo-sgsn failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 47s] [ 11.413748] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 47s] [ 11.415430] CPU1: stopping [ 47s] [ 11.416143] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 47s] [ 11.417597] Hardware name: Generic DT based system [ 47s] [ 11.418849] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 47s] [ 11.420747] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 47s] [ 11.422355] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 47s] [ 11.424229] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 47s] [ 11.436527] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 47s] [ 11.438419] Exception stack(0xee085eb8 to 0xee085f00) [ 47s] [ 11.439614] 5ea0: 00000000 00000001 [ 47s] [ 11.441528] 5ec0: 00000001 ee084000 00000082 00000000 00000000 00000001 ee005000 ee084000 [ 47s] [ 11.443321] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 20070113 ffffffff [ 47s] [ 11.445125] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 47s] [ 11.446757] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 47s] [ 11.448359] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 47s] [ 11.450138] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 47s] [ 11.465738] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 47s] [ 11.467413] Exception stack(0xee085f88 to 0xee085fd0) [ 47s] [ 11.468534] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 47s] [ 11.470421] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 47s] [ 11.472381] 5fc0: c0019ed4 c0019ed8 60070013 ffffffff [ 47s] [ 11.473636] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 47s] [ 11.475553] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 47s] [ 11.477500] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 49s] [ 11.479030] Rebooting in 1 seconds..### VM INTERACTION END ### [ 49s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 49s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 49s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:48:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:48:08 +0000 Subject: [PATCH] osmo-ci[master]: osmo-ggsn + openggsn: Build with and without kernel GTP support Message-ID: Review at https://gerrit.osmocom.org/4826 osmo-ggsn + openggsn: Build with and without kernel GTP support Change-Id: I974ba11fd8ef1ed87ec87fb64b8da44d5a8fec9f --- M jobs/gerrit-verifications.yml 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/4826/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 4e8aab4..da80e62 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -73,7 +73,10 @@ -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - openggsn + - openggsn: + a1_name: GTP + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh - osmo-bsc: concurrent: true @@ -100,7 +103,11 @@ (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - - osmo-ggsn + - osmo-ggsn: + a1_name: gtp-linux + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + - osmo-gsm-manuals - osmo-hlr: -- To view, visit https://gerrit.osmocom.org/4826 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I974ba11fd8ef1ed87ec87fb64b8da44d5a8fec9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:48:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:48:08 +0000 Subject: [PATCH] osmo-ci[master]: Describe our normal (non-gerrit) build jobs in jenkins-job-b... Message-ID: Review at https://gerrit.osmocom.org/4827 Describe our normal (non-gerrit) build jobs in jenkins-job-builder after the recent successful conversion from manual job definitions to jenkins-job-buildre of the gerrit jobs, this is an attempt to convert also the non-gerrit jobs for the common osmocom projects. Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 WARNING: this file has not been tested yet, it's a WIP. --- A jobs/normal-builds.yml 1 file changed, 333 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/27/4827/1 diff --git a/jobs/normal-builds.yml b/jobs/normal-builds.yml new file mode 100644 index 0000000..101d4fd --- /dev/null +++ b/jobs/normal-builds.yml @@ -0,0 +1,333 @@ +# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# One cane simply add a gerrit job by adding project's repository to repos list. + +- project: + name: normal_build + # following default values can be overridden by each repo + disabled: false + concurrent: false + node: linux_amd64_debian8 + # axes related defaults + slave_axis: !!python/tuple [linux_amd64_debian8] + a1_name: a1 + a1: !!python/tuple [default] + a2_name: a2 + a2: !!python/tuple [default] + a3_name: a3 + a3: !!python/tuple [default] + a4_name: a4 + a4: !!python/tuple [default] + combination_filter: '' + # most common build invocation + cmd: ./contrib/jenkins.sh + + # in alphabetical order + repos: + - asn1c + + - cellmgr-ng: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - libasn1c + - libgtpnl + - libosmo-abis: + publishers: + downstream-ext: + projects: + - openbsc + + - libosmo-dsp: + cmd: > + # keep first line with less indent to preserve newlines + autoreconf --install --force + ./configure + $MAKE $PARALLEL_MAKE + $MAKE distcheck + publishers: + downstream-ext: + projects: + - osmo-gmr + + - libosmo-netif: + publishers: + downstream-ext: + projects: + - libosmo-sccp + - openbsc + - osmo-mgw + + - libosmo-sccp: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-gsm-tester_build-osmo-stp + + - libosmocore: + a1_name: arch + a1: !!python/tuple [arm-none-eabi, amd64] + combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' + cmd: > + # keep first line with less indent to preserve newlines + if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]]; then + ./contrib/jenkins-arm.sh + else + ./contrib/jenkins.sh + fi + publishers: + downstream-ext: + projects: + - libosmo-sccp + - libosmo-abis + - openbsc + - osmo-pcap + - OsmoTETRA + - osmo-pcu + - SIMtrace + - osmo-gmr + - osmo-bts + - OsmocomBB + - xgoldmon + + - libsmpp34: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-msc + + - libtelnet + + - openbsc: + a1_name: SMPP + a1: !!python/tuple [--enable-smpp] + a2_name: MGCP + a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + a3_name: IU + a3: !!python/tuple [--disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \ + -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - openggsn: + a1_name: GTP + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + + - osmo-bsc: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-bts: + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15-next] + a2_name: BTS_MODEL + a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15] + combination_filter: > + FIRMWARE_VERSION == "master" || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") || + (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") + cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' + + - osmo-ggsn: + a1_name: gtp-linux + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + publishers: + downstream-ext: + projects: + - osmo-gsm-tester_build-osmo-ggsn + - osmo-sgsn + + - osmo-gmr + + - osmo-gsm-manuals: + cmd: > + # keep first line with less indent to preserve newlines + git clean -dxf . + rm -rf libosmocore + git clone git://git.osmocom.org/libosmocore + make LIBOSMO_DIR=$PWD/libosmocore + mkdir out/ + cp */*.pdf out/ + rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ + publishers: + - archive: + artifacts: '*/*.pdf' + allow-empty: true + + - osmo-hlr: + slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] + + - osmo-iuh + + - osmo-mgw: + a1_name: MGCP + a1: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-msc: + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + - reverse: + jobs: + - osmo-iuh + - osmo-mgw + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-pcap + + - osmo-pcu: + scm: + - git: + branches: + - */master + - */jerlbeck/master + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15-next] + a2_name: with_vty + a2: !!python/tuple [yes ,no] + a3_name: with_dsp + a3: !!python/tuple [sysmo, lc15, none] + combination_filter: > + (with_vty == "yes" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || + (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") + + - osmo-sgsn: + concurrent: true + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-sip-connector + - osmo-tetra + + - osmo-trx: + slave_axis: !!python/tuple [OsmocomBuild1] + + - osmocom-bb + + jobs: + - '{repos}' + +- job-template: + name: '{repos}' + project-type: matrix + node: '{node}' + concurrent: '{obj:concurrent}' + disabled: '{obj:disabled}' + retry-count: 3 # scm checkout + build-discarder: + daysToKeep: 30 + numToKeep: 120 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + description: | + Automatic jenkins test job of + {repos} +

+ Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + + execution-strategy: + combination-filter: | + {obj:combination_filter} + axes: + - axis: + type: slave + name: label + values: '{obj:slave_axis}' + - axis: + type: user-defined + name: '{obj:a1_name}' + values: '{obj:a1}' + - axis: + type: user-defined + name: '{obj:a2_name}' + values: '{obj:a2}' + - axis: + type: user-defined + name: '{obj:a3_name}' + values: '{obj:a3}' + - axis: + type: user-defined + name: '{obj:a4_name}' + values: '{obj:a4}' + + scm: + - git: + url: git://git.osmocom.org/{repos} + branches: + - */master + refspec: + name: + wipe-workspace: false + skip-tag: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + + builders: + - shell: '{obj:cmd}' + + publishers: + - warnings: + console-log-parsers: + - 'GNU C Compiler 4 (gcc)' + resolve-relative-paths: true + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/4827 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:48:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:48:21 +0000 Subject: [PATCH] openggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... Message-ID: Review at https://gerrit.osmocom.org/4828 contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used Change-Id: Id9869d0f3d516b5380430675f879887468b5803d --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/28/4828/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f319acb..6544ce3 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -34,6 +34,6 @@ cd "$base" autoreconf --install --force -./configure +./configure $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9869d0f3d516b5380430675f879887468b5803d Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:48:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:48:40 +0000 Subject: [PATCH] osmo-ggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... Message-ID: Review at https://gerrit.osmocom.org/4829 contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used Change-Id: I83319aa6e5e7dde229ae5a036b5a1800879cbf81 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/29/4829/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b2f8452..6a718a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ cd "$base" autoreconf --install --force -./configure +./configure $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83319aa6e5e7dde229ae5a036b5a1800879cbf81 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:50:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:50:37 +0000 Subject: openggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9869d0f3d516b5380430675f879887468b5803d Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:50:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:50:40 +0000 Subject: [MERGED] openggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used ...................................................................... contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used Change-Id: Id9869d0f3d516b5380430675f879887468b5803d --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f319acb..6544ce3 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -34,6 +34,6 @@ cd "$base" autoreconf --install --force -./configure +./configure $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9869d0f3d516b5380430675f879887468b5803d Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:50:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:50:47 +0000 Subject: osmo-ggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83319aa6e5e7dde229ae5a036b5a1800879cbf81 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:50:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:50:50 +0000 Subject: [MERGED] osmo-ggsn[master]: contrib/jenkins.sh: Allow jenkins job to specify if kernel G... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used ...................................................................... contrib/jenkins.sh: Allow jenkins job to specify if kernel GTP is used Change-Id: I83319aa6e5e7dde229ae5a036b5a1800879cbf81 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b2f8452..6a718a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ cd "$base" autoreconf --install --force -./configure +./configure $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83319aa6e5e7dde229ae5a036b5a1800879cbf81 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:52:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:52:19 +0000 Subject: osmo-ci[master]: osmo-ggsn + openggsn: Build with and without kernel GTP support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/4826 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I974ba11fd8ef1ed87ec87fb64b8da44d5a8fec9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:52:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:52:21 +0000 Subject: [MERGED] osmo-ci[master]: osmo-ggsn + openggsn: Build with and without kernel GTP support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-ggsn + openggsn: Build with and without kernel GTP support ...................................................................... osmo-ggsn + openggsn: Build with and without kernel GTP support Change-Id: I974ba11fd8ef1ed87ec87fb64b8da44d5a8fec9f --- M jobs/gerrit-verifications.yml 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 4e8aab4..da80e62 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -73,7 +73,10 @@ -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - openggsn + - openggsn: + a1_name: GTP + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh - osmo-bsc: concurrent: true @@ -100,7 +103,11 @@ (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - - osmo-ggsn + - osmo-ggsn: + a1_name: gtp-linux + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + - osmo-gsm-manuals - osmo-hlr: -- To view, visit https://gerrit.osmocom.org/4826 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I974ba11fd8ef1ed87ec87fb64b8da44d5a8fec9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:55:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:55:50 +0000 Subject: [PATCH] osmo-ci[master]: Describe our normal (non-gerrit) build jobs in jenkins-job-b... In-Reply-To: References: Message-ID: Describe our normal (non-gerrit) build jobs in jenkins-job-builder after the recent successful conversion from manual job definitions to jenkins-job-buildre of the gerrit jobs, this is an attempt to convert also the non-gerrit jobs for the common osmocom projects. WARNING: this file has not been tested yet, it's a WIP. Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 --- A jobs/normal-builds.yml 1 file changed, 333 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/27/4827/2 diff --git a/jobs/normal-builds.yml b/jobs/normal-builds.yml new file mode 100644 index 0000000..f61715a --- /dev/null +++ b/jobs/normal-builds.yml @@ -0,0 +1,333 @@ +# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# One cane simply add a gerrit job by adding project's repository to repos list. + +- project: + name: normal_build + # following default values can be overridden by each repo + disabled: false + concurrent: false + node: linux_amd64_debian8 + # axes related defaults + slave_axis: !!python/tuple [linux_amd64_debian8] + a1_name: a1 + a1: !!python/tuple [default] + a2_name: a2 + a2: !!python/tuple [default] + a3_name: a3 + a3: !!python/tuple [default] + a4_name: a4 + a4: !!python/tuple [default] + combination_filter: '' + # most common build invocation + cmd: ./contrib/jenkins.sh + + # in alphabetical order + repos: + - asn1c + + - cellmgr-ng: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - libasn1c + - libgtpnl + - libosmo-abis: + publishers: + downstream-ext: + projects: + - openbsc + + - libosmo-dsp: + cmd: > + # keep first line with less indent to preserve newlines + autoreconf --install --force + ./configure + $MAKE $PARALLEL_MAKE + $MAKE distcheck + publishers: + downstream-ext: + projects: + - osmo-gmr + + - libosmo-netif: + publishers: + downstream-ext: + projects: + - libosmo-sccp + - openbsc + - osmo-mgw + + - libosmo-sccp: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-gsm-tester_build-osmo-stp + + - libosmocore: + a1_name: arch + a1: !!python/tuple [arm-none-eabi, amd64] + combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' + cmd: > + # keep first line with less indent to preserve newlines + if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]]; then + ./contrib/jenkins-arm.sh + else + ./contrib/jenkins.sh + fi + publishers: + downstream-ext: + projects: + - libosmo-sccp + - libosmo-abis + - openbsc + - osmo-pcap + - OsmoTETRA + - osmo-pcu + - SIMtrace + - osmo-gmr + - osmo-bts + - OsmocomBB + - xgoldmon + + - libsmpp34: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-msc + + - libtelnet + + - openbsc: + a1_name: SMPP + a1: !!python/tuple [--enable-smpp] + a2_name: MGCP + a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + a3_name: IU + a3: !!python/tuple [--disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \ + -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - openggsn: + a1_name: GTP + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + + - osmo-bsc: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-bts: + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15-next] + a2_name: BTS_MODEL + a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15] + combination_filter: > + FIRMWARE_VERSION == "master" || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") || + (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") + cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' + + - osmo-ggsn: + a1_name: gtp-linux + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + publishers: + downstream-ext: + projects: + - osmo-gsm-tester_build-osmo-ggsn + - osmo-sgsn + + - osmo-gmr + + - osmo-gsm-manuals: + cmd: > + # keep first line with less indent to preserve newlines + git clean -dxf . + rm -rf libosmocore + git clone git://git.osmocom.org/libosmocore + make LIBOSMO_DIR=$PWD/libosmocore + mkdir out/ + cp */*.pdf out/ + rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ + publishers: + - archive: + artifacts: '*/*.pdf' + allow-empty: true + + - osmo-hlr: + slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] + + - osmo-iuh + + - osmo-mgw: + a1_name: MGCP + a1: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-msc: + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + - reverse: + jobs: + - osmo-iuh + - osmo-mgw + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-pcap + + - osmo-pcu: + scm: + - git: + branches: + - '*/master' + - '*/jerlbeck/master' + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15-next] + a2_name: with_vty + a2: !!python/tuple [yes ,no] + a3_name: with_dsp + a3: !!python/tuple [sysmo, lc15, none] + combination_filter: > + (with_vty == "yes" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || + (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") + + - osmo-sgsn: + concurrent: true + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-sip-connector + - osmo-tetra + + - osmo-trx: + slave_axis: !!python/tuple [OsmocomBuild1] + + - osmocom-bb + + jobs: + - '{repos}' + +- job-template: + name: '{repos}' + project-type: matrix + node: '{node}' + concurrent: '{obj:concurrent}' + disabled: '{obj:disabled}' + retry-count: 3 # scm checkout + build-discarder: + daysToKeep: 30 + numToKeep: 120 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + description: | + Automatic jenkins test job of + {repos} +

+ Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + + execution-strategy: + combination-filter: | + {obj:combination_filter} + axes: + - axis: + type: slave + name: label + values: '{obj:slave_axis}' + - axis: + type: user-defined + name: '{obj:a1_name}' + values: '{obj:a1}' + - axis: + type: user-defined + name: '{obj:a2_name}' + values: '{obj:a2}' + - axis: + type: user-defined + name: '{obj:a3_name}' + values: '{obj:a3}' + - axis: + type: user-defined + name: '{obj:a4_name}' + values: '{obj:a4}' + + scm: + - git: + url: git://git.osmocom.org/{repos} + branches: + - '*/master' + refspec: + name: + wipe-workspace: false + skip-tag: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + + builders: + - shell: '{obj:cmd}' + + publishers: + - warnings: + console-log-parsers: + - 'GNU C Compiler 4 (gcc)' + resolve-relative-paths: true + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/4827 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:58:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:58:34 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4824/1/OsmoGGSN/chapters/configuration.adoc File OsmoGGSN/chapters/configuration.adoc: Line 277: To manually enable IP forwarding and masquerading, you can do: I think this is in the wrong section.This section should only contain "manualtun device creation/configuration' for the non-root case. Masquerading + Forwarding is needed whether you create the devices manually or whether you run as root and osmo-ggsn creates them -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 14 05:59:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 05:59:00 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: multiple instances: mention GTP port In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4825 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 06:02:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 06:02:47 +0000 Subject: [MERGED] openbsc[master]: osmo-bsc-sccplite: Implement incoming RESET procedure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bsc-sccplite: Implement incoming RESET procedure ...................................................................... osmo-bsc-sccplite: Implement incoming RESET procedure In osmo-bsc-sccplite we so far didn't implement the inbound RESET procedure. We instead ignored any RESET message from the MSC. This commit adds support for RESET: We will destrpy any SCCP connections and acknowledge the RESET to the MSC. As osmo-msc is requiring the BSC to handle an inbound RESET procedure, this commit allows osmo-msc to properly initialize the A interface towards osmo-bsc-sccplite via a translating/routing osmo-stp. While we don't anticipate any new deployments of osmo-bsc-sccplite, making it interoperate with osmo-msc enables us to do more testing of osmo-bsc-sccplite. Change-Id: Iceb8278deb36d6103662a704f489ba0d685e04d3 --- M openbsc/include/openbsc/bsc_msc_data.h M openbsc/src/osmo-bsc/osmo_bsc_bssap.c M openbsc/src/osmo-bsc/osmo_bsc_sccp.c 3 files changed, 35 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h index 38e87cf..9a92955 100644 --- a/openbsc/include/openbsc/bsc_msc_data.h +++ b/openbsc/include/openbsc/bsc_msc_data.h @@ -138,5 +138,6 @@ struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *, int); struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *, int); +void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con); #endif diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 9c549c3..349c98f 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -29,6 +29,7 @@ #include #include +#include /* * helpers for the assignment command @@ -94,6 +95,35 @@ { LOGP(DMSC, LOGL_NOTICE, "Reset ACK from MSC\n"); return 0; +} + +static int bssmap_send_reset_ack(struct bsc_msc_data *msc) +{ + struct msgb *resp; + int rc; + + LOGP(DMSC, LOGL_NOTICE, "Tx RESET-ACK to MSC\n"); + + resp = gsm0808_create_reset_ack(); + OSMO_ASSERT(resp); + + rc = sccp_write(resp, &sccp_ssn_bssap, &sccp_ssn_bssap, 0, msc->msc_con); + msgb_free(resp); + return rc; +} + +static int bssmap_handle_reset(struct bsc_msc_data *msc, + struct msgb *msg, unsigned int length) +{ + LOGP(DMSC, LOGL_NOTICE, "Rx RESET from MSC\n"); + + /* Instruct the BSC to close all open SCCP connections and to close all + * active radio channels on the BTS side as well */ + bsc_notify_and_close_conns(msc->msc_con); + + /* Inform the MSC that we have received the reset request and + * that we acted accordingly */ + return bssmap_send_reset_ack(msc); } /* GSM 08.08 ? 3.2.1.19 */ @@ -404,6 +434,9 @@ case BSS_MAP_MSG_RESET_ACKNOWLEDGE: ret = bssmap_handle_reset_ack(msc, msg, length); break; + case BSS_MAP_MSG_RESET: + ret = bssmap_handle_reset(msc, msg, length); + break; case BSS_MAP_MSG_PAGING: ret = bssmap_handle_paging(msc, msg, length); break; diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c index e242390..8388f88 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c @@ -287,7 +287,7 @@ bsc_send_ussd_release_complete(conn); } -static void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) +void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) { struct osmo_bsc_sccp_con *con, *tmp; -- To view, visit https://gerrit.osmocom.org/4783 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceb8278deb36d6103662a704f489ba0d685e04d3 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 14 06:09:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 Nov 2017 06:09:49 +0000 Subject: [PATCH] osmo-msc[master]: sms_route_mt_sms: Don't return uninitialized variable Message-ID: Review at https://gerrit.osmocom.org/4830 sms_route_mt_sms: Don't return uninitialized variable Wen there's no SMPP support compiled in, and routing was successful, we shouldn't return an uninitialized value. Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a Fixes: Coverity CID#174176 --- M src/libmsc/gsm_04_11.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/4830/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 99adbf7..103c259 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -388,7 +388,8 @@ rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; rate_ctr_inc(&conn->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); #endif - } + } else + rc = 0; return rc; } -- To view, visit https://gerrit.osmocom.org/4830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 14 08:48:29 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 14 Nov 2017 08:48:29 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4779/1/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 523: } This is one of the annoyances of the VTY or at least how we write it. In the past I have nacked ad-hoc changes. The reasons are: * It generally violates principle of least surprise (e.g. if you see osmo-nitb/bsc where some changes take effect immediately, some on next BTS connection and others only after restart. * It requires documentation "classes" of when something is used. In this case. Can't we avoid it? Just grow the array and forbid it to shrinking? This works when initialized to 0 and then can be used to grow it? Okay, then one can't shrink it. Allow to shrink when the higher endpoints are blocked and unallocated? Okay more complicated but maybe better? -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 14 09:02:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 14 Nov 2017 09:02:15 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 1: You notice that this has "always" been parsed as base 16? Sadly the MGCP RFC doesn't say what an endpoint number should be. In the RFC it is a "NameString" (some chars except /, $, *, 0-9 A-z). Sadly the openbsc tests only check for single digit calls. I looked at some old traces and see 2E, B as endpoint names. From skimming the RFC we could use 1,2,..9,10,..32, but for compat with existing equipment should continue to use hex? And a general comment: For On-Waves I used things like round-robin allocation and placed N+5 calls to see how it would behave. -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 09:03:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 14 Nov 2017 09:03:23 +0000 Subject: [PATCH] osmocom-bb[master]: layer23 vty: fix prompts: insert space after '#' Message-ID: Review at https://gerrit.osmocom.org/4831 layer23 vty: fix prompts: insert space after '#' "All" our VTY prompts have a space after the prompt. Also do that for '(ms)', '(test-sim)' and '(support)' prompts. Change OsmocomBB(ms)#exit to OsmocomBB(ms)# exit Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/31/4831/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 9a4ae63..cbf8162 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -55,19 +55,19 @@ struct cmd_node ms_node = { MS_NODE, - "%s(ms)#", + "%s(ms)# ", 1 }; struct cmd_node testsim_node = { TESTSIM_NODE, - "%s(test-sim)#", + "%s(test-sim)# ", 1 }; struct cmd_node support_node = { SUPPORT_NODE, - "%s(support)#", + "%s(support)# ", 1 }; -- To view, visit https://gerrit.osmocom.org/4831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 14 09:11:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 14 Nov 2017 09:11:26 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 1: > You notice that this has "always" been parsed as base 16? Sadly the > MGCP RFC doesn't say what an endpoint number should be. In the RFC > it is a "NameString" (some chars except /, $, *, 0-9 A-z). Sadly > the openbsc tests only check for single digit calls. I think the real solution is https://osmocom.org/issues/2631 and moving to decimal parsing is just fixing the current behavior of osmo-bsc <-> osmo-mgw as a workaround for the time being. And realize that osmo-bsc *is* the only user of this code right now, anyone else is using osmo-bsc_mgcp which is not changing its behavior, since it's using libosmo-legacy-mgcp, while this is libosmo-mgcp. -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 10:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 Nov 2017 10:39:03 +0000 Subject: meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4773 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 14 10:39:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 Nov 2017 10:39:08 +0000 Subject: [MERGED] meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-mgw: Split packages and install osmo-mgw systemd service ...................................................................... osmo-mgw: Split packages and install osmo-mgw systemd service Change-Id: I1b902842cf8766af1e58de76e46786213d222389 --- M recipes-osmocom/osmo-mgw/osmo-mgw.inc 1 file changed, 34 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 45ee338..2d6db64 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif bcg729 libgsm" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -17,6 +17,38 @@ install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service ${D}${systemd_system_unitdir}/ + + install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg ${D}${sysconfdir}/osmocom/osmo-mgw.cfg + install -m 0644 ${S}/contrib/systemd/osmo-mgw.service ${D}${systemd_system_unitdir}/ } -SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" +PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp" +SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service" +SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service" + +FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}" +FILES_libosmo-legacy-mgcp-dev = " \ + ${includedir}/osmocom/legacy_mgcp \ + ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \ + ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}" +FILES_libosmo-mgcp-dev = " \ + ${includedir}/osmocom/mgcp \ + ${libdir}/pkgconfig/libosmo-mgcp.pc \ + ${libdir}/libosmo-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}" +FILES_libosmo-mgcp-client-dev = " \ + ${includedir}/osmocom/mgcp_client \ + ${libdir}/pkgconfig/libosmo-mgcp-client.pc \ + ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \ + " + +FILES_osmo-bsc-mgcp = " \ + ${bindir}/osmo-bsc_mgcp \ + ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ + ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ + " -- To view, visit https://gerrit.osmocom.org/4773 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: laforge/nightly Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 14 13:55:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 13:55:38 +0000 Subject: [ABANDON] osmo-mgw[master]: vty: assign new VTY port numbr In-Reply-To: References: Message-ID: dexter has abandoned this change. Change subject: vty: assign new VTY port numbr ...................................................................... Abandoned agreed, keeping the old port makes things a lot easier -- To view, visit https://gerrit.osmocom.org/4770 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:06:36 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:06:36 +0000 Subject: [PATCH] libosmocore[master]: Revert "vty: add port number for osmo-mgw" Message-ID: Review at https://gerrit.osmocom.org/4832 Revert "vty: add port number for osmo-mgw" We agreed to re-use the port of osmo-bsc-mgcp, so there is no need for this patch anymore. This reverts commit c0fc7940df40de07320c9b2cdd5525659d16805a. Change-Id: If3f36fa27bd3fae4d06b8bef69ac0a09812a87b6 --- M include/osmocom/vty/ports.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/4832/1 diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab43f05..ab3e1d5 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -28,5 +28,4 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 -#define OSMO_VTY_PORT_MGW 4261 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/4832 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3f36fa27bd3fae4d06b8bef69ac0a09812a87b6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:06:41 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:06:41 +0000 Subject: [PATCH] libosmocore[master]: vty: add port number constant for osmo-mgw Message-ID: Review at https://gerrit.osmocom.org/4833 vty: add port number constant for osmo-mgw osmo-mgw currently uses the VTY port constant of osmo-bsc_mgcp. Even if the VTY port will stay the same it makes sense to give osmo-mgw its own constant. Add define constant with VTY port number for osmo-mgw Change-Id: I1770787e697906322ce5815fcaadba06c01ddee9 --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/4833/1 diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab3e1d5..4ef565e 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -14,6 +14,7 @@ #define OSMO_VTY_PORT_BTS 4241 /* also: osmo_pcap_server */ #define OSMO_VTY_PORT_NITB_BSC 4242 #define OSMO_VTY_PORT_BSC_MGCP 4243 +#define OSMO_VTY_PORT_MGW 4243 #define OSMO_VTY_PORT_BSC_NAT 4244 #define OSMO_VTY_PORT_SGSN 4245 #define OSMO_VTY_PORT_GBPROXY 4246 -- To view, visit https://gerrit.osmocom.org/4833 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1770787e697906322ce5815fcaadba06c01ddee9 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:17:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Revert "common: add VTY port number for osmo-mgw" Message-ID: Review at https://gerrit.osmocom.org/4834 Revert "common: add VTY port number for osmo-mgw" We agreed to re-use the port of osmo-bsc-mgcp, so there is no need for this patch anymore. This reverts commit ad4a01e2a4674caf1f3d5680f825177e659254f0. Change-Id: I8629db5e975cc218c80c747a39c0fdca5f5d6e10 --- M common/chapters/port_numbers.adoc 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/34/4834/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 32baad5..08d9b3c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,7 +35,6 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|ggsn (OpenGGSN) -|TCP|4261|telnet (VTY)|osmo-mgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/4834 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8629db5e975cc218c80c747a39c0fdca5f5d6e10 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:17:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: add VTY port number of osmo-mgw Message-ID: Review at https://gerrit.osmocom.org/4835 common: add VTY port number of osmo-mgw osmo-mgw currently uses the VTY port constant of osmo-bsc_mgcp. We decided to re use the same port number for osmo-mgw, this is not mentioned in the manuals yet. Add the port number of osmo-mgw to the manuals (common) Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/4835/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 08d9b3c..b88db25 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -19,6 +19,7 @@ |TCP|4241|telnet (VTY)|osmo-bts |TCP|4242|telnet (VTY)|osmo-nitb, osmo-bsc, cellmgr-ng |TCP|4243|telnet (VTY)|osmo-bsc_mgcp +|TCP|4243|telnet (VTY)|osmo-mgw |TCP|4244|telnet (VTY)|osmo-bsc_nat |TCP|4245|telnet (VTY)|osmo-sgsn |TCP|4246|telnet (VTY)|osmo-gbproxy -- To view, visit https://gerrit.osmocom.org/4835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:28:26 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:28:26 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: use correct VTY port numbr constant Message-ID: Review at https://gerrit.osmocom.org/4836 cosmetic: use correct VTY port numbr constant osmo-mgw currently uses VTY port number constant of osmo-bsc_mgwp, however, libosmore now offers a constant specifically for osmo_mgw, which has the same value, but is intended to be used by osmo-mgw use the new port number constant for osmo-mgw Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Depends: libosmocore I1770787e697906322ce5815fcaadba06c01ddee9 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/36/4836/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index ab54e62..6932468 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -279,7 +279,7 @@ /* start telnet after reading config for vty_get_bind_addr() */ rc = telnet_init_dynif(tall_bsc_ctx, NULL, - vty_get_bind_addr(), OSMO_VTY_PORT_BSC_MGCP); + vty_get_bind_addr(), OSMO_VTY_PORT_MGW); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 14:57:32 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 14:57:32 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: add osmo-mgw to mgcp Message-ID: Review at https://gerrit.osmocom.org/4837 common: add osmo-mgw to mgcp Add osmo-mgw to the list of programs which use the MGCP port IETF Change-Id: Idfd0340297ddb15494b4b20d776e89e6288107e1 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/37/4837/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index b88db25..7482781 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -10,7 +10,7 @@ [options="header",cols="10%,10%,40%,40%"] |=============== |L4 Protocol|Port Number|Purpose|Software -|UDP|2427|MGCP GW|osmo-bsc_mgcp +|UDP|2427|MGCP GW|osmo-bsc_mgcp, osmo-mgw |TCP|2775|SMPP (SMS interface for external programs)|osmo-nitb |TCP|3002|A-bis/IP OML|osmo-bts, osmo-bsc, osmo-nitb |TCP|3003|A-bis/IP RSL|osmo-bts, osmo-bsc, osmo-nitb -- To view, visit https://gerrit.osmocom.org/4837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfd0340297ddb15494b4b20d776e89e6288107e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 14 16:02:52 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 14 Nov 2017 16:02:52 +0000 Subject: [PATCH] osmo-mgw[master]: vty: simplify endpoint allocation In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4775 to look at the new patch set (#2). vty: simplify endpoint allocation mgcp_parse_config() uses a helper function allocate_trunk() to perform the trunk allocation. This helper function only calls mgcp_endpoints_allocate() and checks the return code. Call mgcp_endpoints_allocate() directly from mgcp_parse_config() Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 6 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/4775/2 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..9420d96 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1269,18 +1269,6 @@ return 0; } -static int allocate_trunk(struct mgcp_trunk_config *trunk) -{ - if (mgcp_endpoints_allocate(trunk) != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "Failed to allocate %d endpoints on trunk %d.\n", - trunk->number_endpoints, trunk->trunk_nr); - return -1; - } - - return 0; -} - int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg, enum mgcp_role role) { @@ -1304,17 +1292,18 @@ return -1; } - if (allocate_trunk(&g_cfg->trunk) != 0) { + if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "Failed to initialize the virtual trunk.\n"); + "Failed to initialize the virtual trunk (%d endpoints)\n", + g_cfg->trunk.number_endpoints); return -1; } llist_for_each_entry(trunk, &g_cfg->trunks, entry) { - if (allocate_trunk(trunk) != 0) { + if (mgcp_endpoints_allocate(trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "Failed to initialize E1 trunk %d.\n", - trunk->trunk_nr); + "Failed to initialize trunk %d (%d endpoints)\n", + trunk->trunk_nr, trunk->number_endpoints); return -1; } } -- To view, visit https://gerrit.osmocom.org/4775 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Tue Nov 14 20:00:55 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 14 Nov 2017 20:00:55 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a0b4b9669bc_a94d30f7c195930@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_16.10/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 256s] | [ 256s] | ## ---------------------- ## [ 256s] | ## Running config.status. ## [ 256s] | ## ---------------------- ## [ 256s] | [ 256s] | This file was extended by libosmocore config.status 0.10.2.20171114, which was [ 256s] | generated by GNU Autoconf 2.69. Invocation command line was [ 256s] | [ 256s] | CONFIG_FILES = [ 256s] | CONFIG_HEADERS = [ 256s] | CONFIG_LINKS = [ 256s] | CONFIG_COMMANDS = [ 256s] | $ ./config.status Doxyfile.core [ 256s] | [ 256s] | on build33 [ 256s] | [ 256s] | config.status:1180: creating Doxyfile.core [ 256s] [ 256s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 256s] make[1]: *** [override_dh_auto_test] Error 1 [ 256s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 256s] debian/rules:15: recipe for target 'build' failed [ 256s] make: *** [build] Error 2 [ 256s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 256s] [ 256s] build33 failed "build libosmocore_0.10.2.20171114.dsc" at Tue Nov 14 20:00:40 UTC 2017. [ 256s] [ 256s] ### VM INTERACTION START ### [ 259s] [ 249.034713] reboot: Power down -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 14 22:28:55 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 14 Nov 2017 22:28:55 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0b6e46afee8_a94d30f7c198152b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 36s] [ 11.538501] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 36s] [ 11.541670] CPU1: stopping [ 36s] [ 11.542440] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 36s] [ 11.543995] Hardware name: Generic DT based system [ 36s] [ 11.545110] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 36s] [ 11.546853] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 36s] [ 11.561540] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 36s] [ 11.563578] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 36s] [ 11.565269] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 36s] [ 11.566929] Exception stack(0xee085eb8 to 0xee085f00) [ 36s] [ 11.568076] 5ea0: 00000000 00000001 [ 36s] [ 11.582565] 5ec0: 00000001 ee084000 00000002 00000000 00000000 00000001 ee005000 ee084000 [ 36s] [ 11.584530] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 20000113 ffffffff [ 36s] [ 11.586373] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 36s] [ 11.604244] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 36s] [ 11.606155] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 36s] [ 11.621636] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 36s] [ 11.623738] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 36s] [ 11.625456] Exception stack(0xee085f88 to 0xee085fd0) [ 36s] [ 11.626620] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 36s] [ 11.628441] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 36s] [ 11.643080] 5fc0: c0019ed4 c0019ed8 60000013 ffffffff [ 36s] [ 11.644418] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 36s] [ 11.646311] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 36s] [ 11.648429] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 38s] [ 11.669180] Rebooting in 1 seconds..### VM INTERACTION END ### [ 38s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 38s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 38s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 14 23:11:32 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 Nov 2017 23:11:32 +0000 Subject: osmocom-bb[master]: layer23 vty: fix prompts: insert space after '#' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From admin at opensuse.org Wed Nov 15 00:57:04 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 00:57:04 +0000 Subject: Build failure of network:osmocom:latest/libosmo-abis in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0b90ece8c0e_a94d30f7c20049c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmo-abis/Debian_9.0/armv7l Package network:osmocom:latest/libosmo-abis failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libosmo-abis Last lines of build log: [ 29s] [ 11.549239] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 29s] [ 11.562601] CPU3: stopping [ 29s] [ 11.563152] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 29s] [ 11.564393] Hardware name: Generic DT based system [ 29s] [ 11.565648] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 29s] [ 11.567068] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 29s] [ 11.568450] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 29s] [ 11.570033] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 29s] [ 11.571437] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 29s] [ 11.572840] Exception stack(0xee08beb8 to 0xee08bf00) [ 29s] [ 11.573773] bea0: 00000000 00000003 [ 29s] [ 11.575461] bec0: 00000003 ee08a000 00000082 00000000 00000000 00000001 ee005000 ee08a000 [ 29s] [ 11.576751] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200f0113 ffffffff [ 29s] [ 11.578073] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 29s] [ 11.579236] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 29s] [ 11.580610] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 29s] [ 11.582021] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 29s] [ 11.583608] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 29s] [ 11.585023] Exception stack(0xee08bf88 to 0xee08bfd0) [ 29s] [ 11.585830] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 29s] [ 11.587133] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 29s] [ 11.588430] bfc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 29s] [ 11.589270] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 29s] [ 11.590352] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 29s] [ 11.591551] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 30s] [ 11.592554] Rebooting in 1 seconds..### VM INTERACTION END ### [ 30s] /var/run/obs/worker/5/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 30s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 30s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 15 00:57:55 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 00:57:55 +0000 Subject: Build failure of network:osmocom:latest/libasn1c in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0b9128958f9_a94d30f7c20051ba@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libasn1c/Debian_9.0/armv7l Package network:osmocom:latest/libasn1c failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libasn1c Last lines of build log: [ 29s] [ 11.596277] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 29s] [ 11.597454] CPU1: stopping [ 29s] [ 11.598410] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 29s] [ 11.600468] Hardware name: Generic DT based system [ 29s] [ 11.602081] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 29s] [ 11.608824] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 29s] [ 11.610812] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 29s] [ 11.612986] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 29s] [ 11.619071] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 29s] [ 11.621174] Exception stack(0xee085eb8 to 0xee085f00) [ 29s] [ 11.622787] 5ea0: 00000000 00000001 [ 29s] [ 11.629698] 5ec0: 00000001 ee084000 00000202 00000000 00000000 00000001 ee005000 ee084000 [ 29s] [ 11.631974] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 200f0113 ffffffff [ 29s] [ 11.637184] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 29s] [ 11.639103] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 29s] [ 11.647175] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 29s] [ 11.649119] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 29s] [ 11.652206] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 29s] [ 11.654185] Exception stack(0xee085f88 to 0xee085fd0) [ 29s] [ 11.655492] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 29s] [ 11.658119] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 29s] [ 11.663509] 5fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 29s] [ 11.667758] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 29s] [ 11.669641] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 29s] [ 11.671666] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 31s] [ 11.683699] Rebooting in 1 seconds..### VM INTERACTION END ### [ 31s] /var/run/obs/worker/5/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 31s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 31s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 15 02:17:09 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 02:17:09 +0000 Subject: Build failure of network:osmocom:latest/osmo-msc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0ba3afe624b_a94d30f7c20130e3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-msc/Debian_9.0/armv7l Package network:osmocom:latest/osmo-msc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-msc Last lines of build log: [ 42s] [ 11.692272] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 42s] [ 11.703117] CPU3: stopping [ 42s] [ 11.703600] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 42s] [ 11.704678] Hardware name: Generic DT based system [ 42s] [ 11.705474] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 42s] [ 11.706733] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 42s] [ 11.707904] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 42s] [ 11.709103] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 42s] [ 11.710329] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 42s] [ 11.711539] Exception stack(0xee08beb8 to 0xee08bf00) [ 43s] [ 11.712383] bea0: 00000000 00000003 [ 43s] [ 11.733809] bec0: 00000003 ee08a000 00000082 00000000 c06b8080 ee08a000 ee08bf00 ee08a000 [ 43s] [ 11.735142] bee0: c06b8080 00000000 c06ef580 ee08bf00 c0034d24 c0034e24 200b0113 ffffffff [ 43s] [ 11.736489] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 43s] [ 11.737719] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 43s] [ 11.738906] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 43s] [ 11.740193] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 43s] [ 11.741546] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 43s] [ 11.742753] Exception stack(0xee08bf88 to 0xee08bfd0) [ 43s] [ 11.763680] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 43s] [ 11.765006] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 43s] [ 11.766323] bfc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 43s] [ 11.767157] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 43s] [ 11.768361] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 43s] [ 11.769697] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 45s] [ 11.792793] Rebooting in 1 seconds..### VM INTERACTION END ### [ 45s] /var/run/obs/worker/4/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 45s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 45s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 15 03:49:40 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 03:49:40 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application Message-ID: Review at https://gerrit.osmocom.org/4838 osmocomBB: Begin with a manual for the "mobile" application Begin with manual for the layer23 ("mobile") application but focus on the scripting code first. Change-Id: I736f2d61650feac70b6d960811b478639aa71737 --- M Makefile A OsmocomBB/Makefile A OsmocomBB/chapters/scripting.adoc A OsmocomBB/osmocombb-usermanual-docinfo.xml A OsmocomBB/osmocombb-usermanual.adoc 5 files changed, 189 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/38/4838/1 diff --git a/Makefile b/Makefile index cd1b10e..8261640 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) + cd OsmocomBB; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -25,6 +26,7 @@ cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean + cd OsmocomBB; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -39,6 +41,7 @@ cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload + cd OsmocomBB; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -55,6 +58,7 @@ cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check cd OsmoSTP; $(MAKE) check + cd OsmocomBB; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmocomBB/Makefile b/OsmocomBB/Makefile new file mode 100644 index 0000000..9f861a5 --- /dev/null +++ b/OsmocomBB/Makefile @@ -0,0 +1,7 @@ +TOPDIR = .. + +ASCIIDOC = osmocombb-usermanual.adoc +ASCIIDOC_DEPS = chapters/*.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmocomBB/chapters/scripting.adoc b/OsmocomBB/chapters/scripting.adoc new file mode 100644 index 0000000..e3cc951 --- /dev/null +++ b/OsmocomBB/chapters/scripting.adoc @@ -0,0 +1,111 @@ +[[scripting]] +== Scripting using Lua + +The mobile application can be extended using the +https://www.lua.org/manual/5.3/[lua5.3 language]. +To use the scripting facility a script needs to be +configured through the VTY interface and will be +associated to a Mobile Station (MS). The script will +then be able to interact with the specific MS. + +An event based programming model is to be used. This +means that once the script has been loaded it should +register to the wanted events, configure timers and +return. When an event occurs the registered event +handler will be executed. + +The following describes the exported runtime services +to be used in the script. + +=== Logging + +The logging functions allow to generate log messages +for different levels. The log implementatiom is using +the standard Osmocom logging framework which allows to +have multiple log targets, e.g. syslog, file or through +the VTY. + +|======== +|Code |Return | Explanation +|print(...) |void | Print a message with log level 'debug' +|log_debug(...) |void | Print a message with log level 'debug' +|log_notice(...) |void | Print a message with log level 'notice' +|log_error(...) |void | Print a message with log level 'error' +|log_fatal(...) |void | Print a message with log level 'fatal' +|======== + +==== Examples + +---- +Code: +print("Log level 'debug'") +log_debug("Log level 'debug'") +log_notice("Log level 'notice'") +log_error("Log level 'error'") +log_fatal("Log level 'fatal'") + +Output: +<0011> @script.lua:1 Log level 'debug' +<0011> @script.lua:2 Log level 'debug' +<0011> @script.lua:3 Log level 'notice' +<0011> @script.lua:4 Log level 'error' +<0011> @script.lua:5 Log level 'fatal' + +---- + +=== Timer class + +The timer allows to invoke a function once after the requested +timeout. The timer creation function will return immediately and +the callback will be called after the timeout and when no other +lua code is executing. The _osmo.timeout_ function should be used +to create a new time, a running timer can be canneled using the _cancel_ +method. + +|======== +|Code |Return |Explanation +|osmo.timeout(timeout, cb)|A new timer|Create a new non-recurring timer. Timeout should be in rounded seconds and cb should be a function. +|timer.cancel() |Void |Cancel the timer, the callback will not be called. +|======== + +==== Examples + +---- +Code: +local timer = osmo.timeout(timeout_in_seconds, call_back) +timer:cancel() +---- + +---- +Code: +local timer = osmo.timeout(3, function() + print("Timeout passed") +end) +print("Configured") + +Output: +<0011> @script.lua:4 Configured +<0011> @script.lua:2 Timeout passed +---- + +=== MS class + +The MS singletong provides access to the Mobile Station configuration +the script is associated with. This includes runtime information like +the IMSI, IMEI or functions like start/stop. + +|======== +|Code |Return |Explanation +|osmo.ms().imsi() |string |The IMSI. It might be invalid in case it has not been read from SIM card yet +|osmo.ms().imei() |string |The configured IMEI +|======== +==== Examples + +----- +Code: +local ms = osmo.ms() +print(ms.imei(), ms.imsi()) + +Output: +<0011> @script.lua:2 126000000000000 +----- diff --git a/OsmocomBB/osmocombb-usermanual-docinfo.xml b/OsmocomBB/osmocombb-usermanual-docinfo.xml new file mode 100644 index 0000000..c93d5e1 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual-docinfo.xml @@ -0,0 +1,46 @@ + + + 1 + August 2017 + HW + + Initial version. + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + + + 2013-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmocomBB/osmocombb-usermanual.adoc b/OsmocomBB/osmocombb-usermanual.adoc new file mode 100644 index 0000000..b405934 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual.adoc @@ -0,0 +1,21 @@ +OsmocomBB User Manual +===================== +Holger Hans Peter Freyther + + +include::../common/chapters/preface.adoc[] + +include::chapters/scripting.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:30:16 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:30:16 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4736 to look at the new patch set (#3). mobile: Add LUA as debug category to the applications Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/main.c 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/4736/3 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index fe7b6e9..c4d0702 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -23,6 +23,7 @@ DSIM, DGPS, DPRIM, + DLUA, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 0810e32..98cd60c 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -133,6 +133,12 @@ .color = "\033[1;32m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DLUA] = { + .name = "DLUA", + .description = "LUA", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 4ef52d9..f5466cc 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DPRIM"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DPRIM:DLUA"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:30:16 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:30:16 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4737 to look at the new patch set (#3). mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 225 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/3 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 9b544ab..ed05a8b 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -77,6 +77,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 6162a38..32ed9e9 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -3,6 +3,8 @@ extern char *config_dir; +struct vty; + int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); int l23_app_exit(void); @@ -13,5 +15,8 @@ int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct vty *vty, struct osmocom_ms *ms); + #endif diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 47870e5..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..4eed947 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *L) +{ + lua_getglobal(L, "_G"); + luaL_setfuncs(L, global_runtime, 0); + lua_pop(L, 1); +} + +static void add_runtime(lua_State *L, struct osmocom_ms *ms) +{ + add_globals(L); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct vty *vty, struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..4594e64 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct vty *vty, struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 9a4ae63..f3d8dda 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1531,6 +1531,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2755,6 +2757,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(vty, ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2946,6 +2972,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:30:16 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:30:16 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4771 to look at the new patch set (#2). mobile: Begin with a primitive interface on top of the code We want the script interface to interface through a primitive interface. This will allow to move it to a different thread or a process in the future. The script interface will just use the primitives. It is not clear how "sap" will be used here. I am keeping it at 0 right now. The first primitive is starting a timer with a request and then getting an indication as a response. Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/main.c A src/host/layer23/src/mobile/primitives.c 7 files changed, 170 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/4771/2 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 3efa57a..fe7b6e9 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -22,6 +22,7 @@ DSUM, DSIM, DGPS, + DPRIM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index b58b952..12cf24b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h + transaction.h vty.h mncc_sock.h primitives.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h new file mode 100644 index 0000000..6a79eaa --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -0,0 +1,38 @@ +#pragma once + +#include + +/** + * Mobile Script<->App primitives. Application script will receive + * indications and will send primitives to the lower layers. Here + * we will convert from internal state/events to the primitives. In + * the future the indications might be generated at lower levels + * directly. + */ +enum mobile_prim { + PRIM_MOB_TIMER, + PRIM_MOB_TIMER_CANCEL, +}; + +struct mobile_prim_intf { + struct osmocom_ms *ms; + void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr *hdr); + + /* Internal state */ + struct llist_head timers; +}; + +/** + * Primitive to create timers and get indication once they have + * expired. Currently there is no way to cancel timers. + */ +struct mobile_timer_prim { + struct osmo_prim_hdr hdr; /*!< Primitive base class */ + uint64_t timer_id; /*!< Unique Id identifying the timer */ + int seconds; /*!< Seconds the timer should fire in */ +}; + + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); +void mobile_prim_intf_free(struct mobile_prim_intf *intf); diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index d8fd076..0810e32 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -127,6 +127,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DPRIM] = { + .name = "DPRIM", + .description = "PRIM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..90468c0 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -5,7 +5,7 @@ noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ gsm48_rr.c mnccms.c settings.c subscriber.c support.c \ - transaction.c vty_interface.c voice.c mncc_sock.c + transaction.c vty_interface.c voice.c mncc_sock.c primitives.c bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 91ed341..4ef52d9 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DPRIM"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c new file mode 100644 index 0000000..a5fb58d --- /dev/null +++ b/src/host/layer23/src/mobile/primitives.c @@ -0,0 +1,122 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include +#include + +struct timer_closure { + struct llist_head entry; + struct mobile_prim_intf *intf; + struct osmo_timer_list timer; + uint64_t id; +}; + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms) +{ + struct mobile_prim_intf *intf; + + intf = talloc_zero(ms, struct mobile_prim_intf); + intf->ms = ms; + + INIT_LLIST_HEAD(&intf->timers); + return intf; +} + +void mobile_prim_intf_free(struct mobile_prim_intf *intf) +{ + struct timer_closure *timer, *tmp; + + llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) { + osmo_timer_del(&timer->timer); + llist_del(&timer->entry); + talloc_free(timer); + } + talloc_free(intf); +} + +static void timer_expired_cb(void *_closure) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_closure *closure = _closure; + struct mobile_prim_intf *intf; + + intf = closure->intf; + prim.timer_id = closure->id; + llist_del(&closure->entry); + talloc_free(closure); + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_INDICATION, NULL); + intf->indication(intf, &prim.hdr); +} + +static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_closure *closure; + + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", prim->timer_id); + + closure = talloc_zero(intf, struct timer_closure); + closure->intf = intf; + closure->id = prim->timer_id; + closure->timer.cb = timer_expired_cb; + closure->timer.data = closure; + llist_add_tail(&closure->entry, &intf->timers); + osmo_timer_schedule(&closure->timer, prim->seconds, 0); + return 0; +} + +static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_closure *closure; + + + llist_for_each_entry(closure, &intf->timers, entry) { + if (closure->id != prim->timer_id) + continue; + + LOGP(DPRIM, LOGL_DEBUG, + "Canceling timer with reference: %llu\n", prim->timer_id); + osmo_timer_del(&closure->timer); + llist_del(&closure->entry); + talloc_free(closure); + return 0; + } + return -1; +} + +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr) +{ + switch (OSMO_PRIM_HDR(hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_REQUEST): + return create_timer(intf, (struct mobile_timer_prim *)hdr); + break; + case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): + return cancel_timer(intf, (struct mobile_timer_prim *)hdr); + break; + default: + LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(hdr)); + break; + } + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:30:17 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:30:17 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add osmo.timeout for lua code to have timeouts Message-ID: Review at https://gerrit.osmocom.org/4839 mobile: Add osmo.timeout for lua code to have timeouts Allow to callback into lua code after a user configured timeout. Make it only work on seconds (truncate double to int). Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 132 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/39/4839/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 4eed947..953fb36 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -25,7 +25,26 @@ #include #include +#include + #include + +struct timer_userdata { + int cb_ref; +}; + +static char lua_prim_key[] = "osmocom.org-mobile-prim"; + +static struct mobile_prim_intf *get_primitive(lua_State *L) +{ + struct mobile_prim_intf *intf; + + lua_pushlightuserdata(L, lua_prim_key); + lua_gettable(L, LUA_REGISTRYINDEX); + intf = (void *) lua_topointer(L, -1); + lua_pop(L, 1); + return intf; +} static int lua_osmo_do_log(lua_State *L, int loglevel) { @@ -75,6 +94,92 @@ { NULL, NULL }, }; +static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_userdata *timer = (void *)(intptr_t) prim->timer_id; + lua_State *L = intf->ms->lua_state; + int err; + + lua_rawgeti(L, LUA_REGISTRYINDEX, timer->cb_ref); + luaL_unref(L, LUA_REGISTRYINDEX, timer->cb_ref); + + err = lua_pcall(L, 0, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 1); + } +} + +static int lua_osmo_timeout(lua_State *L) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_userdata *timer; + + if(lua_gettop(L) != 2) { + lua_pushliteral(L, "Need two arguments"); + lua_error(L); + return 0; + } + + luaL_argcheck(L, lua_isnumber(L, -2), 1, "Timeout needs to be a number"); + luaL_argcheck(L, lua_isfunction(L, -1), 2, "Callback needs to be a function"); + + /* + * Create a handle to prevent the function to be GCed while we run the + * timer. Add a metatable to the object so itself will be GCed properly. + */ + timer = lua_newuserdata(L, sizeof(*timer)); + luaL_getmetatable(L, "Timer"); + lua_setmetatable(L, -2); + + lua_pushvalue(L, -2); + timer->cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + + /* Take the address of the user data... */ + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_REQUEST, NULL); + prim.timer_id = (intptr_t) timer; + prim.seconds = lua_tonumber(L, -3); + mobile_prim_intf_req(get_primitive(L), &prim.hdr); + + return 1; +} + +static int lua_timer_cancel(lua_State *L) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_userdata *timer; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + timer = lua_touserdata(L, -1); + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST, NULL); + prim.timer_id = (intptr_t) timer; + mobile_prim_intf_req(get_primitive(L), &prim.hdr); + return 0; +} + +static const struct luaL_Reg timer_funcs[] = { + { "cancel", lua_timer_cancel }, + { "__gc", lua_timer_cancel }, + { NULL, NULL }, +}; + +static const struct luaL_Reg osmo_funcs[] = { + { "timeout", lua_osmo_timeout }, + { NULL, NULL }, +}; + +static void lua_prim_ind(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr) +{ + switch (OSMO_PRIM_HDR(hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): + return handle_timeout(intf, (struct mobile_timer_prim *)hdr); + break; + default: + LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(hdr)); + }; +} + /* * Add functions to the global lua scope. Technically these are * included in the _G table. The following lua code can be used @@ -89,9 +194,29 @@ lua_pop(L, 1); } -static void add_runtime(lua_State *L, struct osmocom_ms *ms) +static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); + + /* Add a osmo module/table. Seems an oldschool module? */ + lua_newtable(L); + luaL_setfuncs(L, osmo_funcs, 0); + lua_setglobal(L, "osmo"); + + /* Create metatables so we can GC objects... */ + luaL_newmetatable(L, "Timer"); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, timer_funcs, 0); + lua_pop(L, 1); + + + /* Remember the primitive pointer... store it in the registry */ + lua_pushlightuserdata(L, lua_prim_key); + lua_pushlightuserdata(L, intf); + lua_settable(L, LUA_REGISTRYINDEX); + } static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) @@ -115,6 +240,7 @@ int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) { + struct mobile_prim_intf *intf; int err; if (ms->lua_state) @@ -124,6 +250,11 @@ return -1; luaL_openlibs(ms->lua_state); + + intf = mobile_prim_intf_alloc(ms); + intf->indication = lua_prim_ind; + add_runtime(ms->lua_state, intf); + err = luaL_loadfilex(ms->lua_state, filename, NULL); if (err) { vty_out(vty, "%% LUA load error: %s%s", @@ -132,7 +263,6 @@ return -2; } - add_runtime(ms->lua_state, ms); err = lua_pcall(ms->lua_state, 0, 0, 0); if (err) { -- To view, visit https://gerrit.osmocom.org/4839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:30:17 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:30:17 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms Message-ID: Review at https://gerrit.osmocom.org/4840 mobile: Create "ms" singleton for struct osmocom_ms Make the MS the script is associated with accessible to lua. Provide access to IMSI and IMEI. The IMSI might not be available at the given time and just return an empty string. Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 46 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/40/4840/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 953fb36..53f1c57 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -164,8 +164,42 @@ { NULL, NULL }, }; +static int lua_osmo_ms(lua_State *L) +{ + lua_pushlightuserdata(L, get_primitive(L)->ms); + luaL_getmetatable(L, "MS"); + lua_setmetatable(L, -2); + + return 1; +} + +static int lua_ms_imei(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->settings.imei); + return 1; +} +static int lua_ms_imsi(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->subscr.imsi); + return 1; +} + +static const struct luaL_Reg ms_funcs[] = { + { "imsi", lua_ms_imsi }, + { "imei", lua_ms_imei }, + { NULL, NULL }, +}; + + static const struct luaL_Reg osmo_funcs[] = { { "timeout", lua_osmo_timeout }, + { "ms", lua_osmo_ms }, { NULL, NULL }, }; @@ -194,6 +228,16 @@ lua_pop(L, 1); } +static void create_meta_table(lua_State *L, const char *name, const luaL_Reg *regs) +{ + luaL_newmetatable(L, name); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, regs, 0); + lua_pop(L, 1); +} + static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); @@ -204,13 +248,8 @@ lua_setglobal(L, "osmo"); /* Create metatables so we can GC objects... */ - luaL_newmetatable(L, "Timer"); - lua_pushliteral(L, "__index"); - lua_pushvalue(L, -2); - lua_rawset(L, -3); - luaL_setfuncs(L, timer_funcs, 0); - lua_pop(L, 1); - + create_meta_table(L, "Timer", timer_funcs); + create_meta_table(L, "MS", ms_funcs); /* Remember the primitive pointer... store it in the registry */ lua_pushlightuserdata(L, lua_prim_key); -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 15 06:38:48 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 06:38:48 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4838 to look at the new patch set (#2). osmocomBB: Begin with a manual for the "mobile" application Begin with manual for the layer23 ("mobile") application but focus on the scripting code first. Change-Id: I736f2d61650feac70b6d960811b478639aa71737 --- M Makefile A OsmocomBB/Makefile A OsmocomBB/chapters/scripting.adoc A OsmocomBB/osmocombb-usermanual-docinfo.xml A OsmocomBB/osmocombb-usermanual.adoc 5 files changed, 189 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/38/4838/2 diff --git a/Makefile b/Makefile index cd1b10e..8261640 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) + cd OsmocomBB; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -25,6 +26,7 @@ cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean + cd OsmocomBB; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -39,6 +41,7 @@ cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload + cd OsmocomBB; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -55,6 +58,7 @@ cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check cd OsmoSTP; $(MAKE) check + cd OsmocomBB; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmocomBB/Makefile b/OsmocomBB/Makefile new file mode 100644 index 0000000..9f861a5 --- /dev/null +++ b/OsmocomBB/Makefile @@ -0,0 +1,7 @@ +TOPDIR = .. + +ASCIIDOC = osmocombb-usermanual.adoc +ASCIIDOC_DEPS = chapters/*.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmocomBB/chapters/scripting.adoc b/OsmocomBB/chapters/scripting.adoc new file mode 100644 index 0000000..8828a72 --- /dev/null +++ b/OsmocomBB/chapters/scripting.adoc @@ -0,0 +1,111 @@ +[[scripting]] +== Scripting using Lua + +The mobile application can be extended using the +https://www.lua.org/manual/5.3/[lua5.3 language]. +To use the scripting facility a script needs to be +configured through the VTY interface and will be +associated to a Mobile Station (MS). The script will +then be able to interact with the specific MS. + +An event based programming model is to be used. This +means that once the script has been loaded it should +register to the wanted events, configure timers and +return. When an event occurs the registered event +handler will be executed. + +The following describes the exported runtime services +to be used in the script. + +=== Logging + +The logging functions allow to generate log messages +for different levels. The log implementatiom is using +the standard Osmocom logging framework which allows to +have multiple log targets, e.g. syslog, file or through +the VTY. + +|======== +|Code |Return | Explanation +|print(...) |void | Print a message with log level 'debug' +|log_debug(...) |void | Print a message with log level 'debug' +|log_notice(...) |void | Print a message with log level 'notice' +|log_error(...) |void | Print a message with log level 'error' +|log_fatal(...) |void | Print a message with log level 'fatal' +|======== + +==== Examples + +---- +Code: +print("Log level 'debug'") +log_debug("Log level 'debug'") +log_notice("Log level 'notice'") +log_error("Log level 'error'") +log_fatal("Log level 'fatal'") + +Output: +\<0011> @script.lua:1 Log level 'debug' +\<0011> @script.lua:2 Log level 'debug' +\<0011> @script.lua:3 Log level 'notice' +\<0011> @script.lua:4 Log level 'error' +\<0011> @script.lua:5 Log level 'fatal' + +---- + +=== Timer class + +The timer allows to invoke a function once after the requested +timeout. The timer creation function will return immediately and +the callback will be called after the timeout and when no other +lua code is executing. The _osmo.timeout_ function should be used +to create a new time, a running timer can be canneled using the _cancel_ +method. + +|======== +|Code |Return |Explanation +|osmo.timeout(timeout, cb)|A new timer|Create a new non-recurring timer. Timeout should be in rounded seconds and cb should be a function. +|timer.cancel() |Void |Cancel the timer, the callback will not be called. +|======== + +==== Examples + +---- +Code: +local timer = osmo.timeout(timeout_in_seconds, call_back) +timer:cancel() +---- + +---- +Code: +local timer = osmo.timeout(3, function() + print("Timeout passed") +end) +print("Configured") + +Output: +\<0011> @script.lua:4 Configured +\<0011> @script.lua:2 Timeout passed +---- + +=== MS class + +The MS singletong provides access to the Mobile Station configuration +the script is associated with. This includes runtime information like +the IMSI, IMEI or functions like start/stop. + +|======== +|Code |Return |Explanation +|osmo.ms().imsi() |string |The IMSI. It might be invalid in case it has not been read from SIM card yet +|osmo.ms().imei() |string |The configured IMEI +|======== +==== Examples + +----- +Code: +local ms = osmo.ms() +print(ms.imei(), ms.imsi()) + +Output: +\<0011> @script.lua:2 126000000000000 +----- diff --git a/OsmocomBB/osmocombb-usermanual-docinfo.xml b/OsmocomBB/osmocombb-usermanual-docinfo.xml new file mode 100644 index 0000000..c93d5e1 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual-docinfo.xml @@ -0,0 +1,46 @@ + + + 1 + August 2017 + HW + + Initial version. + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + + + 2013-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmocomBB/osmocombb-usermanual.adoc b/OsmocomBB/osmocombb-usermanual.adoc new file mode 100644 index 0000000..b405934 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual.adoc @@ -0,0 +1,21 @@ +OsmocomBB User Manual +===================== +Holger Hans Peter Freyther + + +include::../common/chapters/preface.adoc[] + +include::chapters/scripting.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 15 09:39:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 09:39:49 +0000 Subject: osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4838/2/OsmocomBB/osmocombb-usermanual-docinfo.xml File OsmocomBB/osmocombb-usermanual-docinfo.xml: PS2, Line 14: Harald : Welte : hwelte at sysmocom.de : HW you should probably give yourself credit, rather than me :) -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 15 09:43:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 09:43:08 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 09:43:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 09:43:29 +0000 Subject: osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 09:44:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 09:44:22 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:46:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:46:49 +0000 Subject: osmocom-bb[master]: mobile: Add osmo.timeout for lua code to have timeouts In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:47:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:47:49 +0000 Subject: osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:48:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:48:24 +0000 Subject: osmocom-bb[master]: layer23 vty: fix prompts: insert space after '#' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:48:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:48:26 +0000 Subject: [MERGED] osmocom-bb[master]: layer23 vty: fix prompts: insert space after '#' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: layer23 vty: fix prompts: insert space after '#' ...................................................................... layer23 vty: fix prompts: insert space after '#' "All" our VTY prompts have a space after the prompt. Also do that for '(ms)', '(test-sim)' and '(support)' prompts. Change OsmocomBB(ms)#exit to OsmocomBB(ms)# exit Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 9a4ae63..cbf8162 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -55,19 +55,19 @@ struct cmd_node ms_node = { MS_NODE, - "%s(ms)#", + "%s(ms)# ", 1 }; struct cmd_node testsim_node = { TESTSIM_NODE, - "%s(test-sim)#", + "%s(test-sim)# ", 1 }; struct cmd_node support_node = { SUPPORT_NODE, - "%s(support)#", + "%s(support)# ", 1 }; -- To view, visit https://gerrit.osmocom.org/4831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id437279e0fa9845630a306958b404efa3b94b492 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:49:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:49:52 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:50:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:50:27 +0000 Subject: osmo-msc[master]: sms_route_mt_sms: Don't return uninitialized variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 15 11:50:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 11:50:29 +0000 Subject: [MERGED] osmo-msc[master]: sms_route_mt_sms: Don't return uninitialized variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sms_route_mt_sms: Don't return uninitialized variable ...................................................................... sms_route_mt_sms: Don't return uninitialized variable Wen there's no SMPP support compiled in, and routing was successful, we shouldn't return an uninitialized value. Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a Fixes: Coverity CID#174176 --- M src/libmsc/gsm_04_11.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 99adbf7..103c259 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -388,7 +388,8 @@ rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; rate_ctr_inc(&conn->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); #endif - } + } else + rc = 0; return rc; } -- To view, visit https://gerrit.osmocom.org/4830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Wed Nov 15 12:17:22 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 12:17:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0c306ae3383_a94d30f7c213190@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 25s] [ 10.901914] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 10.920355] CPU2: stopping [ 25s] [ 10.920790] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 25s] [ 10.921783] Hardware name: Generic DT based system [ 25s] [ 10.922514] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 25s] [ 10.923692] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 25s] [ 10.924664] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 25s] [ 10.925651] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 25s] [ 10.926662] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 10.927661] Exception stack(0xee089eb8 to 0xee089f00) [ 25s] [ 10.928340] 9ea0: 00000000 00000002 [ 25s] [ 10.929426] 9ec0: 00000002 00000002 00000020 c06b8084 c06b8080 ee088000 ee089f00 40000001 [ 25s] [ 10.930525] 9ee0: c06b8080 00000000 c06ef580 ee089f00 c0034d24 c0034e40 200b0113 ffffffff [ 25s] [ 10.931613] [] (__irq_svc) from [] (__do_softirq+0x134/0x250) [ 25s] [ 10.932614] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 25s] [ 10.933576] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 25s] [ 10.934619] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 25s] [ 10.935728] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 10.936724] Exception stack(0xee089f88 to 0xee089fd0) [ 25s] [ 10.937401] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 25s] [ 10.938489] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 25s] [ 10.939574] 9fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 25s] [ 10.940255] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 25s] [ 10.941352] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 25s] [ 10.942456] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 10.943390] Rebooting in 1 seconds..### VM INTERACTION END ### [ 26s] /var/run/obs/worker/4/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 26s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 26s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 15 13:20:57 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 15 Nov 2017 13:20:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4838 to look at the new patch set (#3). osmocomBB: Begin with a manual for the "mobile" application Begin with manual for the layer23 ("mobile") application but focus on the scripting code first. Change-Id: I736f2d61650feac70b6d960811b478639aa71737 --- M Makefile A OsmocomBB/Makefile A OsmocomBB/chapters/scripting.adoc A OsmocomBB/osmocombb-usermanual-docinfo.xml A OsmocomBB/osmocombb-usermanual.adoc 5 files changed, 200 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/38/4838/3 diff --git a/Makefile b/Makefile index cd1b10e..8261640 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) + cd OsmocomBB; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -25,6 +26,7 @@ cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean + cd OsmocomBB; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -39,6 +41,7 @@ cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload + cd OsmocomBB; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -55,6 +58,7 @@ cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check cd OsmoSTP; $(MAKE) check + cd OsmocomBB; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmocomBB/Makefile b/OsmocomBB/Makefile new file mode 100644 index 0000000..9f861a5 --- /dev/null +++ b/OsmocomBB/Makefile @@ -0,0 +1,7 @@ +TOPDIR = .. + +ASCIIDOC = osmocombb-usermanual.adoc +ASCIIDOC_DEPS = chapters/*.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmocomBB/chapters/scripting.adoc b/OsmocomBB/chapters/scripting.adoc new file mode 100644 index 0000000..8828a72 --- /dev/null +++ b/OsmocomBB/chapters/scripting.adoc @@ -0,0 +1,111 @@ +[[scripting]] +== Scripting using Lua + +The mobile application can be extended using the +https://www.lua.org/manual/5.3/[lua5.3 language]. +To use the scripting facility a script needs to be +configured through the VTY interface and will be +associated to a Mobile Station (MS). The script will +then be able to interact with the specific MS. + +An event based programming model is to be used. This +means that once the script has been loaded it should +register to the wanted events, configure timers and +return. When an event occurs the registered event +handler will be executed. + +The following describes the exported runtime services +to be used in the script. + +=== Logging + +The logging functions allow to generate log messages +for different levels. The log implementatiom is using +the standard Osmocom logging framework which allows to +have multiple log targets, e.g. syslog, file or through +the VTY. + +|======== +|Code |Return | Explanation +|print(...) |void | Print a message with log level 'debug' +|log_debug(...) |void | Print a message with log level 'debug' +|log_notice(...) |void | Print a message with log level 'notice' +|log_error(...) |void | Print a message with log level 'error' +|log_fatal(...) |void | Print a message with log level 'fatal' +|======== + +==== Examples + +---- +Code: +print("Log level 'debug'") +log_debug("Log level 'debug'") +log_notice("Log level 'notice'") +log_error("Log level 'error'") +log_fatal("Log level 'fatal'") + +Output: +\<0011> @script.lua:1 Log level 'debug' +\<0011> @script.lua:2 Log level 'debug' +\<0011> @script.lua:3 Log level 'notice' +\<0011> @script.lua:4 Log level 'error' +\<0011> @script.lua:5 Log level 'fatal' + +---- + +=== Timer class + +The timer allows to invoke a function once after the requested +timeout. The timer creation function will return immediately and +the callback will be called after the timeout and when no other +lua code is executing. The _osmo.timeout_ function should be used +to create a new time, a running timer can be canneled using the _cancel_ +method. + +|======== +|Code |Return |Explanation +|osmo.timeout(timeout, cb)|A new timer|Create a new non-recurring timer. Timeout should be in rounded seconds and cb should be a function. +|timer.cancel() |Void |Cancel the timer, the callback will not be called. +|======== + +==== Examples + +---- +Code: +local timer = osmo.timeout(timeout_in_seconds, call_back) +timer:cancel() +---- + +---- +Code: +local timer = osmo.timeout(3, function() + print("Timeout passed") +end) +print("Configured") + +Output: +\<0011> @script.lua:4 Configured +\<0011> @script.lua:2 Timeout passed +---- + +=== MS class + +The MS singletong provides access to the Mobile Station configuration +the script is associated with. This includes runtime information like +the IMSI, IMEI or functions like start/stop. + +|======== +|Code |Return |Explanation +|osmo.ms().imsi() |string |The IMSI. It might be invalid in case it has not been read from SIM card yet +|osmo.ms().imei() |string |The configured IMEI +|======== +==== Examples + +----- +Code: +local ms = osmo.ms() +print(ms.imei(), ms.imsi()) + +Output: +\<0011> @script.lua:2 126000000000000 +----- diff --git a/OsmocomBB/osmocombb-usermanual-docinfo.xml b/OsmocomBB/osmocombb-usermanual-docinfo.xml new file mode 100644 index 0000000..992a42e --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual-docinfo.xml @@ -0,0 +1,57 @@ + + + 1 + November 2017 + HHPF + + Initial version. + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + Holger + Freyther + hfreyther at sysmocom.de + HHPF + + sysmocom + sysmocom - s.f.m.c. GmbH + Co-Founder + + + + + + 2013-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmocomBB/osmocombb-usermanual.adoc b/OsmocomBB/osmocombb-usermanual.adoc new file mode 100644 index 0000000..b405934 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual.adoc @@ -0,0 +1,21 @@ +OsmocomBB User Manual +===================== +Holger Hans Peter Freyther + + +include::../common/chapters/preface.adoc[] + +include::chapters/scripting.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 15 13:41:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 Nov 2017 13:41:13 +0000 Subject: osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From admin at opensuse.org Wed Nov 15 19:56:44 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 19:56:44 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a0c9c462bb25_a94d30f7c2253635@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/i586 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 303s] | This file was extended by libosmocore config.status 0.10.2.20171115, which was [ 303s] | generated by GNU Autoconf 2.69. Invocation command line was [ 303s] | [ 303s] | CONFIG_FILES = [ 303s] | CONFIG_HEADERS = [ 303s] | CONFIG_LINKS = [ 303s] | CONFIG_COMMANDS = [ 303s] | $ ./config.status Doxyfile.core [ 303s] | [ 303s] | on cumulus2 [ 303s] | [ 303s] | config.status:1176: creating Doxyfile.core [ 303s] [ 303s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 303s] make[1]: *** [override_dh_auto_test] Error 1 [ 303s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 303s] debian/rules:15: recipe for target 'build' failed [ 303s] make: *** [build] Error 2 [ 303s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 303s] [ 303s] cumulus2 failed "build libosmocore_0.10.2.20171115.dsc" at Wed Nov 15 19:56:37 UTC 2017. [ 303s] [ 303s] ### VM INTERACTION START ### [ 303s] Powering off. [ 303s] [ 292.657057] reboot: Power down [ 303s] ### VM INTERACTION END ### [ 303s] [ 303s] cumulus2 failed "build libosmocore_0.10.2.20171115.dsc" at Wed Nov 15 19:56:39 UTC 2017. [ 303s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 15 19:59:36 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 19:59:36 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-abis in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0c9e032b6f1_a94d30f7c225639d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/Debian_9.0/armv7l Package network:osmocom:nightly/libosmo-abis failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmo-abis Last lines of build log: [ 26s] [ 10.992974] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 26s] [ 10.994758] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 26s] [ 10.996564] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 10.998315] Exception stack(0xee085f88 to 0xee085fd0) [ 26s] [ 10.999541] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 26s] [ 11.001495] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 26s] [ 11.003544] 5fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 26s] [ 11.005041] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 26s] [ 11.006827] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 26s] [ 11.008774] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 11.010419] CPU2: stopping [ 26s] [ 11.011223] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 26s] [ 11.012763] Hardware name: Generic DT based system [ 26s] [ 11.013916] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 26s] [ 11.015703] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 26s] [ 11.017573] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 26s] [ 11.019542] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 26s] [ 11.021368] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 11.023136] Exception stack(0xee089f88 to 0xee089fd0) [ 26s] [ 11.024324] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 26s] [ 11.026303] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 26s] [ 11.033970] 9fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 26s] [ 11.035450] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 26s] [ 11.037316] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 26s] [ 11.039480] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 27s] [ 11.043253] Rebooting in 1 seconds..### VM INTERACTION END ### [ 27s] /var/run/obs/worker/6/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 27s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 27s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 15 20:01:19 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 20:01:19 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a0c9e3942c8_a94d30f7c225773f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.04/i586 Package network:osmocom:nightly/libosmocore failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] -[+] Testing: gsm0503_mcs9 [ 229s] -[.] Input length : ret = 606 exp = 606 -> OK [ 229s] -[.] Output length : ret = 1836 exp = 1836 -> OK [ 229s] -[.] Random vector checks: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] ./testsuite.at:63: exit code was 132, expected 0 [ 229s] 10. testsuite.at:60: 10. conv_gsm0503 (testsuite.at:60): FAILED (testsuite.at:63) [ 229s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 229s] make[1]: *** [override_dh_auto_test] Error 1 [ 229s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 229s] debian/rules:15: recipe for target 'build' failed [ 229s] make: *** [build] Error 2 [ 229s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 229s] [ 229s] build33 failed "build libosmocore_0.10.2.20171115.dsc" at Wed Nov 15 20:01:03 UTC 2017. [ 229s] [ 229s] ### VM INTERACTION START ### [ 231s] [ 219.337861] reboot: Power down [ 232s] ### VM INTERACTION END ### [ 232s] [ 232s] build33 failed "build libosmocore_0.10.2.20171115.dsc" at Wed Nov 15 20:01:07 UTC 2017. [ 232s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 15 20:20:10 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 15 Nov 2017 20:20:10 +0000 Subject: Build failure of network:osmocom:nightly/libasn1c in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0ca1919dce1_a94d30f7c22610a2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libasn1c/Debian_9.0/armv7l Package network:osmocom:nightly/libasn1c failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libasn1c Last lines of build log: [ 36s] [ 11.689758] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 36s] [ 11.692766] CPU2: stopping [ 36s] [ 11.693197] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 36s] [ 11.694149] Hardware name: Generic DT based system [ 36s] [ 11.694957] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 36s] [ 11.696148] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 36s] [ 11.697179] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 36s] [ 11.698319] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 36s] [ 11.703160] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 36s] [ 11.704490] Exception stack(0xee089eb8 to 0xee089f00) [ 36s] [ 11.705337] 9ea0: 00000000 00000002 [ 36s] [ 11.706558] 9ec0: 00000002 ee088000 00000202 00000000 00000000 00000001 ee005000 ee088000 [ 36s] [ 11.713019] 9ee0: c06b3d50 00000000 c06ef580 ee089f00 c0034d24 c0034dc0 200f0113 ffffffff [ 36s] [ 11.714915] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 36s] [ 11.716601] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 36s] [ 11.719864] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 36s] [ 11.724164] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 36s] [ 11.727875] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 36s] [ 11.729777] Exception stack(0xee089f88 to 0xee089fd0) [ 36s] [ 11.733694] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 36s] [ 11.736046] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 36s] [ 11.743038] 9fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 36s] [ 11.744669] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 36s] [ 11.746813] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 36s] [ 11.753092] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 38s] [ 11.754779] Rebooting in 1 seconds..### VM INTERACTION END ### [ 38s] /var/run/obs/worker/3/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 38s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 38s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 15 22:37:23 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 22:37:23 +0000 Subject: [PATCH] osmo-sgsn[master]: .gitignore: remove unneeded ignores of bsc/msc/nitb files Message-ID: Review at https://gerrit.osmocom.org/4841 .gitignore: remove unneeded ignores of bsc/msc/nitb files sgsn was splitted out of the openbsc repository Change-Id: I66905432c411291630f66579fa4177936c8f2bcf --- M .gitignore 1 file changed, 0 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/41/4841/1 diff --git a/.gitignore b/.gitignore index a9e6b84..b8c841f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,6 @@ Makefile.in bscconfig.h bscconfig.h.in -openbsc.pc -src/osmo-nitb/osmo-nitb -src/osmo-bsc_mgcp/osmo-bsc_mgcp -src/osmo-bsc/osmo-bsc src/utils/meas_vis src/utils/meas_json src/utils/osmo-meas-pcap2db @@ -45,30 +41,14 @@ # apps and app data -hlr.sqlite3 -src/utils/bs11_config -src/ipaccess/ipaccess-config -src/ipaccess/abisip-find -src/ipaccess/ipaccess-firmware -src/ipaccess/ipaccess-proxy -src/utils/isdnsync -src/nat/bsc_nat src/gprs/osmo-sgsn src/gprs/osmo-gbproxy src/gprs/osmo-gtphub -src/osmo-bsc_nat/osmo-bsc_nat src/libcommon/gsup_test_client -src/osmo-msc/osmo-msc #tests tests/testsuite.dir tests/*/*_test -# ignore compiled binaries like msc_vlr_test_foo; do not ignore -# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object -# files: -tests/msc_vlr/msc_vlr_test_* -!tests/msc_vlr/msc_vlr_test_*.* -tests/msc_vlr/msc_vlr_test_*.o tests/atconfig @@ -78,6 +58,5 @@ tests/testsuite.log gsn_restart -src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/4841 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66905432c411291630f66579fa4177936c8f2bcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 22:37:24 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 22:37:24 +0000 Subject: [PATCH] osmo-sgsn[master]: tests/ctrl_test_runner.py: remove BSC/NAT TestRunner Message-ID: Review at https://gerrit.osmocom.org/4842 tests/ctrl_test_runner.py: remove BSC/NAT TestRunner SGSN was splitted out of OpenBSC. Change-Id: Ie4e44e49e5c904929869b47fc4d608aab1aab75e --- M tests/ctrl_test_runner.py 1 file changed, 0 insertions(+), 371 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/42/4842/1 diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..7c64f48 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -147,361 +147,6 @@ return responses - -class TestCtrlBSC(TestCtrlBase): - - def tearDown(self): - TestCtrlBase.tearDown(self) - os.unlink("tmp_dummy_sock") - - def ctrl_command(self): - return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c", - "doc/examples/osmo-bsc/osmo-bsc.cfg"] - - def ctrl_app(self): - return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc") - - def testCtrlErrs(self): - r = self.do_get('invalid') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Command not found') - - r = self.do_set('rf_locked', '999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value failed verification.') - - r = self.do_get('bts') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while parsing the index.') - - r = self.do_get('bts.999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while resolving object') - - def testBtsLac(self): - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '1') - - r = self.do_set('bts.0.location-area-code', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.location-area-code', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsCi(self): - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '0') - - r = self.do_set('bts.0.cell-identity', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.cell-identity', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsGenerateSystemInformation(self): - r = self.do_get('bts.0.send-new-system-informations') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write Only attribute') - - # No RSL links so it will fail - r = self.do_set('bts.0.send-new-system-informations', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Failed to generate SI') - - def testBtsChannelLoad(self): - r = self.do_set('bts.0.channel-load', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.channel-load') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], - 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0') - - def testBtsOmlConnectionState(self): - """Check OML state. It will not be connected""" - r = self.do_set('bts.0.oml-connection-state', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.oml-connection-state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], 'disconnected') - - def testTrxPowerRed(self): - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '20') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '22') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value must be even') - - def testTrxArfcn(self): - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '871') - - r = self.do_set('bts.0.trx.0.arfcn', '873') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_set('bts.0.trx.0.arfcn', '2000') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testRfLock(self): - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_set('rf_locked', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '1') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,locked,off') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=off') - - r = self.do_set('rf_locked', '0') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '0') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=on') - - def testTimezone(self): - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_set('timezone', '-2,15,2') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - # Test invalid input - r = self.do_set('timezone', '-2,15,2,5,6,7') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_set('timezone', '-2,15') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '-2') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '1') - - r = self.do_set('timezone', 'off') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - def testMcc(self): - r = self.do_set('mcc', '23') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - r = self.do_set('mcc', '023') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - def testMnc(self): - r = self.do_set('mnc', '9') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - r = self.do_set('mnc', '09') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - - def testMccMncApply(self): - # Test some invalid input - r = self.do_set('mcc-mnc-apply', 'WRONG') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '1,') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Set it again - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Nothing changed') - - # Change it - r = self.do_set('mcc-mnc-apply', '200,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Change it - r = self.do_set('mcc-mnc-apply', '201,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Verify - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '4') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '201') - - # Change it - r = self.do_set('mcc-mnc-apply', '202,03') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '3') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '202') - -class TestCtrlNAT(TestCtrlBase): - - def ctrl_command(self): - return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c", - "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"] - - def ctrl_app(self): - return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat") - - def testAccessList(self): - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - def testAccessListManagement(self): - r = self.do_set("net.0.add.allow.access-list.404", "abc") - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set("net.0.add.allow.access-list.bla", "^234$") - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') - self.assertEquals(r['value'], 'IMSI allow added to access list') - - # TODO.. find a way to actually see if this rule has been - # added. e.g. by implementing a get for the list. - class TestCtrlSGSN(TestCtrlBase): def ctrl_command(self): return ["./src/gprs/osmo-sgsn", "-c", @@ -516,20 +161,6 @@ self.assertEquals(r['mtype'], 'GET_REPLY') self.assertEquals(r['var'], 'subscriber-list-active-v1') self.assertEquals(r['value'], None) - -def add_bsc_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")): - print("Skipping the BSC test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) - suite.addTest(test) - -def add_nat_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")): - print("Skipping the NAT test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT) - suite.addTest(test) def add_sgsn_test(suite, workdir): if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")): @@ -568,8 +199,6 @@ os.chdir(workdir) print "Running tests for specific control commands" suite = unittest.TestSuite() - add_bsc_test(suite, workdir) - add_nat_test(suite, workdir) add_sgsn_test(suite, workdir) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) -- To view, visit https://gerrit.osmocom.org/4842 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4e44e49e5c904929869b47fc4d608aab1aab75e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 22:37:24 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 22:37:24 +0000 Subject: [PATCH] osmo-sgsn[master]: debian: remove doublicated project name in example files Message-ID: Review at https://gerrit.osmocom.org/4843 debian: remove doublicated project name in example files For example: /usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg -> /usr/share/doc/osmo-sgsn/examples/osmo-sgsn.cfg Change-Id: I77f9665e78e3e55910efb30cb50cefdb138e19f7 --- M debian/osmo-gbproxy.install M debian/osmo-gtphub.install M debian/osmo-sgsn.install 3 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/43/4843/1 diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 33ec570..8272551 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,2 +1,3 @@ usr/bin/osmo-gbproxy -usr/share/doc/osmo-sgsn/examples/osmo-gbproxy +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg usr/share/doc/osmo-gbproxy/examples +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy.cfg usr/share/doc/osmo-gbproxy/examples diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install index fb4c095..ed0bd1b 100644 --- a/debian/osmo-gtphub.install +++ b/debian/osmo-gtphub.install @@ -1,2 +1,3 @@ usr/bin/osmo-gtphub -usr/share/doc/osmo-sgsn/examples/osmo-gtphub +usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub-1iface.cfg usr/share/doc/osmo-gtphub/examples +usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub.cfg usr/share/doc/osmo-gtphub/examples diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install index bde329a..9390deb 100644 --- a/debian/osmo-sgsn.install +++ b/debian/osmo-sgsn.install @@ -1,2 +1,3 @@ usr/bin/osmo-sgsn -usr/share/doc/osmo-sgsn/examples/osmo-sgsn +usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg usr/share/doc/osmo-sgsn/examples +usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg usr/share/doc/osmo-sgsn/examples -- To view, visit https://gerrit.osmocom.org/4843 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77f9665e78e3e55910efb30cb50cefdb138e19f7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 22:57:16 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 22:57:16 +0000 Subject: [PATCH] osmo-mgw[master]: debian/control: correct library dependency of osmo-mgw again... Message-ID: Review at https://gerrit.osmocom.org/4844 debian/control: correct library dependency of osmo-mgw against libosmo-mgcp1 When the library version was bump, the dependency of osmo-mgw was forgotten. Change-Id: I3eeafa3c294d9ec71a72fb2833fe3b2bdef05a50 Fixes: e7d27aeae10b ("Tag/Release Version 1.2.0") --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/44/4844/1 diff --git a/debian/control b/debian/control index 11fa685..e96115f 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Package: osmo-mgw Architecture: any Multi-Arch: foreign -Depends: libosmo-mgcp0, ${misc:Depends}, ${shlibs:Depends} +Depends: libosmo-mgcp1, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks Package: libosmo-mgcp1 -- To view, visit https://gerrit.osmocom.org/4844 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3eeafa3c294d9ec71a72fb2833fe3b2bdef05a50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 23:01:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 15 Nov 2017 23:01:00 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4824/1/OsmoGGSN/chapters/configuration.adoc File OsmoGGSN/chapters/configuration.adoc: Line 277: To manually enable IP forwarding and masquerading, you can do: > I think this is in the wrong section.This section should only contain "manu agreed. BTW, does the systemd masquerading thing also enable ip_forward? Is that echo 1 the "proper" way to enable ip forwarding? -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 15 23:02:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 15 Nov 2017 23:02:05 +0000 Subject: [MERGED] osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: MGCP endpoints: parse as decimal, not hex ...................................................................... MGCP endpoints: parse as decimal, not hex Parse the endpoint index from the MGCP messages as base-10, not 16. If osmo-mgw parses the endpoint IDs as base-16 numbers while OsmoMSC and OsmoBSC pass in decimal endpoint numbers, the consequence is, for example: - I configure 32 endpoints in osmo-mgw, - I tell OsmoBSC to use endpoint range 1-32, - At some point OsmoBSC may pass in, say, "30 at mgw", - "30" is parsed base-16 and ends up being endpoint index 48, instead of 32, - OsmoMGW sees that 48 > number_endpoints and barfs. Related: OS#2633 Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e --- M src/libosmo-mgcp/mgcp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index d686bca..763a5a1 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -192,7 +192,7 @@ if (strncmp(mgcp, "ds/e1", 5) == 0) return find_e1_endpoint(cfg, mgcp); - gw = strtoul(mgcp, &endptr, 16); + gw = strtoul(mgcp, &endptr, 10); if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@') return &cfg->trunk.endpoints[gw]; -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 15 23:08:21 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 23:08:21 +0000 Subject: [PATCH] osmo-bsc[master]: debian: remove doublicated project name in example files Message-ID: Review at https://gerrit.osmocom.org/4845 debian: remove doublicated project name in example files For example: /usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc.cfg -> usr/share/doc/osmo-bsc/examples/osmo-bsc.cfg Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea --- M debian/osmo-bsc.install 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/4845/1 diff --git a/debian/osmo-bsc.install b/debian/osmo-bsc.install index a7800c9..9a2bc3f 100644 --- a/debian/osmo-bsc.install +++ b/debian/osmo-bsc.install @@ -1,3 +1,4 @@ usr/bin/osmo-bsc usr/bin/abisip-find -usr/share/doc/osmo-bsc/examples/osmo-bsc +usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg usr/share/doc/osmo-bsc/examples +usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc.cfg usr/share/doc/osmo-bsc/examples -- To view, visit https://gerrit.osmocom.org/4845 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 23:17:20 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 23:17:20 +0000 Subject: [PATCH] osmo-msc[master]: debian/rules: remove doublicated project name in example files Message-ID: Review at https://gerrit.osmocom.org/4846 debian/rules: remove doublicated project name in example files For example: /usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg -> /usr/share/doc/osmo-msc/examples/osmo-msc.cfg Change-Id: I702cd963d5c3a2f4085ebce5e0dfa1a8a27ea89f --- M debian/osmo-msc.install 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/4846/1 diff --git a/debian/osmo-msc.install b/debian/osmo-msc.install index b3d1a55..6b84b8f 100644 --- a/debian/osmo-msc.install +++ b/debian/osmo-msc.install @@ -1,2 +1,4 @@ usr/bin/osmo-msc -usr/share/doc/osmo-msc/examples/osmo-msc +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg usr/share/doc/osmo-msc/examples +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_custom-sccp.cfg usr/share/doc/osmo-msc/examples +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_multi-cs7.cfg usr/share/doc/osmo-msc/examples -- To view, visit https://gerrit.osmocom.org/4846 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I702cd963d5c3a2f4085ebce5e0dfa1a8a27ea89f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Nov 15 23:42:02 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 15 Nov 2017 23:42:02 +0000 Subject: [PATCH] osmo-hlr[master]: debian: include systemd service osmo-hlr.service Message-ID: Review at https://gerrit.osmocom.org/4847 debian: include systemd service osmo-hlr.service Change-Id: I6d9fd34aa42b911f074557b526adde05e03d58b9 --- A debian/osmo-hlr.service 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/47/4847/1 diff --git a/debian/osmo-hlr.service b/debian/osmo-hlr.service new file mode 120000 index 0000000..184f5aa --- /dev/null +++ b/debian/osmo-hlr.service @@ -0,0 +1 @@ +../contrib/systemd/osmo-hlr.service \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/4847 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d9fd34aa42b911f074557b526adde05e03d58b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Nov 16 00:38:29 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 Nov 2017 00:38:29 +0000 Subject: [PATCH] osmo-hlr[master]: doc: install example .cfg files to $(docdir)/examples/ Message-ID: Review at https://gerrit.osmocom.org/4848 doc: install example .cfg files to $(docdir)/examples/ Change-Id: I8671ce33b9bf28c89f767dd1b4a1463aeb275158 --- M Makefile.am M configure.ac M debian/osmo-hlr.install A doc/Makefile.am 4 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/48/4848/1 diff --git a/Makefile.am b/Makefile.am index 392d80d..f5062a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 SUBDIRS = \ + doc \ src \ sql \ tests \ diff --git a/configure.ac b/configure.ac index 1db32d4..d72a026 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,7 @@ AC_OUTPUT( Makefile + doc/Makefile src/Makefile sql/Makefile tests/Makefile diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 0e2a1c4..1e3bbc6 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -1,3 +1,4 @@ /usr/bin/osmo-hlr /usr/bin/osmo-hlr-db-tool /usr/share/doc/osmo-hlr/hlr.sql +/usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..e0e5380 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,22 @@ +CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,' + +dist-hook: + for f in $$($(CFG_FILES)); do \ + j="$(distdir)/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +install-data-hook: + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +uninstall-hook: + @$(PRE_UNINSTALL) + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/$$f" && \ + $(RM) $$j; \ + done -- To view, visit https://gerrit.osmocom.org/4848 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8671ce33b9bf28c89f767dd1b4a1463aeb275158 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Nov 16 00:38:30 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 Nov 2017 00:38:30 +0000 Subject: [PATCH] osmo-hlr[master]: debian: install osmo-hlr.cfg to /etc/osmocom Message-ID: Review at https://gerrit.osmocom.org/4849 debian: install osmo-hlr.cfg to /etc/osmocom Change-Id: Ifa1094da9b286a17a5c9a1ee300ec13a4a10a9a7 --- M debian/osmo-hlr.install 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/49/4849/1 diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 1e3bbc6..062f4fd 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -2,3 +2,4 @@ /usr/bin/osmo-hlr-db-tool /usr/share/doc/osmo-hlr/hlr.sql /usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg +/usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg /etc/osmocom/ -- To view, visit https://gerrit.osmocom.org/4849 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa1094da9b286a17a5c9a1ee300ec13a4a10a9a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Nov 16 00:47:04 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 Nov 2017 00:47:04 +0000 Subject: [PATCH] osmo-mgw[master]: debian: include systemd service osmo-mgw.service Message-ID: Review at https://gerrit.osmocom.org/4850 debian: include systemd service osmo-mgw.service Change-Id: Ic298b836620b3497734aed89b92c4f22a9071f0d --- A debian/osmo-mgw.service 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/4850/1 diff --git a/debian/osmo-mgw.service b/debian/osmo-mgw.service new file mode 120000 index 0000000..1e0664c --- /dev/null +++ b/debian/osmo-mgw.service @@ -0,0 +1 @@ +../contrib/systemd/osmo-mgw.service \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/4850 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic298b836620b3497734aed89b92c4f22a9071f0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus From admin at opensuse.org Thu Nov 16 01:00:04 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 Nov 2017 01:00:04 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a0ce31f68113_a94d30f7c2318827@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_8.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 225s] | This file was extended by libosmocore config.status 0.10.2, which was [ 225s] | generated by GNU Autoconf 2.69. Invocation command line was [ 225s] | [ 225s] | CONFIG_FILES = [ 225s] | CONFIG_HEADERS = [ 225s] | CONFIG_LINKS = [ 225s] | CONFIG_COMMANDS = [ 225s] | $ ./config.status Doxyfile.core [ 225s] | [ 225s] | on build31 [ 225s] | [ 225s] | config.status:1170: creating Doxyfile.core [ 225s] [ 225s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 225s] make[1]: *** [override_dh_auto_test] Error 1 [ 225s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 225s] debian/rules:15: recipe for target 'build' failed [ 225s] make: *** [build] Error 2 [ 225s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 225s] [ 225s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 16 00:59:50 UTC 2017. [ 225s] [ 225s] ### VM INTERACTION START ### [ 226s] Powering off. [ 226s] [ 218.430144] reboot: Power down [ 227s] ### VM INTERACTION END ### [ 227s] [ 227s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 16 00:59:52 UTC 2017. [ 227s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 16 01:01:30 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 Nov 2017 01:01:30 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a0ce37998518_a94d30f7c2319023@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_17.04/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 225s] - [ 225s] -[+] Testing: ??? (non-recursive, direct truncation, not punctured) [ 225s] -[.] Input length : ret = 224 exp = 224 -> OK [ 225s] -[.] Output length : ret = 448 exp = 448 -> OK [ 225s] -[.] Pre computed vector checks: [ 225s] -[..] Encoding: OK [ 225s] -[..] Decoding: OK [ 225s] -[.] Random vector checks: [ 225s] -[..] Encoding / Decoding cycle : OK [ 225s] -[..] Encoding / Decoding cycle : OK [ 225s] -[..] Encoding / Decoding cycle : OK [ 225s] - [ 225s] ./testsuite.at:57: exit code was 132, expected 0 [ 225s] 9. testsuite.at:54: 9. conv (testsuite.at:54): FAILED (testsuite.at:57) [ 225s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 225s] make[1]: *** [override_dh_auto_test] Error 1 [ 225s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 225s] debian/rules:15: recipe for target 'build' failed [ 225s] make: *** [build] Error 2 [ 225s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 225s] [ 225s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 16 01:01:13 UTC 2017. [ 225s] [ 225s] ### VM INTERACTION START ### [ 228s] [ 217.270960] reboot: Power down [ 229s] ### VM INTERACTION END ### [ 229s] [ 229s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 16 01:01:18 UTC 2017. [ 229s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Nov 16 08:42:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 16 Nov 2017 08:42:03 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp In-Reply-To: References: Message-ID: Patch Set 2: It appears that osmo-hnbgw *does* need -lsctp. -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 09:02:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 16 Nov 2017 09:02:29 +0000 Subject: [PATCH] osmo-iuh[master]: src/Makefile.am: drop unused COMMON_LDADD Message-ID: Review at https://gerrit.osmocom.org/4851 src/Makefile.am: drop unused COMMON_LDADD unused since change-id Ic6a645a93406670d58eb5edf5f2f2e1266168c92 "osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp" Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc --- M src/Makefile.am 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/51/4851/1 diff --git a/src/Makefile.am b/src/Makefile.am index ebed2bf..c9e1555 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,7 +52,7 @@ lib_LTLIBRARIES = libosmo-ranap.la libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION) libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ - $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la + $(ASN1C_LIBS) ranap/libosmo-asn1-ranap.la libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ ranap_common_cn.c iu_client.c iu_client_vty.c @@ -68,7 +68,7 @@ context_map.c hnbgw_cn.c osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ - $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) $(COMMON_LDADD) \ + $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ libosmo-ranap.la -- To view, visit https://gerrit.osmocom.org/4851 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 16 09:20:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 09:20:57 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp In-Reply-To: References: Message-ID: Patch Set 2: > It appears that osmo-hnbgw *does* need -lsctp. Which particular libsctp API is used directly by osmo-hnbgw? Can you please point this out? I would have expected that all use of libsctp API is done through libosmo-netif and/or libosmo-sigtran, and those libraries than bring in the sctp dependency. -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 09:25:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 09:25:37 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Patch Set 1: I have no clue about systemd masquerading, sorry. -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 14:50:45 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 16 Nov 2017 14:50:45 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 2: So libosmo-mgcp is not meant to be used with real MSCs/MGWs? I am a bit puzzled why compat with the real world is so easily broken (and then no test case is added). -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:07:29 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Thu, 16 Nov 2017 15:07:29 +0000 Subject: [PATCH] osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4678 to look at the new patch set (#3). PCU: Fix TA adjustment Promblem: TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to actual TA being used for given TBF. The current TA update algorithm in PCU simply applies the relative amount of TA to given TBF but does not take into account of current TA. As a result, the PCU will request wrong TA jump for given TBF if the MS is moving away from BTS more than 2 km. Related issue: http://osmocom.org/issues/2611 Fixes: - The PCU needs increase or decrease current TA of given TBF on receiving of relative amount of TA adjustment provided by PH-DATA-IND from L1 - The PCU needs to set absolute TA of given TBF on receiving absolute TA provided by PH-RA-IND from L1. Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.h 5 files changed, 84 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/4678/3 diff --git a/src/bts.cpp b/src/bts.cpp index e41b1fa..6bdbb85 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1619,8 +1619,45 @@ return rc; } -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta) +/* update TA based on TA provided by PH-DATA-IND */ +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta) +{ + int16_t ta_adj; + uint8_t ta_target; + + if (ta_delta) { + /* adjust TA based on TA provided by PH-DATA-IND */ + ta_adj = tbf->ta() + ta_delta; + + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta_adj); + + LOGP(DL1IF, LOGL_INFO, "PH-DATA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +/* set TA based on TA provided by PH-RA-IND */ +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta) +{ + uint8_t ta_target; + + if (tbf->ta() != ta) { + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta); + + LOGP(DL1IF, LOGL_INFO, "PH-RA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach) { struct gprs_rlcmac_ul_tbf *tbf = bts_main_data()->bts->ul_tbf_by_poll_fn(fn, trx_no, ts); @@ -1628,11 +1665,16 @@ LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to " "unknown UL TBF on TRX = %d, TS = %d, FN = %d\n", p, ta, trx_no, ts, fn); - else if (tbf->ta() != ta) { - LOGP(DL1IF, LOGL_INFO, "[%s] Updating TA %u -> %u on " - "TRX = %d, TS = %d, FN = %d\n", - p, tbf->ta(), ta, trx_no, ts, fn); - tbf->set_ta(ta); + else { + /* we need to distinguish TA information provided by L1 + * from PH-DATA-IND and PHY-RA-IND so that we can properly + * update TA for given TBF + */ + if (is_rach) + set_tbf_ta(tbf, (uint8_t)ta); + else + update_tbf_ta(tbf, ta); + } } diff --git a/src/bts.h b/src/bts.h index d65cd2f..aaf81cf 100644 --- a/src/bts.h +++ b/src/bts.h @@ -162,8 +162,9 @@ #ifdef __cplusplus extern "C" { #endif -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta); +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach); +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); #ifdef __cplusplus } #endif diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 37b7f78..8290a93 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -203,7 +203,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -248,7 +248,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 1c5ecc9..dfef239 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -188,7 +188,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -237,7 +237,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 1618260..cb2a6df 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -43,6 +43,34 @@ return qta >> 2; } +static inline int8_t sign_qta2ta(int16_t qta) +{ + int8_t ta_adj = 0; + + if (qta < -252) + qta = -252; + + if (qta > 252) + qta = 252; + + /* 1-bit TA adjustment if TA error reported by L1 is outside +/- 2 qbits */ + if (qta > 2) + ta_adj = 1; + if (qta < -2) + ta_adj = -1; + + return (qta >> 2) + ta_adj; +} + +static inline uint8_t ta_limit(int16_t ta) +{ + if (ta < 0) + ta = 0; + if (ta > 63) + ta = 63; + return ta; +} + /* * L1 Measurement values */ -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:34:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 15:34:16 +0000 Subject: [PATCH] libosmocore[master]: gsm: Use correct include for getrandom Message-ID: Review at https://gerrit.osmocom.org/4852 gsm: Use correct include for getrandom "man getrandom" states sys/random.h is required. Fixes warning below: warning: implicit declaration of function ?getrandom?; did you mean ?srandom?? [-Wimplicit-function-declaration] rc = getrandom(out, len, GRND_NONBLOCK); ^~~~~~~~~ Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a --- M src/gsm/gsm_utils.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/4852/1 diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 8464090..5d8c834 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -100,7 +100,7 @@ /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25) -#include +#include #elif HAVE_DECL_SYS_GETRANDOM #include #ifndef GRND_NONBLOCK -- To view, visit https://gerrit.osmocom.org/4852 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:42:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 15:42:20 +0000 Subject: [PATCH] libosmocore[master]: utils: Fix false positive in compiler warning Message-ID: Review at https://gerrit.osmocom.org/4853 utils: Fix false positive in compiler warning Fixes the warning below: warning: ?sqn? may be used uninitialized in this function [-Wmaybe-uninitialized] fprintf(stderr, "Requesting --sqn %"PRIu64" implies IND=%u," ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " so no further --ind argument is allowed.\n", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sqn, test_aud.u.umts.ind); ~~~~~~~~~~~~~~~~~~~~~~~~~ The warning is a false positive as sqn is only used in case sqn_is_set!=0, and in that code path, sqn is set. Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98 --- M utils/osmo-auc-gen.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/4853/1 diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index 9d1215c..ec9bad8 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -98,7 +98,7 @@ struct osmo_auth_vector _vec; struct osmo_auth_vector *vec = &_vec; uint8_t _rand[16], _auts[14]; - uint64_t sqn; + uint64_t sqn = 0; unsigned int ind = 0; int rc, option_index; int rand_is_set = 0; -- To view, visit https://gerrit.osmocom.org/4853 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:49:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:49:12 +0000 Subject: libosmocore[master]: utils: Fix false positive in compiler warning In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4853 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:49:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:49:23 +0000 Subject: libosmocore[master]: gsm: Use correct include for getrandom In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4852 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:54:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:54:15 +0000 Subject: osmo-iuh[master]: src/Makefile.am: drop unused COMMON_LDADD In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4851 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:54:41 +0000 Subject: osmo-mgw[master]: debian: include systemd service osmo-mgw.service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4850 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic298b836620b3497734aed89b92c4f22a9071f0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:54:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:54:50 +0000 Subject: osmo-mgw[master]: debian/control: correct library dependency of osmo-mgw again... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4844 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3eeafa3c294d9ec71a72fb2833fe3b2bdef05a50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:54:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:54:56 +0000 Subject: [MERGED] osmo-mgw[master]: debian/control: correct library dependency of osmo-mgw again... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/control: correct library dependency of osmo-mgw against libosmo-mgcp1 ...................................................................... debian/control: correct library dependency of osmo-mgw against libosmo-mgcp1 When the library version was bump, the dependency of osmo-mgw was forgotten. Change-Id: I3eeafa3c294d9ec71a72fb2833fe3b2bdef05a50 Fixes: e7d27aeae10b ("Tag/Release Version 1.2.0") --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 11fa685..e96115f 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Package: osmo-mgw Architecture: any Multi-Arch: foreign -Depends: libosmo-mgcp0, ${misc:Depends}, ${shlibs:Depends} +Depends: libosmo-mgcp1, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks Package: libosmo-mgcp1 -- To view, visit https://gerrit.osmocom.org/4844 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3eeafa3c294d9ec71a72fb2833fe3b2bdef05a50 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:54:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:54:56 +0000 Subject: [MERGED] osmo-mgw[master]: debian: include systemd service osmo-mgw.service In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: include systemd service osmo-mgw.service ...................................................................... debian: include systemd service osmo-mgw.service Change-Id: Ic298b836620b3497734aed89b92c4f22a9071f0d --- A debian/osmo-mgw.service 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-mgw.service b/debian/osmo-mgw.service new file mode 120000 index 0000000..1e0664c --- /dev/null +++ b/debian/osmo-mgw.service @@ -0,0 +1 @@ +../contrib/systemd/osmo-mgw.service \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/4850 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic298b836620b3497734aed89b92c4f22a9071f0d Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:55:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:55:33 +0000 Subject: osmo-hlr[master]: debian: install osmo-hlr.cfg to /etc/osmocom In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4849 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifa1094da9b286a17a5c9a1ee300ec13a4a10a9a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:55:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:55:51 +0000 Subject: osmo-hlr[master]: doc: install example .cfg files to $(docdir)/examples/ In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4848 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8671ce33b9bf28c89f767dd1b4a1463aeb275158 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:56:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:56:05 +0000 Subject: osmo-hlr[master]: debian: include systemd service osmo-hlr.service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4847 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6d9fd34aa42b911f074557b526adde05e03d58b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 15:56:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 15:56:07 +0000 Subject: [MERGED] osmo-hlr[master]: debian: include systemd service osmo-hlr.service In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: include systemd service osmo-hlr.service ...................................................................... debian: include systemd service osmo-hlr.service Change-Id: I6d9fd34aa42b911f074557b526adde05e03d58b9 --- A debian/osmo-hlr.service 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-hlr.service b/debian/osmo-hlr.service new file mode 120000 index 0000000..184f5aa --- /dev/null +++ b/debian/osmo-hlr.service @@ -0,0 +1 @@ +../contrib/systemd/osmo-hlr.service \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/4847 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d9fd34aa42b911f074557b526adde05e03d58b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:05:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 16:05:38 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn_vty: Stop using deprecated API vty_install_default Message-ID: Review at https://gerrit.osmocom.org/4854 ggsn_vty: Stop using deprecated API vty_install_default Changes made as requested by the deprecation text. Fixes warning below: warning: ?vty_install_default? is deprecated: Now happens implicitly with install_node() [-Wdeprecat ed-declarations] vty_install_default(GGSN_NODE); ^~~~~~~~~~~~~~~~~~~ Change-Id: I5c6197129e0c251a4e8dd174027b011c8f6476c6 --- M ggsn/ggsn_vty.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/54/4854/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 9f343ec..6e15ae4 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -856,8 +856,8 @@ install_element(CONFIG_NODE, &cfg_ggsn_cmd); install_element(CONFIG_NODE, &cfg_no_ggsn_cmd); + install_node(&ggsn_node, config_write_ggsn); - vty_install_default(GGSN_NODE); install_element(GGSN_NODE, &cfg_description_cmd); install_element(GGSN_NODE, &cfg_no_description_cmd); install_element(GGSN_NODE, &cfg_ggsn_shutdown_cmd); @@ -872,7 +872,6 @@ install_element(GGSN_NODE, &cfg_ggsn_no_default_apn_cmd); install_node(&apn_node, NULL); - vty_install_default(APN_NODE); install_element(APN_NODE, &cfg_description_cmd); install_element(APN_NODE, &cfg_no_description_cmd); install_element(APN_NODE, &cfg_apn_shutdown_cmd); -- To view, visit https://gerrit.osmocom.org/4854 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c6197129e0c251a4e8dd174027b011c8f6476c6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:09:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 16:09:30 +0000 Subject: [PATCH] osmo-ggsn[master]: contrib/jenkins.sh: Enable Werror in C(PP)FLAGS Message-ID: Review at https://gerrit.osmocom.org/4855 contrib/jenkins.sh: Enable Werror in C(PP)FLAGS Change-Id: Id4724fe07f6641e82c3bd9cde2d8d759aa492288 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/55/4855/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 6a718a8..4437541 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ cd "$base" autoreconf --install --force -./configure $GTP +./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4855 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4724fe07f6641e82c3bd9cde2d8d759aa492288 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:15:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 16:15:43 +0000 Subject: [MERGED] libosmocore[master]: gsm: Use correct include for getrandom In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: gsm: Use correct include for getrandom ...................................................................... gsm: Use correct include for getrandom "man getrandom" states sys/random.h is required. Fixes warning below: warning: implicit declaration of function ?getrandom?; did you mean ?srandom?? [-Wimplicit-function-declaration] rc = getrandom(out, len, GRND_NONBLOCK); ^~~~~~~~~ Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a --- M src/gsm/gsm_utils.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 8464090..5d8c834 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -100,7 +100,7 @@ /* FIXME: this can be removed once we bump glibc requirements to 2.25: */ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25) -#include +#include #elif HAVE_DECL_SYS_GETRANDOM #include #ifndef GRND_NONBLOCK -- To view, visit https://gerrit.osmocom.org/4852 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:16:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 16:16:08 +0000 Subject: [MERGED] libosmocore[master]: utils: Fix false positive in compiler warning In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: utils: Fix false positive in compiler warning ...................................................................... utils: Fix false positive in compiler warning Fixes the warning below: warning: ?sqn? may be used uninitialized in this function [-Wmaybe-uninitialized] fprintf(stderr, "Requesting --sqn %"PRIu64" implies IND=%u," ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " so no further --ind argument is allowed.\n", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sqn, test_aud.u.umts.ind); ~~~~~~~~~~~~~~~~~~~~~~~~~ The warning is a false positive as sqn is only used in case sqn_is_set!=0, and in that code path, sqn is set. Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98 --- M utils/osmo-auc-gen.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index 9d1215c..ec9bad8 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -98,7 +98,7 @@ struct osmo_auth_vector _vec; struct osmo_auth_vector *vec = &_vec; uint8_t _rand[16], _auts[14]; - uint64_t sqn; + uint64_t sqn = 0; unsigned int ind = 0; int rc, option_index; int rand_is_set = 0; -- To view, visit https://gerrit.osmocom.org/4853 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:32:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:32:34 +0000 Subject: osmo-msc[master]: debian/rules: remove doublicated project name in example files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4846 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I702cd963d5c3a2f4085ebce5e0dfa1a8a27ea89f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:32:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:32:44 +0000 Subject: osmo-bsc[master]: debian: remove doublicated project name in example files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4845 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:33:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:33:04 +0000 Subject: osmo-sgsn[master]: .gitignore: remove unneeded ignores of bsc/msc/nitb files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4841 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66905432c411291630f66579fa4177936c8f2bcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:33:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:33:21 +0000 Subject: [MERGED] osmo-sgsn[master]: .gitignore: remove unneeded ignores of bsc/msc/nitb files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: .gitignore: remove unneeded ignores of bsc/msc/nitb files ...................................................................... .gitignore: remove unneeded ignores of bsc/msc/nitb files sgsn was splitted out of the openbsc repository Change-Id: I66905432c411291630f66579fa4177936c8f2bcf --- M .gitignore 1 file changed, 0 insertions(+), 21 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index a9e6b84..b8c841f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,6 @@ Makefile.in bscconfig.h bscconfig.h.in -openbsc.pc -src/osmo-nitb/osmo-nitb -src/osmo-bsc_mgcp/osmo-bsc_mgcp -src/osmo-bsc/osmo-bsc src/utils/meas_vis src/utils/meas_json src/utils/osmo-meas-pcap2db @@ -45,30 +41,14 @@ # apps and app data -hlr.sqlite3 -src/utils/bs11_config -src/ipaccess/ipaccess-config -src/ipaccess/abisip-find -src/ipaccess/ipaccess-firmware -src/ipaccess/ipaccess-proxy -src/utils/isdnsync -src/nat/bsc_nat src/gprs/osmo-sgsn src/gprs/osmo-gbproxy src/gprs/osmo-gtphub -src/osmo-bsc_nat/osmo-bsc_nat src/libcommon/gsup_test_client -src/osmo-msc/osmo-msc #tests tests/testsuite.dir tests/*/*_test -# ignore compiled binaries like msc_vlr_test_foo; do not ignore -# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object -# files: -tests/msc_vlr/msc_vlr_test_* -!tests/msc_vlr/msc_vlr_test_*.* -tests/msc_vlr/msc_vlr_test_*.o tests/atconfig @@ -78,6 +58,5 @@ tests/testsuite.log gsn_restart -src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/4841 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66905432c411291630f66579fa4177936c8f2bcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:33:38 +0000 Subject: osmo-sgsn[master]: tests/ctrl_test_runner.py: remove BSC/NAT TestRunner In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4842 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4e44e49e5c904929869b47fc4d608aab1aab75e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:33:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:33:50 +0000 Subject: osmo-sgsn[master]: debian: remove doublicated project name in example files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4843 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77f9665e78e3e55910efb30cb50cefdb138e19f7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:33:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:33:55 +0000 Subject: [MERGED] osmo-sgsn[master]: tests/ctrl_test_runner.py: remove BSC/NAT TestRunner In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: tests/ctrl_test_runner.py: remove BSC/NAT TestRunner ...................................................................... tests/ctrl_test_runner.py: remove BSC/NAT TestRunner SGSN was splitted out of OpenBSC. Change-Id: Ie4e44e49e5c904929869b47fc4d608aab1aab75e --- M tests/ctrl_test_runner.py 1 file changed, 0 insertions(+), 371 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..7c64f48 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -147,361 +147,6 @@ return responses - -class TestCtrlBSC(TestCtrlBase): - - def tearDown(self): - TestCtrlBase.tearDown(self) - os.unlink("tmp_dummy_sock") - - def ctrl_command(self): - return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c", - "doc/examples/osmo-bsc/osmo-bsc.cfg"] - - def ctrl_app(self): - return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc") - - def testCtrlErrs(self): - r = self.do_get('invalid') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Command not found') - - r = self.do_set('rf_locked', '999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value failed verification.') - - r = self.do_get('bts') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while parsing the index.') - - r = self.do_get('bts.999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while resolving object') - - def testBtsLac(self): - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '1') - - r = self.do_set('bts.0.location-area-code', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.location-area-code', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsCi(self): - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '0') - - r = self.do_set('bts.0.cell-identity', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.cell-identity', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsGenerateSystemInformation(self): - r = self.do_get('bts.0.send-new-system-informations') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write Only attribute') - - # No RSL links so it will fail - r = self.do_set('bts.0.send-new-system-informations', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Failed to generate SI') - - def testBtsChannelLoad(self): - r = self.do_set('bts.0.channel-load', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.channel-load') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], - 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0') - - def testBtsOmlConnectionState(self): - """Check OML state. It will not be connected""" - r = self.do_set('bts.0.oml-connection-state', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.oml-connection-state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], 'disconnected') - - def testTrxPowerRed(self): - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '20') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '22') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value must be even') - - def testTrxArfcn(self): - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '871') - - r = self.do_set('bts.0.trx.0.arfcn', '873') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_set('bts.0.trx.0.arfcn', '2000') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testRfLock(self): - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_set('rf_locked', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '1') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,locked,off') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=off') - - r = self.do_set('rf_locked', '0') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '0') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=on') - - def testTimezone(self): - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_set('timezone', '-2,15,2') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - # Test invalid input - r = self.do_set('timezone', '-2,15,2,5,6,7') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_set('timezone', '-2,15') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '-2') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '1') - - r = self.do_set('timezone', 'off') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - def testMcc(self): - r = self.do_set('mcc', '23') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - r = self.do_set('mcc', '023') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - def testMnc(self): - r = self.do_set('mnc', '9') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - r = self.do_set('mnc', '09') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - - def testMccMncApply(self): - # Test some invalid input - r = self.do_set('mcc-mnc-apply', 'WRONG') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '1,') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Set it again - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Nothing changed') - - # Change it - r = self.do_set('mcc-mnc-apply', '200,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Change it - r = self.do_set('mcc-mnc-apply', '201,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Verify - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '4') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '201') - - # Change it - r = self.do_set('mcc-mnc-apply', '202,03') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '3') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '202') - -class TestCtrlNAT(TestCtrlBase): - - def ctrl_command(self): - return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c", - "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"] - - def ctrl_app(self): - return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat") - - def testAccessList(self): - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - def testAccessListManagement(self): - r = self.do_set("net.0.add.allow.access-list.404", "abc") - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set("net.0.add.allow.access-list.bla", "^234$") - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') - self.assertEquals(r['value'], 'IMSI allow added to access list') - - # TODO.. find a way to actually see if this rule has been - # added. e.g. by implementing a get for the list. - class TestCtrlSGSN(TestCtrlBase): def ctrl_command(self): return ["./src/gprs/osmo-sgsn", "-c", @@ -516,20 +161,6 @@ self.assertEquals(r['mtype'], 'GET_REPLY') self.assertEquals(r['var'], 'subscriber-list-active-v1') self.assertEquals(r['value'], None) - -def add_bsc_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")): - print("Skipping the BSC test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) - suite.addTest(test) - -def add_nat_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")): - print("Skipping the NAT test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT) - suite.addTest(test) def add_sgsn_test(suite, workdir): if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")): @@ -568,8 +199,6 @@ os.chdir(workdir) print "Running tests for specific control commands" suite = unittest.TestSuite() - add_bsc_test(suite, workdir) - add_nat_test(suite, workdir) add_sgsn_test(suite, workdir) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) -- To view, visit https://gerrit.osmocom.org/4842 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4e44e49e5c904929869b47fc4d608aab1aab75e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:50:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:50:41 +0000 Subject: [PATCH] libosmocore[master]: Print /proc/cpuinfo before executing testsuite Message-ID: Review at https://gerrit.osmocom.org/4856 Print /proc/cpuinfo before executing testsuite The testsuite fails on some specific build machines in the OBS build cluster. Let's try to figure out which CPU flags they have to narrow down the cause of this. Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6 --- M tests/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/4856/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 1d4fb24..e11092d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,6 +244,7 @@ TESTSUITE = $(srcdir)/testsuite check-local: atconfig $(TESTSUITE) + cat /proc/cpuinfo $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) installcheck-local: atconfig $(TESTSUITE) -- To view, visit https://gerrit.osmocom.org/4856 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:57:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:57:16 +0000 Subject: libosmocore[master]: Print /proc/cpuinfo before executing testsuite In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4856 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 16 16:57:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 Nov 2017 16:57:33 +0000 Subject: [MERGED] libosmocore[master]: Print /proc/cpuinfo before executing testsuite In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Print /proc/cpuinfo before executing testsuite ...................................................................... Print /proc/cpuinfo before executing testsuite The testsuite fails on some specific build machines in the OBS build cluster. Let's try to figure out which CPU flags they have to narrow down the cause of this. Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6 --- M tests/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index 1d4fb24..e11092d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,6 +244,7 @@ TESTSUITE = $(srcdir)/testsuite check-local: atconfig $(TESTSUITE) + cat /proc/cpuinfo $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) installcheck-local: atconfig $(TESTSUITE) -- To view, visit https://gerrit.osmocom.org/4856 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 16 17:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 Nov 2017 17:07:24 +0000 Subject: [PATCH] osmo-gsm-tester[master]: stp: Set local-ip cfg parameter to use correct ip Message-ID: Review at https://gerrit.osmocom.org/4857 stp: Set local-ip cfg parameter to use correct ip Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f --- M src/osmo_gsm_tester/osmo_stp.py M src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/57/4857/1 diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index cc3906f..8425e42 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,10 +48,9 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - # TODO: osmo-stp is not yet configurable to a specific IP address - #iface = util.ip_to_iface(self.addr()) - #pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, - # 'host %s and port not 22' % self.addr()) + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl index eb6ac1d..6504b9e 100644 --- a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl @@ -14,3 +14,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip ${stp.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/4857 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From admin at opensuse.org Thu Nov 16 19:55:24 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 Nov 2017 19:55:24 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a0e10ce95c19_a94d30f7c27381a1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/x86_64 Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 250s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 250s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 250s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 250s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 250s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 250s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 250s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 250s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 250s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 250s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 250s] -Success [ 250s] ./testsuite.at:69: exit code was 132, expected 0 [ 250s] 11. testsuite.at:66: 11. coding (testsuite.at:66): FAILED (testsuite.at:69) [ 250s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 250s] make[1]: *** [override_dh_auto_test] Error 1 [ 250s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 250s] debian/rules:15: recipe for target 'build' failed [ 250s] make: *** [build] Error 2 [ 250s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 250s] [ 250s] build32 failed "build libosmocore_0.10.2.20171116.dsc" at Thu Nov 16 19:55:07 UTC 2017. [ 250s] [ 250s] ### VM INTERACTION START ### [ 252s] Powering off. [ 252s] [ 239.183602] reboot: Power down [ 252s] ### VM INTERACTION END ### [ 252s] [ 252s] build32 failed "build libosmocore_0.10.2.20171116.dsc" at Thu Nov 16 19:55:09 UTC 2017. [ 252s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 16 21:14:55 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 Nov 2017 21:14:55 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcap in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0e136eebdfd_a94d30f7c275586c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcap/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-pcap failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcap Last lines of build log: [ 46s] [ 12.010295] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 46s] [ 12.025275] CPU3: stopping [ 46s] [ 12.026380] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 46s] [ 12.028508] Hardware name: Generic DT based system [ 46s] [ 12.030217] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 46s] [ 12.032811] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 46s] [ 12.035253] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 46s] [ 12.036901] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 46s] [ 12.056583] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 46s] [ 12.059126] Exception stack(0xee08beb8 to 0xee08bf00) [ 46s] [ 12.060861] bea0: 00000000 00000003 [ 46s] [ 12.063564] bec0: 00000003 ee08a000 00000002 00000000 c06b8080 ee08a000 ee08bf00 ee08a000 [ 46s] [ 12.076246] bee0: c06b8080 00000000 c06ef580 ee08bf00 c0034d24 c0034e24 200b0113 ffffffff [ 46s] [ 12.078560] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 46s] [ 12.087611] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 46s] [ 12.090040] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 46s] [ 12.096935] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 46s] [ 12.098941] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 46s] [ 12.101611] Exception stack(0xee08bf88 to 0xee08bfd0) [ 46s] [ 12.115357] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 46s] [ 12.127236] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 46s] [ 12.129031] bfc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 46s] [ 12.130161] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 46s] [ 12.131781] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 46s] [ 12.133578] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 48s] [ 12.145288] Rebooting in 1 seconds..### VM INTERACTION END ### [ 48s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 48s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 48s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 16 22:01:11 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 Nov 2017 22:01:11 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0e148d577b3_a94d30f7c27674f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 26s] [ 11.333614] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 11.337625] CPU1: stopping [ 26s] [ 11.338325] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 26s] [ 11.339783] Hardware name: Generic DT based system [ 26s] [ 11.340858] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 26s] [ 11.342549] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 26s] [ 11.348450] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 26s] [ 11.350081] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 26s] [ 11.351728] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 11.357720] Exception stack(0xee085eb8 to 0xee085f00) [ 26s] [ 11.358884] 5ea0: 00000000 00000001 [ 26s] [ 11.360678] 5ec0: 00000001 ee084000 00000282 00000000 c06b8080 ee084000 ee085f00 ee084000 [ 26s] [ 11.362449] 5ee0: c06b8080 00000000 c06ef580 ee085f00 c0034d24 c0034e24 200b0113 ffffffff [ 26s] [ 11.365383] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 26s] [ 11.368532] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 26s] [ 11.375256] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 26s] [ 11.376988] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 26s] [ 11.378892] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 11.380581] Exception stack(0xee085f88 to 0xee085fd0) [ 26s] [ 11.383045] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 26s] [ 11.387900] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 26s] [ 11.389742] 5fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 26s] [ 11.390869] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 26s] [ 11.396807] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 26s] [ 11.398688] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 27s] [ 11.402633] Rebooting in 1 seconds..### VM INTERACTION END ### [ 27s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 27s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 27s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Nov 16 23:35:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 16 Nov 2017 23:35:40 +0000 Subject: [PATCH] libosmocore[master]: NOT FOR MERGE: test gerrit sanitizer build Message-ID: Review at https://gerrit.osmocom.org/4858 NOT FOR MERGE: test gerrit sanitizer build Change-Id: I67ae5d253e227002f2c252bd4c5818617bef5fbb --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/4858/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..c341d05 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4858 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67ae5d253e227002f2c252bd4c5818617bef5fbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:20:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:20:40 +0000 Subject: [PATCH] libosmocore[master]: build, jenkins: use only CPPFLAGS, not CFLAGS as well Message-ID: Review at https://gerrit.osmocom.org/4859 build, jenkins: use only CPPFLAGS, not CFLAGS as well According to https://stackoverflow.com/questions/2754966/cflags-vs-cppflags?answertab=votes#tab-top using CPPFLAGS is sufficient and we don't need to set CFLAGS as well. Looking at jenkins 'make V=1' output indeed shows that we pass various flags twice. Drop CFLAGS, keep only CPPFLAGS, for sanitize, -Wfoo, -DFOO args, in configure.ac and jenkins.sh. Change-Id: If94318efa6d4e38d1c97c523ebcc000fdc14ce32 --- M configure.ac M contrib/jenkins.sh 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/4859/1 diff --git a/configure.ac b/configure.ac index a8c1d2e..4bf2459 100644 --- a/configure.ac +++ b/configure.ac @@ -262,11 +262,9 @@ [sanitize=$enableval], [sanitize="no"]) if test x"$sanitize" = x"yes" then - CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi -CFLAGS="$CFLAGS -DBUILDING_LIBOSMOCORE -Wall" CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOCORE -Wall" AC_ARG_ENABLE(simd, diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..795fa26 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -15,7 +15,7 @@ prep_build "$src_dir" "$build_dir" - "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" + "$src_dir"/configure --enable-static $ENABLE_SANITIZE CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4859 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If94318efa6d4e38d1c97c523ebcc000fdc14ce32 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:20:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:20:41 +0000 Subject: [PATCH] libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs Message-ID: Review at https://gerrit.osmocom.org/4860 jenkins: add 'make V=1' for more verbose build logs Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/4860/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 795fa26..9d914ae 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CPPFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:50 +0000 Subject: [PATCH] libosmocore[master]: memleak: osmo_config_list_parse: getline() needs free also o... Message-ID: Review at https://gerrit.osmocom.org/4861 memleak: osmo_config_list_parse: getline() needs free also on error Helps fix sanitizer build on debian 9. Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119 --- M src/msgfile.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/4861/1 diff --git a/src/msgfile.c b/src/msgfile.c index 278b9a7..1f11aa6 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -119,9 +119,10 @@ line = NULL; while (getline(&line, &n, file) != -1) { handle_line(entries, line); - free(line); - line = NULL; } + /* The returned getline() buffer needs to be freed even if it failed. It can simply re-use the + * buffer that was allocated on the first call. */ + free(line); fclose(file); return entries; -- To view, visit https://gerrit.osmocom.org/4861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:50 +0000 Subject: [PATCH] libosmocore[master]: abis_test: sanitize: fix msgb memleak Message-ID: Review at https://gerrit.osmocom.org/4862 abis_test: sanitize: fix msgb memleak Helps fix sanitizer build on debian 9. Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab --- M tests/abis/abis_test.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/4862/1 diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index a631712..c0605c2 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -193,6 +193,8 @@ /* check multiple, chained SW-descr: */ chk_raw("half", chain, sizeof(chain) / 2); chk_raw("full", chain, sizeof(chain)); + + msgb_free(msg); } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/4862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:51 +0000 Subject: [PATCH] libosmocore[master]: lapd_test: sanitize: fix msgb memleaks Message-ID: Review at https://gerrit.osmocom.org/4863 lapd_test: sanitize: fix msgb memleaks Helps fix sanitizer build on debian 9. Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25 --- M tests/lapd/lapd_test.c 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/4863/1 diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index d6c0495..fd92cac 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -498,6 +498,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); /* Send SABM MS 2, we must get nothing, due to collision */ cm2 = malloc(sizeof(cm)); @@ -513,6 +514,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); @@ -597,6 +599,7 @@ /* idempotent */ lapdm_channel_exit(&bts_to_ms_channel); + msgb_free(msg); } static void test_lapdm_establishment() @@ -702,6 +705,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); printf("\nSending Classmark Change\n"); send_buf(cm_chg, sizeof(cm_chg), &bts_to_ms_channel); @@ -718,6 +722,7 @@ printf("\nSending GPRS Suspend Request\n"); send_buf(gprs_susp, sizeof(gprs_susp), &bts_to_ms_channel); dump_queue(&dl->dl.tx_queue); + msgb_free(pp.oph.msg); rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); @@ -726,10 +731,12 @@ printf("\nSending Cipher Mode Complete\n"); send_buf(cipher_compl, sizeof(cipher_compl), &bts_to_ms_channel); dump_queue(&dl->dl.tx_queue); + msgb_free(pp.oph.msg); rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, cipher_compl_ack, ARRAY_SIZE(cipher_compl_ack)) == 0); + msgb_free(pp.oph.msg); printf("\nEstablishing SAPI=3\n"); send_sabm(&bts_to_ms_channel, 3, NULL, 0); @@ -738,6 +745,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua_sms, ARRAY_SIZE(ua_sms)) == 0); + msgb_free(pp.oph.msg); printf("\nSending CP-DATA\n"); send_buf(cp_data_1, sizeof(cp_data_1), &bts_to_ms_channel); @@ -746,6 +754,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, cp_data_1_ack, ARRAY_SIZE(cp_data_1_ack)) == 0); + msgb_free(pp.oph.msg); /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); -- To view, visit https://gerrit.osmocom.org/4863 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:51 +0000 Subject: [PATCH] libosmocore[master]: gsm0408_test: sanitize: cleanup msgb Message-ID: Review at https://gerrit.osmocom.org/4864 gsm0408_test: sanitize: cleanup msgb Remove initial msgb talloc context creation: if we create a root ctx for msgb that all msgb are allocated in, we would in a final cleanup discard all msgbs, i.e. we would not verify that all msgb are cleaned up properly. If we create the msgb context and *don't* clean it up in the end, the sanitizer build fails because the context root is not cleaned up. Easiest is to actually allocate all msgb at NULL ctx, because then any msgb that aren't cleaned up properly would still linger, while we don't leave a root ctx that we need to clean up either. Helps fix sanitizer build on debian 9. Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f --- M tests/gsm0408/gsm0408_test.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/4864/1 diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 3f3a5c7..935ec21 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -197,7 +197,6 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); test_bearer_cap(); test_mid_from_tmsi(); test_ra_cap(); -- To view, visit https://gerrit.osmocom.org/4864 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:51 +0000 Subject: [PATCH] libosmocore[master]: gsm0808_test: sanitize: fix msgb memleak Message-ID: Review at https://gerrit.osmocom.org/4865 gsm0808_test: sanitize: fix msgb memleak Helps fix sanitizer build on debian 9. Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f --- M tests/gsm0808/gsm0808_test.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/4865/1 diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 68771a4..28bd7f7 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -256,6 +256,8 @@ msg = gsm0808_create_classmark_update(&cm2, 1, &cm3, 1); VERIFY(msg, res, ARRAY_SIZE(res)); + msgb_free(msg); + msg = gsm0808_create_classmark_update(&cm2, 1, NULL, 0); VERIFY(msg, res2o, ARRAY_SIZE(res2o)); -- To view, visit https://gerrit.osmocom.org/4865 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:51 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: doc: explain intentional "mem leak" for mangled gr... Message-ID: Review at https://gerrit.osmocom.org/4866 rate_ctr: doc: explain intentional "mem leak" for mangled group names Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f --- M src/rate_ctr.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/4866/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 5464490..deb9874 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -178,10 +178,17 @@ return NULL; } -/*! Allocate a new group of counters according to description +/*! Allocate a new group of counters according to description. * \param[in] ctx \ref talloc context * \param[in] desc Rate counter group description * \param[in] idx Index of new counter group + * Attention: if the description struct (\a desc) contains invalid characters, a mangled description + * struct will be allocated on \a ctx, and this newly allocated description struct will *not* be + * freed by rate_ctr_group_free(). To have memleak free rate_ctr_group_free(), either free the entire \a + * ctx, or use valid names in \a desc -- see osmo_identifier_valid(). In particular, rate counter groups + * and items must not contain dots '.', instead rather use ':' as separator. The main reason is to be + * able to provide auto-generated CTRL interface commands that don't conflict with the CTRL separator + * '.'. */ struct rate_ctr_group *rate_ctr_group_alloc(void *ctx, const struct rate_ctr_group_desc *desc, -- To view, visit https://gerrit.osmocom.org/4866 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:52 +0000 Subject: [PATCH] libosmocore[master]: stats_test: clarify talloc contexts Message-ID: Review at https://gerrit.osmocom.org/4867 stats_test: clarify talloc contexts Change-Id: I0eda27cd3e322fb43a825382b37185048ebcd509 --- M tests/stats/stats_test.c 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/4867/1 diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index b302b37..054fa78 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -313,6 +313,8 @@ struct osmo_stat_item_group *statg1, *statg2; struct rate_ctr_group *ctrg1, *ctrg2, *ctrg3; void *stats_ctx = talloc_named_const(NULL, 1, "stats test context"); + void *ctr_ctx = talloc_named_const(NULL, 1, "rate counter context"); + void *ctr_with_dot_ctx = talloc_named_const(NULL, 1, "rate counter with dot context"); int rc; @@ -323,11 +325,11 @@ OSMO_ASSERT(statg1 != NULL); statg2 = osmo_stat_item_group_alloc(stats_ctx, &statg_desc, 2); OSMO_ASSERT(statg2 != NULL); - ctrg1 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 1); + ctrg1 = rate_ctr_group_alloc(ctr_ctx, &ctrg_desc, 1); OSMO_ASSERT(ctrg1 != NULL); - ctrg2 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); + ctrg2 = rate_ctr_group_alloc(ctr_ctx, &ctrg_desc, 2); OSMO_ASSERT(ctrg2 != NULL); - ctrg3 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc_dot, 3); + ctrg3 = rate_ctr_group_alloc(ctr_with_dot_ctx, &ctrg_desc_dot, 3); OSMO_ASSERT(ctrg3 != NULL); srep1 = stats_reporter_create_test("test1"); @@ -462,10 +464,17 @@ rate_ctr_group_free(ctrg3); - /* Leak check */ + /* Leak check -- expecting one block each (= just the context itself), except for + * ctr_with_dot_ctx, where we expect a mangled rate counter group desc to be allocated. */ OSMO_ASSERT(talloc_total_blocks(stats_ctx) == 1); talloc_free(stats_ctx); + OSMO_ASSERT(talloc_total_blocks(ctr_ctx) == 1); + talloc_free(ctr_ctx); + + OSMO_ASSERT(talloc_total_blocks(ctr_with_dot_ctx) == 1); + talloc_free(ctr_with_dot_ctx); + printf("End test: %s\n", __func__); } -- To view, visit https://gerrit.osmocom.org/4867 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0eda27cd3e322fb43a825382b37185048ebcd509 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:52 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr_group_alloc: use ctx; adjust stats_test Message-ID: Review at https://gerrit.osmocom.org/4868 rate_ctr_group_alloc: use ctx; adjust stats_test Using the NULL context creates mem leaks that bother sanitizer builds. Allocating from the rate counter context allows cleaning up at the end of stats_test. Remove the comment concerning osmo-msc: one way to fix if the talloc becomes unexpected from this patch is to adjust the talloc expectations, another (preferred) way is to have no invalid rate counter names in osmo-msc. Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b --- M src/rate_ctr.c M tests/stats/stats_test.c 2 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/4868/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index deb9874..a6f2c45 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -199,9 +199,7 @@ /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ if (!rate_ctrl_group_desc_validate(desc, true)) { - /* don't use 'ctx' here as it would screw up memory leak debugging e.g. - * in osmo-msc */ - desc = rate_ctr_group_desc_mangle(NULL, desc); + desc = rate_ctr_group_desc_mangle(ctx, desc); if (!desc) return NULL; } diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 054fa78..4dddc08 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -472,7 +472,7 @@ OSMO_ASSERT(talloc_total_blocks(ctr_ctx) == 1); talloc_free(ctr_ctx); - OSMO_ASSERT(talloc_total_blocks(ctr_with_dot_ctx) == 1); + OSMO_ASSERT(talloc_total_blocks(ctr_with_dot_ctx) == 6); talloc_free(ctr_with_dot_ctx); printf("End test: %s\n", __func__); -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:52 +0000 Subject: [PATCH] libosmocore[master]: bssgp_fc_test: remove rounding to deciseconds Message-ID: Review at https://gerrit.osmocom.org/4869 bssgp_fc_test: remove rounding to deciseconds Ever since this test was changed to use osmo_gettimeofday_override, the times it sees are exact every time and don't need rounding to pass the expected output. Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740 --- M tests/gb/bssgp_fc_test.c 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/4869/1 diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 27d8fcc..4719872 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -29,19 +29,10 @@ return tv.tv_sec * 100 + tv.tv_usec/10000; } -/* round to deciseconds to make sure test output is always consistent */ -int round_decisec(int csec_in) -{ - int tmp = csec_in / 10; - - return tmp * 10; -} - static int fc_out_cb(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv) { unsigned int csecs = get_centisec_diff(); - csecs = round_decisec(csecs); printf("%u: FC OUT Nr %lu\n", csecs, (unsigned long) msg->cb[0]); msgb_free(msg); @@ -52,7 +43,6 @@ { struct msgb *msg; unsigned int csecs = get_centisec_diff(); - csecs = round_decisec(csecs); msg = msgb_alloc(1, "fc test"); msg->cb[0] = in_ctr++; -- To view, visit https://gerrit.osmocom.org/4869 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:52 +0000 Subject: [PATCH] libosmocore[master]: bssgp_fc_test: clarify by outputting ok / failure messages Message-ID: Review at https://gerrit.osmocom.org/4870 bssgp_fc_test: clarify by outputting ok / failure messages The test fills up the queue / sends too large PDUs on purpose. Make that obvious by outputting returned errors in the expected output. Cosmetic: - fc_in()'s return value is ignored, hence don't return anything. - add comment. Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46 --- M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 2 files changed, 99 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/4870/1 diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 4719872..6e4f747 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -39,17 +39,31 @@ return 0; } -static int fc_in(struct bssgp_flow_control *fc, unsigned int pdu_len) +static void fc_in(struct bssgp_flow_control *fc, unsigned int pdu_len) { struct msgb *msg; unsigned int csecs = get_centisec_diff(); + int rc; msg = msgb_alloc(1, "fc test"); msg->cb[0] = in_ctr++; printf("%u: FC IN Nr %lu\n", csecs, msg->cb[0]); - bssgp_fc_in(fc, msg, pdu_len, NULL); - return 0; + rc = bssgp_fc_in(fc, msg, pdu_len, NULL); + switch (rc) { + case 0: + printf(" -> %d: ok\n", rc); + break; + case -ENOSPC: + printf(" -> %d: queue full, msg dropped.\n", rc); + break; + case -EIO: + printf(" -> %d: PDU too large, msg dropped.\n", rc); + break; + default: + printf(" -> %d: error, msg dropped.\n", rc); + break; + } } @@ -71,6 +85,8 @@ osmo_gettimeofday(&tv_start, NULL); + /* Fill the queue with PDUs, possibly beyond the queue being full. If it is full, additional PDUs + * are discarded. */ for (i = 0; i < pdu_count; i++) { fc_in(fc, pdu_len); osmo_timers_check(); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index fda96f3..f8fca3c 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -3,34 +3,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> -28: queue full, msg dropped. 0: FC IN Nr 17 + -> -28: queue full, msg dropped. 0: FC IN Nr 18 + -> -28: queue full, msg dropped. 0: FC IN Nr 19 + -> -28: queue full, msg dropped. 0: FC IN Nr 20 + -> -28: queue full, msg dropped. 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 @@ -43,34 +63,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> 0: ok 0: FC IN Nr 17 + -> 0: ok 0: FC IN Nr 18 + -> 0: ok 0: FC IN Nr 19 + -> 0: ok 0: FC IN Nr 20 + -> 0: ok 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 @@ -87,25 +127,45 @@ size-max=100 oct, leak-rate=100 oct/s, queue-len=5 msgs, pdu_len=1000 oct, pdu_cnt=20 0: FC IN Nr 1 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 2 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 3 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 4 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 5 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 6 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 7 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 8 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 9 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 10 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 11 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 12 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 13 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 14 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 15 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 16 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 17 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 18 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 19 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 20 + -> -5: PDU too large, msg dropped. ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -113,34 +173,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> -28: queue full, msg dropped. 0: FC IN Nr 17 + -> -28: queue full, msg dropped. 0: FC IN Nr 18 + -> -28: queue full, msg dropped. 0: FC IN Nr 19 + -> -28: queue full, msg dropped. 0: FC IN Nr 20 + -> -28: queue full, msg dropped. 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 -- To view, visit https://gerrit.osmocom.org/4870 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:53 +0000 Subject: [PATCH] libosmocore[master]: bssgp_fc_test: sanitizer: free msgb context when done Message-ID: Review at https://gerrit.osmocom.org/4871 bssgp_fc_test: sanitizer: free msgb context when done Print remaining msgbs when done, then free the entire tall_msgb_context. To be able to do that, call msgb_talloc_ctx_init() and use its return value. A subsequent patch will fix a known mem leak and add assertions for 0b in 1 blocks remaining in the tall_msgb_context. Helps fix sanitizer build on debian 9. Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641 --- M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/4871/1 diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 6e4f747..7a75a4d 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -130,6 +130,7 @@ uint32_t pdu_length = 10; /* octets */ uint32_t pdu_count = 20; /* messages */ int c; + void *tall_msgb_ctx; static const struct option long_options[] = { { "bucket-size-max", 1, 0, 's' }, @@ -144,6 +145,8 @@ osmo_init_logging(&info); log_set_use_color(osmo_stderr_target, 0); log_set_print_filename(osmo_stderr_target, 0); + + tall_msgb_ctx = msgb_talloc_ctx_init(NULL, 0); while ((c = getopt_long(argc, argv, "s:r:d:l:c:", long_options, NULL)) != -1) { @@ -184,6 +187,11 @@ bucket_leak_rate, max_queue_depth, pdu_length, pdu_count); test_fc(bucket_size_max, bucket_leak_rate, max_queue_depth, pdu_length, pdu_count); + printf("msgb ctx: %zu b in %zu blocks (0 b in 1 block == just the context)\n", + talloc_total_size(tall_msgb_ctx), + talloc_total_blocks(tall_msgb_ctx)); + /* KNOWN BUG: expecting 0b in 1 block, but a full queue is still a mem leak */ + talloc_free(tall_msgb_ctx); printf("===== BSSGP flow-control test END\n\n"); exit(EXIT_SUCCESS); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index f8fca3c..d146843 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -56,6 +56,7 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 +msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -121,6 +122,7 @@ 80: FC OUT Nr 18 90: FC OUT Nr 19 100: FC OUT Nr 20 +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -166,6 +168,7 @@ -> -5: PDU too large, msg dropped. 0: FC IN Nr 20 -> -5: PDU too large, msg dropped. +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -226,5 +229,6 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 +msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END -- To view, visit https://gerrit.osmocom.org/4871 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:53 +0000 Subject: [PATCH] libosmocore[master]: gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow Message-ID: Review at https://gerrit.osmocom.org/4872 gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow All successful and all error code paths of bssgp_fc_in() free the msgb, except the code path calling fc_enqueue() when the msg is dropped (due to queue being full, or failure to allocate). Callers could theoretically catch the -ENOSPC return value and discard the msgb. However, in other code paths, a callback's return value is returned, which is expected to free the msgb, so such callback would have to never return -ENOSPC when it freed the msgb. Much simpler semantics would be to free the msgb in every code path, no matter which kind of error occurred. Who is currently calling bssgp_fc_in and how do they handle the return value? - bssgp_fc_test.c ignores the return value (and hits a mem leak aka sanitizer build failure if the queue is full). - fc_timer_cb() ignores the return value. - bssgp_tx_dl_ud() returns the bssgp_fc_in() rc. - which is returned by a cascade of functions leading up to being returned, for example, by gprs_llgmm_reset(), which is usually called with ignored return code. At this point it is already fairly clear that bssgp_fc_in() should always free the msgb, since the callers don't seem to distinguish even between error or success, let alone between -ENOSPC or other errors. bssgp_fc_test: assert that no msgbs remain unfreed after the tests. Adjust expected results. Helps fix sanitizer build on debian 9. Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df --- M src/gb/gprs_bssgp.c M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 3 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/4872/1 diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 520868e..d27a94f 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -764,7 +764,11 @@ } if (bssgp_fc_needs_queueing(fc, llc_pdu_len)) { - return fc_enqueue(fc, msg, llc_pdu_len, priv); + int rc; + rc = fc_enqueue(fc, msg, llc_pdu_len, priv); + if (rc) + msgb_free(msg); + return rc; } else { /* record the time we transmitted this PDU */ osmo_gettimeofday(&time_now, NULL); diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 7a75a4d..98e17cc 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -190,7 +190,8 @@ printf("msgb ctx: %zu b in %zu blocks (0 b in 1 block == just the context)\n", talloc_total_size(tall_msgb_ctx), talloc_total_blocks(tall_msgb_ctx)); - /* KNOWN BUG: expecting 0b in 1 block, but a full queue is still a mem leak */ + OSMO_ASSERT(talloc_total_size(tall_msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(tall_msgb_ctx) == 1); talloc_free(tall_msgb_ctx); printf("===== BSSGP flow-control test END\n\n"); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index d146843..30d9776 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -56,7 +56,7 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 -msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -229,6 +229,6 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 -msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END -- To view, visit https://gerrit.osmocom.org/4872 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:53 +0000 Subject: [PATCH] libosmocore[master]: bssgp_fc_test: sanitize: free fc struct when done Message-ID: Review at https://gerrit.osmocom.org/4873 bssgp_fc_test: sanitize: free fc struct when done Helps fix sanitizer build on debian 9. Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181 --- M tests/gb/bssgp_fc_test.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/4873/1 diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 98e17cc..ac690a5 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -104,6 +104,8 @@ if (llist_empty(&fc->queue)) break; } + + talloc_free(fc); } static void help(void) -- To view, visit https://gerrit.osmocom.org/4873 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:54 +0000 Subject: [PATCH] libosmocore[master]: tlv_put: guard against NULL val and 0 len Message-ID: Review at https://gerrit.osmocom.org/4874 tlv_put: guard against NULL val and 0 len For example encode_auth_info() from gsup.c calls msgb_tlv_put(msg, iei, 0, NULL) to put a tag and len with content data following later. However, this would cause a memcpy() from a NULL pointer, in tlv_put(). Allow passing NULL and len = 0 for cases like the above: If val is NULL, use memset(0) instead of memcpy(). If len is zero, do not copy nor memset anything. Hence make tlv_put() behave in a well-defined and valid way for any and all input args; no negative fallout is possible from this patch. Add proper API doc comment. Fixes a sanitizer build failure in gsup_test: ../../../../src/libosmocore/include/osmocom/gsm/tlv.h:99:2: runtime error: null pointer passed as argument 2, which is declared to never be null Helps fix sanitizer build on debian 9. Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64 --- M include/osmocom/gsm/tlv.h 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/4874/1 diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index 5bf4a87..8654893 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -90,13 +90,24 @@ return buf + len; } -/*! put (append) a TLV field */ +/*! Append a TLV field, a Tag-Length-Value field. + * \param[out] buf Location in a buffer to append TLV at. + * \param[in] tag Tag id to write. + * \param[in] len Length field to write and amount of bytes to append. + * \param[in] val Pointer to data to append, or NULL to append zero data. + * Always append tag and length. Append \a len bytes read from \a val. If val is NULL, append \a len zero + * bytes instead. If \a len is zero, do not append any data apart from tag and length. */ static inline uint8_t *tlv_put(uint8_t *buf, uint8_t tag, uint8_t len, const uint8_t *val) { *buf++ = tag; *buf++ = len; - memcpy(buf, val, len); + if (len) { + if (val) + memcpy(buf, val, len); + else + memset(buf, 0, len); + } return buf + len; } -- To view, visit https://gerrit.osmocom.org/4874 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:27:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:27:54 +0000 Subject: [PATCH] libosmocore[master]: sercomm_test: sanitize: fix msgb mem leak Message-ID: Review at https://gerrit.osmocom.org/4875 sercomm_test: sanitize: fix msgb mem leak This should fix the last current remaining sanitizer build failure in libosmocore regression tests. Helps fix sanitizer build on debian 9. Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043 --- M tests/sercomm/sercomm_test.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/4875/1 diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index f4f1c22..058c9eb 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -47,6 +47,7 @@ static void dlci_rx_cb(struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg) { printf("%s(): %s\n", __func__, msgb_hexdump(msg)); + msgb_free(msg); } static struct msgb *create_mahlzeit_msg(void) -- To view, visit https://gerrit.osmocom.org/4875 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:31:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:31:53 +0000 Subject: [MERGED] osmo-iuh[master]: src/Makefile.am: drop unused COMMON_LDADD In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: src/Makefile.am: drop unused COMMON_LDADD ...................................................................... src/Makefile.am: drop unused COMMON_LDADD unused since change-id Ic6a645a93406670d58eb5edf5f2f2e1266168c92 "osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp" Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc --- M src/Makefile.am 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index ebed2bf..c9e1555 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,7 +52,7 @@ lib_LTLIBRARIES = libosmo-ranap.la libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION) libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ - $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la + $(ASN1C_LIBS) ranap/libosmo-asn1-ranap.la libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ ranap_common_cn.c iu_client.c iu_client_vty.c @@ -68,7 +68,7 @@ context_map.c hnbgw_cn.c osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ - $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) $(COMMON_LDADD) \ + $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ libosmo-ranap.la -- To view, visit https://gerrit.osmocom.org/4851 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:46:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:46:14 +0000 Subject: [PATCH] libasn1c[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4876 add --enable-sanitize config option Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf --- M configure.ac 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/76/4876/1 diff --git a/configure.ac b/configure.ac index dcec465..f018c23 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,17 @@ PKG_CHECK_MODULES(LIBTALLOC, talloc) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4876 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf Gerrit-PatchSet: 1 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 00:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 00:59:03 +0000 Subject: [PATCH] libosmocore[master]: build, jenkins: use only CFLAGS, not CPPFLAGS as well In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4859 to look at the new patch set (#2). build, jenkins: use only CFLAGS, not CPPFLAGS as well Looking at jenkins 'make V=1' output shows that we pass various flags twice. Apparently only CFLAGS is sufficient and CPPFLAGS are not needed. Drop CPPFLAGS, keep only CFLAGS, for sanitize, -Wfoo, -DFOO args, in configure.ac and jenkins.sh. Change-Id: If94318efa6d4e38d1c97c523ebcc000fdc14ce32 --- M configure.ac M contrib/jenkins.sh 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/4859/2 diff --git a/configure.ac b/configure.ac index a8c1d2e..a1cece7 100644 --- a/configure.ac +++ b/configure.ac @@ -263,11 +263,9 @@ if test x"$sanitize" = x"yes" then CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" - CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi CFLAGS="$CFLAGS -DBUILDING_LIBOSMOCORE -Wall" -CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOCORE -Wall" AC_ARG_ENABLE(simd, [AS_HELP_STRING( diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..a649952 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -15,7 +15,7 @@ prep_build "$src_dir" "$build_dir" - "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" + "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" $MAKE $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4859 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If94318efa6d4e38d1c97c523ebcc000fdc14ce32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Fri Nov 17 01:01:40 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 17 Nov 2017 01:01:40 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a0e35411425d_a94d30f7c280946e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_17.04/i586 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 257s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 257s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 257s] -tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 [ 257s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 257s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 257s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 257s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 257s] -pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 [ 257s] -pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 [ 257s] -pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 [ 257s] -pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 [ 257s] -Success [ 257s] ./testsuite.at:69: exit code was 132, expected 0 [ 257s] 11. testsuite.at:66: 11. coding (testsuite.at:66): FAILED (testsuite.at:69) [ 257s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 257s] make[1]: *** [override_dh_auto_test] Error 1 [ 257s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 257s] debian/rules:15: recipe for target 'build' failed [ 257s] make: *** [build] Error 2 [ 257s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 257s] [ 257s] build30 failed "build libosmocore_0.10.2.dsc" at Fri Nov 17 01:01:26 UTC 2017. [ 257s] [ 257s] ### VM INTERACTION START ### [ 260s] [ 244.390858] reboot: Power down [ 262s] ### VM INTERACTION END ### [ 262s] [ 262s] build30 failed "build libosmocore_0.10.2.dsc" at Fri Nov 17 01:01:31 UTC 2017. [ 262s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 17 01:16:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 01:16:37 +0000 Subject: [PATCH] libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4860 to look at the new patch set (#2). jenkins: add 'make V=1' for more verbose build logs Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/4860/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a649952..cf10e1a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 01:24:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 01:24:20 +0000 Subject: [ABANDON] libosmocore[master]: build, jenkins: use only CFLAGS, not CPPFLAGS as well In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: build, jenkins: use only CFLAGS, not CPPFLAGS as well ...................................................................... Abandoned not really worth the bother -- To view, visit https://gerrit.osmocom.org/4859 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If94318efa6d4e38d1c97c523ebcc000fdc14ce32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 01:25:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 01:25:37 +0000 Subject: [PATCH] libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4860 to look at the new patch set (#3). jenkins: add 'make V=1' for more verbose build logs Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/4860/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..c341d05 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:33:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:33:01 +0000 Subject: [PATCH] libosmo-netif[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4877 add --enable-sanitize config option Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/77/4877/1 diff --git a/configure.ac b/configure.ac index 5ced828..d146513 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,18 @@ AC_CONFIG_MACRO_DIR([m4]) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" -- To view, visit https://gerrit.osmocom.org/4877 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:33:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:33:36 +0000 Subject: [PATCH] libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue Message-ID: Review at https://gerrit.osmocom.org/4878 osmo_stream_{cli,srv}_destroy: fix mem leak: empty msgb queue On destroying a client or server stream, deallocate any msgbs that are still pending in the queue. In libosmo-sccp, the ss7_test.c in test_as(), messages are queued and were, before this, left floating after the stream was destroyed, causing a sanitizer memory leak. This patch fixes the leak. Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 --- M src/stream.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/78/4878/1 diff --git a/src/stream.c b/src/stream.c index 71c9b17..309fcd9 100644 --- a/src/stream.c +++ b/src/stream.c @@ -430,6 +430,12 @@ { osmo_stream_cli_close(cli); osmo_timer_del(&cli->timer); + while (1) { + struct msgb *msg = msgb_dequeue(&cli->tx_queue); + if (!msg) + break; + talloc_free(msg); + } talloc_free(cli); } @@ -920,6 +926,12 @@ osmo_fd_unregister(&conn->ofd); if (conn->closed_cb) conn->closed_cb(conn); + while (1) { + struct msgb *msg = msgb_dequeue(&conn->tx_queue); + if (!msg) + break; + talloc_free(msg); + } talloc_free(conn); } -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:34:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:34:18 +0000 Subject: [PATCH] libosmo-sccp[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4879 add --enable-sanitize config option Change-Id: Ie9bf734cb6cdee24e776cd64f9f1b800a7a9277c --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/79/4879/1 diff --git a/configure.ac b/configure.ac index 5165cdb..5b91522 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,18 @@ AC_MSG_ERROR([sctp_send not found in searched libs])]) LIBS=$old_LIBS +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4879 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9bf734cb6cdee24e776cd64f9f1b800a7a9277c Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:34:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:34:18 +0000 Subject: [PATCH] libosmo-sccp[master]: sccp_test: sanitize: fix msgb mem leaks Message-ID: Review at https://gerrit.osmocom.org/4880 sccp_test: sanitize: fix msgb mem leaks Change-Id: I6d5ff3e4c053db5a2af9d548250f0307e00317bb --- M tests/sccp/sccp_test.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/80/4880/1 diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 6043cff..d6abc5d 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -450,6 +450,7 @@ } write_called = 1; + msgb_free(data); } void sccp_c_read(struct sccp_connection *connection, struct msgb *msgb, unsigned int len) @@ -502,6 +503,7 @@ } matched = 1; + msgb_free(data); } static void test_sccp_system(void) @@ -981,6 +983,8 @@ osmo_hexdump(msg->data, ret)); } } + + talloc_free(msg); } static const struct log_info_cat default_categories[] = { -- To view, visit https://gerrit.osmocom.org/4880 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d5ff3e4c053db5a2af9d548250f0307e00317bb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:34:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:34:19 +0000 Subject: [PATCH] libosmo-sccp[master]: sccp_test: sanitize: don't memcmp NULL pointers Message-ID: Review at https://gerrit.osmocom.org/4881 sccp_test: sanitize: don't memcmp NULL pointers Change-Id: I0159a875c1e11f4f9728d9e09f5c365b8174673a --- M tests/sccp/sccp_test.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/81/4881/1 diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index d6abc5d..ed485bc 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -886,15 +886,17 @@ FAIL("GTI length is wrong: %d\n", result.called.gti_len); } - if (memcmp(&parse_result[current_test].dst_gti_data[0], - result.called.gti_data, result.called.gti_len) != 0) { + if (parse_result[current_test].dst_gti_data + && memcmp(&parse_result[current_test].dst_gti_data[0], + result.called.gti_data, result.called.gti_len) != 0) { FAIL("GTI data is wrong: %d '%s'\n", result.called.gti_len, osmo_hexdump(result.called.gti_data, result.called.gti_len)); } - if (memcmp(&parse_result[current_test].src_gti_data[0], - result.calling.gti_data, result.calling.gti_len) != 0) { + if (parse_result[current_test].src_gti_data + && memcmp(&parse_result[current_test].src_gti_data[0], + result.calling.gti_data, result.calling.gti_len) != 0) { FAIL("GTI data is wrong: %d\n", result.calling.gti_len); } } -- To view, visit https://gerrit.osmocom.org/4881 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0159a875c1e11f4f9728d9e09f5c365b8174673a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:34:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:34:19 +0000 Subject: [PATCH] libosmo-sccp[master]: xua_test: sanitize: fix msgb leak Message-ID: Review at https://gerrit.osmocom.org/4882 xua_test: sanitize: fix msgb leak Change-Id: Ie57e803bb6361f39042084a21cada754a6506606 --- M tests/xua/xua_test.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/82/4882/1 diff --git a/tests/xua/xua_test.c b/tests/xua/xua_test.c index 5a9d0ab..3e370fe 100644 --- a/tests/xua/xua_test.c +++ b/tests/xua/xua_test.c @@ -564,6 +564,9 @@ OSMO_ASSERT(nested); OSMO_ASSERT(xua_msg_get_u32(nested, M3UA_IEI_LOC_RKEY_ID) == 1); OSMO_ASSERT(xua_msg_get_u32(nested, M3UA_IEI_DEST_PC) == 23); + + talloc_free(nested); + talloc_free(xua); } -- To view, visit https://gerrit.osmocom.org/4882 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie57e803bb6361f39042084a21cada754a6506606 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:34:36 +0000 Subject: [PATCH] libasn1c[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4876 to look at the new patch set (#2). add --enable-sanitize config option Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/76/4876/2 diff --git a/configure.ac b/configure.ac index dcec465..4d65c2f 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,18 @@ PKG_CHECK_MODULES(LIBTALLOC, talloc) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4876 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf Gerrit-PatchSet: 2 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:35:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:35:09 +0000 Subject: [PATCH] libosmo-abis[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4883 add --enable-sanitize config option Change-Id: I59fea4a7199ca6aa71710d3aca0b25425df7d346 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/83/4883/1 diff --git a/configure.ac b/configure.ac index eb7733e..0e07330 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,18 @@ CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4883 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59fea4a7199ca6aa71710d3aca0b25425df7d346 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:35:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:35:44 +0000 Subject: [PATCH] libsmpp34[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4884 add --enable-sanitize config option Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609 --- M configure.ac 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/84/4884/1 diff --git a/configure.ac b/configure.ac index 305cc11..85270bc 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,19 @@ # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([memset]) + +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT([Makefile def_frame/Makefile def_list/Makefile -- To view, visit https://gerrit.osmocom.org/4884 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:35:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:35:59 +0000 Subject: [PATCH] osmo-bsc[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4885 add --enable-sanitize config option Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/4885/1 diff --git a/configure.ac b/configure.ac index f741441..a66ed26 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,18 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4885 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:36:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:36:38 +0000 Subject: [PATCH] osmo-ggsn[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4886 add --enable-sanitize config option Change-Id: I439ff2b2cb36a5c29347a914c0f2e21bed598b06 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/86/4886/1 diff --git a/configure.ac b/configure.ac index ca455ce..4fd0132 100644 --- a/configure.ac +++ b/configure.ac @@ -140,6 +140,18 @@ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_CONFIG_FILES([Makefile doc/Makefile doc/examples/Makefile -- To view, visit https://gerrit.osmocom.org/4886 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I439ff2b2cb36a5c29347a914c0f2e21bed598b06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:37:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:37:02 +0000 Subject: [PATCH] osmo-hlr[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4887 add --enable-sanitize config option Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/87/4887/1 diff --git a/configure.ac b/configure.ac index 1db32d4..8545b62 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,18 @@ dnl checks for header files AC_HEADER_STDC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), -- To view, visit https://gerrit.osmocom.org/4887 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:38:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:38:17 +0000 Subject: [PATCH] osmo-iuh[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4888 add --enable-sanitize config option Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/88/4888/1 diff --git a/configure.ac b/configure.ac index ff0501a..4c5f47f 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,18 @@ dnl checks for header files AC_HEADER_STDC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT( libosmo-ranap.pc src/Makefile -- To view, visit https://gerrit.osmocom.org/4888 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:38:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:38:30 +0000 Subject: [PATCH] osmo-mgw[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4889 add --enable-sanitize config option Change-Id: I2693238c5c8d914cf3ff7721511e7b4b56e413d2 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/89/4889/1 diff --git a/configure.ac b/configure.ac index dea41b1..f72b9e1 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,18 @@ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # Enable/disable transcoding within osmo-bsc_mgcp? AC_ARG_ENABLE([mgcp-transcoding], [AS_HELP_STRING([--enable-mgcp-transcoding], [Build the MGCP gateway with internal transcoding enabled.])], [osmo_ac_mgcp_transcoding="$enableval"],[osmo_ac_mgcp_transcoding="no"]) -- To view, visit https://gerrit.osmocom.org/4889 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2693238c5c8d914cf3ff7721511e7b4b56e413d2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:38:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:38:43 +0000 Subject: [PATCH] osmo-msc[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4890 add --enable-sanitize config option Change-Id: I6c0c91abc0d3fa737dbe3db1e6473358da64c2a5 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/90/4890/1 diff --git a/configure.ac b/configure.ac index 601b438..f965240 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,18 @@ PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # Enable/disable smpp support in the msc? AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])], [osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"]) -- To view, visit https://gerrit.osmocom.org/4890 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c0c91abc0d3fa737dbe3db1e6473358da64c2a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 02:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 17 Nov 2017 02:38:55 +0000 Subject: [PATCH] osmo-sgsn[master]: add --enable-sanitize config option Message-ID: Review at https://gerrit.osmocom.org/4891 add --enable-sanitize config option Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/91/4891/1 diff --git a/configure.ac b/configure.ac index 0daa5e2..9a6f963 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,18 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4891 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From admin at opensuse.org Fri Nov 17 02:54:31 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 17 Nov 2017 02:54:31 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0e4f764ce50_a94d30f7c2831010@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:latest/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 43s] [ 11.893373] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 43s] [ 11.898853] CPU1: stopping [ 43s] [ 11.899696] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 43s] [ 11.901415] Hardware name: Generic DT based system [ 43s] [ 11.902669] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 43s] [ 11.904634] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 43s] [ 11.906528] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 43s] [ 11.908443] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 43s] [ 11.920641] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 43s] [ 11.922460] Exception stack(0xee085eb8 to 0xee085f00) [ 43s] [ 11.923712] 5ea0: 00000000 00000001 [ 43s] [ 11.925686] 5ec0: 00000001 ee084000 00000282 00000000 00000000 00000001 ee005000 ee084000 [ 43s] [ 11.927785] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 200b0113 ffffffff [ 43s] [ 11.929787] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 43s] [ 11.931591] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 43s] [ 11.936869] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 43s] [ 11.938800] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 43s] [ 11.940812] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 43s] [ 11.955308] Exception stack(0xee085f88 to 0xee085fd0) [ 43s] [ 11.956602] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 43s] [ 11.958586] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 43s] [ 11.960555] 5fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 43s] [ 11.961820] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 43s] [ 11.963636] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 43s] [ 11.965626] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 45s] [ 11.967378] Rebooting in 1 seconds..### VM INTERACTION END ### [ 45s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 45s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 45s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 17 10:45:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 10:45:39 +0000 Subject: [PATCH] libosmocore[master]: conv_acc: Our code requires SSSE3, not just SSE3 Message-ID: Review at https://gerrit.osmocom.org/4892 conv_acc: Our code requires SSSE3, not just SSE3 The accelerated convolutional decoder uses SSSE3 instructions such as PSIGNW (via _mm_sign_epi16) which go beyond what SSE3 offers. So let's make sure we use the right compiler flag (-mssse3) and also the right runtime check. Without this patch, we would use illegal instructions e.g. on Opteron Gen3 such as Opteron 2427, which are also used as build.opensuse.org build hosts (build31 through build36) where we wouldn't pass "make check" as a result. Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Fixes: OS#2386 --- M configure.ac M m4/ax_check_simd.m4 M src/Makefile.am M src/conv_acc.c M src/conv_acc_sse.c M src/conv_acc_sse_avx.c 6 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/4892/1 diff --git a/configure.ac b/configure.ac index a8c1d2e..f7acf05 100644 --- a/configure.ac +++ b/configure.ac @@ -281,7 +281,7 @@ AX_CHECK_SIMD else AM_CONDITIONAL(HAVE_AVX2, false) - AM_CONDITIONAL(HAVE_SSE3, false) + AM_CONDITIONAL(HAVE_SSSE3, false) AM_CONDITIONAL(HAVE_SSE4_1, false) fi diff --git a/m4/ax_check_simd.m4 b/m4/ax_check_simd.m4 index 8a0ceb7..daca2be 100644 --- a/m4/ax_check_simd.m4 +++ b/m4/ax_check_simd.m4 @@ -19,7 +19,7 @@ # # And defines: # -# HAVE_AVX3 / HAVE_SSE3 / HAVE_SSE4.1 +# HAVE_AVX3 / HAVE_SSSE3 / HAVE_SSE4.1 # # LICENSE # @@ -42,7 +42,7 @@ AC_REQUIRE([AC_CANONICAL_HOST]) AM_CONDITIONAL(HAVE_AVX2, false) - AM_CONDITIONAL(HAVE_SSE3, false) + AM_CONDITIONAL(HAVE_SSSE3, false) AM_CONDITIONAL(HAVE_SSE4_1, false) case $host_cpu in @@ -57,14 +57,14 @@ AC_MSG_WARN([Your compiler does not support AVX2 instructions]) fi - AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, []) - if test x"$ax_cv_support_sse3_ext" = x"yes"; then - SIMD_FLAGS="$SIMD_FLAGS -msse3" - AC_DEFINE(HAVE_SSE3,, - [Support SSE3 (Streaming SIMD Extensions 3) instructions]) - AM_CONDITIONAL(HAVE_SSE3, true) + AX_CHECK_COMPILE_FLAG(-mssse3, ax_cv_support_ssse3_ext=yes, []) + if test x"$ax_cv_support_ssse3_ext" = x"yes"; then + SIMD_FLAGS="$SIMD_FLAGS -mssse3" + AC_DEFINE(HAVE_SSSE3,, + [Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions]) + AM_CONDITIONAL(HAVE_SSSE3, true) else - AC_MSG_WARN([Your compiler does not support SSE3 instructions]) + AC_MSG_WARN([Your compiler does not support SSSE3 instructions]) fi AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, []) diff --git a/src/Makefile.am b/src/Makefile.am index e7f94ce..3d6e6f7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,20 +23,20 @@ macaddr.c stat_item.c stats.c stats_statsd.c prim.c \ conv_acc.c conv_acc_generic.c sercomm.c prbs.c -if HAVE_SSE3 +if HAVE_SSSE3 libosmocore_la_SOURCES += conv_acc_sse.c if HAVE_SSE4_1 -conv_acc_sse.lo : AM_CFLAGS += -msse3 -msse4.1 +conv_acc_sse.lo : AM_CFLAGS += -mssse3 -msse4.1 else -conv_acc_sse.lo : AM_CFLAGS += -msse3 +conv_acc_sse.lo : AM_CFLAGS += -mssse3 endif if HAVE_AVX2 libosmocore_la_SOURCES += conv_acc_sse_avx.c if HAVE_SSE4_1 -conv_acc_sse_avx.lo : AM_CFLAGS += -msse3 -mavx2 -msse4.1 +conv_acc_sse_avx.lo : AM_CFLAGS += -mssse3 -mavx2 -msse4.1 else -conv_acc_sse_avx.lo : AM_CFLAGS += -msse3 -mavx2 +conv_acc_sse_avx.lo : AM_CFLAGS += -mssse3 -mavx2 endif endif endif diff --git a/src/conv_acc.c b/src/conv_acc.c index 33fe264..c16e436 100644 --- a/src/conv_acc.c +++ b/src/conv_acc.c @@ -48,7 +48,7 @@ static int init_complete = 0; __attribute__ ((visibility("hidden"))) int avx2_supported = 0; -__attribute__ ((visibility("hidden"))) int sse3_supported = 0; +__attribute__ ((visibility("hidden"))) int ssse3_supported = 0; __attribute__ ((visibility("hidden"))) int sse41_supported = 0; /** @@ -75,12 +75,12 @@ int16_t *osmo_conv_gen_vdec_malloc(size_t n); void osmo_conv_gen_vdec_free(int16_t *ptr); -#if defined(HAVE_SSE3) +#if defined(HAVE_SSSE3) int16_t *osmo_conv_sse_vdec_malloc(size_t n); void osmo_conv_sse_vdec_free(int16_t *ptr); #endif -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) int16_t *osmo_conv_sse_avx_vdec_malloc(size_t n); void osmo_conv_sse_avx_vdec_free(int16_t *ptr); #endif @@ -99,7 +99,7 @@ void osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); -#if defined(HAVE_SSE3) +#if defined(HAVE_SSSE3) void osmo_conv_sse_metrics_k5_n2(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); void osmo_conv_sse_metrics_k5_n3(const int8_t *seq, const int16_t *out, @@ -114,7 +114,7 @@ int16_t *sums, int16_t *paths, int norm); #endif -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) void osmo_conv_sse_avx_metrics_k5_n2(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); void osmo_conv_sse_avx_metrics_k5_n3(const int8_t *seq, const int16_t *out, @@ -654,8 +654,8 @@ avx2_supported = __builtin_cpu_supports("avx2"); #endif - #ifdef HAVE_SSE3 - sse3_supported = __builtin_cpu_supports("sse3"); + #ifdef HAVE_SSSE3 + ssse3_supported = __builtin_cpu_supports("ssse3"); #endif #ifdef HAVE_SSE4_1 @@ -667,16 +667,16 @@ * Usage of curly braces is mandatory, * because we use multi-line define. */ -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) - if (sse3_supported && avx2_supported) { +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) + if (ssse3_supported && avx2_supported) { INIT_POINTERS(sse_avx); - } else if (sse3_supported) { + } else if (ssse3_supported) { INIT_POINTERS(sse); } else { INIT_POINTERS(gen); } -#elif defined(HAVE_SSE3) - if (sse3_supported) { +#elif defined(HAVE_SSSE3) + if (ssse3_supported) { INIT_POINTERS(sse); } else { INIT_POINTERS(gen); diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c index a9679ef..63d8722 100644 --- a/src/conv_acc_sse.c +++ b/src/conv_acc_sse.c @@ -1,6 +1,6 @@ /*! \file conv_acc_sse.c * Accelerated Viterbi decoder implementation - * for architectures with only SSE3 available. */ + * for architectures with only SSSE3 available. */ /* * Copyright (C) 2013, 2014 Thomas Tsou * diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c index 5b6e704..5ac3c16 100644 --- a/src/conv_acc_sse_avx.c +++ b/src/conv_acc_sse_avx.c @@ -1,6 +1,6 @@ /*! \file conv_acc_sse_avx.c * Accelerated Viterbi decoder implementation - * for architectures with both SSE3 and AVX2 support. */ + * for architectures with both SSSE3 and AVX2 support. */ /* * Copyright (C) 2013, 2014 Thomas Tsou * -- To view, visit https://gerrit.osmocom.org/4892 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 10:49:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 10:49:32 +0000 Subject: libosmocore[master]: conv_acc: Our code requires SSSE3, not just SSE3 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4892 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 10:58:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 10:58:36 +0000 Subject: [MERGED] libosmocore[master]: conv_acc: Our code requires SSSE3, not just SSE3 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: conv_acc: Our code requires SSSE3, not just SSE3 ...................................................................... conv_acc: Our code requires SSSE3, not just SSE3 The accelerated convolutional decoder uses SSSE3 instructions such as PSIGNW (via _mm_sign_epi16) which go beyond what SSE3 offers. So let's make sure we use the right compiler flag (-mssse3) and also the right runtime check. Without this patch, we would use illegal instructions e.g. on Opteron Gen3 such as Opteron 2427, which are also used as build.opensuse.org build hosts (build31 through build36) where we wouldn't pass "make check" as a result. Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Fixes: OS#2386 --- M configure.ac M m4/ax_check_simd.m4 M src/Makefile.am M src/conv_acc.c M src/conv_acc_sse.c M src/conv_acc_sse_avx.c 6 files changed, 29 insertions(+), 29 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index a8c1d2e..f7acf05 100644 --- a/configure.ac +++ b/configure.ac @@ -281,7 +281,7 @@ AX_CHECK_SIMD else AM_CONDITIONAL(HAVE_AVX2, false) - AM_CONDITIONAL(HAVE_SSE3, false) + AM_CONDITIONAL(HAVE_SSSE3, false) AM_CONDITIONAL(HAVE_SSE4_1, false) fi diff --git a/m4/ax_check_simd.m4 b/m4/ax_check_simd.m4 index 8a0ceb7..daca2be 100644 --- a/m4/ax_check_simd.m4 +++ b/m4/ax_check_simd.m4 @@ -19,7 +19,7 @@ # # And defines: # -# HAVE_AVX3 / HAVE_SSE3 / HAVE_SSE4.1 +# HAVE_AVX3 / HAVE_SSSE3 / HAVE_SSE4.1 # # LICENSE # @@ -42,7 +42,7 @@ AC_REQUIRE([AC_CANONICAL_HOST]) AM_CONDITIONAL(HAVE_AVX2, false) - AM_CONDITIONAL(HAVE_SSE3, false) + AM_CONDITIONAL(HAVE_SSSE3, false) AM_CONDITIONAL(HAVE_SSE4_1, false) case $host_cpu in @@ -57,14 +57,14 @@ AC_MSG_WARN([Your compiler does not support AVX2 instructions]) fi - AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, []) - if test x"$ax_cv_support_sse3_ext" = x"yes"; then - SIMD_FLAGS="$SIMD_FLAGS -msse3" - AC_DEFINE(HAVE_SSE3,, - [Support SSE3 (Streaming SIMD Extensions 3) instructions]) - AM_CONDITIONAL(HAVE_SSE3, true) + AX_CHECK_COMPILE_FLAG(-mssse3, ax_cv_support_ssse3_ext=yes, []) + if test x"$ax_cv_support_ssse3_ext" = x"yes"; then + SIMD_FLAGS="$SIMD_FLAGS -mssse3" + AC_DEFINE(HAVE_SSSE3,, + [Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions]) + AM_CONDITIONAL(HAVE_SSSE3, true) else - AC_MSG_WARN([Your compiler does not support SSE3 instructions]) + AC_MSG_WARN([Your compiler does not support SSSE3 instructions]) fi AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, []) diff --git a/src/Makefile.am b/src/Makefile.am index e7f94ce..3d6e6f7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,20 +23,20 @@ macaddr.c stat_item.c stats.c stats_statsd.c prim.c \ conv_acc.c conv_acc_generic.c sercomm.c prbs.c -if HAVE_SSE3 +if HAVE_SSSE3 libosmocore_la_SOURCES += conv_acc_sse.c if HAVE_SSE4_1 -conv_acc_sse.lo : AM_CFLAGS += -msse3 -msse4.1 +conv_acc_sse.lo : AM_CFLAGS += -mssse3 -msse4.1 else -conv_acc_sse.lo : AM_CFLAGS += -msse3 +conv_acc_sse.lo : AM_CFLAGS += -mssse3 endif if HAVE_AVX2 libosmocore_la_SOURCES += conv_acc_sse_avx.c if HAVE_SSE4_1 -conv_acc_sse_avx.lo : AM_CFLAGS += -msse3 -mavx2 -msse4.1 +conv_acc_sse_avx.lo : AM_CFLAGS += -mssse3 -mavx2 -msse4.1 else -conv_acc_sse_avx.lo : AM_CFLAGS += -msse3 -mavx2 +conv_acc_sse_avx.lo : AM_CFLAGS += -mssse3 -mavx2 endif endif endif diff --git a/src/conv_acc.c b/src/conv_acc.c index 33fe264..c16e436 100644 --- a/src/conv_acc.c +++ b/src/conv_acc.c @@ -48,7 +48,7 @@ static int init_complete = 0; __attribute__ ((visibility("hidden"))) int avx2_supported = 0; -__attribute__ ((visibility("hidden"))) int sse3_supported = 0; +__attribute__ ((visibility("hidden"))) int ssse3_supported = 0; __attribute__ ((visibility("hidden"))) int sse41_supported = 0; /** @@ -75,12 +75,12 @@ int16_t *osmo_conv_gen_vdec_malloc(size_t n); void osmo_conv_gen_vdec_free(int16_t *ptr); -#if defined(HAVE_SSE3) +#if defined(HAVE_SSSE3) int16_t *osmo_conv_sse_vdec_malloc(size_t n); void osmo_conv_sse_vdec_free(int16_t *ptr); #endif -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) int16_t *osmo_conv_sse_avx_vdec_malloc(size_t n); void osmo_conv_sse_avx_vdec_free(int16_t *ptr); #endif @@ -99,7 +99,7 @@ void osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); -#if defined(HAVE_SSE3) +#if defined(HAVE_SSSE3) void osmo_conv_sse_metrics_k5_n2(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); void osmo_conv_sse_metrics_k5_n3(const int8_t *seq, const int16_t *out, @@ -114,7 +114,7 @@ int16_t *sums, int16_t *paths, int norm); #endif -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) void osmo_conv_sse_avx_metrics_k5_n2(const int8_t *seq, const int16_t *out, int16_t *sums, int16_t *paths, int norm); void osmo_conv_sse_avx_metrics_k5_n3(const int8_t *seq, const int16_t *out, @@ -654,8 +654,8 @@ avx2_supported = __builtin_cpu_supports("avx2"); #endif - #ifdef HAVE_SSE3 - sse3_supported = __builtin_cpu_supports("sse3"); + #ifdef HAVE_SSSE3 + ssse3_supported = __builtin_cpu_supports("ssse3"); #endif #ifdef HAVE_SSE4_1 @@ -667,16 +667,16 @@ * Usage of curly braces is mandatory, * because we use multi-line define. */ -#if defined(HAVE_SSE3) && defined(HAVE_AVX2) - if (sse3_supported && avx2_supported) { +#if defined(HAVE_SSSE3) && defined(HAVE_AVX2) + if (ssse3_supported && avx2_supported) { INIT_POINTERS(sse_avx); - } else if (sse3_supported) { + } else if (ssse3_supported) { INIT_POINTERS(sse); } else { INIT_POINTERS(gen); } -#elif defined(HAVE_SSE3) - if (sse3_supported) { +#elif defined(HAVE_SSSE3) + if (ssse3_supported) { INIT_POINTERS(sse); } else { INIT_POINTERS(gen); diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c index a9679ef..63d8722 100644 --- a/src/conv_acc_sse.c +++ b/src/conv_acc_sse.c @@ -1,6 +1,6 @@ /*! \file conv_acc_sse.c * Accelerated Viterbi decoder implementation - * for architectures with only SSE3 available. */ + * for architectures with only SSSE3 available. */ /* * Copyright (C) 2013, 2014 Thomas Tsou * diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c index 5b6e704..5ac3c16 100644 --- a/src/conv_acc_sse_avx.c +++ b/src/conv_acc_sse_avx.c @@ -1,6 +1,6 @@ /*! \file conv_acc_sse_avx.c * Accelerated Viterbi decoder implementation - * for architectures with both SSE3 and AVX2 support. */ + * for architectures with both SSSE3 and AVX2 support. */ /* * Copyright (C) 2013, 2014 Thomas Tsou * -- To view, visit https://gerrit.osmocom.org/4892 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 12:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 12:03:01 +0000 Subject: [PATCH] libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP Message-ID: Review at https://gerrit.osmocom.org/4893 ss7: Re-bind xUA server socket after setting new IP In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" is actually not applied. Because the server is created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP is changed but the server is not re-bound using the new IP, so it keeps listening at 0.0.0.0. This implementation still has several drawbacks: - We cannot identify in VTY 2 listen nodes (xUA servers) which use same port but different IP. - Server keeps first binding against 0.0.0.0 and then it switches to a specific IP when the "local-ip" cmd is run. This can create different issues in a host running more than one osmo-stp instance. Correct fix for this would be to have the IP parameter in the "listen" node, but that would break VTY compatibility with old configurations. Related: OS#2647 Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 --- M src/osmo_ss7.c M src/osmo_ss7_vty.c 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/4893/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 86fb45c..769f00e 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1801,12 +1801,17 @@ int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host) { + int rc; OSMO_ASSERT(ss7_initialized); osmo_talloc_replace_string(xs, &xs->cfg.local.host, local_host); osmo_stream_srv_link_set_addr(xs->server, xs->cfg.local.host); + LOGP(DLSS7, LOGL_INFO, "Binding new local ip for %s Server %s:%u\n", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host, xs->cfg.local.port); + rc = osmo_stream_srv_link_open(xs->server); - return 0; + return rc; } void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs) diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 4c67508..2c55049 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -466,7 +466,10 @@ { struct osmo_xua_server *xs = vty->index; - osmo_ss7_xua_server_set_local_host(xs, argv[0]); + if (osmo_ss7_xua_server_set_local_host(xs, argv[0]) < 0) { + vty_out(vty, "Unable to change xUA server IP to %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 13:12:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 13:12:38 +0000 Subject: [PATCH] libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... Message-ID: Review at https://gerrit.osmocom.org/4894 ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_mgcp It was decided that osmo-mgw as direct successor of osmo-bsc_mgcp will use the same VTY port number (similar to osmo-nitb, osmo-bsc and osmo-bsc-sccplite all using the same VTY port number) Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/4894/1 diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab43f05..ff0b58c 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -14,6 +14,7 @@ #define OSMO_VTY_PORT_BTS 4241 /* also: osmo_pcap_server */ #define OSMO_VTY_PORT_NITB_BSC 4242 #define OSMO_VTY_PORT_BSC_MGCP 4243 +#define OSMO_VTY_PORT_MGW OSMO_VTY_PORT_BSC_MGCP #define OSMO_VTY_PORT_BSC_NAT 4244 #define OSMO_VTY_PORT_SGSN 4245 #define OSMO_VTY_PORT_GBPROXY 4246 @@ -28,5 +29,4 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 -#define OSMO_VTY_PORT_MGW 4261 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 13:18:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 13:18:29 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: fix whitespaces; we use tabs for indentation Message-ID: Review at https://gerrit.osmocom.org/4895 cosmetic: fix whitespaces; we use tabs for indentation Change-Id: I547f650bcda369ea399c5171a3541a96862d978b --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-legacy-mgcp/mgcp_protocol.c M src/libosmo-mgcp-client/mgcp_client.c M src/osmo-bsc_mgcp/mgcp_main.c M src/osmo-mgw/mgw_main.c 5 files changed, 55 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/95/4895/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index e91b190..1a6cbce 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -64,8 +64,8 @@ char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; uint32_t conn_id; - uint16_t audio_port; - char *audio_ip; + uint16_t audio_port; + char *audio_ip; enum mgcp_connection_mode conn_mode; }; diff --git a/src/libosmo-legacy-mgcp/mgcp_protocol.c b/src/libosmo-legacy-mgcp/mgcp_protocol.c index bc1ec0d..d2df5f7 100644 --- a/src/libosmo-legacy-mgcp/mgcp_protocol.c +++ b/src/libosmo-legacy-mgcp/mgcp_protocol.c @@ -372,8 +372,8 @@ display_mgcp_message(msg->l2h, msgb_l2len(msg), "Received message"); - /* attempt to treat it as a response */ - if (sscanf((const char *)&msg->l2h[0], "%3d %*s", &code) == 1) { + /* attempt to treat it as a response */ + if (sscanf((const char *)&msg->l2h[0], "%3d %*s", &code) == 1) { LOGP(DLMGCP, LOGL_DEBUG, "Response: Code: %d\n", code); return NULL; } diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index f8c55ac..2047637 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -133,7 +133,7 @@ r->body = (char *)msg->data; - if (sscanf(r->body, "%3d %u %n", + if (sscanf(r->body, "%3d %u %n", &r->head.response_code, &r->head.trans_id, &comment_pos) != 2) goto response_parse_failure; @@ -176,7 +176,7 @@ /* Parse a line like "m=audio 16002 RTP/AVP 98" */ static int mgcp_parse_audio_port(struct mgcp_response *r, const char *line) { - if (sscanf(line, "m=audio %hu", + if (sscanf(line, "m=audio %hu", &r->audio_port) != 1) goto response_parse_failure; @@ -325,7 +325,7 @@ LOGP(DLMGCP, LOGL_ERROR, "Too much data: %d\n", ret); msgb_free(msg); return -1; - } + } msg->l2h = msgb_put(msg, ret); ret = mgcp_client_rx(mgcp, msg); diff --git a/src/osmo-bsc_mgcp/mgcp_main.c b/src/osmo-bsc_mgcp/mgcp_main.c index 48241a6..91f9074 100644 --- a/src/osmo-bsc_mgcp/mgcp_main.c +++ b/src/osmo-bsc_mgcp/mgcp_main.c @@ -189,33 +189,33 @@ int mgcp_vty_is_config_node(struct vty *vty, int node) { - switch (node) { - case CONFIG_NODE: - return 0; + switch (node) { + case CONFIG_NODE: + return 0; - default: - return 1; - } + default: + return 1; + } } int mgcp_vty_go_parent(struct vty *vty) { - switch (vty->node) { - case TRUNK_NODE: - vty->node = MGCP_NODE; - vty->index = NULL; - break; - case MGCP_NODE: - default: - if (mgcp_vty_is_config_node(vty, vty->node)) - vty->node = CONFIG_NODE; - else - vty->node = ENABLE_NODE; + switch (vty->node) { + case TRUNK_NODE: + vty->node = MGCP_NODE; + vty->index = NULL; + break; + case MGCP_NODE: + default: + if (mgcp_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; - vty->index = NULL; - } + vty->index = NULL; + } - return vty->node; + return vty->node; } @@ -231,8 +231,8 @@ }; const struct log_info log_info = { - .cat = log_categories, - .num_cat = ARRAY_SIZE(log_categories), + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), }; int main(int argc, char **argv) @@ -282,8 +282,8 @@ /* set some callbacks */ cfg->reset_cb = mgcp_rsip_cb; - /* we need to bind a socket */ - if (rc == 0) { + /* we need to bind a socket */ + if (rc == 0) { cfg->gw_fd.bfd.when = BSC_FD_READ; cfg->gw_fd.bfd.cb = read_call_agent; cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index ab54e62..2e1ac8b 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -195,33 +195,33 @@ int mgcp_vty_is_config_node(struct vty *vty, int node) { - switch (node) { - case CONFIG_NODE: - return 0; + switch (node) { + case CONFIG_NODE: + return 0; - default: - return 1; - } + default: + return 1; + } } int mgcp_vty_go_parent(struct vty *vty) { - switch (vty->node) { - case TRUNK_NODE: - vty->node = MGCP_NODE; - vty->index = NULL; - break; - case MGCP_NODE: - default: - if (mgcp_vty_is_config_node(vty, vty->node)) - vty->node = CONFIG_NODE; - else - vty->node = ENABLE_NODE; + switch (vty->node) { + case TRUNK_NODE: + vty->node = MGCP_NODE; + vty->index = NULL; + break; + case MGCP_NODE: + default: + if (mgcp_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; - vty->index = NULL; - } + vty->index = NULL; + } - return vty->node; + return vty->node; } @@ -243,8 +243,8 @@ }; const struct log_info log_info = { - .cat = log_categories, - .num_cat = ARRAY_SIZE(log_categories), + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), }; int main(int argc, char **argv) @@ -287,8 +287,8 @@ * mgcp-command "RSIP" (Reset in Progress) is received */ cfg->reset_cb = mgcp_rsip_cb; - /* we need to bind a socket */ - if (rc == 0) { + /* we need to bind a socket */ + if (rc == 0) { cfg->gw_fd.bfd.when = BSC_FD_READ; cfg->gw_fd.bfd.cb = read_call_agent; cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); -- To view, visit https://gerrit.osmocom.org/4895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I547f650bcda369ea399c5171a3541a96862d978b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 13:29:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 13:29:48 +0000 Subject: [PATCH] osmo-mgw[master]: Fix possible buffer overflow in mgcp_conn_dump() Message-ID: Review at https://gerrit.osmocom.org/4896 Fix possible buffer overflow in mgcp_conn_dump() mgcp_conn.c: In function ?mgcp_conn_dump?: mgcp_conn.c:248:30: warning: ?/rtp, id:? directive output may be truncated writing 9 bytes into a region of size between 0 and 255 [-Wformat-truncation=] snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " ^~~~~~~~~~~~~~~~~~~~~~~~~ mgcp_conn.c:248:30: note: directive argument in the range [0, 65535] mgcp_conn.c:248:30: note: directive argument in the range [0, 65535] mgcp_conn.c:248:3: note: ?snprintf? output 32 or more bytes (assuming 295) into a destination of size 256 snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " as mgcp_conn->name can already be up to 256 bytes, a total buffer size of 256 is insufficient! Change-Id: I5d48132b1358d19fe72e3901117737b09a42c69c --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/96/4896/1 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e0eec63..e07b766 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -235,7 +235,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[256]; + static char str[sizeof(conn->name)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); -- To view, visit https://gerrit.osmocom.org/4896 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d48132b1358d19fe72e3901117737b09a42c69c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 13:37:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 13:37:21 +0000 Subject: [PATCH] libosmo-sccp[master]: ss7_vty: Fix out-of-bounds access in 'as' cmd Message-ID: Review at https://gerrit.osmocom.org/4897 ss7_vty: Fix out-of-bounds access in 'as' cmd Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/97/4897/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 4c67508..cbbb9e3 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -677,7 +677,7 @@ enum osmo_ss7_asp_protocol protocol = parse_asp_proto(argv[1]); if (protocol == OSMO_SS7_ASP_PROT_NONE) { - vty_out(vty, "invalid protocol '%s'%s", argv[3], VTY_NEWLINE); + vty_out(vty, "invalid protocol '%s'%s", argv[1], VTY_NEWLINE); return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/4897 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 13:48:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 13:48:02 +0000 Subject: [PATCH] libosmo-sccp[master]: contrib/test: Fix config of local/remote ports Message-ID: Review at https://gerrit.osmocom.org/4898 contrib/test: Fix config of local/remote ports The first port is the remote one, and the second port is the local one, according to cs7_asp_cmd doc and code. In the same config, the ports for the servers are used and for the local port in the client we don't care, that's why we use 0 there. Change-Id: I0fafd07614068a27c19bc2dfa6491b4b0c6737fb --- M contrib/test/osmo-stp.cfg 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/98/4898/1 diff --git a/contrib/test/osmo-stp.cfg b/contrib/test/osmo-stp.cfg index bf059a9..9003131 100644 --- a/contrib/test/osmo-stp.cfg +++ b/contrib/test/osmo-stp.cfg @@ -29,9 +29,9 @@ no login ! cs7 instance 0 - asp asp0 0 2905 m3ua + asp asp0 2905 0 m3ua remote-ip 172.18.0.2 - asp asp-s-0 0 14001 sua + asp asp-s-0 14001 0 sua remote-ip 172.18.0.3 as as0 m3ua asp asp0 -- To view, visit https://gerrit.osmocom.org/4898 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fafd07614068a27c19bc2dfa6491b4b0c6737fb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:11:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:11:11 +0000 Subject: [PATCH] osmo-mgw[master]: osmo-mgw: Update copyright statement Message-ID: Review at https://gerrit.osmocom.org/4899 osmo-mgw: Update copyright statement sysmocom (specifically Philipp) was doing all the new osmo-mgw development, but that is not yet reflected in the Copyright statement for some reason. Let's fix it. Change-Id: I4cad29daaabec1caec1bd09088414e59fa15a17e --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/99/4899/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 2e1ac8b..e21baa8 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -4,6 +4,7 @@ /* * (C) 2009-2011 by Holger Hans Peter Freyther * (C) 2009-2011 by On-Waves + * (C) 2017 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * * This program is free software; you can redistribute it and/or modify -- To view, visit https://gerrit.osmocom.org/4899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4cad29daaabec1caec1bd09088414e59fa15a17e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:11:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:11:11 +0000 Subject: [PATCH] osmo-mgw[master]: osmo-mgw: Use libosmocore socket abstraction Message-ID: Review at https://gerrit.osmocom.org/4900 osmo-mgw: Use libosmocore socket abstraction There's no need for us to use the sockets API directly: We have pretty nice socket helper functions in libosmocore, let's make use of them. Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 --- M src/osmo-mgw/mgw_main.c 1 file changed, 21 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/4900/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index e21baa8..75bdfe0 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -250,8 +251,8 @@ int main(int argc, char **argv) { - struct sockaddr_in addr; - int on = 1, rc; + unsigned int flags; + int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); msgb_talloc_ctx_init(tall_bsc_ctx, 0); @@ -289,53 +290,27 @@ cfg->reset_cb = mgcp_rsip_cb; /* we need to bind a socket */ - if (rc == 0) { - cfg->gw_fd.bfd.when = BSC_FD_READ; - cfg->gw_fd.bfd.cb = read_call_agent; - cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); - if (cfg->gw_fd.bfd.fd < 0) { - perror("Gateway failed to listen"); - return -1; - } + flags = OSMO_SOCK_F_BIND; + if (cfg->call_agent_addr) + flags |= OSMO_SOCK_F_CONNECT; - setsockopt(cfg->gw_fd.bfd.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(cfg->source_port); - inet_aton(cfg->source_addr, &addr.sin_addr); - - if (bind(cfg->gw_fd.bfd.fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - perror("Gateway failed to bind"); - return -1; - } - - cfg->gw_fd.bfd.data = msgb_alloc(4096, "mgcp-msg"); - if (!cfg->gw_fd.bfd.data) { - fprintf(stderr, "Gateway memory error.\n"); - return -1; - } - - if (cfg->call_agent_addr) { - addr.sin_port = htons(2727); - inet_aton(cfg->call_agent_addr, &addr.sin_addr); - if (connect(cfg->gw_fd.bfd.fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - LOGP(DLMGCP, LOGL_ERROR, "Failed to connect to: '%s'. errno: %d\n", - cfg->call_agent_addr, errno); - close(cfg->gw_fd.bfd.fd); - cfg->gw_fd.bfd.fd = -1; - return -1; - } - } - - if (osmo_fd_register(&cfg->gw_fd.bfd) != 0) { - LOGP(DLMGCP, LOGL_FATAL, "Failed to register the fd\n"); - return -1; - } - - LOGP(DLMGCP, LOGL_NOTICE, "Configured for MGCP.\n"); + rc = osmo_sock_init2_ofd(&cfg->gw_fd.bfd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, + cfg->source_addr, cfg->source_port, + cfg->call_agent_addr, cfg->call_agent_addr ? 2727 : 0, flags); + if (rc < 0) { + perror("Gateway failed to bind"); + return -1; } + cfg->gw_fd.bfd.cb = read_call_agent; + cfg->gw_fd.bfd.data = msgb_alloc(4096, "mgcp-msg"); + if (!cfg->gw_fd.bfd.data) { + fprintf(stderr, "Gateway memory error.\n"); + return -1; + } + + LOGP(DLMGCP, LOGL_NOTICE, "Configured for MGCP.\n"); + /* initialisation */ srand(time(NULL)); -- To view, visit https://gerrit.osmocom.org/4900 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:11:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:11:11 +0000 Subject: [PATCH] osmo-mgw[master]: osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg Message-ID: Review at https://gerrit.osmocom.org/4901 osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg Change-Id: I16016684ee5bd6d82a8867d4b2be108b6d718291 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/01/4901/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 75bdfe0..ce800f5 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -74,7 +74,7 @@ "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n"; -static char *config_file = "mgcp.cfg"; +static char *config_file = "osmo-mgw.cfg"; /* used by msgb and mgcp */ void *tall_bsc_ctx = NULL; -- To view, visit https://gerrit.osmocom.org/4901 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16016684ee5bd6d82a8867d4b2be108b6d718291 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:17:33 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 14:17:33 +0000 Subject: [PATCH] libosmo-netif[master]: stream: Avoid re-creating and leaking socket when unneeded Message-ID: Review at https://gerrit.osmocom.org/4902 stream: Avoid re-creating and leaking socket when unneeded In previous implementation, if no reconfiguring is needed, a new socket would be created without closing the old one, leaking the previous socket. Instead, if we don't need reconfiguring, we return 0 as no operation is required. Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987 --- M src/stream.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/02/4902/1 diff --git a/src/stream.c b/src/stream.c index 71c9b17..d9c3f62 100644 --- a/src/stream.c +++ b/src/stream.c @@ -735,9 +735,13 @@ { int ret; - /* we are reconfiguring this socket, close existing first. */ - if ((link->flags & OSMO_STREAM_SRV_F_RECONF) && link->ofd.fd >= 0) + if (link->ofd.fd >= 0) { + /* No reconfigure needed for existing socket, we are fine */ + if (!(link->flags & OSMO_STREAM_SRV_F_RECONF)) + return 0; + /* we are reconfiguring this socket, close existing first. */ osmo_stream_srv_link_close(link); + } link->flags &= ~OSMO_STREAM_SRV_F_RECONF; -- To view, visit https://gerrit.osmocom.org/4902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:27:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:27:18 +0000 Subject: [MERGED] osmo-sgsn[master]: debian: remove doublicated project name in example files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: remove doublicated project name in example files ...................................................................... debian: remove doublicated project name in example files For example: /usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg -> /usr/share/doc/osmo-sgsn/examples/osmo-sgsn.cfg Change-Id: I77f9665e78e3e55910efb30cb50cefdb138e19f7 --- M debian/osmo-gbproxy.install M debian/osmo-gtphub.install M debian/osmo-sgsn.install 3 files changed, 6 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 33ec570..8272551 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,2 +1,3 @@ usr/bin/osmo-gbproxy -usr/share/doc/osmo-sgsn/examples/osmo-gbproxy +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg usr/share/doc/osmo-gbproxy/examples +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy.cfg usr/share/doc/osmo-gbproxy/examples diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install index fb4c095..ed0bd1b 100644 --- a/debian/osmo-gtphub.install +++ b/debian/osmo-gtphub.install @@ -1,2 +1,3 @@ usr/bin/osmo-gtphub -usr/share/doc/osmo-sgsn/examples/osmo-gtphub +usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub-1iface.cfg usr/share/doc/osmo-gtphub/examples +usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub.cfg usr/share/doc/osmo-gtphub/examples diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install index bde329a..9390deb 100644 --- a/debian/osmo-sgsn.install +++ b/debian/osmo-sgsn.install @@ -1,2 +1,3 @@ usr/bin/osmo-sgsn -usr/share/doc/osmo-sgsn/examples/osmo-sgsn +usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg usr/share/doc/osmo-sgsn/examples +usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg usr/share/doc/osmo-sgsn/examples -- To view, visit https://gerrit.osmocom.org/4843 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77f9665e78e3e55910efb30cb50cefdb138e19f7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:27:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:27:23 +0000 Subject: [MERGED] osmo-bsc[master]: debian: remove doublicated project name in example files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: remove doublicated project name in example files ...................................................................... debian: remove doublicated project name in example files For example: /usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc.cfg -> usr/share/doc/osmo-bsc/examples/osmo-bsc.cfg Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea --- M debian/osmo-bsc.install 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-bsc.install b/debian/osmo-bsc.install index a7800c9..9a2bc3f 100644 --- a/debian/osmo-bsc.install +++ b/debian/osmo-bsc.install @@ -1,3 +1,4 @@ usr/bin/osmo-bsc usr/bin/abisip-find -usr/share/doc/osmo-bsc/examples/osmo-bsc +usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg usr/share/doc/osmo-bsc/examples +usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc.cfg usr/share/doc/osmo-bsc/examples -- To view, visit https://gerrit.osmocom.org/4845 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:27:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:27:33 +0000 Subject: [MERGED] osmo-msc[master]: debian/rules: remove doublicated project name in example files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/rules: remove doublicated project name in example files ...................................................................... debian/rules: remove doublicated project name in example files For example: /usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg -> /usr/share/doc/osmo-msc/examples/osmo-msc.cfg Change-Id: I702cd963d5c3a2f4085ebce5e0dfa1a8a27ea89f --- M debian/osmo-msc.install 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-msc.install b/debian/osmo-msc.install index b3d1a55..6b84b8f 100644 --- a/debian/osmo-msc.install +++ b/debian/osmo-msc.install @@ -1,2 +1,4 @@ usr/bin/osmo-msc -usr/share/doc/osmo-msc/examples/osmo-msc +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg usr/share/doc/osmo-msc/examples +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_custom-sccp.cfg usr/share/doc/osmo-msc/examples +usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_multi-cs7.cfg usr/share/doc/osmo-msc/examples -- To view, visit https://gerrit.osmocom.org/4846 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I702cd963d5c3a2f4085ebce5e0dfa1a8a27ea89f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:27:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:27:40 +0000 Subject: [MERGED] osmo-hlr[master]: doc: install example .cfg files to $(docdir)/examples/ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: doc: install example .cfg files to $(docdir)/examples/ ...................................................................... doc: install example .cfg files to $(docdir)/examples/ Change-Id: I8671ce33b9bf28c89f767dd1b4a1463aeb275158 --- M Makefile.am M configure.ac M debian/osmo-hlr.install A doc/Makefile.am 4 files changed, 25 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index 392d80d..f5062a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 SUBDIRS = \ + doc \ src \ sql \ tests \ diff --git a/configure.ac b/configure.ac index 1db32d4..d72a026 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,7 @@ AC_OUTPUT( Makefile + doc/Makefile src/Makefile sql/Makefile tests/Makefile diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 0e2a1c4..1e3bbc6 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -1,3 +1,4 @@ /usr/bin/osmo-hlr /usr/bin/osmo-hlr-db-tool /usr/share/doc/osmo-hlr/hlr.sql +/usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..e0e5380 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,22 @@ +CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,' + +dist-hook: + for f in $$($(CFG_FILES)); do \ + j="$(distdir)/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +install-data-hook: + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +uninstall-hook: + @$(PRE_UNINSTALL) + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/$$f" && \ + $(RM) $$j; \ + done -- To view, visit https://gerrit.osmocom.org/4848 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8671ce33b9bf28c89f767dd1b4a1463aeb275158 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:22 +0000 Subject: libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... In-Reply-To: References: Message-ID: Patch Set 1: @dexter: is this ok? -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:30 +0000 Subject: osmo-mgw[master]: cosmetic: fix whitespaces; we use tabs for indentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I547f650bcda369ea399c5171a3541a96862d978b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:36 +0000 Subject: osmo-mgw[master]: Fix possible buffer overflow in mgcp_conn_dump() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4896 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5d48132b1358d19fe72e3901117737b09a42c69c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:39 +0000 Subject: osmo-mgw[master]: osmo-mgw: Update copyright statement In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4cad29daaabec1caec1bd09088414e59fa15a17e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:47 +0000 Subject: [MERGED] osmo-mgw[master]: osmo-mgw: Update copyright statement In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-mgw: Update copyright statement ...................................................................... osmo-mgw: Update copyright statement sysmocom (specifically Philipp) was doing all the new osmo-mgw development, but that is not yet reflected in the Copyright statement for some reason. Let's fix it. Change-Id: I4cad29daaabec1caec1bd09088414e59fa15a17e --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 2e1ac8b..e21baa8 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -4,6 +4,7 @@ /* * (C) 2009-2011 by Holger Hans Peter Freyther * (C) 2009-2011 by On-Waves + * (C) 2017 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * * This program is free software; you can redistribute it and/or modify -- To view, visit https://gerrit.osmocom.org/4899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4cad29daaabec1caec1bd09088414e59fa15a17e Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:47 +0000 Subject: [MERGED] osmo-mgw[master]: Fix possible buffer overflow in mgcp_conn_dump() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix possible buffer overflow in mgcp_conn_dump() ...................................................................... Fix possible buffer overflow in mgcp_conn_dump() mgcp_conn.c: In function ?mgcp_conn_dump?: mgcp_conn.c:248:30: warning: ?/rtp, id:? directive output may be truncated writing 9 bytes into a region of size between 0 and 255 [-Wformat-truncation=] snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " ^~~~~~~~~~~~~~~~~~~~~~~~~ mgcp_conn.c:248:30: note: directive argument in the range [0, 65535] mgcp_conn.c:248:30: note: directive argument in the range [0, 65535] mgcp_conn.c:248:3: note: ?snprintf? output 32 or more bytes (assuming 295) into a destination of size 256 snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " as mgcp_conn->name can already be up to 256 bytes, a total buffer size of 256 is insufficient! Change-Id: I5d48132b1358d19fe72e3901117737b09a42c69c --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e0eec63..e07b766 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -235,7 +235,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[256]; + static char str[sizeof(conn->name)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); -- To view, visit https://gerrit.osmocom.org/4896 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d48132b1358d19fe72e3901117737b09a42c69c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:28:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:28:48 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: fix whitespaces; we use tabs for indentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: fix whitespaces; we use tabs for indentation ...................................................................... cosmetic: fix whitespaces; we use tabs for indentation Change-Id: I547f650bcda369ea399c5171a3541a96862d978b --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-legacy-mgcp/mgcp_protocol.c M src/libosmo-mgcp-client/mgcp_client.c M src/osmo-bsc_mgcp/mgcp_main.c M src/osmo-mgw/mgw_main.c 5 files changed, 55 insertions(+), 55 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index e91b190..1a6cbce 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -64,8 +64,8 @@ char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; uint32_t conn_id; - uint16_t audio_port; - char *audio_ip; + uint16_t audio_port; + char *audio_ip; enum mgcp_connection_mode conn_mode; }; diff --git a/src/libosmo-legacy-mgcp/mgcp_protocol.c b/src/libosmo-legacy-mgcp/mgcp_protocol.c index bc1ec0d..d2df5f7 100644 --- a/src/libosmo-legacy-mgcp/mgcp_protocol.c +++ b/src/libosmo-legacy-mgcp/mgcp_protocol.c @@ -372,8 +372,8 @@ display_mgcp_message(msg->l2h, msgb_l2len(msg), "Received message"); - /* attempt to treat it as a response */ - if (sscanf((const char *)&msg->l2h[0], "%3d %*s", &code) == 1) { + /* attempt to treat it as a response */ + if (sscanf((const char *)&msg->l2h[0], "%3d %*s", &code) == 1) { LOGP(DLMGCP, LOGL_DEBUG, "Response: Code: %d\n", code); return NULL; } diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index f8c55ac..2047637 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -133,7 +133,7 @@ r->body = (char *)msg->data; - if (sscanf(r->body, "%3d %u %n", + if (sscanf(r->body, "%3d %u %n", &r->head.response_code, &r->head.trans_id, &comment_pos) != 2) goto response_parse_failure; @@ -176,7 +176,7 @@ /* Parse a line like "m=audio 16002 RTP/AVP 98" */ static int mgcp_parse_audio_port(struct mgcp_response *r, const char *line) { - if (sscanf(line, "m=audio %hu", + if (sscanf(line, "m=audio %hu", &r->audio_port) != 1) goto response_parse_failure; @@ -325,7 +325,7 @@ LOGP(DLMGCP, LOGL_ERROR, "Too much data: %d\n", ret); msgb_free(msg); return -1; - } + } msg->l2h = msgb_put(msg, ret); ret = mgcp_client_rx(mgcp, msg); diff --git a/src/osmo-bsc_mgcp/mgcp_main.c b/src/osmo-bsc_mgcp/mgcp_main.c index 48241a6..91f9074 100644 --- a/src/osmo-bsc_mgcp/mgcp_main.c +++ b/src/osmo-bsc_mgcp/mgcp_main.c @@ -189,33 +189,33 @@ int mgcp_vty_is_config_node(struct vty *vty, int node) { - switch (node) { - case CONFIG_NODE: - return 0; + switch (node) { + case CONFIG_NODE: + return 0; - default: - return 1; - } + default: + return 1; + } } int mgcp_vty_go_parent(struct vty *vty) { - switch (vty->node) { - case TRUNK_NODE: - vty->node = MGCP_NODE; - vty->index = NULL; - break; - case MGCP_NODE: - default: - if (mgcp_vty_is_config_node(vty, vty->node)) - vty->node = CONFIG_NODE; - else - vty->node = ENABLE_NODE; + switch (vty->node) { + case TRUNK_NODE: + vty->node = MGCP_NODE; + vty->index = NULL; + break; + case MGCP_NODE: + default: + if (mgcp_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; - vty->index = NULL; - } + vty->index = NULL; + } - return vty->node; + return vty->node; } @@ -231,8 +231,8 @@ }; const struct log_info log_info = { - .cat = log_categories, - .num_cat = ARRAY_SIZE(log_categories), + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), }; int main(int argc, char **argv) @@ -282,8 +282,8 @@ /* set some callbacks */ cfg->reset_cb = mgcp_rsip_cb; - /* we need to bind a socket */ - if (rc == 0) { + /* we need to bind a socket */ + if (rc == 0) { cfg->gw_fd.bfd.when = BSC_FD_READ; cfg->gw_fd.bfd.cb = read_call_agent; cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index ab54e62..2e1ac8b 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -195,33 +195,33 @@ int mgcp_vty_is_config_node(struct vty *vty, int node) { - switch (node) { - case CONFIG_NODE: - return 0; + switch (node) { + case CONFIG_NODE: + return 0; - default: - return 1; - } + default: + return 1; + } } int mgcp_vty_go_parent(struct vty *vty) { - switch (vty->node) { - case TRUNK_NODE: - vty->node = MGCP_NODE; - vty->index = NULL; - break; - case MGCP_NODE: - default: - if (mgcp_vty_is_config_node(vty, vty->node)) - vty->node = CONFIG_NODE; - else - vty->node = ENABLE_NODE; + switch (vty->node) { + case TRUNK_NODE: + vty->node = MGCP_NODE; + vty->index = NULL; + break; + case MGCP_NODE: + default: + if (mgcp_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; - vty->index = NULL; - } + vty->index = NULL; + } - return vty->node; + return vty->node; } @@ -243,8 +243,8 @@ }; const struct log_info log_info = { - .cat = log_categories, - .num_cat = ARRAY_SIZE(log_categories), + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), }; int main(int argc, char **argv) @@ -287,8 +287,8 @@ * mgcp-command "RSIP" (Reset in Progress) is received */ cfg->reset_cb = mgcp_rsip_cb; - /* we need to bind a socket */ - if (rc == 0) { + /* we need to bind a socket */ + if (rc == 0) { cfg->gw_fd.bfd.when = BSC_FD_READ; cfg->gw_fd.bfd.cb = read_call_agent; cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); -- To view, visit https://gerrit.osmocom.org/4895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I547f650bcda369ea399c5171a3541a96862d978b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:41:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:41:51 +0000 Subject: [PATCH] osmo-mgw[master]: osmo-mgw: Use libosmocore socket abstraction In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4900 to look at the new patch set (#2). osmo-mgw: Use libosmocore socket abstraction There's no need for us to use the sockets API directly: We have pretty nice socket helper functions in libosmocore, let's make use of them. Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_network.c M src/osmo-mgw/mgw_main.c 3 files changed, 36 insertions(+), 118 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/4900/2 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..726ac63 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -390,7 +391,6 @@ int mgcp_client_connect(struct mgcp_client *mgcp) { - int on; struct sockaddr_in addr; struct osmo_wqueue *wq; int rc; @@ -402,46 +402,19 @@ wq = &mgcp->wq; - wq->bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); - if (wq->bfd.fd < 0) { - LOGP(DLMGCP, LOGL_FATAL, "Failed to create UDP socket errno: %d\n", errno); - return -errno; - } - - on = 1; - if (setsockopt(wq->bfd.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) { + rc = osmo_sock_init2_ofd(&wq->bfd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, + mgcp->actual.local_addr, mgcp->actual.local_port, + mgcp->actual.remote_addr, mgcp->actual.remote_port, + OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT); + if (rc < 0) { LOGP(DLMGCP, LOGL_FATAL, - "Failed to initialize socket for MGCP GW: %s\n", - strerror(errno)); - rc = -errno; + "Failed to initialize socket %s:%u -> %s:%u for MGCP GW: %s\n", + mgcp->actual.local_addr, mgcp->actual.local_port, + mgcp->actual.remote_addr, mgcp->actual.remote_port, strerror(errno)); goto error_close_fd; } - /* bind socket */ - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - inet_aton(mgcp->actual.local_addr, &addr.sin_addr); - addr.sin_port = htons(mgcp->actual.local_port); - if (bind(wq->bfd.fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - LOGP(DLMGCP, LOGL_FATAL, - "Failed to bind for MGCP GW to %s %u\n", - mgcp->actual.local_addr, mgcp->actual.local_port); - rc = -errno; - goto error_close_fd; - } - - /* connect to the remote */ inet_aton(mgcp->actual.remote_addr, &addr.sin_addr); - addr.sin_port = htons(mgcp->actual.remote_port); - if (connect(wq->bfd.fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - LOGP(DLMGCP, LOGL_FATAL, - "Failed to connect to MGCP GW at %s %u: %s\n", - mgcp->actual.remote_addr, mgcp->actual.remote_port, - strerror(errno)); - rc = -errno; - goto error_close_fd; - } - mgcp->remote_addr = htonl(addr.sin_addr.s_addr); osmo_wqueue_init(wq, 10); @@ -450,11 +423,6 @@ wq->read_cb = mgcp_do_read; wq->write_cb = mgcp_do_write; - if (osmo_fd_register(&wq->bfd) != 0) { - LOGP(DLMGCP, LOGL_FATAL, "Failed to register BFD\n"); - rc = -EIO; - goto error_close_fd; - } LOGP(DLMGCP, LOGL_INFO, "MGCP GW connection: %s:%u -> %s:%u\n", mgcp->actual.local_addr, mgcp->actual.local_port, mgcp->actual.remote_addr, mgcp->actual.remote_port); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..302289d 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -1109,41 +1108,17 @@ * \returns 0 on success, -1 on ERROR */ int mgcp_create_bind(const char *source_addr, struct osmo_fd *fd, int port) { - struct sockaddr_in addr; - int on = 1; + int rc; - fd->fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd->fd < 0) { - LOGP(DRTP, LOGL_ERROR, "failed to create UDP port (%s:%i).\n", - source_addr, port); - return -1; - } else { - LOGP(DRTP, LOGL_DEBUG, - "created UDP port (%s:%i).\n", source_addr, port); - } - - if (setsockopt(fd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0) { - LOGP(DRTP, LOGL_ERROR, - "failed to set socket options (%s:%i).\n", source_addr, - port); - return -1; - } - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - inet_aton(source_addr, &addr.sin_addr); - - if (bind(fd->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - close(fd->fd); - fd->fd = -1; + rc = osmo_sock_init2(AF_INET, SOCK_DGRAM, IPPROTO_UDP, source_addr, port, + NULL, 0, OSMO_SOCK_F_BIND); + if (rc < 0) { LOGP(DRTP, LOGL_ERROR, "failed to bind UDP port (%s:%i).\n", source_addr, port); return -1; - } else { - LOGP(DRTP, LOGL_DEBUG, - "bound UDP port (%s:%i).\n", source_addr, port); } + fd->fd = rc; + LOGP(DRTP, LOGL_DEBUG, "created socket + bound UDP port (%s:%i).\n", source_addr, port); return 0; } diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 99efb15..ce800f5 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -250,8 +251,8 @@ int main(int argc, char **argv) { - struct sockaddr_in addr; - int on = 1, rc; + unsigned int flags; + int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); msgb_talloc_ctx_init(tall_bsc_ctx, 0); @@ -289,53 +290,27 @@ cfg->reset_cb = mgcp_rsip_cb; /* we need to bind a socket */ - if (rc == 0) { - cfg->gw_fd.bfd.when = BSC_FD_READ; - cfg->gw_fd.bfd.cb = read_call_agent; - cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); - if (cfg->gw_fd.bfd.fd < 0) { - perror("Gateway failed to listen"); - return -1; - } + flags = OSMO_SOCK_F_BIND; + if (cfg->call_agent_addr) + flags |= OSMO_SOCK_F_CONNECT; - setsockopt(cfg->gw_fd.bfd.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(cfg->source_port); - inet_aton(cfg->source_addr, &addr.sin_addr); - - if (bind(cfg->gw_fd.bfd.fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - perror("Gateway failed to bind"); - return -1; - } - - cfg->gw_fd.bfd.data = msgb_alloc(4096, "mgcp-msg"); - if (!cfg->gw_fd.bfd.data) { - fprintf(stderr, "Gateway memory error.\n"); - return -1; - } - - if (cfg->call_agent_addr) { - addr.sin_port = htons(2727); - inet_aton(cfg->call_agent_addr, &addr.sin_addr); - if (connect(cfg->gw_fd.bfd.fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - LOGP(DLMGCP, LOGL_ERROR, "Failed to connect to: '%s'. errno: %d\n", - cfg->call_agent_addr, errno); - close(cfg->gw_fd.bfd.fd); - cfg->gw_fd.bfd.fd = -1; - return -1; - } - } - - if (osmo_fd_register(&cfg->gw_fd.bfd) != 0) { - LOGP(DLMGCP, LOGL_FATAL, "Failed to register the fd\n"); - return -1; - } - - LOGP(DLMGCP, LOGL_NOTICE, "Configured for MGCP.\n"); + rc = osmo_sock_init2_ofd(&cfg->gw_fd.bfd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, + cfg->source_addr, cfg->source_port, + cfg->call_agent_addr, cfg->call_agent_addr ? 2727 : 0, flags); + if (rc < 0) { + perror("Gateway failed to bind"); + return -1; } + cfg->gw_fd.bfd.cb = read_call_agent; + cfg->gw_fd.bfd.data = msgb_alloc(4096, "mgcp-msg"); + if (!cfg->gw_fd.bfd.data) { + fprintf(stderr, "Gateway memory error.\n"); + return -1; + } + + LOGP(DLMGCP, LOGL_NOTICE, "Configured for MGCP.\n"); + /* initialisation */ srand(time(NULL)); -- To view, visit https://gerrit.osmocom.org/4900 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:44:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 14:44:01 +0000 Subject: [MERGED] osmo-hlr[master]: debian: install osmo-hlr.cfg to /etc/osmocom In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian: install osmo-hlr.cfg to /etc/osmocom ...................................................................... debian: install osmo-hlr.cfg to /etc/osmocom Change-Id: Ifa1094da9b286a17a5c9a1ee300ec13a4a10a9a7 --- M debian/osmo-hlr.install 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 1e3bbc6..062f4fd 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -2,3 +2,4 @@ /usr/bin/osmo-hlr-db-tool /usr/share/doc/osmo-hlr/hlr.sql /usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg +/usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg /etc/osmocom/ -- To view, visit https://gerrit.osmocom.org/4849 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa1094da9b286a17a5c9a1ee300ec13a4a10a9a7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 14:48:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 14:48:47 +0000 Subject: [PATCH] libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4893 to look at the new patch set (#2). ss7: Re-bind xUA server socket after setting new IP In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" was actually not being applied, because the server was created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP was changed but the server was not re-bound using the new IP, so it kept listening at 0.0.0.0. With this patch, we defer binding the socket to "local-ip" cmd time, after the IP has been applied. As a result, if no "local-ip" command is provided, then the bind never happens, which means it is now mandatory to have a "local-ip" line in the config file, otherwise osmo-stp will not listen on the socket. Related: OS#2647 Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 --- M doc/examples/osmo-stp.cfg M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c 5 files changed, 27 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/4893/2 diff --git a/doc/examples/osmo-stp.cfg b/doc/examples/osmo-stp.cfg index 960bf33..013181f 100644 --- a/doc/examples/osmo-stp.cfg +++ b/doc/examples/osmo-stp.cfg @@ -18,3 +18,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip 0.0.0.0 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 71c2022..59c0416 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -441,6 +441,9 @@ uint16_t local_port, const char *local_host); int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); + +int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 86fb45c..fc00525 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1745,7 +1745,7 @@ return NULL; } -/*! \brief create a new xUA server listening to given ip/port +/*! \brief create a new xUA server configured with given ip/port * \param[in] ctx talloc allocation context * \param[in] proto protocol (xUA variant) to use * \param[in] local_port local SCTP port to bind/listen to @@ -1757,7 +1757,6 @@ uint16_t local_port, const char *local_host) { struct osmo_xua_server *oxs = talloc_zero(inst, struct osmo_xua_server); - int rc; OSMO_ASSERT(ss7_initialized); if (!oxs) @@ -1781,13 +1780,6 @@ osmo_stream_srv_link_set_port(oxs->server, oxs->cfg.local.port); osmo_stream_srv_link_set_proto(oxs->server, asp_proto_to_ip_proto(proto)); - rc = osmo_stream_srv_link_open(oxs->server); - if (rc < 0) { - osmo_stream_srv_link_destroy(oxs->server); - oxs->server = NULL; - talloc_free(oxs); - } - oxs->inst = inst; llist_add_tail(&oxs->list, &inst->xua_servers); @@ -1798,6 +1790,19 @@ return oxs; } +/*! \brief Set the xUA server to bind/listen to the currently configured ip/port + * \param[in] xs xUA server to operate + * \returns 0 on success, negative value on error. + */ +int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs) +{ + LOGP(DLSS7, LOGL_INFO, "Binding %s Server to %s:%u\n", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host, xs->cfg.local.port); + return osmo_stream_srv_link_open(xs->server); +} + int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host) { diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 4c67508..eaf8764 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -467,6 +467,10 @@ struct osmo_xua_server *xs = vty->index; osmo_ss7_xua_server_set_local_host(xs, argv[0]); + if (osmo_ss7_xua_server_bind(xs) < 0) { + vty_out(vty, "Unable to bind xUA server to IP %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } diff --git a/src/sccp_user.c b/src/sccp_user.c index d9de8d7..cd89c88 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -521,6 +521,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_xua_server *xs; + int rc; if (local_port < 0) local_port = osmo_ss7_asp_protocol_port(prot); @@ -535,6 +536,10 @@ if (!xs) goto out_ss7; + rc = osmo_ss7_xua_server_bind(xs); + if (rc < 0) + goto out_xs; + /* Allocate SCCP stack */ ss7->sccp = osmo_sccp_instance_create(ss7, NULL); if (!ss7->sccp) -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 17 16:12:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 16:12:34 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4764 to look at the new patch set (#2). Move Test class to its own test.py module Make the code more reachable for newcomers, as well as more organized for people who work a lot with it. SuiteRun in suite.py is already quite big, and having the Test class in there make it unnecessarily more big, and makes it difficult to find stuff. At the same time, having a test.py which does actually not contain the Test class but other stuff, makes it even more confusing. Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a --- M selftest/suite_test.ok M src/osmo_gsm_tester/report.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/test.py 4 files changed, 149 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/64/4764/2 diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok index cd5a9e7..79c37cc 100644 --- a/selftest/suite_test.ok +++ b/selftest/suite_test.ok @@ -110,7 +110,7 @@ ---------------------------------------------- tst test_error.py:[LINENR]: I am 'test_suite' / 'test_error.py:[LINENR]' [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]] tst test_error.py:[LINENR]: ERR: AssertionError: test_error.py:[LINENR]: assert False [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]: assert False] -tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [suite.py:[LINENR]] +tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -133,7 +133,7 @@ ---------------------------------------------- tst test_fail.py:[LINENR]: I am 'test_suite' / 'test_fail.py:[LINENR]' [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] tst test_fail.py:[LINENR]: ERR: EpicFail: This failure is expected [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] -tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -155,7 +155,7 @@ trial test_suite test_fail_raise.py ---------------------------------------------- tst test_fail_raise.py:[LINENR]: ERR: ExpectedFail: This failure is expected [test_suite?test_fail_raise.py:[LINENR]] [test_fail_raise.py:[LINENR]: raise ExpectedFail('This failure is expected')] -tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -233,7 +233,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- @@ -311,7 +311,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py index 82b2f13..a53504b 100644 --- a/src/osmo_gsm_tester/report.py +++ b/src/osmo_gsm_tester/report.py @@ -21,7 +21,7 @@ import math from datetime import datetime import xml.etree.ElementTree as et -from . import log, suite +from . import log, suite, test def trial_to_junit_write(trial, junit_path): elements = et.ElementTree(element=trial_to_junit(trial)) @@ -48,20 +48,20 @@ testsuite.append(testcase) return testsuite -def test_to_junit(test): +def test_to_junit(t): testcase = et.Element('testcase') - testcase.set('name', test.name()) - testcase.set('time', str(math.ceil(test.duration))) - if test.status == suite.Test.SKIP: + testcase.set('name', t.name()) + testcase.set('time', str(math.ceil(t.duration))) + if t.status == test.Test.SKIP: skip = et.SubElement(testcase, 'skipped') - elif test.status == suite.Test.FAIL: + elif t.status == test.Test.FAIL: failure = et.SubElement(testcase, 'failure') - failure.set('type', test.fail_type or 'failure') - failure.text = test.fail_message - if test.fail_tb: + failure.set('type', t.fail_type or 'failure') + failure.text = t.fail_message + if t.fail_tb: system_err = et.SubElement(testcase, 'system-err') - system_err.text = test.fail_tb - elif test.status != suite.Test.PASS: + system_err.text = t.fail_tb + elif t.status != test.Test.PASS: error = et.SubElement(testcase, 'error') error.text = 'could not run' return testcase @@ -102,12 +102,12 @@ msgs.extend([test_to_text(t) for t in suite.tests]) return '\n '.join(msgs) -def test_to_text(test): - msgs = ['%s: %s' % (test.status, test.name())] - if test.start_timestamp: - msgs.append('(%.1f sec)' % test.duration) - if test.status == suite.Test.FAIL: - msgs.append('%s: %s' % (test.fail_type, test.fail_message)) +def test_to_text(t): + msgs = ['%s: %s' % (t.status, t.name())] + if t.start_timestamp: + msgs.append('(%.1f sec)' % t.duration) + if t.status == test.Test.FAIL: + msgs.append('%s: %s' % (t.fail_type, t.fail_message)) return ' '.join(msgs) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 5b9df76..25aef35 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -20,11 +20,9 @@ import os import sys import time -import traceback import pprint -from . import config, log, template, util, resource, schema, event_loop -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms -from . import testenv +from . import config, log, template, util, resource, schema, event_loop, test +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme class Timeout(Exception): pass @@ -59,94 +57,6 @@ continue self.test_basenames.append(basename) - -class Test(log.Origin): - UNKNOWN = 'UNKNOWN' - SKIP = 'skip' - PASS = 'pass' - FAIL = 'FAIL' - - _run_dir = None - - def __init__(self, suite_run, test_basename): - self.basename = test_basename - super().__init__(log.C_TST, self.basename) - self.suite_run = suite_run - self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) - self.status = Test.UNKNOWN - self.start_timestamp = 0 - self.duration = 0 - self.fail_type = None - self.fail_message = None - - def get_run_dir(self): - if self._run_dir is None: - self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) - return self._run_dir - - def run(self): - try: - log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) - self.status = Test.UNKNOWN - self.start_timestamp = time.time() - testenv.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) - with self.redirect_stdout(): - util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), - self.path) - if self.status == Test.UNKNOWN: - self.set_pass() - except Exception as e: - if hasattr(e, 'msg'): - msg = e.msg - else: - msg = str(e) - if isinstance(e, AssertionError): - # AssertionError lacks further information on what was - # asserted. Find the line where the code asserted: - msg += log.get_src_from_exc_info(sys.exc_info()) - # add source file information to failure report - if hasattr(e, 'origins'): - msg += ' [%s]' % e.origins - tb_str = traceback.format_exc() - if isinstance(e, resource.NoResourceExn): - tb_str += self.suite_run.resource_status_str() - self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) - except BaseException as e: - # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. - self.err('TEST RUN ABORTED: %s' % type(e).__name__) - raise - - def name(self): - l = log.get_line_for_src(self.path) - if l is not None: - return '%s:%s' % (self._name, l) - return super().name() - - def set_fail(self, fail_type, fail_message, tb_str=None, src=4): - self.status = Test.FAIL - self.duration = time.time() - self.start_timestamp - self.fail_type = fail_type - self.fail_message = fail_message - - if tb_str is None: - # populate an exception-less call to set_fail() with traceback info - tb_str = ''.join(traceback.format_stack()[:-1]) - - self.fail_tb = tb_str - self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) - if self.fail_tb: - self.log(self.fail_tb, _level=log.L_TRACEBACK) - self.log('Test FAILED (%.1f sec)' % self.duration) - - def set_pass(self): - self.status = Test.PASS - self.duration = time.time() - self.start_timestamp - self.log('Test passed (%.1f sec)' % self.duration) - - def set_skip(self): - self.status = Test.SKIP - self.duration = 0 - class SuiteRun(log.Origin): UNKNOWN = 'UNKNOWN' PASS = 'PASS' @@ -176,7 +86,7 @@ def load_tests(self): self.tests = [] for test_basename in self.definition.test_basenames: - self.tests.append(Test(self, test_basename)) + self.tests.append(test.Test(self, test_basename)) def register_for_cleanup(self, *obj): assert all([hasattr(o, 'cleanup') for o in obj]) @@ -243,12 +153,12 @@ event_loop.register_poll_func(self.poll) if not self.reserved_resources: self.reserve_resources() - for test in self.tests: - if names and not test.name() in names: - test.set_skip() + for t in self.tests: + if names and not t.name() in names: + t.set_skip() continue - self.current_test = test - test.run() + self.current_test = t + t.run() self.stop_processes() self.objects_cleanup() self.reserved_resources.put_all() @@ -284,10 +194,10 @@ passed = 0 skipped = 0 failed = 0 - for test in self.tests: - if test.status == Test.PASS: + for t in self.tests: + if t.status == test.Test.PASS: passed += 1 - elif test.status == Test.FAIL: + elif t.status == test.Test.FAIL: failed += 1 else: skipped += 1 diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py new file mode 100644 index 0000000..82b290f --- /dev/null +++ b/src/osmo_gsm_tester/test.py @@ -0,0 +1,116 @@ +# osmo_gsm_tester: test class +# +# Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import time +import traceback +from . import testenv + +from . import log, util, resource + +class Test(log.Origin): + UNKNOWN = 'UNKNOWN' + SKIP = 'skip' + PASS = 'pass' + FAIL = 'FAIL' + + _run_dir = None + + def __init__(self, suite_run, test_basename): + self.basename = test_basename + super().__init__(log.C_TST, self.basename) + self.suite_run = suite_run + self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) + self.status = Test.UNKNOWN + self.start_timestamp = 0 + self.duration = 0 + self.fail_type = None + self.fail_message = None + + def get_run_dir(self): + if self._run_dir is None: + self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) + return self._run_dir + + def run(self): + try: + log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) + self.status = Test.UNKNOWN + self.start_timestamp = time.time() + from . import suite, event_loop, sms + testenv.setup(self.suite_run, self, suite, event_loop, sms) + with self.redirect_stdout(): + util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), + self.path) + if self.status == Test.UNKNOWN: + self.set_pass() + except Exception as e: + if hasattr(e, 'msg'): + msg = e.msg + else: + msg = str(e) + if isinstance(e, AssertionError): + # AssertionError lacks further information on what was + # asserted. Find the line where the code asserted: + msg += log.get_src_from_exc_info(sys.exc_info()) + # add source file information to failure report + if hasattr(e, 'origins'): + msg += ' [%s]' % e.origins + tb_str = traceback.format_exc() + if isinstance(e, resource.NoResourceExn): + tb_str += self.suite_run.resource_status_str() + self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) + except BaseException as e: + # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. + self.err('TEST RUN ABORTED: %s' % type(e).__name__) + raise + + def name(self): + l = log.get_line_for_src(self.path) + if l is not None: + return '%s:%s' % (self._name, l) + return super().name() + + def set_fail(self, fail_type, fail_message, tb_str=None, src=4): + self.status = Test.FAIL + self.duration = time.time() - self.start_timestamp + self.fail_type = fail_type + self.fail_message = fail_message + + if tb_str is None: + # populate an exception-less call to set_fail() with traceback info + tb_str = ''.join(traceback.format_stack()[:-1]) + + self.fail_tb = tb_str + self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) + if self.fail_tb: + self.log(self.fail_tb, _level=log.L_TRACEBACK) + self.log('Test FAILED (%.1f sec)' % self.duration) + + def set_pass(self): + self.status = Test.PASS + self.duration = time.time() - self.start_timestamp + self.log('Test passed (%.1f sec)' % self.duration) + + def set_skip(self): + self.status = Test.SKIP + self.duration = 0 + +# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 16:23:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 16:23:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4667 to look at the new patch set (#4). OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/67/4667/4 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..a6a6c16 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,40 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +Scenarios define contrains that match one-to-one with the resources specified +in a 'suite.conf' for a specific type of resource after the list is expanded +taking the 'times' attribute into account. This means, for instance, that given +'suite.conf' requests 2 BTS and that we want to enforce both to be of type +'osmo-bts-sysmo', we then need to provide an scenario like the one below: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that next +resources have no restrictions to be taken into consideration. If the user wants +to apply no restrictions to the first resource but wants to do so for any of the +other ones, the first element can be listed but left empty in the scenario file. + +Any number of such scenario configurations can be combined in the form +':++...', e.g. 'my_suite:sysmo+tch_f+amr'. + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 16:23:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 16:23:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4669 to look at the new patch set (#2). OsmoGSMTester: Add state_dir section Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/69/4669/2 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 7aec344..3d9d28e 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -54,10 +54,32 @@ scenarios_dir: './scenarios' ---- +[[state_dir]] +==== 'state_dir' + +It contains global or system-wide state for osmo-gsm-tester. In a typical state +dir you can find the following files: + +'last_used_msisdn.state':: + Contains last used msisdn number, which is automatically increased every + time osmo-gsm-tester needs to assign a new subscriber in a test. +'lock':: + Lock file used to implement a mutual exclusion zone around the + 'reserved_resources.state' file. +'reserved_resources.state':: + File containing a set of reserved resources by any number of + osmo-gsm-tester instances. Each osmo-gsm-tester instance is responsible + to clear its resources from the list once it is done using them and are + no longer reserved. + If you would like to set up several separate configurations (not typical), note that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +This way, several concurrent users of osmo-gsm-tester (ie. several +osmo-gsm-tester processes running in parallel) can run without interfering with +each other (e.g. using same ARFCN, same IP or same ofono modem path). + [[suites_dir]] ==== 'suites_dir' -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 17 16:23:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 16:23:16 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Update import test->testenv Message-ID: Review at https://gerrit.osmocom.org/4903 OsmoGSMTester: Update import test->testenv Latest changes in osmo-gsm-tester require this import change. Depends on: osmo-gsm-tester I520bd046cb09042b5567d967f951f050e4e02e85 Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/03/4903/1 diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 55f1a5e..14daba4 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -161,7 +161,7 @@ ---- #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() -- To view, visit https://gerrit.osmocom.org/4903 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 17 16:24:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 16:24:50 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 2: Fixing the import dependency was easy, see last version of next patch in series. I submitted a patch to osmo-gsm-tester on top of the patch series pending there, https://gerrit.osmocom.org/#/c/4903/ -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 17 18:11:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 Nov 2017 18:11:21 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Configure bsc and msc to connect to the specific stp provide... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4857 to look at the new patch set (#2). Configure bsc and msc to connect to the specific stp provided in test Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f --- M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_stp.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_connect_policy_acceptall.py M suites/aoip_smpp/esme_connect_policy_closed.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/voice/mo_mt_call.py 18 files changed, 53 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/57/4857/2 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 736fe8f..6d84cf5 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -31,14 +31,16 @@ bts = None encryption = None mgw = None + stp = None - def __init__(self, suite_run, msc, mgw, ip_address): + def __init__(self, suite_run, msc, mgw, stp, ip_address): super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.bts = [] self.msc = msc self.mgw = mgw + self.stp = stp def start(self): self.log('Starting osmo-bsc') @@ -76,6 +78,7 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(bsc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgw.conf_for_client()) + config.overlay(values, self.stp.conf_for_client()) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index 67234e3..cdeec1b 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -31,15 +31,17 @@ hlr = None config = None smsc = None + stp = None encryption = None authentication = None - def __init__(self, suite_run, hlr, mgcpgw, ip_address): + def __init__(self, suite_run, hlr, mgcpgw, stp, ip_address): super().__init__(log.C_RUN, 'osmo-msc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.hlr = hlr self.mgcpgw = mgcpgw + self.stp = stp self.smsc = smsc.Smsc((ip_address.get('addr'), 2775)) def start(self): @@ -77,6 +79,7 @@ config.overlay(values, dict(msc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgcpgw.conf_for_msc()) config.overlay(values, self.hlr.conf_for_msc()) + config.overlay(values, self.stp.conf_for_client()) config.overlay(values, self.smsc.get_config()) # runtime parameters: diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index cc3906f..c4c6c04 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,10 +48,9 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - # TODO: osmo-stp is not yet configurable to a specific IP address - #iface = util.ip_to_iface(self.addr()) - #pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, - # 'host %s and port not 22' % self.addr()) + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } @@ -78,6 +77,9 @@ self.dbg(r) f.write(r) + def conf_for_client(self): + return dict(stp=dict(ip_address=self.ip_address)) + def addr(self): return self.ip_address.get('addr') diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 1a96b1e..48a264c 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -330,15 +330,15 @@ ip_address = self.ip_address() return osmo_mgw.OsmoMgw(self, ip_address) - def msc(self, hlr, mgcpgw, ip_address=None): + def msc(self, hlr, mgcpgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address) + return osmo_msc.OsmoMsc(self, hlr, mgcpgw, stp, ip_address) - def bsc(self, msc, mgw, ip_address=None): + def bsc(self, msc, mgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address) + return osmo_bsc.OsmoBsc(self, msc, mgw, stp, ip_address) def stp(self, ip_address=None): if ip_address is None: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2f06710..1b21e63 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -15,6 +15,11 @@ ipa bind ${bsc.ip_address.addr} cs7 instance 1 point-code 0.0.2 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 2 0.0.2 sccp-address bsc_local point-code 0.0.2 routing-indicator PC diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 9ac68b3..149833a 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -19,6 +19,11 @@ authentication ${msc.net.authentication} cs7 instance 0 point-code 0.0.1 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 1 0.0.1 msc mgw remote-ip ${mgw.ip_address.addr} assign-tmsi diff --git a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl index eb6ac1d..6504b9e 100644 --- a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl @@ -14,3 +14,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip ${stp.ip_address.addr} diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cfa5d6c..fd1838c 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -4,9 +4,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) modems = suite.modems(int(prompt('How many modems?'))) hlr.start() diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 6e5e459..7aeab08 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 428fc8d..11e5f7e 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index 59e3fac..cb604af 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_smpp/esme_connect_policy_acceptall.py b/suites/aoip_smpp/esme_connect_policy_acceptall.py index 2a954d5..e9608cb 100755 --- a/suites/aoip_smpp/esme_connect_policy_acceptall.py +++ b/suites/aoip_smpp/esme_connect_policy_acceptall.py @@ -9,7 +9,8 @@ hlr = suite.hlr() bts = suite.bts() # bts not started, only needed for mgcpgw mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -18,6 +19,7 @@ smsc.set_smsc_policy(smsc.SMSC_POLICY_ACCEPT_ALL) esme.set_smsc(smsc) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_connect_policy_closed.py b/suites/aoip_smpp/esme_connect_policy_closed.py index 29b25d1..33e25f3 100755 --- a/suites/aoip_smpp/esme_connect_policy_closed.py +++ b/suites/aoip_smpp/esme_connect_policy_closed.py @@ -14,7 +14,8 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -25,6 +26,7 @@ smsc.esme_add(esme) smsc.esme_add(esme_no_pwd) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index d49401f..5188a50 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -16,9 +16,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 6892a7e..80d36e2 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -14,9 +14,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index a7c1f48..977a227 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 36d6222..d6b3479 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -7,9 +7,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() hlr.start() diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index 8cd3b23..9eab474 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() -- To view, visit https://gerrit.osmocom.org/4857 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Fri Nov 17 19:51:28 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 17 Nov 2017 19:51:28 +0000 Subject: Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0f3dc8eb633_a94d30f7c30677a9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/armv7l Package network:osmocom:nightly/libosmocore failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 48s] [ 11.741296] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 48s] [ 11.763297] CPU0: stopping [ 48s] [ 11.764239] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.2-0-guest #1 [ 48s] [ 11.766029] Hardware name: Generic DT based system [ 48s] [ 11.767372] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 48s] [ 11.769335] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 48s] [ 11.771528] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 48s] [ 11.773557] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 48s] [ 11.775335] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 48s] [ 11.777454] Exception stack(0xc06b7e78 to 0xc06b7ec0) [ 48s] [ 11.778661] 7e60: 00000000 00000000 [ 48s] [ 11.780554] 7e80: 00000000 c06b6000 00000282 00000000 00000000 00000001 ee005000 c06b6000 [ 48s] [ 11.786171] 7ea0: c06b3d50 00000000 c06ef580 c06b7ec0 c0034d24 c0034dc0 20070113 ffffffff [ 48s] [ 11.788044] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 48s] [ 11.789791] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 48s] [ 11.800427] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 48s] [ 11.802205] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 48s] [ 11.804143] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 48s] [ 11.806414] Exception stack(0xc06b7f48 to 0xc06b7f90) [ 48s] [ 11.807653] 7f40: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 48s] [ 11.809550] 7f60: 00000000 00000000 c06b7f98 c06b6000 c06b3d50 00000000 00000000 c06b7f90 [ 48s] [ 11.819776] 7f80: c0019ed4 c0019ed8 60070013 ffffffff [ 48s] [ 11.820988] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 48s] [ 11.822692] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 48s] [ 11.824556] [] (cpu_startup_entry) from [] (start_kernel+0x3e0/0x3ec) [ 50s] [ 11.826426] Rebooting in 1 seconds..### VM INTERACTION END ### [ 50s] /var/run/obs/worker/3/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 50s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 50s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 17 19:58:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 19:58:54 +0000 Subject: [PATCH] osmo-mgw[master]: osmo-mgw: Fix copyright notice Message-ID: Review at https://gerrit.osmocom.org/4904 osmo-mgw: Fix copyright notice The copyright statement and contribution notices were copied 1:1 from OpenBSC, which is of course not correct for OsmoMGW. Change-Id: I6143becdd0da589451efcbda530a78f655b7ce0b --- M src/osmo-mgw/mgw_main.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/04/4904/1 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 99efb15..20df923 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -64,11 +64,11 @@ static int reset_endpoints = 0; static int daemonize = 0; -const char *openbsc_copyright = +const char *osmomgw_copyright = "Copyright (C) 2009-2010 Holger Freyther and On-Waves\r\n" "Copyright (C) 2017 by sysmocom s.f.m.c. GmbH \r\n" - "Contributions by Daniel Willmann, Jan L?bbe, Stefan Schmidt\r\n" - "Dieter Spaar, Andreas Eversberg, Harald Welte\r\n\r\n" + "Contributions by Pablo Neira Ayuso, Jacob Erlbeck, Neels Hofmeyr\r\n" + "Philipp Maier\r\n\r\n" "License AGPLv3+: GNU AGPL version 3 or later \r\n" "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n"; @@ -263,7 +263,7 @@ if (!cfg) return -1; - vty_info.copyright = openbsc_copyright; + vty_info.copyright = osmomgw_copyright; vty_init(&vty_info); logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&log_info); -- To view, visit https://gerrit.osmocom.org/4904 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6143becdd0da589451efcbda530a78f655b7ce0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 19:58:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 19:58:54 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... Message-ID: Review at https://gerrit.osmocom.org/4905 libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M configure.ac M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 33 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/1 diff --git a/configure.ac b/configure.ac index dea41b1..752d224 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..2bf8847 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -434,6 +435,31 @@ return mgcp_parse_osmux_cid(line); } +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_conn_id(struct mgcp_endpoint *endp) +{ + int i; + + for (i = 0; i < 32; i++) { + uint32_t conn_id; + int rc; + + rc = osmo_get_rand_id((uint8_t *) &conn_id, 4); + if (rc < 0) + return rc; + + /* to distinguish it from negative responses */ + conn_id &= 0x7fffffff; + + /* Only accept connection ID != current */ + if (!mgcp_conn_get_rtp(endp, conn_id)) + return conn_id; + } + + return -1; +} + /* CRCX command handler, processes the received command */ static struct msgb *handle_create_con(struct mgcp_parse_data *p) { @@ -443,7 +469,6 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; @@ -467,9 +492,6 @@ break; case 'C': callid = (const char *)line + 3; - break; - case 'I': - ci = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -507,13 +529,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!ci) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -561,26 +576,13 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { + /* Generate a new Connection Identifier */ + conn_id = mgcp_alloc_conn_id(endp); + if (conn_id < 0) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", + "CRCX: endpoint:%x cannot allocate connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); - } - - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } } snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Nov 17 19:58:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 Nov 2017 19:58:55 +0000 Subject: [PATCH] osmo-mgw[master]: WIP: MGCP: Connection Identifiers are hex strings Message-ID: Review at https://gerrit.osmocom.org/4906 WIP: MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. As we use an uint32_t to represent connection identifiers, we should use %08x format strings in all places. As the MGW allocates them, it doesn't need to support any larger-than-32bit numbers. However, libosmo-mgcp-client cannot make any assumptions about the connection ID being an uint32_t or even an uint64_t. It should simply treat it as an opaque string. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp_client/mgcp_client_test.c 5 files changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..168f412 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -63,7 +63,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 726ac63..3b0cba7 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -292,6 +292,7 @@ LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); return -1; } + /* FIXME: parse response parameters such as connection ID in case of CRCX! */ pending = mgcp_client_response_pending_get(mgcp, &r); if (!pending) { @@ -686,7 +687,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..0ec4180 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -337,13 +337,13 @@ if (!endp) return -1; - id = strtoul(ci, NULL, 10); + id = strtoul(ci, NULL, 16); if (mgcp_conn_get(endp, id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", + "endpoint:%x No connection found under ConnectionIdentifier %08x\n", ENDPOINT_NUMBER(endp), id); return -1; @@ -399,7 +399,7 @@ if (!ci) return -1; - *conn_id = strtoul(ci, NULL, 10); + *conn_id = strtoul(ci, NULL, 16); return 0; } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 2bf8847..80ef3eb 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -222,7 +222,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %08x%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -585,7 +585,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%08x", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From admin at opensuse.org Fri Nov 17 20:26:38 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 17 Nov 2017 20:26:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a0f461eae99e_a94d30f7c307269a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 48s] [ 11.939858] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 48s] [ 11.947224] CPU3: stopping [ 48s] [ 11.948220] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 48s] [ 11.950325] Hardware name: Generic DT based system [ 48s] [ 11.951854] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 48s] [ 11.954233] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 48s] [ 11.956409] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 48s] [ 11.958366] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 48s] [ 11.960451] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 48s] [ 11.962549] Exception stack(0xee08beb8 to 0xee08bf00) [ 48s] [ 11.963957] bea0: 00000000 00000003 [ 48s] [ 11.966212] bec0: 00000003 ee08a000 00000002 00000000 00000000 00000001 ee005000 ee08a000 [ 48s] [ 11.968338] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200f0113 ffffffff [ 48s] [ 11.970498] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 48s] [ 11.972549] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 48s] [ 11.974636] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 48s] [ 11.977130] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 48s] [ 11.979664] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 48s] [ 11.982093] Exception stack(0xee08bf88 to 0xee08bfd0) [ 48s] [ 11.983720] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 48s] [ 11.986400] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 48s] [ 11.989111] bfc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 48s] [ 11.990689] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 48s] [ 11.992929] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 48s] [ 11.995467] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 50s] [ 11.997373] Rebooting in 1 seconds..### VM INTERACTION END ### [ 50s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 50s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 50s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Nov 18 01:00:51 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 Nov 2017 01:00:51 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a0f8651774c5_a94d30f7c314192a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_8.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 238s] | This file was extended by libosmocore config.status 0.10.2, which was [ 238s] | generated by GNU Autoconf 2.69. Invocation command line was [ 238s] | [ 238s] | CONFIG_FILES = [ 238s] | CONFIG_HEADERS = [ 238s] | CONFIG_LINKS = [ 238s] | CONFIG_COMMANDS = [ 238s] | $ ./config.status Doxyfile.core [ 238s] | [ 238s] | on build32 [ 238s] | [ 238s] | config.status:1170: creating Doxyfile.core [ 238s] [ 238s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 238s] make[1]: *** [override_dh_auto_test] Error 1 [ 238s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 238s] debian/rules:15: recipe for target 'build' failed [ 238s] make: *** [build] Error 2 [ 238s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 238s] [ 238s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 18 01:00:44 UTC 2017. [ 238s] [ 238s] ### VM INTERACTION START ### [ 239s] Powering off. [ 239s] [ 229.093150] reboot: Power down [ 240s] ### VM INTERACTION END ### [ 240s] [ 240s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 18 01:00:47 UTC 2017. [ 240s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:13:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:13:45 +0000 Subject: osmo-mgw[master]: osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4901 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16016684ee5bd6d82a8867d4b2be108b6d718291 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:13:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:13:48 +0000 Subject: osmo-mgw[master]: osmo-mgw: Fix copyright notice In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4904 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6143becdd0da589451efcbda530a78f655b7ce0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:13:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:13:59 +0000 Subject: [MERGED] osmo-mgw[master]: osmo-mgw: Fix copyright notice In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-mgw: Fix copyright notice ...................................................................... osmo-mgw: Fix copyright notice The copyright statement and contribution notices were copied 1:1 from OpenBSC, which is of course not correct for OsmoMGW. Change-Id: I6143becdd0da589451efcbda530a78f655b7ce0b --- M src/osmo-mgw/mgw_main.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 99efb15..20df923 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -64,11 +64,11 @@ static int reset_endpoints = 0; static int daemonize = 0; -const char *openbsc_copyright = +const char *osmomgw_copyright = "Copyright (C) 2009-2010 Holger Freyther and On-Waves\r\n" "Copyright (C) 2017 by sysmocom s.f.m.c. GmbH \r\n" - "Contributions by Daniel Willmann, Jan L?bbe, Stefan Schmidt\r\n" - "Dieter Spaar, Andreas Eversberg, Harald Welte\r\n\r\n" + "Contributions by Pablo Neira Ayuso, Jacob Erlbeck, Neels Hofmeyr\r\n" + "Philipp Maier\r\n\r\n" "License AGPLv3+: GNU AGPL version 3 or later \r\n" "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n"; @@ -263,7 +263,7 @@ if (!cfg) return -1; - vty_info.copyright = openbsc_copyright; + vty_info.copyright = osmomgw_copyright; vty_init(&vty_info); logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&log_info); -- To view, visit https://gerrit.osmocom.org/4904 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6143becdd0da589451efcbda530a78f655b7ce0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:14:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:14:00 +0000 Subject: [MERGED] osmo-mgw[master]: osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg ...................................................................... osmo-mgw: Config file is osmo-mgw.cfg, and not mgcp.cfg Change-Id: I16016684ee5bd6d82a8867d4b2be108b6d718291 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index e21baa8..99efb15 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -73,7 +73,7 @@ "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n"; -static char *config_file = "mgcp.cfg"; +static char *config_file = "osmo-mgw.cfg"; /* used by msgb and mgcp */ void *tall_bsc_ctx = NULL; -- To view, visit https://gerrit.osmocom.org/4901 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16016684ee5bd6d82a8867d4b2be108b6d718291 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:14:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:14:37 +0000 Subject: libosmo-sccp[master]: ss7_vty: Fix out-of-bounds access in 'as' cmd In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4897 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:16:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:16:32 +0000 Subject: [MERGED] libosmo-sccp[master]: ss7_vty: Fix out-of-bounds access in 'as' cmd In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ss7_vty: Fix out-of-bounds access in 'as' cmd ...................................................................... ss7_vty: Fix out-of-bounds access in 'as' cmd Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 4c67508..cbbb9e3 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -677,7 +677,7 @@ enum osmo_ss7_asp_protocol protocol = parse_asp_proto(argv[1]); if (protocol == OSMO_SS7_ASP_PROT_NONE) { - vty_out(vty, "invalid protocol '%s'%s", argv[3], VTY_NEWLINE); + vty_out(vty, "invalid protocol '%s'%s", argv[1], VTY_NEWLINE); return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/4897 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:16:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:16:44 +0000 Subject: osmo-msc[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4890 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c0c91abc0d3fa737dbe3db1e6473358da64c2a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:16:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:16:46 +0000 Subject: [MERGED] osmo-msc[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I6c0c91abc0d3fa737dbe3db1e6473358da64c2a5 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 601b438..f965240 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,18 @@ PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # Enable/disable smpp support in the msc? AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])], [osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"]) -- To view, visit https://gerrit.osmocom.org/4890 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c0c91abc0d3fa737dbe3db1e6473358da64c2a5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:16:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:16:51 +0000 Subject: osmo-sgsn[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4891 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:16:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:16:52 +0000 Subject: [MERGED] osmo-sgsn[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 0daa5e2..9a6f963 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,18 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4891 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:12 +0000 Subject: osmo-iuh[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4888 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:15 +0000 Subject: [MERGED] osmo-iuh[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index ff0501a..4c5f47f 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,18 @@ dnl checks for header files AC_HEADER_STDC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT( libosmo-ranap.pc src/Makefile -- To view, visit https://gerrit.osmocom.org/4888 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:22 +0000 Subject: osmo-bsc[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4885 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:26 +0000 Subject: [MERGED] osmo-bsc[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index f741441..a66ed26 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,18 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4885 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:32 +0000 Subject: osmo-mgw[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4889 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2693238c5c8d914cf3ff7721511e7b4b56e413d2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:17:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:17:39 +0000 Subject: [MERGED] osmo-mgw[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I2693238c5c8d914cf3ff7721511e7b4b56e413d2 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index dea41b1..f72b9e1 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,18 @@ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # Enable/disable transcoding within osmo-bsc_mgcp? AC_ARG_ENABLE([mgcp-transcoding], [AS_HELP_STRING([--enable-mgcp-transcoding], [Build the MGCP gateway with internal transcoding enabled.])], [osmo_ac_mgcp_transcoding="$enableval"],[osmo_ac_mgcp_transcoding="no"]) -- To view, visit https://gerrit.osmocom.org/4889 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2693238c5c8d914cf3ff7721511e7b4b56e413d2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:18:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:18:22 +0000 Subject: libosmo-netif[master]: stream: Avoid re-creating and leaking socket when unneeded In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:18:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:18:23 +0000 Subject: [MERGED] libosmo-netif[master]: stream: Avoid re-creating and leaking socket when unneeded In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: stream: Avoid re-creating and leaking socket when unneeded ...................................................................... stream: Avoid re-creating and leaking socket when unneeded In previous implementation, if no reconfiguring is needed, a new socket would be created without closing the old one, leaking the previous socket. Instead, if we don't need reconfiguring, we return 0 as no operation is required. Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987 --- M src/stream.c 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/stream.c b/src/stream.c index 71c9b17..d9c3f62 100644 --- a/src/stream.c +++ b/src/stream.c @@ -735,9 +735,13 @@ { int ret; - /* we are reconfiguring this socket, close existing first. */ - if ((link->flags & OSMO_STREAM_SRV_F_RECONF) && link->ofd.fd >= 0) + if (link->ofd.fd >= 0) { + /* No reconfigure needed for existing socket, we are fine */ + if (!(link->flags & OSMO_STREAM_SRV_F_RECONF)) + return 0; + /* we are reconfiguring this socket, close existing first. */ osmo_stream_srv_link_close(link); + } link->flags &= ~OSMO_STREAM_SRV_F_RECONF; -- To view, visit https://gerrit.osmocom.org/4902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:18:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:18:40 +0000 Subject: libosmo-sccp[master]: xua_test: sanitize: fix msgb leak In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4882 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie57e803bb6361f39042084a21cada754a6506606 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:18:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:18:45 +0000 Subject: libosmo-sccp[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4879 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9bf734cb6cdee24e776cd64f9f1b800a7a9277c Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:18:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:18:51 +0000 Subject: libosmo-sccp[master]: sccp_test: sanitize: fix msgb mem leaks In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4880 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6d5ff3e4c053db5a2af9d548250f0307e00317bb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:01 +0000 Subject: libosmo-sccp[master]: sccp_test: sanitize: don't memcmp NULL pointers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4881 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0159a875c1e11f4f9728d9e09f5c365b8174673a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:04 +0000 Subject: [MERGED] libosmo-sccp[master]: sccp_test: sanitize: don't memcmp NULL pointers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sccp_test: sanitize: don't memcmp NULL pointers ...................................................................... sccp_test: sanitize: don't memcmp NULL pointers Change-Id: I0159a875c1e11f4f9728d9e09f5c365b8174673a --- M tests/sccp/sccp_test.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index d6abc5d..ed485bc 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -886,15 +886,17 @@ FAIL("GTI length is wrong: %d\n", result.called.gti_len); } - if (memcmp(&parse_result[current_test].dst_gti_data[0], - result.called.gti_data, result.called.gti_len) != 0) { + if (parse_result[current_test].dst_gti_data + && memcmp(&parse_result[current_test].dst_gti_data[0], + result.called.gti_data, result.called.gti_len) != 0) { FAIL("GTI data is wrong: %d '%s'\n", result.called.gti_len, osmo_hexdump(result.called.gti_data, result.called.gti_len)); } - if (memcmp(&parse_result[current_test].src_gti_data[0], - result.calling.gti_data, result.calling.gti_len) != 0) { + if (parse_result[current_test].src_gti_data + && memcmp(&parse_result[current_test].src_gti_data[0], + result.calling.gti_data, result.calling.gti_len) != 0) { FAIL("GTI data is wrong: %d\n", result.calling.gti_len); } } -- To view, visit https://gerrit.osmocom.org/4881 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0159a875c1e11f4f9728d9e09f5c365b8174673a Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:04 +0000 Subject: [MERGED] libosmo-sccp[master]: sccp_test: sanitize: fix msgb mem leaks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sccp_test: sanitize: fix msgb mem leaks ...................................................................... sccp_test: sanitize: fix msgb mem leaks Change-Id: I6d5ff3e4c053db5a2af9d548250f0307e00317bb --- M tests/sccp/sccp_test.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 6043cff..d6abc5d 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -450,6 +450,7 @@ } write_called = 1; + msgb_free(data); } void sccp_c_read(struct sccp_connection *connection, struct msgb *msgb, unsigned int len) @@ -502,6 +503,7 @@ } matched = 1; + msgb_free(data); } static void test_sccp_system(void) @@ -981,6 +983,8 @@ osmo_hexdump(msg->data, ret)); } } + + talloc_free(msg); } static const struct log_info_cat default_categories[] = { -- To view, visit https://gerrit.osmocom.org/4880 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d5ff3e4c053db5a2af9d548250f0307e00317bb Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:04 +0000 Subject: [MERGED] libosmo-sccp[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: Ie9bf734cb6cdee24e776cd64f9f1b800a7a9277c --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 5165cdb..5b91522 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,18 @@ AC_MSG_ERROR([sctp_send not found in searched libs])]) LIBS=$old_LIBS +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4879 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9bf734cb6cdee24e776cd64f9f1b800a7a9277c Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:05 +0000 Subject: [MERGED] libosmo-sccp[master]: xua_test: sanitize: fix msgb leak In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: xua_test: sanitize: fix msgb leak ...................................................................... xua_test: sanitize: fix msgb leak Change-Id: Ie57e803bb6361f39042084a21cada754a6506606 --- M tests/xua/xua_test.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/xua/xua_test.c b/tests/xua/xua_test.c index 5a9d0ab..3e370fe 100644 --- a/tests/xua/xua_test.c +++ b/tests/xua/xua_test.c @@ -564,6 +564,9 @@ OSMO_ASSERT(nested); OSMO_ASSERT(xua_msg_get_u32(nested, M3UA_IEI_LOC_RKEY_ID) == 1); OSMO_ASSERT(xua_msg_get_u32(nested, M3UA_IEI_DEST_PC) == 23); + + talloc_free(nested); + talloc_free(xua); } -- To view, visit https://gerrit.osmocom.org/4882 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie57e803bb6361f39042084a21cada754a6506606 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:11 +0000 Subject: osmo-hlr[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4887 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:13 +0000 Subject: [MERGED] osmo-hlr[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d72a026..ef234c5 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,18 @@ dnl checks for header files AC_HEADER_STDC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), -- To view, visit https://gerrit.osmocom.org/4887 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12b7b0e751f274a05e88c79299fd8388667cc542 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:25 +0000 Subject: osmo-ggsn[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4886 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I439ff2b2cb36a5c29347a914c0f2e21bed598b06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:29 +0000 Subject: [MERGED] osmo-ggsn[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I439ff2b2cb36a5c29347a914c0f2e21bed598b06 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index ca455ce..4fd0132 100644 --- a/configure.ac +++ b/configure.ac @@ -140,6 +140,18 @@ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_CONFIG_FILES([Makefile doc/Makefile doc/examples/Makefile -- To view, visit https://gerrit.osmocom.org/4886 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I439ff2b2cb36a5c29347a914c0f2e21bed598b06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:35 +0000 Subject: libsmpp34[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4884 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:37 +0000 Subject: [MERGED] libsmpp34[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609 --- M configure.ac 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 305cc11..85270bc 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,19 @@ # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([memset]) + +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT([Makefile def_frame/Makefile def_list/Makefile -- To view, visit https://gerrit.osmocom.org/4884 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:40 +0000 Subject: libosmo-abis[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4883 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I59fea4a7199ca6aa71710d3aca0b25425df7d346 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:42 +0000 Subject: [MERGED] libosmo-abis[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I59fea4a7199ca6aa71710d3aca0b25425df7d346 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index eb7733e..0e07330 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,18 @@ CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4883 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59fea4a7199ca6aa71710d3aca0b25425df7d346 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:51 +0000 Subject: libasn1c[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4876 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf Gerrit-PatchSet: 2 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:19:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:19:53 +0000 Subject: [MERGED] libasn1c[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index dcec465..4d65c2f 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,18 @@ PKG_CHECK_MODULES(LIBTALLOC, talloc) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " -- To view, visit https://gerrit.osmocom.org/4876 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf Gerrit-PatchSet: 2 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:23:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:23:05 +0000 Subject: libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4878/1/src/stream.c File src/stream.c: Line 433: while (1) { why not simply "while (msg = msgb_dequeue()) talloc_free(msg)" ? two lines instead of 6, and as added benefit no "while (1)" which may ring some alarms by people looking at the code (just psychologically) -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:23:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:23:08 +0000 Subject: libosmo-netif[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4877 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:23:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:23:09 +0000 Subject: [MERGED] libosmo-netif[master]: add --enable-sanitize config option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add --enable-sanitize config option ...................................................................... add --enable-sanitize config option Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7 --- M configure.ac 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 5ced828..d146513 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,18 @@ AC_CONFIG_MACRO_DIR([m4]) +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" -- To view, visit https://gerrit.osmocom.org/4877 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:23:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:23:37 +0000 Subject: libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Patch Set 3: some kind of rationale/explanation as to why would be great in the commitlog -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:24:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:24:19 +0000 Subject: libosmocore[master]: memleak: osmo_config_list_parse: getline() needs free also o... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:24:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:24:28 +0000 Subject: libosmocore[master]: abis_test: sanitize: fix msgb memleak In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:24:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:24:37 +0000 Subject: libosmocore[master]: lapd_test: sanitize: fix msgb memleaks In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4863 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:25:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:25:55 +0000 Subject: libosmocore[master]: gsm0408_test: sanitize: cleanup msgb In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4864 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:26:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:26:03 +0000 Subject: libosmocore[master]: gsm0808_test: sanitize: fix msgb memleak In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4865 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:28:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:28:17 +0000 Subject: libosmocore[master]: rate_ctr: doc: explain intentional "mem leak" for mangled gr... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4866/1/src/rate_ctr.c File src/rate_ctr.c: Line 185: * Attention: if the description struct (\a desc) contains invalid characters, a mangled description Actually, if it behaves like this, I think it's a bug. We cannot create a copy of the descriptor every time we call rate_ctr_group_alloc(), this could create a nightmare. We would need to create only a single copy and then re-use that every time the same group_desc is provided. Or simply don't support this name mangling at all anymore, but that breaks compatibility with old code. -- To view, visit https://gerrit.osmocom.org/4866 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:28:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:28:25 +0000 Subject: libosmocore[master]: stats_test: clarify talloc contexts In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4867 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eda27cd3e322fb43a825382b37185048ebcd509 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:29:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:29:04 +0000 Subject: libosmocore[master]: bssgp_fc_test: remove rounding to deciseconds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4869 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:29:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:29:27 +0000 Subject: libosmocore[master]: bssgp_fc_test: clarify by outputting ok / failure messages In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4870 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:29:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:29:43 +0000 Subject: libosmocore[master]: bssgp_fc_test: sanitizer: free msgb context when done In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4871 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:29:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:29:59 +0000 Subject: libosmocore[master]: gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4872 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:08 +0000 Subject: libosmocore[master]: bssgp_fc_test: sanitize: free fc struct when done In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4873 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:44 +0000 Subject: libosmocore[master]: tlv_put: guard against NULL val and 0 len In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4874 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:50 +0000 Subject: libosmocore[master]: sercomm_test: sanitize: fix msgb mem leak In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4875 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:58 +0000 Subject: [MERGED] libosmocore[master]: gsm0808_test: sanitize: fix msgb memleak In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0808_test: sanitize: fix msgb memleak ...................................................................... gsm0808_test: sanitize: fix msgb memleak Helps fix sanitizer build on debian 9. Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f --- M tests/gsm0808/gsm0808_test.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 68771a4..28bd7f7 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -256,6 +256,8 @@ msg = gsm0808_create_classmark_update(&cm2, 1, &cm3, 1); VERIFY(msg, res, ARRAY_SIZE(res)); + msgb_free(msg); + msg = gsm0808_create_classmark_update(&cm2, 1, NULL, 0); VERIFY(msg, res2o, ARRAY_SIZE(res2o)); -- To view, visit https://gerrit.osmocom.org/4865 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:59 +0000 Subject: [MERGED] libosmocore[master]: gsm0408_test: sanitize: cleanup msgb In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0408_test: sanitize: cleanup msgb ...................................................................... gsm0408_test: sanitize: cleanup msgb Remove initial msgb talloc context creation: if we create a root ctx for msgb that all msgb are allocated in, we would in a final cleanup discard all msgbs, i.e. we would not verify that all msgb are cleaned up properly. If we create the msgb context and *don't* clean it up in the end, the sanitizer build fails because the context root is not cleaned up. Easiest is to actually allocate all msgb at NULL ctx, because then any msgb that aren't cleaned up properly would still linger, while we don't leave a root ctx that we need to clean up either. Helps fix sanitizer build on debian 9. Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f --- M tests/gsm0408/gsm0408_test.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 3f3a5c7..935ec21 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -197,7 +197,6 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); test_bearer_cap(); test_mid_from_tmsi(); test_ra_cap(); -- To view, visit https://gerrit.osmocom.org/4864 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:59 +0000 Subject: [MERGED] libosmocore[master]: lapd_test: sanitize: fix msgb memleaks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: lapd_test: sanitize: fix msgb memleaks ...................................................................... lapd_test: sanitize: fix msgb memleaks Helps fix sanitizer build on debian 9. Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25 --- M tests/lapd/lapd_test.c 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index d6c0495..fd92cac 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -498,6 +498,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); /* Send SABM MS 2, we must get nothing, due to collision */ cm2 = malloc(sizeof(cm)); @@ -513,6 +514,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); @@ -597,6 +599,7 @@ /* idempotent */ lapdm_channel_exit(&bts_to_ms_channel); + msgb_free(msg); } static void test_lapdm_establishment() @@ -702,6 +705,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua, ARRAY_SIZE(ua)) == 0); + msgb_free(pp.oph.msg); printf("\nSending Classmark Change\n"); send_buf(cm_chg, sizeof(cm_chg), &bts_to_ms_channel); @@ -718,6 +722,7 @@ printf("\nSending GPRS Suspend Request\n"); send_buf(gprs_susp, sizeof(gprs_susp), &bts_to_ms_channel); dump_queue(&dl->dl.tx_queue); + msgb_free(pp.oph.msg); rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); @@ -726,10 +731,12 @@ printf("\nSending Cipher Mode Complete\n"); send_buf(cipher_compl, sizeof(cipher_compl), &bts_to_ms_channel); dump_queue(&dl->dl.tx_queue); + msgb_free(pp.oph.msg); rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, cipher_compl_ack, ARRAY_SIZE(cipher_compl_ack)) == 0); + msgb_free(pp.oph.msg); printf("\nEstablishing SAPI=3\n"); send_sabm(&bts_to_ms_channel, 3, NULL, 0); @@ -738,6 +745,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, ua_sms, ARRAY_SIZE(ua_sms)) == 0); + msgb_free(pp.oph.msg); printf("\nSending CP-DATA\n"); send_buf(cp_data_1, sizeof(cp_data_1), &bts_to_ms_channel); @@ -746,6 +754,7 @@ rc = dequeue_prim(&bts_to_ms_channel.lapdm_dcch, &pp, "DCCH"); CHECK_RC(rc); OSMO_ASSERT(memcmp(pp.oph.msg->l2h, cp_data_1_ack, ARRAY_SIZE(cp_data_1_ack)) == 0); + msgb_free(pp.oph.msg); /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); -- To view, visit https://gerrit.osmocom.org/4863 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:59 +0000 Subject: [MERGED] libosmocore[master]: abis_test: sanitize: fix msgb memleak In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abis_test: sanitize: fix msgb memleak ...................................................................... abis_test: sanitize: fix msgb memleak Helps fix sanitizer build on debian 9. Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab --- M tests/abis/abis_test.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index a631712..c0605c2 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -193,6 +193,8 @@ /* check multiple, chained SW-descr: */ chk_raw("half", chain, sizeof(chain) / 2); chk_raw("full", chain, sizeof(chain)); + + msgb_free(msg); } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/4862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:30:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:30:59 +0000 Subject: [MERGED] libosmocore[master]: memleak: osmo_config_list_parse: getline() needs free also o... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: memleak: osmo_config_list_parse: getline() needs free also on error ...................................................................... memleak: osmo_config_list_parse: getline() needs free also on error Helps fix sanitizer build on debian 9. Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119 --- M src/msgfile.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/msgfile.c b/src/msgfile.c index 278b9a7..1f11aa6 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -119,9 +119,10 @@ line = NULL; while (getline(&line, &n, file) != -1) { handle_line(entries, line); - free(line); - line = NULL; } + /* The returned getline() buffer needs to be freed even if it failed. It can simply re-use the + * buffer that was allocated on the first call. */ + free(line); fclose(file); return entries; -- To view, visit https://gerrit.osmocom.org/4861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:32:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:32:33 +0000 Subject: osmo-ggsn[master]: ggsn_vty: Stop using deprecated API vty_install_default In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4854 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c6197129e0c251a4e8dd174027b011c8f6476c6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:32:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:32:36 +0000 Subject: osmo-ggsn[master]: contrib/jenkins.sh: Enable Werror in C(PP)FLAGS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4855 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4724fe07f6641e82c3bd9cde2d8d759aa492288 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:32:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:32:37 +0000 Subject: [MERGED] osmo-ggsn[master]: contrib/jenkins.sh: Enable Werror in C(PP)FLAGS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib/jenkins.sh: Enable Werror in C(PP)FLAGS ...................................................................... contrib/jenkins.sh: Enable Werror in C(PP)FLAGS Change-Id: Id4724fe07f6641e82c3bd9cde2d8d759aa492288 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 6a718a8..4437541 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ cd "$base" autoreconf --install --force -./configure $GTP +./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/4855 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4724fe07f6641e82c3bd9cde2d8d759aa492288 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 10:32:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 Nov 2017 10:32:38 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn_vty: Stop using deprecated API vty_install_default In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn_vty: Stop using deprecated API vty_install_default ...................................................................... ggsn_vty: Stop using deprecated API vty_install_default Changes made as requested by the deprecation text. Fixes warning below: warning: ?vty_install_default? is deprecated: Now happens implicitly with install_node() [-Wdeprecat ed-declarations] vty_install_default(GGSN_NODE); ^~~~~~~~~~~~~~~~~~~ Change-Id: I5c6197129e0c251a4e8dd174027b011c8f6476c6 --- M ggsn/ggsn_vty.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 9f343ec..6e15ae4 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -856,8 +856,8 @@ install_element(CONFIG_NODE, &cfg_ggsn_cmd); install_element(CONFIG_NODE, &cfg_no_ggsn_cmd); + install_node(&ggsn_node, config_write_ggsn); - vty_install_default(GGSN_NODE); install_element(GGSN_NODE, &cfg_description_cmd); install_element(GGSN_NODE, &cfg_no_description_cmd); install_element(GGSN_NODE, &cfg_ggsn_shutdown_cmd); @@ -872,7 +872,6 @@ install_element(GGSN_NODE, &cfg_ggsn_no_default_apn_cmd); install_node(&apn_node, NULL); - vty_install_default(APN_NODE); install_element(APN_NODE, &cfg_description_cmd); install_element(APN_NODE, &cfg_no_description_cmd); install_element(APN_NODE, &cfg_apn_shutdown_cmd); -- To view, visit https://gerrit.osmocom.org/4854 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c6197129e0c251a4e8dd174027b011c8f6476c6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 11:58:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 11:58:42 +0000 Subject: libosmocore[master]: rate_ctr: doc: explain intentional "mem leak" for mangled gr... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4866/1/src/rate_ctr.c File src/rate_ctr.c: Line 185: * Attention: if the description struct (\a desc) contains invalid characters, a mangled description > Actually, if it behaves like this, I think it's a bug. We cannot create a I see these ways forward: - drop mangling, output a warning on startup instead of aborting the program. Then old programs will lack some ctrl variables, but we don't break compat. - place a mangled_desc pointer in rate_ctr_group. It can then be deallocated on group_free(). We'll create a new mangling for each alloc, not really harmful. Mangling is nice for fixing "into the past", but once we have proper rate ctr names everywhere, it would be dead code into the future and it would be better to forbid instead of mangling... dilemma decision. I guess I slightly tend towards having less code and let the past be the past... but don't feel strongly either way. -- To view, visit https://gerrit.osmocom.org/4866 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:01:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 12:01:04 +0000 Subject: [PATCH] libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4860 to look at the new patch set (#4). jenkins: add 'make V=1' for more verbose build logs In the logs, it is nice to see whether e.g. sanitize or -Werror args actually made it to the gcc command line. With V=1 we see the complete command invocations that would be hidden otherwise. Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/4860/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..c341d05 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:51:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 18 Nov 2017 12:51:34 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Switch from printf to LOGP statements Message-ID: Review at https://gerrit.osmocom.org/4907 mobile: Switch from printf to LOGP statements Add a mobile application logging category and replace printf with a LOGP. The code is sadly still using exit in the middle of handling. Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/main.c 5 files changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/4907/1 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 3efa57a..efe493d 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -22,6 +22,7 @@ DSUM, DSIM, DGPS, + DMOB, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index d8fd076..3b761ef 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -127,6 +127,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DMOB] = { + .name = "DMOB", + .description = "Mobile", + .color = "\033[1;35m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index e3e948f..43631f3 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -97,7 +97,7 @@ /* waiting for reset after shutdown */ if (ms->shutdown == 2) { - printf("MS '%s' has been resetted\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "MS '%s' has been resetted\n", ms->name); ms->shutdown = 3; break; } @@ -175,7 +175,7 @@ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); - printf("Power off! (MS %s)\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "Power off! (MS %s)\n", ms->name); return 0; } @@ -212,7 +212,7 @@ rc = layer2_open(ms, ms->settings.layer2_socket_path); if (rc < 0) { - fprintf(stderr, "Failed during layer2_open()\n"); + LOGP(DMOB, LOGL_ERROR, "Failed during layer2_open()\n"); ms->l2_wq.bfd.fd = -1; mobile_exit(ms, 1); return rc; @@ -234,14 +234,14 @@ ms->started = 0; if (!strcmp(ms->settings.imei, "000000000000000")) { - printf("***\nWarning: Mobile '%s' has default IMEI: %s\n", + LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", ms->name, ms->settings.imei); - printf("This could relate your identitiy to other users with " + LOGP(DMOB, LOGL_NOTICE, "This could relate your identitiy to other users with " "default IMEI.\n***\n"); } l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); - printf("Mobile '%s' initialized, please start phone now!\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "Mobile '%s' initialized, please start phone now!\n", ms->name); return 0; } @@ -253,7 +253,7 @@ ms = talloc_zero(l23_ctx, struct osmocom_ms); if (!ms) { - fprintf(stderr, "Failed to allocate MS\n"); + LOGP(DMOB, LOGL_ERROR, "Failed to allocate MS: %s\n", name); return NULL; } diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 91729d8..6de8bec 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -3584,7 +3584,7 @@ gsm322_sync_to_cell(cs, NULL, 0); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when ret.idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when ret.idle, please fix!\n"); exit(0L); } @@ -3670,7 +3670,7 @@ gsm_print_arfcn(cs->arfcn)); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when leaving idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when leaving idle, please fix!\n"); exit(0L); } cs->sync_retries = SYNC_RETRIES; @@ -3700,7 +3700,7 @@ gsm_print_arfcn(cs->arfcn)); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when leaving idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when leaving idle, please fix!\n"); exit(0L); } cs->sync_retries = SYNC_RETRIES; @@ -4637,7 +4637,7 @@ cs->arfci = arfcn2index(cs->arfcn); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI after neighbour scan, please fix!\n"); + LOGP(DNB, LOGL_FATAL, "No SI after neighbour scan, please fix!\n"); exit(0L); } LOGP(DNB, LOGL_INFO, "Syncing back to serving cell\n"); diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 91ed341..8921bd8 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4907 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:51:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 18 Nov 2017 12:51:34 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Use bool to show started can only be true or false Message-ID: Review at https://gerrit.osmocom.org/4908 mobile: Use bool to show started can only be true or false The state handling is complicated and maybe it gets better by moving started to bool and then the rest to an enum. Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/app_mobile.c 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/4908/1 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 9b544ab..21b2880 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -62,7 +62,8 @@ uint16_t test_arfcn; struct osmol1_entity l1_entity; - uint8_t deleting, shutdown, started; + bool started, deleting; + uint8_t shutdown; struct gsm_support support; struct gsm_settings settings; struct gsm_subscriber subscr; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 43631f3..1905010 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -131,7 +131,7 @@ gsm322_cs_sendmsg(ms, nmsg); } - ms->started = 1; + ms->started = true; } return 0; } @@ -231,7 +231,7 @@ gsm_random_imei(&ms->settings); ms->shutdown = 0; - ms->started = 0; + ms->started = false; if (!strcmp(ms->settings.imei, "000000000000000")) { LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", @@ -291,7 +291,7 @@ { int rc; - ms->deleting = 1; + ms->deleting = true; if (mncc_recv_app) { mncc_sock_exit(ms->mncc_entity.sock_state); -- To view, visit https://gerrit.osmocom.org/4908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:51:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 18 Nov 2017 12:51:34 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum Message-ID: Review at https://gerrit.osmocom.org/4909 mobile: Instead of putting semantic in a comment, use an enum The enum was created to understand the different states during the shutdown and find places where it is used. The normal transitions are like. Idle -> Imsi Detach -> L1 Reset -> Done Idle -> L1 Reset -> Done The shutdown can get stuck in case: * Out of memory situation while handling IMSI detach (timeout) * Never receiving l1 reset acknnowledgment. The code could benefit the move to osmo fsm to deal with proper timeouts. Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 34 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/09/4909/1 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 21b2880..7a935f9 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -54,6 +54,13 @@ int16_t s, rl_fail; }; +enum { + MS_SHUTDOWN_NONE = 0, + MS_SHUTDOWN_IMSI_DETACH = 1, + MS_SHUTDOWN_WAIT_RESET = 2, + MS_SHUTDOWN_COMPL = 3, +}; + /* One Mobilestation for osmocom */ struct osmocom_ms { struct llist_head entity; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 1905010..d28af00 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -96,9 +96,9 @@ set = &ms->settings; /* waiting for reset after shutdown */ - if (ms->shutdown == 2) { + if (ms->shutdown == MS_SHUTDOWN_WAIT_RESET) { LOGP(DMOB, LOGL_NOTICE, "MS '%s' has been resetted\n", ms->name); - ms->shutdown = 3; + ms->shutdown = MS_SHUTDOWN_COMPL; break; } @@ -142,13 +142,13 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; /* if shutdown is already performed */ - if (ms->shutdown >= 2) + if (ms->shutdown >= MS_SHUTDOWN_WAIT_RESET) return 0; if (!force && ms->started) { struct msgb *nmsg; - ms->shutdown = 1; /* going down */ + ms->shutdown = MS_SHUTDOWN_IMSI_DETACH; nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_IMSI_DETACH); if (!nmsg) return -ENOMEM; @@ -168,10 +168,10 @@ lapdm_channel_exit(&ms->lapdm_channel); if (ms->started) { - ms->shutdown = 2; /* being down, wait for reset */ + ms->shutdown = MS_SHUTDOWN_WAIT_RESET; /* being down, wait for reset */ l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); } else { - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; /* being down */ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); @@ -230,7 +230,7 @@ gsm_random_imei(&ms->settings); - ms->shutdown = 0; + ms->shutdown = MS_SHUTDOWN_NONE; ms->started = false; if (!strcmp(ms->settings.imei, "000000000000000")) { @@ -268,7 +268,7 @@ gsm_support_init(ms); gsm_settings_init(ms); - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; if (mncc_recv_app) { mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); @@ -298,7 +298,7 @@ ms->mncc_entity.sock_state = NULL; } - if (ms->shutdown == 0 || (ms->shutdown == 1 && force)) { + if (ms->shutdown == MS_SHUTDOWN_NONE || (ms->shutdown == MS_SHUTDOWN_IMSI_DETACH && force)) { rc = mobile_exit(ms, force); if (rc < 0) return rc; @@ -339,9 +339,9 @@ int work = 0; llist_for_each_entry_safe(ms, ms2, &ms_list, entity) { - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) work |= mobile_work(ms); - if (ms->shutdown == 3) { + if (ms->shutdown == MS_SHUTDOWN_COMPL) { if (ms->l2_wq.bfd.fd > -1) { layer2_close(ms); ms->l2_wq.bfd.fd = -1; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 22db859..1b10262 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -633,7 +633,7 @@ LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n"); /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_COMPL) { LOGP(DLSMS, LOGL_ERROR, "Phone is down\n"); gsm411_sms_report(ms, sms, GSM411_RP_CAUSE_MO_TEMP_FAIL); sms_free(sms); diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index ff90faa..ee2c943 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -603,7 +603,7 @@ } /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { gsm480_ss_result(ms, "", 0); return -EIO; } diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index d398c76..f1e8109 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -1923,7 +1923,7 @@ struct gsm_trans *trans; int i, rc; - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { LOGP(DCC, LOGL_NOTICE, "Phone is down!\n"); if (ms->mncc_entity.mncc_recv && msg_type != MNCC_REL_REQ) { struct gsm_mncc rel; diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 4b1db1e..f32d57a 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -1849,7 +1849,7 @@ subscr->sim_valid = 0; /* wait for RR idle and then power off when IMSI is detached */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { if (mm->state == GSM48_MM_ST_MM_IDLE) { mobile_exit(ms, 1); return 0; @@ -1944,7 +1944,7 @@ new_mm_state(mm, GSM48_MM_ST_WAIT_NETWORK_CMD, 0); /* power off */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { mobile_exit(ms, 1); return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index cbf8162..285a956 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -123,7 +123,7 @@ { if (vty_reading) return; - if (ms->shutdown != 0) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; vty_out(vty, "You must restart MS '%s' ('shutdown / no shutdown') for " "change to take effect!%s", ms->name, VTY_NEWLINE); @@ -142,7 +142,7 @@ llist_for_each_entry(ms, &ms_list, entity) { if (!strcmp(ms->name, name)) { - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { vty_out(vty, "MS '%s' is admin down.%s", name, VTY_NEWLINE); return NULL; @@ -189,9 +189,9 @@ service = ", MM connection active"; vty_out(vty, "MS '%s' is %s%s%s%s", ms->name, - (ms->shutdown) ? "administratively " : "", - (ms->shutdown || !ms->started) ? "down" : "up", - (!ms->shutdown) ? service : "", + (ms->shutdown != MS_SHUTDOWN_NONE) ? "administratively " : "", + (ms->shutdown != MS_SHUTDOWN_NONE || !ms->started) ? "down" : "up", + (ms->shutdown == MS_SHUTDOWN_NONE) ? service : "", VTY_NEWLINE); vty_out(vty, " IMEI: %s%s", set->imei, VTY_NEWLINE); vty_out(vty, " IMEISV: %s%s", set->imeisv, VTY_NEWLINE); @@ -201,7 +201,7 @@ else vty_out(vty, " IMEI generation: fixed%s", VTY_NEWLINE); - if (ms->shutdown) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; if (set->plmn_mode == PLMN_MODE_AUTO) @@ -303,7 +303,7 @@ gsm_subscr_dump(&ms->subscr, print_vty, vty); } else { llist_for_each_entry(ms, &ms_list, entity) { - if (!ms->shutdown) { + if (ms->shutdown == MS_SHUTDOWN_NONE) { gsm_subscr_dump(&ms->subscr, print_vty, vty); vty_out(vty, "%s", VTY_NEWLINE); } @@ -1529,7 +1529,7 @@ (set->test_always) ? "everywhere" : "foreign-country", VTY_NEWLINE); /* no shutdown must be written to config, because shutdown is default */ - vty_out(vty, " %sshutdown%s", (ms->shutdown) ? "" : "no ", + vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2699,7 +2699,7 @@ struct osmocom_ms *ms = vty->index, *tmp; int rc; - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) return CMD_SUCCESS; llist_for_each_entry(tmp, &ms_list, entity) { @@ -2738,7 +2738,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown == 0) + if (ms->shutdown == MS_SHUTDOWN_NONE) mobile_exit(ms, 0); return CMD_SUCCESS; @@ -2749,7 +2749,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= 1) + if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) mobile_exit(ms, 1); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:51:35 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 18 Nov 2017 12:51:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Pass the msg_ref from outside Message-ID: Review at https://gerrit.osmocom.org/4910 mobile: Pass the msg_ref from outside Instead of hardcoding 42 for all messages make it configurable. Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/10/4910/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d14e6db..a94d1aa 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -28,6 +28,6 @@ struct gsm_sms *sms_from_text(const char *receiver, int dcs, const char *text); int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text); + const char *text, uint8_t msg_ref); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 1b10262..c4d2512 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -620,12 +620,11 @@ /* Take a SMS in gsm_sms structure and send it. */ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, - struct gsm_sms *sms) + struct gsm_sms *sms, uint8_t msg_ref) { struct msgb *msg; struct gsm_trans *trans; uint8_t *data, *rp_ud_len; - uint8_t msg_ref = 42; int rc; int transaction_id; uint8_t sca[11]; /* max len per 03.40 */ @@ -703,14 +702,14 @@ /* create and send SMS */ int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text) + const char *text, uint8_t msg_ref) { struct gsm_sms *sms = sms_from_text(number, 0, text); if (!sms) return -ENOMEM; - return gsm411_tx_sms_submit(ms, sms_sca, sms); + return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref); } /* diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 285a956..a77600e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -947,7 +947,7 @@ if (vty_check_number(vty, number)) return CMD_WARNING; - sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2)); + sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2), 42); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Nov 18 12:51:35 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 18 Nov 2017 12:51:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Avoid msg_ref going out of sync Message-ID: Review at https://gerrit.osmocom.org/4911 mobile: Avoid msg_ref going out of sync It seemed like msg_ref could go out of sync. In some places we are using sms->msg_ref in other cases we pass it as parameter (e.g. when sending the SMS) or we get it out of the gsm411_rp_hdr. Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/4911/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index a94d1aa..0d0578a 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -11,7 +11,6 @@ uint8_t ud_hdr_ind; uint8_t protocol_id; uint8_t data_coding_scheme; - uint8_t msg_ref; char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes * BCD == 20 bytes string */ time_t time; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index c4d2512..73fad84 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -221,7 +221,7 @@ /* process an incoming TPDU (called from RP-DATA) * return value > 0: RP CAUSE for ERROR; < 0: silent error; 0 = success */ -static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg) +static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg, uint8_t msg_ref) { uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; @@ -296,7 +296,7 @@ LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, " "UserDataLength: 0x%02x, UserData: \"%s\"\n", - sms_mti, gsms->msg_ref, + sms_mti, msg_ref, gsms->protocol_id, gsms->data_coding_scheme, gsms->address, gsms->user_data_len, sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text : @@ -377,7 +377,7 @@ LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, osmo_hexdump(msg->l4h, msg->tail-msg->l4h)); - rc = gsm340_rx_tpdu(trans, msg); + rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); if (rc == 0) return gsm411_send_rp_ack(trans, rph->msg_ref); else if (rc > 0) @@ -528,7 +528,7 @@ /* generate a msgb containing a TPDU derived from struct gsm_sms, * returns total size of TPDU */ -static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms) +static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t msg_ref) { uint8_t *smsp; uint8_t da[12]; /* max len per 03.40 */ @@ -559,7 +559,7 @@ /* generate message ref */ smsp = msgb_put(msg, 1); - *smsp = sms->msg_ref; + *smsp = msg_ref; /* generate destination address */ if (sms->address[0] == '+') @@ -688,7 +688,7 @@ rp_ud_len = (uint8_t *)msgb_put(msg, 1); /* generate the 03.40 TPDU */ - rc = gsm340_gen_tpdu(msg, sms); + rc = gsm340_gen_tpdu(msg, sms, msg_ref); if (rc < 0) goto error; *rp_ud_len = rc; -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Nov 18 16:40:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 16:40:12 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4824 to look at the new patch set (#2). OsmoGGSN: more info on non-root operation / tun creation Add examples for 'ip addr add' and mention correspondence to config file, add examples for enabling masquerading and IP forwarding, place the non-root config in its own section and highlight the diffs. Add tiny hint at systemd-networkd. Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 --- M OsmoGGSN/chapters/configuration.adoc 1 file changed, 16 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/24/4824/2 diff --git a/OsmoGGSN/chapters/configuration.adoc b/OsmoGGSN/chapters/configuration.adoc index 9a4c81b..5f61c88 100644 --- a/OsmoGGSN/chapters/configuration.adoc +++ b/OsmoGGSN/chapters/configuration.adoc @@ -250,7 +250,7 @@ achieved by means such as * a custom shell script run as root before starting osmo-ggsn (e.g. as init script) -* systemd .netdev and .network files +* systemd .netdev and .network files, if your system is using systemd-networkd (see `networkctl status`). ==== Manual TUN device creation / configuration @@ -266,8 +266,13 @@ Where _username_ and _groupname_ correspond to the User and Group that will have ownership over the device, i.e. the privileges which you intend to run osmo-ggsn under, and _apn0_ will be the name of the network device created. After creating the interface, you can configure its addresses -using standard means like `ip addr add` or your distribution-specific utilities/tools. +using standard means like `ip addr add` or your distribution-specific utilities/tools +to match the `ip prefix dynamic` config item, and activate the link, for example: +---- +# ip addr add 192.168.7.0/24 dev apn0 +# ip link set apn0 up +---- ==== systemd based TUN device creation+configuration @@ -303,10 +308,16 @@ You may not want this if you have proper end-to-end routing set up, and want to have transparent inbound IP access to your GPRS-attached devices. -The pair of the configuration files above allows you to create and configure tun device which can be -used by OsmoGGSN as follows. +==== Config Changes -.Example: using externally configured tun device as non-root +With the tun device pre-configured in one of the ways outlined above, the main +changes in your osmo-ggsn.cfg file are: + +* remove `ip ifconfig` directive, +* make sure that `no shutdown` is present in the `apn` section as well as + `no shutdown ggsn` in the `ggsn` section. + +.Example: using externally configured tun device `apn0` as non-root ---- ggsn ggsn0 gtp state-dir /tmp -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 16:40:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 16:40:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: add IP forward and Masquerading section Message-ID: Review at https://gerrit.osmocom.org/4912 OsmoGGSN: add IP forward and Masquerading section Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 --- M OsmoGGSN/chapters/running.adoc 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/12/4912/1 diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index ef899b5..82e2390 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -20,6 +20,30 @@ used. If none is specified, use `osmo-ggsn.cfg` in the current working directory. +=== Enable IP Forwarding and Masquerading + +To be able to route data traffic between subscribers' IP addresses and an +internet uplink, OsmoGGSN usually requires IP Forwarding and Masquerading to be +enabled on the system. + +To manually enable IPv4 forwarding and masquerading ad-hoc, you can do: + +---- +sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" +iptables -t nat -A POSTROUTING -o '*' -j MASQUERADE +---- + +(You may want to replace `*` with the network device name, like `-o eth0`) + +To enable IP forwarding persistently: + +---- +sh -c "echo net.ipv4.ip_forward=1 > /etc/sysctl.d/99-ip-forward-v4.conf" +---- + +There are various ways to enable Masquerading persistently, please refer to +your distribution's documentation (for example https://wiki.debian.org/iptables). + === Multiple instances Running multiple instances of `osmo-ggsn` is possible if all GGSN instances -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 16:40:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 16:40:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: typo: priveleges Message-ID: Review at https://gerrit.osmocom.org/4913 OsmoGGSN: typo: priveleges Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d --- M OsmoGGSN/chapters/configuration.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/13/4913/1 diff --git a/OsmoGGSN/chapters/configuration.adoc b/OsmoGGSN/chapters/configuration.adoc index 5f61c88..657a014 100644 --- a/OsmoGGSN/chapters/configuration.adoc +++ b/OsmoGGSN/chapters/configuration.adoc @@ -242,7 +242,7 @@ <5> Shut down the APN [[ggsn_no_root]] -=== Configuring for running without root priveleges +=== Configuring for running without root privileges It's possible to run OsmoGGSN without root privileges if the tun devices are already configured. -- To view, visit https://gerrit.osmocom.org/4913 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 16:40:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 16:40:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: install doc: add asciidoc-dblatex dep Message-ID: Review at https://gerrit.osmocom.org/4914 install doc: add asciidoc-dblatex dep On debian 9, apparently asciidoc-dblatex needs to be installed manually in order to be able to generate PDFs. Add asciidoc-dblatex dep to INSTALL.txt. Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 --- M INSTALL.txt 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/4914/1 diff --git a/INSTALL.txt b/INSTALL.txt index 2669c0c..468070c 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -3,6 +3,7 @@ apt-get install \ make \ asciidoc \ + asciidoc-dblatex \ xsltproc \ dblatex \ mscgen \ -- To view, visit https://gerrit.osmocom.org/4914 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 16:59:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 16:59:27 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4868 to look at the new patch set (#2). rate_ctr: fix mem leak for mangled desc Using the NULL context creates mem leaks that bother sanitizer builds. Allocate as talloc "child" of the rate_ctr_group, so that the mangled desc (if any) gets freed when the rate_ctr group is freed. Remove the comment concerning osmo-msc: one way to fix if the talloc becomes unexpected from this patch is to adjust the talloc expectations, another (preferred) way is to have no invalid rate counter names in osmo-msc. Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b --- M src/rate_ctr.c 1 file changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/4868/2 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 5464490..7b69127 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,15 +190,6 @@ unsigned int size; struct rate_ctr_group *group; - /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ - if (!rate_ctrl_group_desc_validate(desc, true)) { - /* don't use 'ctx' here as it would screw up memory leak debugging e.g. - * in osmo-msc */ - desc = rate_ctr_group_desc_mangle(NULL, desc); - if (!desc) - return NULL; - } - size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); @@ -209,6 +200,13 @@ if (!group) return NULL; + /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ + if (!rate_ctrl_group_desc_validate(desc, true)) { + desc = rate_ctr_group_desc_mangle(group, desc); + if (!desc) + return NULL; + } + group->desc = desc; group->idx = idx; -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 17:01:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 17:01:04 +0000 Subject: [ABANDON] libosmocore[master]: stats_test: clarify talloc contexts In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: stats_test: clarify talloc contexts ...................................................................... Abandoned no longer needed after new patch set of G#4868 -- To view, visit https://gerrit.osmocom.org/4867 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0eda27cd3e322fb43a825382b37185048ebcd509 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 17:01:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 17:01:15 +0000 Subject: [ABANDON] libosmocore[master]: rate_ctr: doc: explain intentional "mem leak" for mangled gr... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: rate_ctr: doc: explain intentional "mem leak" for mangled group names ...................................................................... Abandoned no longer needed after new patch set of G#4868 -- To view, visit https://gerrit.osmocom.org/4866 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I35363c4c1fa0d62fd7fed40fe689487244248a3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 17:02:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 17:02:49 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4868 to look at the new patch set (#3). rate_ctr: fix mem leak for mangled desc Using the NULL context creates mem leaks that bother sanitizer builds. Allocate as talloc "child" of the rate_ctr_group, so that the mangled desc (if any) gets freed when the rate_ctr group is freed. Remove the comment concerning osmo-msc: one way to fix if the talloc becomes unexpected from this patch is to adjust the talloc expectations, another (preferred) way is to have no invalid rate counter names in osmo-msc. Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b --- M src/rate_ctr.c 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/4868/3 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 5464490..477339f 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,15 +190,6 @@ unsigned int size; struct rate_ctr_group *group; - /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ - if (!rate_ctrl_group_desc_validate(desc, true)) { - /* don't use 'ctx' here as it would screw up memory leak debugging e.g. - * in osmo-msc */ - desc = rate_ctr_group_desc_mangle(NULL, desc); - if (!desc) - return NULL; - } - size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); @@ -209,6 +200,15 @@ if (!group) return NULL; + /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ + if (!rate_ctrl_group_desc_validate(desc, true)) { + desc = rate_ctr_group_desc_mangle(group, desc); + if (!desc) { + talloc_free(group); + return NULL; + } + } + group->desc = desc; group->idx = idx; -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 17:07:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 17:07:15 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: install doc: add asciidoc-dblatex dep In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4914 to look at the new patch set (#2). install doc: add asciidoc-dblatex dep On debian 9, apparently asciidoc-dblatex needs to be installed manually in order to be able to generate PDFs. Add asciidoc-dblatex dep to INSTALL.txt. Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 --- M INSTALL.txt 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/4914/2 diff --git a/INSTALL.txt b/INSTALL.txt index 2669c0c..c06248a 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -3,6 +3,7 @@ apt-get install \ make \ asciidoc \ + asciidoc-dblatex \ xsltproc \ dblatex \ mscgen \ @@ -10,6 +11,8 @@ python-pychart \ python-nwdiag +(Note that asciidoc-dblatex is required from debian 9 on and did not exist before.) + Build PDFs, run: make or for a parallel build using more CPU cores: -- To view, visit https://gerrit.osmocom.org/4914 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Nov 18 17:33:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 17:33:39 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... Message-ID: Review at https://gerrit.osmocom.org/4915 sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 22 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/1 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..97a2bdc 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -18,6 +18,7 @@ static void test_gtpie_tlv() { unsigned int len = 0; + uint16_t u16; printf("Testing gtpie_tlv()\n"); @@ -27,7 +28,9 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + /* uint16_t must be 2-byte aligned to not trigger sanitize build failure */ + memcpy(&u16, &buf[1], sizeof(u16)); + OSMO_ASSERT(ntohs(u16) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -65,6 +68,7 @@ static void test_gtpie_tv2() { unsigned int len = 0; + uint16_t u16; printf("Testing gtpie_tv2()\n"); @@ -73,12 +77,15 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + /* uint16_t must be 2-byte aligned to not trigger sanitize build failure */ + memcpy(&u16, &buf[1], sizeof(u16)); + OSMO_ASSERT(ntohs(u16) == 0xABCD); } static void test_gtpie_tv4() { unsigned int len = 0; + uint32_t u32; printf("Testing gtpie_tv4()\n"); @@ -87,12 +94,15 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&u32, &buf[1], sizeof(u32)); + OSMO_ASSERT(ntohl(u32) == 0xABCD0123); } static void test_gtpie_tv8() { unsigned int len = 0; + uint32_t u32; printf("Testing gtpie_tv8()\n"); @@ -101,8 +111,11 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&u32, &buf[1], sizeof(u32)); + OSMO_ASSERT(ntohl(u32) == 0x00010203); + memcpy(&u32, &buf[5], sizeof(u32)); + OSMO_ASSERT(ntohl(u32) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..bca1015 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -159,6 +159,7 @@ .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; struct ul66_t eua; + uint32_t v4_addr; printf("testing in46a_to_eua()\n"); @@ -171,7 +172,9 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&v4_addr, &eua.v[2], sizeof(v4_addr)); + OSMO_ASSERT(v4_addr == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:32:16 +0000 Subject: osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4911/1/src/host/layer23/src/mobile/gsm411_sms.c File src/host/layer23/src/mobile/gsm411_sms.c: Line 380: rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); msg_ref is passed in as arg, gets logged above, and then this here is using rpg->mgs_ref and the function arg remains unused? -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:32:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:32:25 +0000 Subject: osmocom-bb[master]: mobile: Pass the msg_ref from outside In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:32:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:32:30 +0000 Subject: osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:32:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:32:35 +0000 Subject: osmocom-bb[master]: mobile: Use bool to show started can only be true or false In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:32:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:32:39 +0000 Subject: osmocom-bb[master]: mobile: Switch from printf to LOGP statements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4907 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 18 19:40:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 19:40:41 +0000 Subject: [PATCH] osmo-iuh[master]: tests: clean after tests to avoid sanitize build failures Message-ID: Review at https://gerrit.osmocom.org/4916 tests: clean after tests to avoid sanitize build failures Add test_common_cleanup() in test_common.c, call in test-{helpers,hnbap,ranap}.c Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c --- M src/tests/test-helpers.c M src/tests/test-hnbap.c M src/tests/test-ranap.c M src/tests/test_common.c M src/tests/test_common.h 5 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/16/4916/1 diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 44fd735..33ef2e1 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -211,5 +211,6 @@ test_asn1_helpers(); test_ranap_common(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index ef46070..1e3607b 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -175,6 +175,7 @@ test_asn1_decoding(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c1c7003..05be874 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -197,6 +197,8 @@ talloc_report(talloc_asn1_ctx, stdout); talloc_report(tall_msgb_ctx, stdout); //talloc_report(NULL, stdout); + + test_common_cleanup(); printf("exit\n"); exit(0); } diff --git a/src/tests/test_common.c b/src/tests/test_common.c index c8aafdd..5c33680 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -69,11 +69,13 @@ .num_cat = ARRAY_SIZE(log_cat), }; +static void *msgb_ctx; + int test_common_init(void) { int rc; - msgb_talloc_ctx_init(NULL, 0); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); @@ -85,3 +87,9 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); } + +void test_common_cleanup(void) +{ + talloc_free(msgb_ctx); + talloc_free(talloc_asn1_ctx); +} diff --git a/src/tests/test_common.h b/src/tests/test_common.h index 1af1abd..836d999 100644 --- a/src/tests/test_common.h +++ b/src/tests/test_common.h @@ -1,3 +1,4 @@ #pragma once int test_common_init(void); +void test_common_cleanup(void); -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 20:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 20:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: legacy_mgcp: mgcp_test: sanitize: free msgb_ctx Message-ID: Review at https://gerrit.osmocom.org/4917 legacy_mgcp: mgcp_test: sanitize: free msgb_ctx Ensure that all msgb were cleaned up, then free the overall msgb_ctx, in order to not leave any memory leaks the sanitizer build complains about. Change-Id: I84e0ac7f0928f04ffddd7da18200466841589c25 --- M tests/legacy_mgcp/mgcp_test.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/17/4917/1 diff --git a/tests/legacy_mgcp/mgcp_test.c b/tests/legacy_mgcp/mgcp_test.c index 1400893..a540b5f 100644 --- a/tests/legacy_mgcp/mgcp_test.c +++ b/tests/legacy_mgcp/mgcp_test.c @@ -1212,7 +1212,7 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); + void *msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); @@ -1231,6 +1231,9 @@ test_no_name(); test_osmux_cid(); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + talloc_free(msgb_ctx); printf("Done\n"); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4917 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84e0ac7f0928f04ffddd7da18200466841589c25 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 20:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 20:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: test_packet_error_detection: sanitize: free all c... Message-ID: Review at https://gerrit.osmocom.org/4918 mgcp_test: test_packet_error_detection: sanitize: free all conns Don't leave any memory leaks a sanitizer build will complain about. Change-Id: I6823653d5efcebaed40471123d21a9321cf633fd --- M tests/mgcp/mgcp_test.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/4918/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index e14b7ee..3dee509 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1083,6 +1083,7 @@ } force_monotonic_time_us = -1; + mgcp_conn_free_all(&endp); } static void test_multilple_codec(void) -- To view, visit https://gerrit.osmocom.org/4918 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6823653d5efcebaed40471123d21a9321cf633fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 20:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 20:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: talloc endp from cfg Message-ID: Review at https://gerrit.osmocom.org/4919 mgcp_test: test_no_cycle: sanitize: talloc endp from cfg Allocating the endp from NULL left a mem leak the sanitizer build complains about. Allocating from cfg, which gets freed later, also frees the endp and its connections. Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 --- M tests/mgcp/mgcp_test.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/19/4919/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 3dee509..8cdfb91 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1233,7 +1233,7 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(cfg, endp, 4711, MGCP_CONN_TYPE_RTP, "test-connection"); conn = mgcp_conn_get_rtp(endp, 4711); OSMO_ASSERT(conn); -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 20:30:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 20:30:57 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: sanitize: free msgb_ctx Message-ID: Review at https://gerrit.osmocom.org/4920 mgcp_test: sanitize: free msgb_ctx Ensure that all msgb were cleaned up, then free the overall msgb_ctx, in order to not leave any memory leaks the sanitizer build complains about. Change-Id: I53373023a6c3f490d6d6cb1c283db5dfb915882c --- M tests/mgcp/mgcp_test.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/20/4920/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 8cdfb91..3c89074 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1330,7 +1330,7 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); + void *msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); @@ -1349,6 +1349,9 @@ test_no_name(); test_osmux_cid(); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + talloc_free(msgb_ctx); printf("Done\n"); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53373023a6c3f490d6d6cb1c283db5dfb915882c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 20:35:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 20:35:52 +0000 Subject: [PATCH] osmo-iuh[master]: NOT FOR MERGE -- test build on deb9 build slave Message-ID: Review at https://gerrit.osmocom.org/4921 NOT FOR MERGE -- test build on deb9 build slave Change-Id: I01102c15be5565f3e29f9f1e1391b4afe7aa5eed --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/21/4921/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 01e3da2..d228a2e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -50,8 +50,8 @@ exit 1 fi -$MAKE $PARALLEL_MAKE -$MAKE check \ +$MAKE V=1 $PARALLEL_MAKE +$MAKE V=1 check \ || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/4921 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01102c15be5565f3e29f9f1e1391b4afe7aa5eed Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:33 +0000 Subject: [PATCH] osmo-msc[master]: rate_ctr: don't use . as separator Message-ID: Review at https://gerrit.osmocom.org/4922 rate_ctr: don't use . as separator Use ':' as separator, so that no mangled rate_ctr descriptions are allocated. When '.' is used, the rate_ctr mangling code creates tallocs of mangled counter descriptors, and hence affects the amount of expected talloc contexts in msc_vlr_tests.c. Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 --- M include/osmocom/msc/gsm_data.h 1 file changed, 19 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/22/4922/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 4d493cb..e0fbcec 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -297,26 +297,26 @@ }; static const struct rate_ctr_desc msc_ctr_description[] = { - [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type.attach", "Received location update imsi attach requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type.normal", "Received location update normal requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type.periodic", "Received location update periodic requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type.detach", "Received location update detach indication."}, - [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp.failed", "Rejected location updates."}, - [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp.completed", "Successful location updates."}, - [MSC_CTR_SMS_SUBMITTED] = {"sms.submitted", "Received a RPDU from a MS (MO)."}, - [MSC_CTR_SMS_NO_RECEIVER] = {"sms.no_receiver", "Counts SMS which couldn't routed because no receiver found."}, - [MSC_CTR_SMS_DELIVERED] = {"sms.delivered", "Global SMS Deliver attempts."}, - [MSC_CTR_SMS_RP_ERR_MEM] = {"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, - [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."}, - [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms.deliver_unknown_error", "Unknown error occured during sms delivery."}, + [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type:attach", "Received location update imsi attach requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type:normal", "Received location update normal requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type:periodic", "Received location update periodic requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type:detach", "Received location update detach indication."}, + [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp:failed", "Rejected location updates."}, + [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp:completed", "Successful location updates."}, + [MSC_CTR_SMS_SUBMITTED] = {"sms:submitted", "Received a RPDU from a MS (MO)."}, + [MSC_CTR_SMS_NO_RECEIVER] = {"sms:no_receiver", "Counts SMS which couldn't routed because no receiver found."}, + [MSC_CTR_SMS_DELIVERED] = {"sms:delivered", "Global SMS Deliver attempts."}, + [MSC_CTR_SMS_RP_ERR_MEM] = {"sms:rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, + [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms:rp_err_other", "Other error of MS responses on a sms delive attempt."}, + [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Unknown error occured during sms delivery."}, /* FIXME: count also sms delivered */ - [MSC_CTR_CALL_MO_SETUP] = {"call.mo_setup", "Received setup requests from a MS to init a MO call."}, - [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, - [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, - [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, - [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, - [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, - [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, + [MSC_CTR_CALL_MO_SETUP] = {"call:mo_setup", "Received setup requests from a MS to init a MO call."}, + [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call:mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, + [MSC_CTR_CALL_MT_SETUP] = {"call:mt_setup", "Sent setup requests to the MS (MT)."}, + [MSC_CTR_CALL_MT_CONNECT] = {"call:mt_connect", "Sent a connect to the MS (MT)."}, + [MSC_CTR_CALL_ACTIVE] = {"call:active", "Count total amount of calls that ever reached active state."}, + [MSC_CTR_CALL_COMPLETE] = {"call:complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, + [MSC_CTR_CALL_INCOMPLETE] = {"call:incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, }; -- To view, visit https://gerrit.osmocom.org/4922 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:33 +0000 Subject: [PATCH] osmo-msc[master]: sub_pres_vlr_fsm_start: fix heap use after free Message-ID: Review at https://gerrit.osmocom.org/4923 sub_pres_vlr_fsm_start: fix heap use after free When sub_pres_vlr_fsm_start() is called, it dispatches an event which may in some cases already cause tear down and free of the parent FSM instance, after which storing the returned instance pointer in that parent's metadata will use freed memory. Instead, pass the target pointer to remember the instance at to sub_pres_vlr_fsm_start() and assign the pointer *before* firing the event. Explain so in a new comment. I haven't checked whether that pointer is actually used at all -- this is the easiest way to fix the use-after-free without getting sucked into semantic questions. Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c 3 files changed, 20 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/23/4923/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index d5306fa..9e6b12c 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -274,9 +274,10 @@ /* internal use only */ -struct osmo_fsm_inst *sub_pres_vlr_fsm_start(struct osmo_fsm_inst *parent, - struct vlr_subscr *vsub, - uint32_t term_event); +void sub_pres_vlr_fsm_start(struct osmo_fsm_inst **fsm, + struct osmo_fsm_inst *parent, + struct vlr_subscr *vsub, + uint32_t term_event); struct osmo_fsm_inst * upd_hlr_vlr_proc_start(struct osmo_fsm_inst *parent, struct vlr_subscr *vsub, diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 41620b9..e90d8de 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -241,8 +241,7 @@ if (vsub->ms_not_reachable_flag) { /* Start Subscriber_Present_VLR */ osmo_fsm_inst_state_chg(fi, PR_ARQ_S_WAIT_SUB_PRES, 0, 0); - par->sub_pres_vlr_fsm = sub_pres_vlr_fsm_start(fi, vsub, - PR_ARQ_E_PRES_RES); + sub_pres_vlr_fsm_start(&par->sub_pres_vlr_fsm, fi, vsub, PR_ARQ_E_PRES_RES); return; } _proc_arq_vlr_post_pres(fi); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 37fe235..a3a68ed 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -252,21 +252,29 @@ .event_names = sub_pres_vlr_event_names, }; -struct osmo_fsm_inst *sub_pres_vlr_fsm_start(struct osmo_fsm_inst *parent, - struct vlr_subscr *vsub, - uint32_t term_event) +/* Note that the start event is dispatched right away, so in case the FSM immediately concludes from that + * event, the created FSM struct may no longer be valid as it already deallocated again, and it may + * furthermore already have invoked the parent FSM instance's deallocation as well. Hence, instead of + * returning, store the created FSM instance address in *fi_p before dispatching the event. It is thus + * possible to store the instance's pointer in a parent FSM instance without running danger of using + * already freed memory. */ +void sub_pres_vlr_fsm_start(struct osmo_fsm_inst **fi_p, + struct osmo_fsm_inst *parent, + struct vlr_subscr *vsub, + uint32_t term_event) { struct osmo_fsm_inst *fi; + OSMO_ASSERT(fi_p); + fi = osmo_fsm_inst_alloc_child(&sub_pres_vlr_fsm, parent, term_event); + *fi_p = fi; if (!fi) - return NULL; + return; fi->priv = vsub; osmo_fsm_inst_dispatch(fi, SUB_PRES_VLR_E_START, NULL); - - return fi; } /*********************************************************************** @@ -384,9 +392,7 @@ osmo_fsm_inst_state_chg(fi, LU_COMPL_VLR_S_WAIT_SUB_PRES, LU_TIMEOUT_LONG, 0); - lcvp->sub_pres_vlr_fsm = sub_pres_vlr_fsm_start(fi, vsub, - LU_COMPL_VLR_E_SUB_PRES_COMPL); - + sub_pres_vlr_fsm_start(&lcvp->sub_pres_vlr_fsm, fi, vsub, LU_COMPL_VLR_E_SUB_PRES_COMPL); } static void lu_compl_vlr_new_tmsi(struct osmo_fsm_inst *fi) -- To view, visit https://gerrit.osmocom.org/4923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:33 +0000 Subject: [PATCH] osmo-msc[master]: vlr_gsupc_read_cb: fix use after free of GSUP msgb Message-ID: Review at https://gerrit.osmocom.org/4924 vlr_gsupc_read_cb: fix use after free of GSUP msgb osmo_gsup_decode() doesn't actually decode everything, it does leave quite a number of pointers into the original msgb. Hence we must not deallocate the gsup msgb before dispatching GSUP events. Move msgb_free() to the bottom of vlr_gsupc_read_cb() and use rc and gotos to early-exit if needed. Change-Id: I16fc92dcf84e29fcf34712a2e8b0464ef08425ad --- M src/libvlr/vlr.c 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/24/4924/1 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 07c31ee..4ef52da 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -804,12 +804,11 @@ osmo_hexdump_nospc(msgb_l2(msg), msgb_l2len(msg))); rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); - msgb_free(msg); if (rc < 0) { LOGP(DVLR, LOGL_ERROR, "decoding GSUP message fails with error '%s' (%d)\n", get_value_string(gsm48_gmm_cause_names, -rc), -rc); - return rc; + goto msgb_free_and_return; } if (!gsup.imsi[0]) { @@ -817,7 +816,8 @@ if (OSMO_GSUP_IS_MSGT_REQUEST(gsup.message_type)) vlr_tx_gsup_error_reply(vlr, &gsup, GMM_CAUSE_INV_MAND_INFO); - return -GMM_CAUSE_INV_MAND_INFO; + rc = -GMM_CAUSE_INV_MAND_INFO; + goto msgb_free_and_return; } vsub = vlr_subscr_find_by_imsi(vlr, gsup.imsi); @@ -825,9 +825,11 @@ switch (gsup.message_type) { case OSMO_GSUP_MSGT_PURGE_MS_RESULT: case OSMO_GSUP_MSGT_PURGE_MS_ERROR: - return vlr_rx_gsup_purge_no_subscr(vlr, &gsup); + rc = vlr_rx_gsup_purge_no_subscr(vlr, &gsup); + goto msgb_free_and_return; default: - return vlr_rx_gsup_unknown_imsi(vlr, &gsup); + rc = vlr_rx_gsup_unknown_imsi(vlr, &gsup); + goto msgb_free_and_return; } } @@ -865,6 +867,9 @@ } vlr_subscr_put(vsub); + +msgb_free_and_return: + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/4924 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16fc92dcf84e29fcf34712a2e8b0464ef08425ad Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:33 +0000 Subject: [PATCH] osmo-msc[master]: subscr_conn: don't close after conn timeout Message-ID: Review at https://gerrit.osmocom.org/4925 subscr_conn: don't close after conn timeout If dispatching a conn timeout, the conn fsm will already have been discarded, and we cannot fire any more events to it. The expected test output changes illustrate that we are now omitting event dispatches that happen *after* the same FSM was already deallocated. Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 --- M src/libmsc/subscr_conn.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err 3 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/25/4925/1 diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index 336637c..62b7619 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -233,7 +233,8 @@ struct gsm_subscriber_connection *conn = fi->priv; if (conn) vlr_subscr_conn_timeout(conn->vsub); - osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL); + else + osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL); return 0; } diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index e34490d..4caaf1e 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -71,8 +71,6 @@ DREF freeing VLR subscr IMSI:901700000004620 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -173,8 +171,6 @@ DREF freeing VLR subscr MSISDN:46071 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index e267c5b..47af359 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -91,8 +91,6 @@ DREF freeing VLR subscr IMSI:901700000004620 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -325,8 +323,6 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 -- To view, visit https://gerrit.osmocom.org/4925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:34 +0000 Subject: [PATCH] osmo-msc[master]: vlr_subscr_conn_timeout(): don't fire events to discarded fi Message-ID: Review at https://gerrit.osmocom.org/4926 vlr_subscr_conn_timeout(): don't fire events to discarded fi Terminating one of the FSM instances may effect termination and deallocation of the others, as well as the vlr_subscr itself. So, reserve the vlr_subscr locally, and then dispatch events to exactly those FSM instances that exist. The changes in expected output in the msc_vlr_tests shows that the subscriber was deallocated from the first FSM termination, and now sticks around until we've checked both FSMs are gone. Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err 3 files changed, 21 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/26/4926/1 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 4ef52da..59eb37d 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -973,8 +973,12 @@ if (!vsub) return; - vlr_loc_update_conn_timeout(vsub->lu_fsm); - vlr_parq_conn_timeout(vsub->proc_arq_fsm); + vlr_subscr_get(vsub); + if (vsub->lu_fsm) + vlr_loc_update_conn_timeout(vsub->lu_fsm); + if (vsub->proc_arq_fsm) + vlr_parq_conn_timeout(vsub->proc_arq_fsm); + vlr_subscr_put(vsub); } struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops) diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 4caaf1e..8ca2991 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -46,6 +46,7 @@ llist_count(&net->subscr_conns) == 1 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Connection timed out - sending LU Reject for IMSI:901700000004620, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_DONE @@ -67,10 +68,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF IMSI:901700000004620: MSC conn use - 1 == 0 DRLL subscr IMSI:901700000004620: Freeing subscriber connection -DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 -DREF freeing VLR subscr IMSI:901700000004620 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 +DREF freeing VLR subscr IMSI:901700000004620 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -146,6 +148,7 @@ lu_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Connection timed out - sending LU Reject for MSISDN:46071, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_DONE @@ -167,10 +170,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF MSISDN:46071: MSC conn use - 1 == 0 DRLL subscr MSISDN:46071: Freeing subscriber connection -DREF VLR subscr MSISDN:46071 usage decreases to: 0 -DREF freeing VLR subscr MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 47af359..df34b86 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -66,6 +66,7 @@ lu_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Connection timed out - sending LU Reject for IMSI:901700000004620, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_DONE @@ -87,10 +88,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF IMSI:901700000004620: MSC conn use - 1 == 0 DRLL subscr IMSI:901700000004620: Freeing subscriber connection -DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 -DREF freeing VLR subscr IMSI:901700000004620 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 +DREF freeing VLR subscr IMSI:901700000004620 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -298,6 +300,7 @@ cm_service_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Connection timed out DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_TIMEOUT) DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_DONE @@ -320,9 +323,10 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF MSISDN:46071: MSC conn use - 1 == 0 DRLL subscr MSISDN:46071: Freeing subscriber connection -DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 2 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 -- To view, visit https://gerrit.osmocom.org/4926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 18 22:58:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 18 Nov 2017 22:58:34 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs Message-ID: Review at https://gerrit.osmocom.org/4927 cosmetic: msc_vlr_tests: add comment to show expected tallocs If something changed the talloc landscape, it is hard to find out what the test actually expected when it was written. Add the expectations in an inline comment. Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/27/4927/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7b1db1b..7cd869b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -664,6 +664,19 @@ void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) { talloc_report_full(msgb_ctx, stderr); + /* Expecting these to stick around in tall_bsc_ctx: +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 +full talloc report on 'subscr_conn_test_ctx' (total 2658 bytes in 9 blocks) + struct gsup_client contains 248 bytes in 1 blocks (ref 0) 0x61300000dee0 + struct gsm_network contains 2410 bytes in 6 blocks (ref 0) 0x61700000fce0 + struct vlr_instance contains 160 bytes in 1 blocks (ref 0) 0x611000009a60 + no_gsup_server contains 15 bytes in 1 blocks (ref 0) 0x60b00000ade0 + ../../../src/libosmocore/src/rate_ctr.c:199 contains 1552 bytes in 1 blocks (ref 0) 0x61b00001eae0 + struct llist_head contains 16 bytes in 1 blocks (ref 0) 0x60b00000ae90 + .* contains 3 bytes in 1 blocks (ref 0) 0x60b00000af40 + msgb contains 0 bytes in 1 blocks (ref 0) 0x60800000bf80 + */ fprintf(stderr, "talloc_total_blocks(tall_bsc_ctx) == %zu\n", talloc_total_blocks(tall_bsc_ctx)); if (talloc_total_blocks(tall_bsc_ctx) != expected_blocks) -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From admin at opensuse.org Sun Nov 19 01:00:19 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:00:19 +0000 Subject: Build failure of network:osmocom:latest/libsmpp34 in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10d7ba13449_a94d30f7c3484863@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libsmpp34/Debian_9.0/armv7l Package network:osmocom:latest/libsmpp34 failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libsmpp34 Last lines of build log: [ 42s] [ 11.734456] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 42s] [ 11.736048] CPU2: stopping [ 42s] [ 11.736478] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 42s] [ 11.737427] Hardware name: Generic DT based system [ 42s] [ 11.738100] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 42s] [ 11.739214] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 42s] [ 11.740231] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 42s] [ 11.751173] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 42s] [ 11.752412] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 42s] [ 11.753424] Exception stack(0xee089eb8 to 0xee089f00) [ 42s] [ 11.754117] 9ea0: 00000000 00000002 [ 42s] [ 11.755381] 9ec0: 00000002 ee088000 00000002 00000000 c06b8080 ee088000 ee089f00 ee088000 [ 42s] [ 11.756577] 9ee0: c06b8080 00000000 c06ef580 ee089f00 c0034d24 c0034e24 200b0113 ffffffff [ 42s] [ 11.771512] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 42s] [ 11.772850] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 42s] [ 11.774050] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 42s] [ 11.775374] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 43s] [ 11.776752] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 43s] [ 11.791875] Exception stack(0xee089f88 to 0xee089fd0) [ 43s] [ 11.792824] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 43s] [ 11.794111] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 43s] [ 11.795359] 9fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 43s] [ 11.796159] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 43s] [ 11.797295] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 43s] [ 11.798630] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 44s] [ 11.799779] Rebooting in 1 seconds..### VM INTERACTION END ### [ 44s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 44s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 44s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:11:11 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:11:11 +0000 Subject: Build failure of network:osmocom:latest/libosmocore in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10da32b3888_a94d30f7c348546e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_9.0/armv7l Package network:osmocom:latest/libosmocore failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 27s] [ 11.083763] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 27s] [ 11.091783] CPU3: stopping [ 27s] [ 11.092221] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 27s] [ 11.093204] Hardware name: Generic DT based system [ 27s] [ 11.093929] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 27s] [ 11.094939] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 27s] [ 11.095888] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 27s] [ 11.096857] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 27s] [ 11.097856] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 27s] [ 11.098837] Exception stack(0xee08beb8 to 0xee08bf00) [ 27s] [ 11.099502] bea0: 00000000 00000003 [ 27s] [ 11.100568] bec0: 00000003 ee08a000 00000002 00000000 c06b8080 ee08a000 ee08bf00 ee08a000 [ 27s] [ 11.101635] bee0: c06b8080 00000000 c06ef580 ee08bf00 c0034d24 c0034e24 20000113 ffffffff [ 27s] [ 11.102865] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 27s] [ 11.103864] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 27s] [ 11.104808] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 27s] [ 11.105827] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 27s] [ 11.106913] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 27s] [ 11.107890] Exception stack(0xee08bf88 to 0xee08bfd0) [ 27s] [ 11.108554] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 27s] [ 11.109762] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 27s] [ 11.110983] bfc0: c0019ed4 c0019ed8 60000013 ffffffff [ 27s] [ 11.121789] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 27s] [ 11.122792] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 27s] [ 11.123875] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 29s] [ 11.124795] Rebooting in 1 seconds..### VM INTERACTION END ### [ 29s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 29s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 29s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:12:02 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:12:02 +0000 Subject: Build failure of network:osmocom:latest/libosmo-netif in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10da6c9a762_a94d30f7c34856d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmo-netif/Debian_9.0/armv7l Package network:osmocom:latest/libosmo-netif failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libosmo-netif Last lines of build log: [ 23s] [ 10.968075] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 23s] [ 10.984654] CPU2: stopping [ 23s] [ 10.985067] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 23s] [ 10.986051] Hardware name: Generic DT based system [ 23s] [ 10.986783] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 23s] [ 10.987934] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 23s] [ 10.989015] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 23s] [ 10.990124] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 23s] [ 10.991121] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 23s] [ 10.992093] Exception stack(0xee089eb8 to 0xee089f00) [ 23s] [ 10.992758] 9ea0: 00000000 00000002 [ 23s] [ 10.993869] 9ec0: 00000002 ee088000 00000282 00000000 c06b8080 ee088000 ee089f00 ee088000 [ 23s] [ 10.995066] 9ee0: c06b8080 00000000 c06ef580 ee089f00 c0034d24 c0034e24 200b0113 ffffffff [ 23s] [ 10.996201] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 23s] [ 10.997205] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 23s] [ 10.998305] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 23s] [ 10.999511] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 23s] [ 11.000835] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 23s] [ 11.002083] Exception stack(0xee089f88 to 0xee089fd0) [ 23s] [ 11.002894] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 23s] [ 11.004190] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 23s] [ 11.005556] 9fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 23s] [ 11.024757] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 23s] [ 11.025863] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 23s] [ 11.027108] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 11.028896] Rebooting in 1 seconds..### VM INTERACTION END ### [ 25s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 25s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 25s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:12:02 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:12:02 +0000 Subject: Build failure of network:osmocom:latest/osmo-ggsn in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10da6d3231c_a94d30f7c348576b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-ggsn/Debian_9.0/armv7l Package network:osmocom:latest/osmo-ggsn failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-ggsn Last lines of build log: [ 24s] [ 11.081411] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 24s] [ 11.084072] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 24s] [ 11.086857] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 24s] [ 11.089615] Exception stack(0xee089f88 to 0xee089fd0) [ 24s] [ 11.091486] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 24s] [ 11.094469] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 24s] [ 11.097526] 9fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 24s] [ 11.099528] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 24s] [ 11.109811] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 24s] [ 11.112956] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 24s] [ 11.121654] CPU1: stopping [ 24s] [ 11.122148] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 24s] [ 11.123225] Hardware name: Generic DT based system [ 24s] [ 11.124014] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 24s] [ 11.125264] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 24s] [ 11.126432] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 24s] [ 11.127583] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 24s] [ 11.128594] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 24s] [ 11.129590] Exception stack(0xee085f88 to 0xee085fd0) [ 24s] [ 11.130270] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 24s] [ 11.156773] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 24s] [ 11.158128] 5fc0: c0019ed4 c0019ed8 60000013 ffffffff [ 24s] [ 11.159095] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 24s] [ 11.160300] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 24s] [ 11.161636] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 11.177244] Rebooting in 1 seconds..### VM INTERACTION END ### [ 26s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 26s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 26s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:12:53 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:12:53 +0000 Subject: Build failure of network:osmocom:latest/osmo-bts in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10daaba632f_a94d30f7c348612a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bts/Debian_9.0/armv7l Package network:osmocom:latest/osmo-bts failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-bts Last lines of build log: [ 22s] [ 10.888911] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 22s] [ 10.890096] CPU3: stopping [ 22s] [ 10.890566] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 22s] [ 10.891626] Hardware name: Generic DT based system [ 22s] [ 10.892415] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 22s] [ 10.893667] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 22s] [ 10.894872] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 22s] [ 10.896078] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 22s] [ 10.897165] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 22s] [ 10.898304] Exception stack(0xee08beb8 to 0xee08bf00) [ 22s] [ 10.899132] bea0: 00000000 00000003 [ 22s] [ 10.900459] bec0: 00000003 ee08a000 00000202 00000000 00000000 00000001 ee005000 ee08a000 [ 22s] [ 10.901789] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200f0113 ffffffff [ 22s] [ 10.903117] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 22s] [ 10.904262] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 22s] [ 10.905445] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 22s] [ 10.906640] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 22s] [ 10.907859] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 22s] [ 10.908941] Exception stack(0xee08bf88 to 0xee08bfd0) [ 22s] [ 10.909676] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 22s] [ 10.910960] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 22s] [ 10.912307] bfc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 22s] [ 10.913148] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 22s] [ 10.914394] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 22s] [ 10.915770] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 23s] [ 10.916937] Rebooting in 1 seconds..### VM INTERACTION END ### [ 23s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 23s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 23s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:37:45 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:37:45 +0000 Subject: Build failure of network:osmocom:latest/libasn1c in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10e084891a4_a94d30f7c3487589@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libasn1c/Debian_9.0/armv7l Package network:osmocom:latest/libasn1c failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libasn1c Last lines of build log: [ 23s] [ 11.066569] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 23s] [ 11.074691] CPU3: stopping [ 23s] [ 11.076224] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 23s] [ 11.079153] Hardware name: Generic DT based system [ 23s] [ 11.081959] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 23s] [ 11.085268] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 23s] [ 11.088564] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 23s] [ 11.092232] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 23s] [ 11.095554] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 23s] [ 11.098951] Exception stack(0xee08beb8 to 0xee08bf00) [ 23s] [ 11.101507] bea0: 00000000 00000003 [ 23s] [ 11.104964] bec0: 00000003 ee08a000 00000002 00000000 00000000 00000001 ee005000 ee08a000 [ 23s] [ 11.109173] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200b0113 ffffffff [ 23s] [ 11.112802] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 23s] [ 11.116321] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 23s] [ 11.119822] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 23s] [ 11.123868] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 23s] [ 11.127263] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 23s] [ 11.130599] Exception stack(0xee08bf88 to 0xee08bfd0) [ 23s] [ 11.132956] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 23s] [ 11.136884] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 23s] [ 11.140390] bfc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 23s] [ 11.142926] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 23s] [ 11.146160] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 23s] [ 11.149847] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 24s] [ 11.153727] Rebooting in 1 seconds..### VM INTERACTION END ### [ 24s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 24s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 24s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:38:36 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:38:36 +0000 Subject: Build failure of network:osmocom:latest/osmo-iuh in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10e0a86e1de_a94d30f7c348788f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-iuh/Debian_9.0/armv7l Package network:osmocom:latest/osmo-iuh failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-iuh Last lines of build log: [ 26s] [ 11.091420] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 11.093531] CPU3: stopping [ 26s] [ 11.094026] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 26s] [ 11.095029] Hardware name: Generic DT based system [ 26s] [ 11.095793] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 26s] [ 11.096978] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 26s] [ 11.098060] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 26s] [ 11.100802] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 26s] [ 11.103413] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 11.104661] Exception stack(0xee08beb8 to 0xee08bf00) [ 26s] [ 11.107141] bea0: 00000000 00000003 [ 26s] [ 11.109064] bec0: 00000003 ee08a000 00000002 00000000 c06b8080 ee08a000 ee08bf00 ee08a000 [ 26s] [ 11.111950] bee0: c06b8080 00000000 c06ef580 ee08bf00 c0034d24 c0034e24 20070113 ffffffff [ 26s] [ 11.115007] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 26s] [ 11.116857] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 26s] [ 11.118648] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 26s] [ 11.121672] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 26s] [ 11.123641] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 26s] [ 11.126316] Exception stack(0xee08bf88 to 0xee08bfd0) [ 26s] [ 11.127796] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 26s] [ 11.130616] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 26s] [ 11.132535] bfc0: c0019ed4 c0019ed8 60070013 ffffffff [ 27s] [ 11.134410] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 27s] [ 11.136934] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 27s] [ 11.138867] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 28s] [ 11.142031] Rebooting in 1 seconds..### VM INTERACTION END ### [ 28s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 28s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 28s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 01:39:11 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 01:39:11 +0000 Subject: Build failure of network:osmocom:latest/osmo-msc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a10e0c417aa7_a94d30f7c34879bd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-msc/Debian_9.0/armv7l Package network:osmocom:latest/osmo-msc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-msc Last lines of build log: [ 25s] [ 11.003958] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 11.005086] CPU1: stopping [ 25s] [ 11.005520] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 25s] [ 11.006497] Hardware name: Generic DT based system [ 25s] [ 11.007215] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 25s] [ 11.008361] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 25s] [ 11.009426] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 25s] [ 11.010517] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 25s] [ 11.011630] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.012748] Exception stack(0xee085eb8 to 0xee085f00) [ 25s] [ 11.013497] 5ea0: 00000000 00000001 [ 25s] [ 11.014699] 5ec0: 00000001 ee084000 00000082 00000000 c06b8080 ee084000 ee085f00 ee084000 [ 25s] [ 11.016084] 5ee0: c06b8080 00000000 c06ef580 ee085f00 c0034d24 c0034e24 20070113 ffffffff [ 25s] [ 11.017401] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 25s] [ 11.018515] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 25s] [ 11.019584] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 25s] [ 11.020863] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 25s] [ 11.022237] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.023582] Exception stack(0xee085f88 to 0xee085fd0) [ 25s] [ 11.024418] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 25s] [ 11.025726] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 25s] [ 11.027053] 5fc0: c0019ed4 c0019ed8 60070013 ffffffff [ 25s] [ 11.027885] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 25s] [ 11.029089] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 25s] [ 11.030365] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 11.031412] Rebooting in 1 seconds..### VM INTERACTION END ### [ 26s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 26s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 26s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 03:51:11 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 03:51:11 +0000 Subject: Build failure of network:osmocom:nightly/libasn1c in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a10ffcebff94_a94d30f7c350046@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libasn1c/Debian_9.0/i586 Package network:osmocom:nightly/libasn1c failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libasn1c Last lines of build log: [ 12s] running gawk postinstall script [ 12s] querying package ids... [ 12s] [ 12s] gzip: stdin: not in gzip format [ 12s] gunzip error [ 12s] [1/167] installing autotools-dev-20161112.1 [ 13s] [2/167] installing gcc-6-base-6.3.0-18 [ 13s] [3/167] installing libaudit-common-1:2.6.7-2 [ 13s] [4/167] installing libmagic-mgc-1:5.30-1+deb9u1 [ 13s] [5/167] installing libsemanage-common-2.6-2 [ 13s] [6/167] installing linux-libc-dev-4.9.51-1 [ 13s] [7/167] installing lsb-base-9.20161125 [ 14s] [8/167] installing ncurses-base-6.0+20161126-1+deb9u1 [ 14s] [9/167] installing sensible-utils-0.0.9 [ 14s] [10/167] installing vim-runtime-2:8.0.0197-4+deb9u1 [ 14s] Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime' [ 14s] Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime' [ 15s] [11/167] installing libgcc1-1:6.3.0-18 [ 15s] dpkg: libgcc1:i386: dependency problems, but configuring anyway as you requested: [ 15s] libgcc1:i386 depends on libc6 (>= 2.2.4); however: [ 15s] Package libc6 is not installed. [ 15s] [12/167] installing libc6-2.24-11+deb9u1 [28818s] qemu-system-x86_64: terminating on signal 15 from pid 23051 () [28818s] ### VM INTERACTION END ### [28818s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [28818s] or the build host has a kernel or hardware problem... Job seems to be stuck here, killed. (after 28800 seconds of inactivity) -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Nov 19 04:48:52 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 04:48:52 +0000 Subject: osmo-msc[master]: vlr_gsupc_read_cb: fix use after free of GSUP msgb In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4924 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16fc92dcf84e29fcf34712a2e8b0464ef08425ad Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 04:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 04:50:28 +0000 Subject: osmo-msc[master]: subscr_conn: don't close after conn timeout In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4925/1/src/libmsc/subscr_conn.c File src/libmsc/subscr_conn.c: Line 235: vlr_subscr_conn_timeout(conn->vsub); Maybe return here instead to show that this is done? -- To view, visit https://gerrit.osmocom.org/4925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 19 04:52:04 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 04:52:04 +0000 Subject: osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/4911/1/src/host/layer23/src/mobile/gsm411_sms.c File src/host/layer23/src/mobile/gsm411_sms.c: Line 299: sms_mti, msg_ref, I was dealing with this line. Line 380: rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); > msg_ref is passed in as arg, gets logged above, and then this here is using Well. This is why the next patch is killing msg_ref from the sms structure. But maybe it is better to sqaush them together? -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 19 04:53:40 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 04:53:40 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Patch Set 1: How does this help you? If that is the expected put it into the .ok file? Not following you here. :) -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 12:03:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 19 Nov 2017 12:03:39 +0000 Subject: [PATCH] osmo-iuh[master]: tests: sanitize: clean after tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4916 to look at the new patch set (#2). tests: sanitize: clean after tests Add test_common_cleanup() in test_common.c, call in test-{helpers,hnbap,ranap}.c, so that any memleaks a sanitize build finds are real bugs. Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c --- M src/tests/test-helpers.c M src/tests/test-hnbap.c M src/tests/test-ranap.c M src/tests/test_common.c M src/tests/test_common.h 5 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/16/4916/2 diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 44fd735..33ef2e1 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -211,5 +211,6 @@ test_asn1_helpers(); test_ranap_common(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index ef46070..1e3607b 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -175,6 +175,7 @@ test_asn1_decoding(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c1c7003..05be874 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -197,6 +197,8 @@ talloc_report(talloc_asn1_ctx, stdout); talloc_report(tall_msgb_ctx, stdout); //talloc_report(NULL, stdout); + + test_common_cleanup(); printf("exit\n"); exit(0); } diff --git a/src/tests/test_common.c b/src/tests/test_common.c index c8aafdd..5c33680 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -69,11 +69,13 @@ .num_cat = ARRAY_SIZE(log_cat), }; +static void *msgb_ctx; + int test_common_init(void) { int rc; - msgb_talloc_ctx_init(NULL, 0); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); @@ -85,3 +87,9 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); } + +void test_common_cleanup(void) +{ + talloc_free(msgb_ctx); + talloc_free(talloc_asn1_ctx); +} diff --git a/src/tests/test_common.h b/src/tests/test_common.h index 1af1abd..836d999 100644 --- a/src/tests/test_common.h +++ b/src/tests/test_common.h @@ -1,3 +1,4 @@ #pragma once int test_common_init(void); +void test_common_cleanup(void); -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 19 12:03:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 19 Nov 2017 12:03:40 +0000 Subject: [PATCH] osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... Message-ID: Review at https://gerrit.osmocom.org/4928 ranap_msg_factory: sanitize: memcpy instead of unaligned int copy The sanitize build complains about writing to a uint32_t that is not 4-byte aligned. Instead, write the uint32_t by memcpy. For that, move the common ntohl() to the top and store in a local uint32_t, memcpy() from that in both code paths. Change-Id: Iacdd15421f824dd009448a96355b533dff28258b --- M src/ranap_msg_factory.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/28/4928/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 64d87f9..8e4954a 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -638,6 +638,7 @@ { uint8_t *buf; unsigned int len; + uint32_t ip_h = ntohl(ip); if (use_x213_nsap) { len = 160/8; @@ -645,11 +646,11 @@ buf[0] = 0x35; /* AFI For IANA ICP */ buf[1] = 0x00; /* See A.5.2.1.2.7 of X.213 */ buf[2] = 0x01; - *(uint32_t *)&buf[3] = ntohl(ip); + memcpy(&buf[3], &ip_h, sizeof(ip_h)); } else { len = 4; buf = CALLOC(len, sizeof(uint8_t)); - *(uint32_t *)buf = ntohl(ip); + memcpy(buf, &ip_h, sizeof(ip_h)); } out->buf = buf; out->size = len; -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 19 12:03:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 19 Nov 2017 12:03:40 +0000 Subject: [PATCH] osmo-iuh[master]: cosmetic: ranap_msg_factory: htonl instead of ntohl Message-ID: Review at https://gerrit.osmocom.org/4929 cosmetic: ranap_msg_factory: htonl instead of ntohl In new_transp_layer_addr(), we're composing an outgoing PDU, hence the proper function to call would be htonl(), not ntohl(). Change-Id: I07979252b7d5a92e8ba11fd088ee06f608fef489 --- M src/ranap_msg_factory.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/29/4929/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 8e4954a..4f7fdb7 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -638,7 +638,7 @@ { uint8_t *buf; unsigned int len; - uint32_t ip_h = ntohl(ip); + uint32_t ip_h = htonl(ip); if (use_x213_nsap) { len = 160/8; -- To view, visit https://gerrit.osmocom.org/4929 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07979252b7d5a92e8ba11fd088ee06f608fef489 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 19 14:54:31 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 14:54:31 +0000 Subject: osmo-iuh[master]: cosmetic: ranap_msg_factory: htonl instead of ntohl In-Reply-To: References: Message-ID: Patch Set 1: Can't judge it (uint32_t could already be in network byte order). Where is the IP coming from and can that info be put into the commit message? In the kernel there are defines like __be (out of the top of my head) to indicate this. Maybe we can do typedef uint32_t no_uint32_t? -- To view, visit https://gerrit.osmocom.org/4929 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07979252b7d5a92e8ba11fd088ee06f608fef489 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 14:56:26 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 14:56:26 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4928/1/src/ranap_msg_factory.c File src/ranap_msg_factory.c: Line 651: len = 4; sizeof(ip_h)? -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 19 14:58:00 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 14:58:00 +0000 Subject: osmo-iuh[master]: tests: sanitize: clean after tests In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 Due the hierarchical nature of talloc we would silence all msgb's leaks? So the common code should print the leak count? -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:00:37 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:00:37 +0000 Subject: libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4878/2/src/stream.c File src/stream.c: Line 437: talloc_free(msg); msgb_free.. or we deprecate it.. (if you look at glib when they introduced the slice allocator/pooling they faced various issues...).. and we have such "flush" routines all over the place? Maybe put one into libosmocore? -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:04:01 +0000 Subject: osmo-msc[master]: sub_pres_vlr_fsm_start: fix heap use after free In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 It does look like the easiest way. So the general rule of thumb is that after an event dispatch the object could be invalidated? Separate construction from event transition? -- To view, visit https://gerrit.osmocom.org/4923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:04:56 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:04:56 +0000 Subject: osmo-msc[master]: vlr_subscr_conn_timeout(): don't fire events to discarded fi In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:05:24 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:05:24 +0000 Subject: osmo-msc[master]: rate_ctr: don't use . as separator In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4922 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:06:39 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:06:39 +0000 Subject: osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: talloc endp from cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 so so. As a "policy" we didn't really want to rely on talloc hierarchy (or it's destructor support). So here we "free" the endpoint.. but what about the socket fd? -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:07:09 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:07:09 +0000 Subject: osmo-mgw[master]: mgcp_test: sanitize: free msgb_ctx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53373023a6c3f490d6d6cb1c283db5dfb915882c Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:07:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:07:43 +0000 Subject: osmo-mgw[master]: legacy_mgcp: mgcp_test: sanitize: free msgb_ctx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4917 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84e0ac7f0928f04ffddd7da18200466841589c25 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:08:11 +0000 Subject: osmo-mgw[master]: mgcp_test: test_packet_error_detection: sanitize: free all c... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4918 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6823653d5efcebaed40471123d21a9321cf633fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:20:00 +0000 Subject: [ABANDON] osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP: First invocation of a primitive and callback into lua.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4772 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:49 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:49 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4736 to look at the new patch set (#4). mobile: Add LUA as debug category to the applications Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/main.c 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/4736/4 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index fb1229e..bf6e6aa 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -24,6 +24,7 @@ DGPS, DMOB, DPRIM, + DLUA, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 7b3ea26..ed79991 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -139,6 +139,12 @@ .color = "\033[1;32m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DLUA] = { + .name = "DLUA", + .description = "LUA", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 227cd10..5a28be8 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM:DLUA"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:49 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:49 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4737 to look at the new patch set (#4). mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 228 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/4 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 7a935f9..8f5cdc3 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -85,6 +85,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 83c07d6..af4ac23 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -5,6 +5,8 @@ extern char *config_dir; +struct vty; + int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); int l23_app_exit(void); @@ -18,5 +20,8 @@ void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct osmocom_ms *ms); + #endif diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 47870e5..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..b3b9c99 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *L) +{ + lua_getglobal(L, "_G"); + luaL_setfuncs(L, global_runtime, 0); + lua_pop(L, 1); +} + +static void add_runtime(lua_State *L, struct osmocom_ms *ms) +{ + add_globals(L); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..61466f7 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 2b51837..6d50c6b 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -143,6 +144,8 @@ talloc_free(abbrev); } + script_lua_close(ms); + return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index a77600e..a1c62b8 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1531,6 +1531,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2755,6 +2757,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2946,6 +2972,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:49 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:49 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4771 to look at the new patch set (#3). mobile: Begin with a primitive interface on top of the code We want the script interface to interface through a primitive interface. This will allow to move it to a different thread or a process in the future. The script interface will just use the primitives. It is not clear how "sap" will be used here. I am keeping it at 0 right now. The first primitive is starting a timer with a request and then getting an indication as a response. Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/main.c A src/host/layer23/src/mobile/primitives.c 7 files changed, 170 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/4771/3 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index efe493d..fb1229e 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -23,6 +23,7 @@ DSIM, DGPS, DMOB, + DPRIM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index b58b952..12cf24b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h + transaction.h vty.h mncc_sock.h primitives.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h new file mode 100644 index 0000000..6a79eaa --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -0,0 +1,38 @@ +#pragma once + +#include + +/** + * Mobile Script<->App primitives. Application script will receive + * indications and will send primitives to the lower layers. Here + * we will convert from internal state/events to the primitives. In + * the future the indications might be generated at lower levels + * directly. + */ +enum mobile_prim { + PRIM_MOB_TIMER, + PRIM_MOB_TIMER_CANCEL, +}; + +struct mobile_prim_intf { + struct osmocom_ms *ms; + void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr *hdr); + + /* Internal state */ + struct llist_head timers; +}; + +/** + * Primitive to create timers and get indication once they have + * expired. Currently there is no way to cancel timers. + */ +struct mobile_timer_prim { + struct osmo_prim_hdr hdr; /*!< Primitive base class */ + uint64_t timer_id; /*!< Unique Id identifying the timer */ + int seconds; /*!< Seconds the timer should fire in */ +}; + + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); +void mobile_prim_intf_free(struct mobile_prim_intf *intf); diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 3b761ef..7b3ea26 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -133,6 +133,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DPRIM] = { + .name = "DPRIM", + .description = "PRIM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..90468c0 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -5,7 +5,7 @@ noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ gsm48_rr.c mnccms.c settings.c subscriber.c support.c \ - transaction.c vty_interface.c voice.c mncc_sock.c + transaction.c vty_interface.c voice.c mncc_sock.c primitives.c bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 8921bd8..227cd10 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c new file mode 100644 index 0000000..a5fb58d --- /dev/null +++ b/src/host/layer23/src/mobile/primitives.c @@ -0,0 +1,122 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include +#include + +struct timer_closure { + struct llist_head entry; + struct mobile_prim_intf *intf; + struct osmo_timer_list timer; + uint64_t id; +}; + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms) +{ + struct mobile_prim_intf *intf; + + intf = talloc_zero(ms, struct mobile_prim_intf); + intf->ms = ms; + + INIT_LLIST_HEAD(&intf->timers); + return intf; +} + +void mobile_prim_intf_free(struct mobile_prim_intf *intf) +{ + struct timer_closure *timer, *tmp; + + llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) { + osmo_timer_del(&timer->timer); + llist_del(&timer->entry); + talloc_free(timer); + } + talloc_free(intf); +} + +static void timer_expired_cb(void *_closure) +{ + struct mobile_timer_prim prim = { 0, }; + struct timer_closure *closure = _closure; + struct mobile_prim_intf *intf; + + intf = closure->intf; + prim.timer_id = closure->id; + llist_del(&closure->entry); + talloc_free(closure); + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_INDICATION, NULL); + intf->indication(intf, &prim.hdr); +} + +static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_closure *closure; + + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", prim->timer_id); + + closure = talloc_zero(intf, struct timer_closure); + closure->intf = intf; + closure->id = prim->timer_id; + closure->timer.cb = timer_expired_cb; + closure->timer.data = closure; + llist_add_tail(&closure->entry, &intf->timers); + osmo_timer_schedule(&closure->timer, prim->seconds, 0); + return 0; +} + +static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) +{ + struct timer_closure *closure; + + + llist_for_each_entry(closure, &intf->timers, entry) { + if (closure->id != prim->timer_id) + continue; + + LOGP(DPRIM, LOGL_DEBUG, + "Canceling timer with reference: %llu\n", prim->timer_id); + osmo_timer_del(&closure->timer); + llist_del(&closure->entry); + talloc_free(closure); + return 0; + } + return -1; +} + +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr) +{ + switch (OSMO_PRIM_HDR(hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_REQUEST): + return create_timer(intf, (struct mobile_timer_prim *)hdr); + break; + case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): + return cancel_timer(intf, (struct mobile_timer_prim *)hdr); + break; + default: + LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(hdr)); + break; + } + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:49 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:49 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4911 to look at the new patch set (#2). mobile: Avoid msg_ref going out of sync It seemed like msg_ref could go out of sync. In some places we are using sms->msg_ref in other cases we pass it as parameter (e.g. when sending the SMS) or we get it out of the gsm411_rp_hdr. Instead of hardcoding 42 for all messages make it configurable and pass the parameter from the caller. Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/4911/2 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d14e6db..0d0578a 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -11,7 +11,6 @@ uint8_t ud_hdr_ind; uint8_t protocol_id; uint8_t data_coding_scheme; - uint8_t msg_ref; char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes * BCD == 20 bytes string */ time_t time; @@ -28,6 +27,6 @@ struct gsm_sms *sms_from_text(const char *receiver, int dcs, const char *text); int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text); + const char *text, uint8_t msg_ref); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 1b10262..73fad84 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -221,7 +221,7 @@ /* process an incoming TPDU (called from RP-DATA) * return value > 0: RP CAUSE for ERROR; < 0: silent error; 0 = success */ -static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg) +static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg, uint8_t msg_ref) { uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; @@ -296,7 +296,7 @@ LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, " "UserDataLength: 0x%02x, UserData: \"%s\"\n", - sms_mti, gsms->msg_ref, + sms_mti, msg_ref, gsms->protocol_id, gsms->data_coding_scheme, gsms->address, gsms->user_data_len, sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text : @@ -377,7 +377,7 @@ LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, osmo_hexdump(msg->l4h, msg->tail-msg->l4h)); - rc = gsm340_rx_tpdu(trans, msg); + rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); if (rc == 0) return gsm411_send_rp_ack(trans, rph->msg_ref); else if (rc > 0) @@ -528,7 +528,7 @@ /* generate a msgb containing a TPDU derived from struct gsm_sms, * returns total size of TPDU */ -static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms) +static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t msg_ref) { uint8_t *smsp; uint8_t da[12]; /* max len per 03.40 */ @@ -559,7 +559,7 @@ /* generate message ref */ smsp = msgb_put(msg, 1); - *smsp = sms->msg_ref; + *smsp = msg_ref; /* generate destination address */ if (sms->address[0] == '+') @@ -620,12 +620,11 @@ /* Take a SMS in gsm_sms structure and send it. */ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, - struct gsm_sms *sms) + struct gsm_sms *sms, uint8_t msg_ref) { struct msgb *msg; struct gsm_trans *trans; uint8_t *data, *rp_ud_len; - uint8_t msg_ref = 42; int rc; int transaction_id; uint8_t sca[11]; /* max len per 03.40 */ @@ -689,7 +688,7 @@ rp_ud_len = (uint8_t *)msgb_put(msg, 1); /* generate the 03.40 TPDU */ - rc = gsm340_gen_tpdu(msg, sms); + rc = gsm340_gen_tpdu(msg, sms, msg_ref); if (rc < 0) goto error; *rp_ud_len = rc; @@ -703,14 +702,14 @@ /* create and send SMS */ int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text) + const char *text, uint8_t msg_ref) { struct gsm_sms *sms = sms_from_text(number, 0, text); if (!sms) return -ENOMEM; - return gsm411_tx_sms_submit(ms, sms_sca, sms); + return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref); } /* diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 285a956..a77600e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -947,7 +947,7 @@ if (vty_check_number(vty, number)) return CMD_WARNING; - sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2)); + sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2), 42); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:50 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Change started and shutdown state through function Message-ID: Review at https://gerrit.osmocom.org/4930 mobile: Change started and shutdown state through function Instead of changing the field all over the place, do the state change in a function. This will allow us to emit a notification when things change. It is similar to the lchan_state. Change-Id: I6a0591bb2785232681b23e41368323f16d3c960c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c 2 files changed, 21 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/30/4930/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 6162a38..83c07d6 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -1,6 +1,8 @@ #ifndef APP_MOBILE_H #define APP_MOBILE_H +#include + extern char *config_dir; int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), @@ -13,5 +15,8 @@ int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +void mobile_set_started(struct osmocom_ms *ms, bool state); +void mobile_set_shutdown(struct osmocom_ms *ms, int state); + #endif diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index d28af00..c5c84e6 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -131,7 +131,7 @@ gsm322_cs_sendmsg(ms, nmsg); } - ms->started = true; + mobile_set_started(ms, true); } return 0; } @@ -148,7 +148,7 @@ if (!force && ms->started) { struct msgb *nmsg; - ms->shutdown = MS_SHUTDOWN_IMSI_DETACH; + mobile_set_shutdown(ms, MS_SHUTDOWN_IMSI_DETACH); nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_IMSI_DETACH); if (!nmsg) return -ENOMEM; @@ -168,10 +168,10 @@ lapdm_channel_exit(&ms->lapdm_channel); if (ms->started) { - ms->shutdown = MS_SHUTDOWN_WAIT_RESET; /* being down, wait for reset */ + mobile_set_shutdown(ms, MS_SHUTDOWN_WAIT_RESET); /* being down, wait for reset */ l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); } else { - ms->shutdown = MS_SHUTDOWN_COMPL; /* being down */ + mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); /* being down */ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); @@ -230,8 +230,8 @@ gsm_random_imei(&ms->settings); - ms->shutdown = MS_SHUTDOWN_NONE; - ms->started = false; + mobile_set_shutdown(ms, MS_SHUTDOWN_NONE); + mobile_set_started(ms, false); if (!strcmp(ms->settings.imei, "000000000000000")) { LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", @@ -268,7 +268,7 @@ gsm_support_init(ms); gsm_settings_init(ms); - ms->shutdown = MS_SHUTDOWN_COMPL; + mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); if (mncc_recv_app) { mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); @@ -444,3 +444,12 @@ return 0; } +void mobile_set_started(struct osmocom_ms *ms, bool state) +{ + ms->started = state; +} + +void mobile_set_shutdown(struct osmocom_ms *ms, int state) +{ + ms->shutdown = state; +} -- To view, visit https://gerrit.osmocom.org/4930 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a0591bb2785232681b23e41368323f16d3c960c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:50 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Directly inform the primitive layer about an event Message-ID: Review at https://gerrit.osmocom.org/4931 mobile: Directly inform the primitive layer about an event Forward started/shutdown changes to the primitive layer which will turn them into indications. The other option might be to use the signals but it seems primitives are a superset of the signals. The notify will be done per MS and then the right primitive instance will be searched and the indication be sent. The approach will be applied to other systems as well. The signal framework might be seen as a subset of the primitives A signal mostly being a different form of an indication. Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 64 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/31/4931/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 6a79eaa..eda0e83 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -12,6 +12,8 @@ enum mobile_prim { PRIM_MOB_TIMER, PRIM_MOB_TIMER_CANCEL, + PRIM_MOB_STARTED, + PRIM_MOB_SHUTDOWN, }; struct mobile_prim_intf { @@ -19,6 +21,7 @@ void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr *hdr); /* Internal state */ + struct llist_head entry; struct llist_head timers; }; @@ -32,7 +35,27 @@ int seconds; /*!< Seconds the timer should fire in */ }; +/** + * Primitive to indicate starting of the mobile. + */ +struct mobile_started_prim { + struct osmo_prim_hdr hdr; + bool started; +}; + +/** + * Primitive to indicate shutdown of the mobile. It will go through + * various states. + */ +struct mobile_shutdown_prim { + struct osmo_prim_hdr hdr; + int old_state; + int new_state; +}; struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); void mobile_prim_intf_free(struct mobile_prim_intf *intf); + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index c5c84e6..46cf171 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -447,9 +448,14 @@ void mobile_set_started(struct osmocom_ms *ms, bool state) { ms->started = state; + + mobile_prim_ntfy_started(ms, state); } void mobile_set_shutdown(struct osmocom_ms *ms, int state) { + int old_state = ms->shutdown; ms->shutdown = state; + + mobile_prim_ntfy_shutdown(ms, old_state, state); } diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index a5fb58d..3cc3133 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -24,6 +24,8 @@ #include #include +static LLIST_HEAD(s_prims); + struct timer_closure { struct llist_head entry; struct mobile_prim_intf *intf; @@ -39,6 +41,7 @@ intf->ms = ms; INIT_LLIST_HEAD(&intf->timers); + llist_add_tail(&intf->entry, &s_prims); return intf; } @@ -51,6 +54,7 @@ llist_del(&timer->entry); talloc_free(timer); } + llist_del(&intf->entry); talloc_free(intf); } @@ -85,6 +89,37 @@ return 0; } +static void dispatch(struct osmocom_ms *ms, struct osmo_prim_hdr *hdr) +{ + struct mobile_prim_intf *intf, *tmp; + + llist_for_each_entry_safe(intf, tmp, &s_prims, entry) { + if (intf->ms == ms) + intf->indication(intf, hdr); + } +} + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started) +{ + struct mobile_started_prim prim = { 0, }; + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_STARTED, PRIM_OP_INDICATION, NULL); + prim.started = started; + + dispatch(ms, &prim.hdr); +} + +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state) +{ + struct mobile_shutdown_prim prim = { 0, }; + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION, NULL); + prim.old_state = old_state; + prim.new_state = new_state; + + dispatch(ms, &prim.hdr); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4931 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sun Nov 19 15:23:51 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 19 Nov 2017 15:23:51 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Inform the primitive layer about status and new sms Message-ID: Review at https://gerrit.osmocom.org/4932 mobile: Inform the primitive layer about status and new sms Inform the layer about new SMS and inform about the cause of it. In both cases pass the SMS. Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/32/4932/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index eda0e83..9a66994 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -14,6 +14,7 @@ PRIM_MOB_TIMER_CANCEL, PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, + PRIM_MOB_SMS, }; struct mobile_prim_intf { @@ -53,9 +54,22 @@ int new_state; }; +/** + * SMS related configs. + */ +struct mobile_sms_prim { + struct osmo_prim_hdr hdr; + struct gsm_sms *sms; + + bool cause_valid; + int cause; +}; + struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr *hdr); void mobile_prim_intf_free(struct mobile_prim_intf *intf); void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 73fad84..21b416a 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -40,6 +40,7 @@ #include #include #include +#include #define UM_SAPI_SMS 3 @@ -129,6 +130,7 @@ vty_notify(ms, "SMS to %s failed: %s\n", sms->address, get_value_string(gsm411_rp_cause_strs, cause)); + mobile_prim_ntfy_sms_status(ms, sms, cause); return 0; } /* @@ -186,6 +188,8 @@ char vty_text[sizeof(gsms->text)], *p; FILE *fp; + mobile_prim_ntfy_sms_new(ms, gsms); + /* remove linefeeds and show at VTY */ strcpy(vty_text, gsms->text); for (p = vty_text; *p; p++) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index 3cc3133..f7c3d37 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -120,6 +120,28 @@ dispatch(ms, &prim.hdr); } +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms) +{ + struct mobile_sms_prim prim = { 0, }; + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_SMS, PRIM_OP_INDICATION, NULL); + prim.sms = sms; + + dispatch(ms, &prim.hdr); +} + +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause) +{ + struct mobile_sms_prim prim = { 0, }; + + osmo_prim_init(&prim.hdr, 0, PRIM_MOB_SMS, PRIM_OP_INDICATION, NULL); + prim.sms = sms; + prim.cause_valid = true; + prim.cause = cause; + + dispatch(ms, &prim.hdr); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_prim *prim) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4932 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From admin at opensuse.org Sun Nov 19 19:58:38 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 19:58:38 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-abis in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a11e27b20100_a94d30f7c36632b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/Debian_9.0/armv7l Package network:osmocom:nightly/libosmo-abis failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmo-abis Last lines of build log: [ 39s] [ 11.563418] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 39s] [ 11.564750] CPU3: stopping [ 39s] [ 11.565212] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 39s] [ 11.566380] Hardware name: Generic DT based system [ 39s] [ 11.567117] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 39s] [ 11.568149] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 39s] [ 11.569119] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 39s] [ 11.570102] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 39s] [ 11.571128] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 39s] [ 11.572125] Exception stack(0xee08beb8 to 0xee08bf00) [ 39s] [ 11.572797] bea0: 00000000 00000003 [ 39s] [ 11.575669] bec0: 00000003 ee08a000 00000202 00000000 c06b8080 ee08a000 ee08bf00 ee08a000 [ 39s] [ 11.581695] bee0: c06b8080 00000000 c06ef580 ee08bf00 c0034d24 c0034e24 200b0113 ffffffff [ 39s] [ 11.583263] [] (__irq_svc) from [] (__do_softirq+0x118/0x250) [ 39s] [ 11.584493] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 39s] [ 11.586295] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 39s] [ 11.587426] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 39s] [ 11.594769] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 39s] [ 11.596187] Exception stack(0xee08bf88 to 0xee08bfd0) [ 39s] [ 11.597081] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 39s] [ 11.598436] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 39s] [ 11.601370] bfc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 39s] [ 11.605917] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 39s] [ 11.606913] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 39s] [ 11.607999] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 40s] [ 11.620293] Rebooting in 1 seconds..### VM INTERACTION END ### [ 40s] /var/run/obs/worker/2/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 40s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 40s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 20:01:29 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 20:01:29 +0000 Subject: Build failure of network:osmocom:nightly/libasn1c in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a11e332c81d7_a94d30f7c3664027@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libasn1c/Debian_9.0/armv7l Package network:osmocom:nightly/libasn1c failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libasn1c Last lines of build log: [ 35s] [ 11.650476] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 35s] [ 11.651933] CPU1: stopping [ 35s] [ 11.652655] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 35s] [ 11.654211] Hardware name: Generic DT based system [ 35s] [ 11.655455] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 35s] [ 11.657469] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 35s] [ 11.659795] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 35s] [ 11.661674] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 35s] [ 11.663800] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 35s] [ 11.667200] Exception stack(0xee085eb8 to 0xee085f00) [ 35s] [ 11.669316] 5ea0: 00000000 00000001 [ 35s] [ 11.673217] 5ec0: 00000001 ee084000 00000002 00000000 00000000 00000001 ee005000 ee084000 [ 35s] [ 11.677332] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 200b0113 ffffffff [ 35s] [ 11.698269] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 35s] [ 11.700642] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 35s] [ 11.702583] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 35s] [ 11.704581] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 35s] [ 11.706674] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 35s] [ 11.709087] Exception stack(0xee085f88 to 0xee085fd0) [ 35s] [ 11.710446] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 35s] [ 11.712495] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 35s] [ 11.714518] 5fc0: c0019ed4 c0019ed8 600b0013 ffffffff [ 35s] [ 11.715843] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 35s] [ 11.717678] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 35s] [ 11.719619] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 37s] [ 11.721233] Rebooting in 1 seconds..### VM INTERACTION END ### [ 37s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 37s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 37s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 20:09:46 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 20:09:46 +0000 Subject: Build failure of network:osmocom:nightly/osmo-ggsn in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a11e50eeec9f_a94d30f7c3665186@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-ggsn/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-ggsn failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-ggsn Last lines of build log: [ 25s] [ 10.940325] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 10.941302] CPU3: stopping [ 25s] [ 10.941755] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 25s] [ 10.942820] Hardware name: Generic DT based system [ 25s] [ 10.943561] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 25s] [ 10.944710] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 25s] [ 10.945702] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 25s] [ 10.946769] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 25s] [ 10.949070] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 10.950313] Exception stack(0xee08beb8 to 0xee08bf00) [ 25s] [ 10.951181] bea0: 00000000 00000003 [ 25s] [ 10.952582] bec0: 00000003 ee08a000 00000202 00000000 00000000 00000001 ee005000 ee08a000 [ 25s] [ 10.954037] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 20070113 ffffffff [ 25s] [ 10.955347] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 25s] [ 10.958685] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 25s] [ 10.959861] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 25s] [ 10.961118] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 25s] [ 10.962413] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 10.963593] Exception stack(0xee08bf88 to 0xee08bfd0) [ 25s] [ 10.964501] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 25s] [ 10.965897] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 25s] [ 10.967293] bfc0: c0019ed4 c0019ed8 60070013 ffffffff [ 25s] [ 10.968201] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 25s] [ 10.969448] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 25s] [ 10.970896] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 26s] [ 10.972150] Rebooting in 1 seconds..### VM INTERACTION END ### [ 26s] /var/run/obs/worker/5/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 26s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 26s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 19 21:28:38 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 Nov 2017 21:28:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a11f793ad098_a94d30f7c36823fc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 25s] [ 11.165670] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 11.169498] CPU3: stopping [ 25s] [ 11.170024] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 25s] [ 11.171006] Hardware name: Generic DT based system [ 25s] [ 11.171702] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 25s] [ 11.172805] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 25s] [ 11.173951] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 25s] [ 11.175341] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 25s] [ 11.176527] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.177656] Exception stack(0xee08beb8 to 0xee08bf00) [ 25s] [ 11.178417] bea0: 00000000 00000003 [ 25s] [ 11.179647] bec0: 00000003 ee08a000 00000002 00000000 00000000 00000001 ee005000 ee08a000 [ 25s] [ 11.181082] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200f0113 ffffffff [ 25s] [ 11.182472] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 25s] [ 11.183801] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 25s] [ 11.195352] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 25s] [ 11.196584] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 25s] [ 11.197982] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.199232] Exception stack(0xee08bf88 to 0xee08bfd0) [ 25s] [ 11.200114] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 25s] [ 11.201479] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 25s] [ 11.202843] bfc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 25s] [ 11.203697] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 25s] [ 11.215139] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 25s] [ 11.216531] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 27s] [ 11.224535] Rebooting in 1 seconds..### VM INTERACTION END ### [ 27s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 27s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 27s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 00:57:16 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 00:57:16 +0000 Subject: Build failure of network:osmocom:latest/libosmo-abis in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a12286e4116a_a94d30f7c37057dd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmo-abis/Debian_9.0/armv7l Package network:osmocom:latest/libosmo-abis failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libosmo-abis Last lines of build log: [ 31s] [ 11.268254] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 31s] [ 11.287067] CPU3: stopping [ 31s] [ 11.287582] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.19.2-0-guest #1 [ 31s] [ 11.288652] Hardware name: Generic DT based system [ 31s] [ 11.289466] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 31s] [ 11.291001] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 31s] [ 11.292165] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 31s] [ 11.293269] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 31s] [ 11.294410] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 31s] [ 11.295509] Exception stack(0xee08beb8 to 0xee08bf00) [ 31s] [ 11.296299] bea0: 00000000 00000003 [ 31s] [ 11.297666] bec0: 00000003 ee08a000 00000082 00000000 00000000 00000001 ee005000 ee08a000 [ 31s] [ 11.299137] bee0: c06b3d50 00000000 c06ef580 ee08bf00 c0034d24 c0034dc0 200d0113 ffffffff [ 31s] [ 11.300606] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 31s] [ 11.301966] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 31s] [ 11.303286] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 31s] [ 11.304698] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 31s] [ 11.306203] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 31s] [ 11.307622] Exception stack(0xee08bf88 to 0xee08bfd0) [ 31s] [ 11.308538] bf80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 31s] [ 11.310048] bfa0: 00000000 00000000 ee08bfd8 ee08a000 c06b3d50 00000000 00000000 ee08bfd0 [ 31s] [ 11.311522] bfc0: c0019ed4 c0019ed8 600d0013 ffffffff [ 31s] [ 11.312478] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 31s] [ 11.313855] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 31s] [ 11.315308] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 32s] [ 11.316505] Rebooting in 1 seconds..### VM INTERACTION END ### [ 32s] /var/run/obs/worker/1/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 32s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 32s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 00:57:33 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 00:57:33 +0000 Subject: Build failure of network:osmocom:latest/libsmpp34 in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a12288ccc9c5_a94d30f7c3705820@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libsmpp34/Debian_9.0/armv7l Package network:osmocom:latest/libsmpp34 failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest libsmpp34 Last lines of build log: [ 25s] [ 11.260022] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 25s] [ 11.263426] CPU2: stopping [ 25s] [ 11.263858] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.19.2-0-guest #1 [ 25s] [ 11.264819] Hardware name: Generic DT based system [ 25s] [ 11.265497] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 25s] [ 11.266570] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 25s] [ 11.267595] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 25s] [ 11.268565] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 25s] [ 11.277875] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.279084] Exception stack(0xee089eb8 to 0xee089f00) [ 25s] [ 11.279922] 9ea0: 00000000 00000002 [ 25s] [ 11.281200] 9ec0: 00000002 ee088000 00000082 00000000 00000000 00000001 ee005000 ee088000 [ 25s] [ 11.282466] 9ee0: c06b3d50 00000000 c06ef580 ee089f00 c0034d24 c0034dc0 200f0113 ffffffff [ 25s] [ 11.283812] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 25s] [ 11.286913] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 25s] [ 11.287905] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 25s] [ 11.302697] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 25s] [ 11.303864] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 25s] [ 11.304994] Exception stack(0xee089f88 to 0xee089fd0) [ 25s] [ 11.305772] 9f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 25s] [ 11.307027] 9fa0: 00000000 00000000 ee089fd8 ee088000 c06b3d50 00000000 00000000 ee089fd0 [ 25s] [ 11.308125] 9fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 25s] [ 11.308861] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 25s] [ 11.309905] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 25s] [ 11.311219] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 27s] [ 11.312385] Rebooting in 1 seconds..### VM INTERACTION END ### [ 27s] /var/run/obs/worker/5/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 27s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 27s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 00:58:24 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 00:58:24 +0000 Subject: Build failure of network:osmocom:latest/osmo-trx in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a1228ca6f070_a94d30f7c370595d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-trx/Debian_9.0/armv7l Package network:osmocom:latest/osmo-trx failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-trx Last lines of build log: [ 30s] [ 11.322581] [] (__irq_svc) from [] (_find_next_bit_le+0x28/0x48) [ 30s] [ 11.327672] CPU1: stopping [ 30s] [ 11.328140] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.2-0-guest #1 [ 30s] [ 11.329019] Hardware name: Generic DT based system [ 30s] [ 11.329702] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 30s] [ 11.330861] [] (show_stack) from [] (dump_stack+0x88/0x98) [ 30s] [ 11.331939] [] (dump_stack) from [] (handle_IPI+0x154/0x170) [ 30s] [ 11.333043] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x5c) [ 30s] [ 11.334173] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 30s] [ 11.335159] Exception stack(0xee085eb8 to 0xee085f00) [ 30s] [ 11.335825] 5ea0: 00000000 00000001 [ 30s] [ 11.336895] 5ec0: 00000001 ee084000 00000282 00000000 00000000 00000001 ee005000 ee084000 [ 30s] [ 11.338159] 5ee0: c06b3d50 00000000 c06ef580 ee085f00 c0034d24 c0034dc0 200f0113 ffffffff [ 30s] [ 11.339547] [] (__irq_svc) from [] (__do_softirq+0xb4/0x250) [ 30s] [ 11.340826] [] (__do_softirq) from [] (irq_exit+0x78/0xb0) [ 30s] [ 11.342065] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 30s] [ 11.343415] [] (__handle_domain_irq) from [] (gic_handle_irq+0x24/0x5c) [ 30s] [ 11.344850] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 30s] [ 11.346143] Exception stack(0xee085f88 to 0xee085fd0) [ 30s] [ 11.347019] 5f80: ffffffed 00000000 ffffffed c00296e0 c06be5b0 c04a6a18 [ 30s] [ 11.368428] 5fa0: 00000000 00000000 ee085fd8 ee084000 c06b3d50 00000000 00000000 ee085fd0 [ 30s] [ 11.369642] 5fc0: c0019ed4 c0019ed8 600f0013 ffffffff [ 30s] [ 11.370337] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 30s] [ 11.371318] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x170/0x238) [ 30s] [ 11.372411] [] (cpu_startup_entry) from [<40008844>] (0x40008844) [ 32s] [ 11.373341] Rebooting in 1 seconds..### VM INTERACTION END ### [ 32s] /var/run/obs/worker/5/build/build-vm: line 913: warning: command substitution: ignored null byte in input [ 32s] No buildstatus set, either the base system is broken (kernel/initrd/udev/glibc/bash/perl) [ 32s] or the build host has a kernel or hardware problem... -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:08:07 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:08:07 +0000 Subject: libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... In-Reply-To: References: Message-ID: Patch Set 1: > @dexter: is this ok? Yes, looks good to me. We have to abandon #4832 and #4833 then which also corrected the problem. -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:12:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:12:01 +0000 Subject: libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 > > @dexter: is this ok? > > Yes, looks good to me. We have to abandon #4832 and #4833 then > which also corrected the problem. -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:21:16 +0000 Subject: [MERGED] osmo-bsc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: reset: remove name variable from reset context ...................................................................... reset: remove name variable from reset context The reset context contains a string buffer to allow for setting a human readable name, that is then displayed in the logs. Since OSMO-FSMs already have such a feature there is no need for an extra name variable. Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc() to display the name of the FSM Fixes: Coverity CID#178664 Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 --- M include/osmocom/bsc/a_reset.h M src/libcommon-cs/a_reset.c 2 files changed, 9 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/a_reset.h b/include/osmocom/bsc/a_reset.h index 7aaab06..c01a8b0 100644 --- a/include/osmocom/bsc/a_reset.h +++ b/include/osmocom/bsc/a_reset.h @@ -33,9 +33,6 @@ * will be triggered */ int conn_loss_counter; - /* A human readable name to display in the logs */ - char name[256]; - /* Callback function to be called when a connection * failure is detected and a rest must occur */ void (*cb)(void *priv); diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index f08d813..5e45b09 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -62,8 +62,9 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); reset->conn_loss_counter = 0; @@ -76,13 +77,13 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) { - LOGP(DMSC, LOGL_NOTICE, "(%s) SIGTRAN connection down, reconnecting...\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection down, reconnecting...\n"); osmo_fsm_inst_state_chg(fi, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); } else reset->conn_loss_counter++; @@ -97,8 +98,9 @@ static int fsm_reset_ack_timeout_cb(struct osmo_fsm_inst *fi) { struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset-ack timeout (T%i) in state %s, resending...\n", reset->name, fi->T, + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, get_value_string(fsm_state_names, fi->state)); reset->cb(reset->priv); @@ -147,12 +149,11 @@ OSMO_ASSERT(reset); reset->priv = priv; reset->cb = cb; - strncpy(reset->name, name, sizeof(reset->name)); reset->conn_loss_counter = 0; - reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, NULL); + reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,7 +173,7 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm destroyed.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:21:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 09:21:47 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Fix build with default paths In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix build with default paths ...................................................................... Fix build with default paths If LIBOSMO_DIR is not set explicitly than ~/source/gsm/libosmocore is used which is base for MERGE_DOC which is used by vty_reference_combine.sh as it is. If the shell used by vty_reference_combine.sh does not expand ~ than the build will fail. Let's be nice and use realpath on MERGE_DOC before giving it to vty_reference_combine.sh to make sure complete path is used. Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 --- M build/Makefile.vty-reference.inc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/build/Makefile.vty-reference.inc b/build/Makefile.vty-reference.inc index baf9cf5..6607ae5 100644 --- a/build/Makefile.vty-reference.inc +++ b/build/Makefile.vty-reference.inc @@ -26,7 +26,7 @@ include $(TOPDIR)/build/Makefile.docbook.inc LIBOSMO_DIR ?= ~/source/gsm/libosmocore -MERGE_DOC = $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl +MERGE_DOC = $(shell realpath $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl) CLEAN_FILES += generated -- To view, visit https://gerrit.osmocom.org/4646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:22:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:22:33 +0000 Subject: [MERGED] osmo-msc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: reset: remove name variable from reset context ...................................................................... reset: remove name variable from reset context The reset context contains a string buffer to allow for setting a human readable name, that is then displayed in the logs. Since OSMO-FSMs already have such a feature there is no need for an extra name variable. Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc() to display the name of the FSM Fixes: Coverity CID#178664 Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 --- M src/libcommon-cs/a_reset.c M src/libmsc/a_iface.c 2 files changed, 12 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 7dbd014..32c00ae 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -62,8 +62,9 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); reset->conn_loss_counter = 0; @@ -76,13 +77,13 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) fsm-state (msc-reset): %s, fsm-event: %s\n", reset->name, + LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: if (reset->conn_loss_counter >= BAD_CONNECTION_THRESOLD) { - LOGP(DMSC, LOGL_NOTICE, "(%s) SIGTRAN connection down, reconnecting...\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection down, reconnecting...\n"); osmo_fsm_inst_state_chg(fi, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); } else reset->conn_loss_counter++; @@ -97,8 +98,9 @@ static int fsm_reset_ack_timeout_cb(struct osmo_fsm_inst *fi) { struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; + OSMO_ASSERT(reset->fsm); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset-ack timeout (T%i) in state %s, resending...\n", reset->name, fi->T, + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, get_value_string(fsm_state_names, fi->state)); reset->cb(reset->priv); @@ -147,12 +149,11 @@ OSMO_ASSERT(reset); reset->priv = priv; reset->cb = cb; - strncpy(reset->name, name, sizeof(reset->name)); reset->conn_loss_counter = 0; - reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, NULL); + reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,7 +173,7 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm destroyed.\n", reset->name); + LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 4892fb8..bdfef87 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -460,6 +460,7 @@ { struct bsc_context *bsc_ctx; struct osmo_ss7_instance *ss7; + char bsc_name[32]; OSMO_ASSERT(bsc_addr); OSMO_ASSERT(msc_addr); @@ -482,7 +483,8 @@ llist_add_tail(&bsc_ctx->list, &gsm_network->a.bscs); /* Start reset procedure to make the new connection active */ - bsc_ctx->reset = a_reset_alloc(bsc_ctx, osmo_sccp_addr_name(ss7, bsc_addr), a_reset_cb, bsc_ctx); + snprintf(bsc_name, sizeof(bsc_name), "bsc-%i", bsc_addr->pc); + bsc_ctx->reset = a_reset_alloc(bsc_ctx, bsc_name, a_reset_cb, bsc_ctx); } /* Callback function, called by the SSCP stack when data arrives */ -- To view, visit https://gerrit.osmocom.org/4754 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:31:07 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:31:07 +0000 Subject: [ABANDON] osmo-msc[master]: reset: check length of the reset context name In-Reply-To: References: Message-ID: dexter has abandoned this change. Change subject: reset: check length of the reset context name ...................................................................... Abandoned We have removed the name variable, see also 4754 -- To view, visit https://gerrit.osmocom.org/4716 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id7c4a7ff17e1c8ceb6e543ab6f0f07c87df603c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:31:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:31:53 +0000 Subject: [MERGED] osmo-bsc[master]: doc: add example configuration for osmo-mgw In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: doc: add example configuration for osmo-mgw ...................................................................... doc: add example configuration for osmo-mgw osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf --- M doc/examples/osmo-bsc/osmo-bsc.cfg 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index efa27ec..69f8ab7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -102,6 +102,9 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden + mgw remote-ip 127.0.0.1 + mgw remote-port 2427 + mgw endpoint-range 1 31 bsc mid-call-timeout 0 no missing-msc-text -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:34:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 20 Nov 2017 09:34:15 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: move log message to else branch In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: cosmetic: move log message to else branch ...................................................................... cosmetic: move log message to else branch The log message after the nullpointer check for conn tricks Coverity Scan into detecting a nullpointer deref. Include the log message into else branch to state the program flow more clearly Fixes: Coverity CID#178656 Change-Id: If6e962f4033c955ecd3539a719031a83c9b6205a --- M src/libmsc/gsm_04_08.c 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 8a5265b..438f681 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3004,14 +3004,14 @@ trans->callref = 0; trans_free(trans); return rc; + } else { + DEBUGP(DCC, "(ti %02x sub %s) " + "Received '%s' from MNCC in state %d (%s)\n", + trans->transaction_id, + vlr_subscr_msisdn_or_name(trans->conn->vsub), + get_mncc_name(msg_type), trans->cc.state, + gsm48_cc_state_name(trans->cc.state)); } - - DEBUGP(DCC, "(ti %02x sub %s) " - "Received '%s' from MNCC in state %d (%s)\n", - trans->transaction_id, - vlr_subscr_msisdn_or_name(trans->conn->vsub), - get_mncc_name(msg_type), trans->cc.state, - gsm48_cc_state_name(trans->cc.state)); /* Find function for current state and message */ for (i = 0; i < DOWNSLLEN; i++) -- To view, visit https://gerrit.osmocom.org/4755 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6e962f4033c955ecd3539a719031a83c9b6205a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:46:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:46:36 +0000 Subject: libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:46:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:46:45 +0000 Subject: [MERGED] libosmocore[master]: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_mgcp ...................................................................... ports.h: Use same VTY port number for osmo-mgw and osmo-bsc_mgcp It was decided that osmo-mgw as direct successor of osmo-bsc_mgcp will use the same VTY port number (similar to osmo-nitb, osmo-bsc and osmo-bsc-sccplite all using the same VTY port number) Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: dexter: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ab43f05..ff0b58c 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -14,6 +14,7 @@ #define OSMO_VTY_PORT_BTS 4241 /* also: osmo_pcap_server */ #define OSMO_VTY_PORT_NITB_BSC 4242 #define OSMO_VTY_PORT_BSC_MGCP 4243 +#define OSMO_VTY_PORT_MGW OSMO_VTY_PORT_BSC_MGCP #define OSMO_VTY_PORT_BSC_NAT 4244 #define OSMO_VTY_PORT_SGSN 4245 #define OSMO_VTY_PORT_GBPROXY 4246 @@ -28,5 +29,4 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 -#define OSMO_VTY_PORT_MGW 4261 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/4894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:47:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:47:21 +0000 Subject: [ABANDON] libosmocore[master]: Revert "vty: add port number for osmo-mgw" In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: Revert "vty: add port number for osmo-mgw" ...................................................................... Abandoned superceded by 4894 -- To view, visit https://gerrit.osmocom.org/4832 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If3f36fa27bd3fae4d06b8bef69ac0a09812a87b6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:47:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:47:52 +0000 Subject: [ABANDON] libosmocore[master]: vty: add port number constant for osmo-mgw In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: vty: add port number constant for osmo-mgw ...................................................................... Abandoned suprceded by 4894 -- To view, visit https://gerrit.osmocom.org/4833 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1770787e697906322ce5815fcaadba06c01ddee9 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:48:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:48:44 +0000 Subject: osmocom-bb[master]: mobile: Switch from printf to LOGP statements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4907 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:48:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:48:57 +0000 Subject: osmocom-bb[master]: mobile: Use bool to show started can only be true or false In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:49:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:49:19 +0000 Subject: osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:49:33 +0000 Subject: osmocom-bb[master]: mobile: Pass the msg_ref from outside In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:50:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:50:11 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:52:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:52:29 +0000 Subject: osmocom-bb[master]: mobile: Directly inform the primitive layer about an event In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4931/1/src/host/layer23/src/mobile/primitives.c File src/host/layer23/src/mobile/primitives.c: Line 104: struct mobile_started_prim prim = { 0, }; you're using the primitive header outside of the context of a msgb, which is not something that we have done so far, AFAIK/AFAIR. Once we introduce something like osmo_prim_free() this might become confusing? or we could simply have prim_hdr.msg=NULL in such cases to indicate it's not a msgb-wrapped primitive? -- To view, visit https://gerrit.osmocom.org/4931 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:54:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:54:20 +0000 Subject: osmocom-bb[master]: mobile: Inform the primitive layer about status and new sms In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4932/1/src/host/layer23/src/mobile/primitives.c File src/host/layer23/src/mobile/primitives.c: Line 138: prim.sms = sms; normally in terms of osmo_prim handling I would have expected that the entire primitive is a msgb, with an osmo prim hdr and the message as payload. Now we're passing pointers to other objects inside a primitive and handling the primitive header from the stack into a function. This is possibke, but quite unlike existing users of the asynchronous msgb-queued primitives that we have in other places. -- To view, visit https://gerrit.osmocom.org/4932 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:54:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:54:31 +0000 Subject: osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 09:54:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 09:54:58 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:18:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:18:16 +0000 Subject: osmo-msc[master]: sub_pres_vlr_fsm_start: fix heap use after free In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:18:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:18:32 +0000 Subject: osmo-msc[master]: rate_ctr: don't use . as separator In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4922 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:19:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:19:26 +0000 Subject: osmo-msc[master]: vlr_subscr_conn_timeout(): don't fire events to discarded fi In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:19:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:19:54 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:23:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:23:03 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/4915/1/tests/gtp/gtpie_test.c File tests/gtp/gtpie_test.c: Line 32: memcpy(&u16, &buf[1], sizeof(u16)); why not simply use osmo_load16_be() ? it does the unaligned load without memcpy, another variable declaration and without the need for an ntohs Line 98: memcpy(&u32, &buf[1], sizeof(u32)); osmo_load32be -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:23:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:23:35 +0000 Subject: osmo-gsm-manuals[master]: install doc: add asciidoc-dblatex dep In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4914 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:23:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:23:44 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: typo: priveleges In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4913 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:26:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:26:25 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: add IP forward and Masquerading section In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4912/1/OsmoGGSN/chapters/running.adoc File OsmoGGSN/chapters/running.adoc: Line 26: internet uplink, OsmoGGSN usually requires IP Forwarding and Masquerading to be I don't really like the idea of telling people to outright enable masquerading. I think * we should simply refer to this as a normal Linux router setup with multiple interfaces, so of course if you want to forward traffic betewen the tun device and e.g. an ethernet device, you need forwarding. * if you don't allocate routed IP adresses on the tun device / APN to your subscribers, then, equally, you will have to enable masquerading. Just like in any other setup where non-routed IP adresses are used, irrespective to GGSN. Not using masquerading has the significant advantage of being able to test inbound connections to your MS/UE, which is not something you can do in most public networks/APNs. Let's mention it. -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:26:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:26:46 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:26:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:26:49 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN: more info on non-root operation / tun creation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN: more info on non-root operation / tun creation ...................................................................... OsmoGGSN: more info on non-root operation / tun creation Add examples for 'ip addr add' and mention correspondence to config file, add examples for enabling masquerading and IP forwarding, place the non-root config in its own section and highlight the diffs. Add tiny hint at systemd-networkd. Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 --- M OsmoGGSN/chapters/configuration.adoc 1 file changed, 16 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/chapters/configuration.adoc b/OsmoGGSN/chapters/configuration.adoc index 9a4c81b..5f61c88 100644 --- a/OsmoGGSN/chapters/configuration.adoc +++ b/OsmoGGSN/chapters/configuration.adoc @@ -250,7 +250,7 @@ achieved by means such as * a custom shell script run as root before starting osmo-ggsn (e.g. as init script) -* systemd .netdev and .network files +* systemd .netdev and .network files, if your system is using systemd-networkd (see `networkctl status`). ==== Manual TUN device creation / configuration @@ -266,8 +266,13 @@ Where _username_ and _groupname_ correspond to the User and Group that will have ownership over the device, i.e. the privileges which you intend to run osmo-ggsn under, and _apn0_ will be the name of the network device created. After creating the interface, you can configure its addresses -using standard means like `ip addr add` or your distribution-specific utilities/tools. +using standard means like `ip addr add` or your distribution-specific utilities/tools +to match the `ip prefix dynamic` config item, and activate the link, for example: +---- +# ip addr add 192.168.7.0/24 dev apn0 +# ip link set apn0 up +---- ==== systemd based TUN device creation+configuration @@ -303,10 +308,16 @@ You may not want this if you have proper end-to-end routing set up, and want to have transparent inbound IP access to your GPRS-attached devices. -The pair of the configuration files above allows you to create and configure tun device which can be -used by OsmoGGSN as follows. +==== Config Changes -.Example: using externally configured tun device as non-root +With the tun device pre-configured in one of the ways outlined above, the main +changes in your osmo-ggsn.cfg file are: + +* remove `ip ifconfig` directive, +* make sure that `no shutdown` is present in the `apn` section as well as + `no shutdown ggsn` in the `ggsn` section. + +.Example: using externally configured tun device `apn0` as non-root ---- ggsn ggsn0 gtp state-dir /tmp -- To view, visit https://gerrit.osmocom.org/4824 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:26:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:26:49 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN: multiple instances: mention GTP port In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN: multiple instances: mention GTP port ...................................................................... OsmoGGSN: multiple instances: mention GTP port Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32 --- M OsmoGGSN/chapters/running.adoc 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index a242e36..ef899b5 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -39,3 +39,12 @@ ctrl bind 127.0.0.2 ---- + +Also make sure to place each instance's GTP bind on a separate IP address (GTP +uses a port number that is fixed in the GTP specifications, so it will not be +possible to pick differing ports on the same IP address), like: + +---- +ggsn ggsn0 + gtp bind-ip 127.0.0.2 +---- -- To view, visit https://gerrit.osmocom.org/4825 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:27:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:27:29 +0000 Subject: libosmo-sccp[master]: contrib/test: Fix config of local/remote ports In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4898 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0fafd07614068a27c19bc2dfa6491b4b0c6737fb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:27:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:27:31 +0000 Subject: [MERGED] libosmo-sccp[master]: contrib/test: Fix config of local/remote ports In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib/test: Fix config of local/remote ports ...................................................................... contrib/test: Fix config of local/remote ports The first port is the remote one, and the second port is the local one, according to cs7_asp_cmd doc and code. In the same config, the ports for the servers are used and for the local port in the client we don't care, that's why we use 0 there. Change-Id: I0fafd07614068a27c19bc2dfa6491b4b0c6737fb --- M contrib/test/osmo-stp.cfg 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/test/osmo-stp.cfg b/contrib/test/osmo-stp.cfg index bf059a9..9003131 100644 --- a/contrib/test/osmo-stp.cfg +++ b/contrib/test/osmo-stp.cfg @@ -29,9 +29,9 @@ no login ! cs7 instance 0 - asp asp0 0 2905 m3ua + asp asp0 2905 0 m3ua remote-ip 172.18.0.2 - asp asp-s-0 0 14001 sua + asp asp-s-0 14001 0 sua remote-ip 172.18.0.3 as as0 m3ua asp asp0 -- To view, visit https://gerrit.osmocom.org/4898 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fafd07614068a27c19bc2dfa6491b4b0c6737fb Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 10:32:19 +0000 Subject: libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Patch Set 2: I think at the least we should make sure that "local-ip 0.0.0.0" is written unconditionally in any "write file" even if the user has not explitly specified one. So far, "local-ip" is only written if it is set to any value. -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 10:49:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 10:49:59 +0000 Subject: [PATCH] libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4893 to look at the new patch set (#3). ss7: Re-bind xUA server socket after setting new IP In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" was actually not being applied, because the server was created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP was changed but the server was not re-bound using the new IP, so it kept listening at 0.0.0.0. With this patch, we defer binding the socket to "local-ip" cmd time, after the IP has been applied. As a result, if no "local-ip" command is provided, then the bind never happens, which means it is now mandatory to have a "local-ip" line in the config file, otherwise osmo-stp will not listen on the socket. Related: OS#2647 Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 --- M doc/examples/osmo-stp.cfg M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c 5 files changed, 28 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/4893/3 diff --git a/doc/examples/osmo-stp.cfg b/doc/examples/osmo-stp.cfg index 960bf33..013181f 100644 --- a/doc/examples/osmo-stp.cfg +++ b/doc/examples/osmo-stp.cfg @@ -18,3 +18,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip 0.0.0.0 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 71c2022..59c0416 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -441,6 +441,9 @@ uint16_t local_port, const char *local_host); int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); + +int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 86fb45c..fc00525 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1745,7 +1745,7 @@ return NULL; } -/*! \brief create a new xUA server listening to given ip/port +/*! \brief create a new xUA server configured with given ip/port * \param[in] ctx talloc allocation context * \param[in] proto protocol (xUA variant) to use * \param[in] local_port local SCTP port to bind/listen to @@ -1757,7 +1757,6 @@ uint16_t local_port, const char *local_host) { struct osmo_xua_server *oxs = talloc_zero(inst, struct osmo_xua_server); - int rc; OSMO_ASSERT(ss7_initialized); if (!oxs) @@ -1781,13 +1780,6 @@ osmo_stream_srv_link_set_port(oxs->server, oxs->cfg.local.port); osmo_stream_srv_link_set_proto(oxs->server, asp_proto_to_ip_proto(proto)); - rc = osmo_stream_srv_link_open(oxs->server); - if (rc < 0) { - osmo_stream_srv_link_destroy(oxs->server); - oxs->server = NULL; - talloc_free(oxs); - } - oxs->inst = inst; llist_add_tail(&oxs->list, &inst->xua_servers); @@ -1798,6 +1790,19 @@ return oxs; } +/*! \brief Set the xUA server to bind/listen to the currently configured ip/port + * \param[in] xs xUA server to operate + * \returns 0 on success, negative value on error. + */ +int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs) +{ + LOGP(DLSS7, LOGL_INFO, "Binding %s Server to %s:%u\n", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host, xs->cfg.local.port); + return osmo_stream_srv_link_open(xs->server); +} + int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host) { diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index cbbb9e3..80738e6 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -467,6 +467,10 @@ struct osmo_xua_server *xs = vty->index; osmo_ss7_xua_server_set_local_host(xs, argv[0]); + if (osmo_ss7_xua_server_bind(xs) < 0) { + vty_out(vty, "Unable to bind xUA server to IP %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } @@ -491,8 +495,7 @@ vty_out(vty, " listen %s %u%s", get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), xs->cfg.local.port, VTY_NEWLINE); - if (xs->cfg.local.host) - vty_out(vty, " local-ip %s%s", xs->cfg.local.host, VTY_NEWLINE); + vty_out(vty, " local-ip %s%s", xs->cfg.local.host ? : "0.0.0.0", VTY_NEWLINE); if (xs->cfg.accept_dyn_reg) vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } diff --git a/src/sccp_user.c b/src/sccp_user.c index d9de8d7..cd89c88 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -521,6 +521,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_xua_server *xs; + int rc; if (local_port < 0) local_port = osmo_ss7_asp_protocol_port(prot); @@ -535,6 +536,10 @@ if (!xs) goto out_ss7; + rc = osmo_ss7_xua_server_bind(xs); + if (rc < 0) + goto out_xs; + /* Allocate SCCP stack */ ss7->sccp = osmo_sccp_instance_create(ss7, NULL); if (!ss7->sccp) -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:28:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 11:28:15 +0000 Subject: osmo-msc[master]: reset: remove name variable from reset context In-Reply-To: References: Message-ID: Patch Set 2: (5 comments) https://gerrit.osmocom.org/#/c/4754/2/src/libcommon-cs/a_reset.c File src/libcommon-cs/a_reset.c: Line 67: LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", duplicates FSM logging Line 80: LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", duplicates FSM logging Line 103: LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, duplicates FSM logging except for "resending" maybe Line 156: LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); duplicates FSM logging Line 176: LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); duplicates FSM logging -- To view, visit https://gerrit.osmocom.org/4754 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b051606791c5e085ca6bb1be20592127d48ceb5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:41:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 11:41:34 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 1: Why not use osmo_load32be()? -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:41:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 11:41:42 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:46:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 11:46:15 +0000 Subject: libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) Also, I think rate_ctr_group_desc_mangle() should log as NOTICE to make it more visible. This could be part of another patch though. https://gerrit.osmocom.org/#/c/4868/3//COMMIT_MSG Commit Message: Line 14: unexpected from this patch is to adjust the talloc expectations, another I've failed to understand it. What do you mean by "talloc becomes unexpected"? -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:48:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 11:48:44 +0000 Subject: osmo-mgw[master]: osmo-mgw: Use libosmocore socket abstraction In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4900 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 11:51:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 11:51:44 +0000 Subject: osmo-pcu[master]: PCU: display TA information in TBF stats In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 12:00:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 12:00:11 +0000 Subject: osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 12:25:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 12:25:17 +0000 Subject: osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 12:25:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 12:25:52 +0000 Subject: [MERGED] osmo-pcu[master]: PCU: Fix TA adjustment In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: PCU: Fix TA adjustment ...................................................................... PCU: Fix TA adjustment Promblem: TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to actual TA being used for given TBF. The current TA update algorithm in PCU simply applies the relative amount of TA to given TBF but does not take into account of current TA. As a result, the PCU will request wrong TA jump for given TBF if the MS is moving away from BTS more than 2 km. Related issue: http://osmocom.org/issues/2611 Fixes: - The PCU needs increase or decrease current TA of given TBF on receiving of relative amount of TA adjustment provided by PH-DATA-IND from L1 - The PCU needs to set absolute TA of given TBF on receiving absolute TA provided by PH-RA-IND from L1. Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.h 5 files changed, 84 insertions(+), 13 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index e41b1fa..6bdbb85 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1619,8 +1619,45 @@ return rc; } -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta) +/* update TA based on TA provided by PH-DATA-IND */ +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta) +{ + int16_t ta_adj; + uint8_t ta_target; + + if (ta_delta) { + /* adjust TA based on TA provided by PH-DATA-IND */ + ta_adj = tbf->ta() + ta_delta; + + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta_adj); + + LOGP(DL1IF, LOGL_INFO, "PH-DATA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +/* set TA based on TA provided by PH-RA-IND */ +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta) +{ + uint8_t ta_target; + + if (tbf->ta() != ta) { + /* limit target TA in range 0..63 bits */ + ta_target = ta_limit(ta); + + LOGP(DL1IF, LOGL_INFO, "PH-RA-IND is updating TLLI=0x%08x: TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + tbf->tlli(), tbf->ta(), ta_target, + tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn); + tbf->set_ta(ta_target); + } +} + +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach) { struct gprs_rlcmac_ul_tbf *tbf = bts_main_data()->bts->ul_tbf_by_poll_fn(fn, trx_no, ts); @@ -1628,11 +1665,16 @@ LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to " "unknown UL TBF on TRX = %d, TS = %d, FN = %d\n", p, ta, trx_no, ts, fn); - else if (tbf->ta() != ta) { - LOGP(DL1IF, LOGL_INFO, "[%s] Updating TA %u -> %u on " - "TRX = %d, TS = %d, FN = %d\n", - p, tbf->ta(), ta, trx_no, ts, fn); - tbf->set_ta(ta); + else { + /* we need to distinguish TA information provided by L1 + * from PH-DATA-IND and PHY-RA-IND so that we can properly + * update TA for given TBF + */ + if (is_rach) + set_tbf_ta(tbf, (uint8_t)ta); + else + update_tbf_ta(tbf, ta); + } } diff --git a/src/bts.h b/src/bts.h index d65cd2f..aaf81cf 100644 --- a/src/bts.h +++ b/src/bts.h @@ -162,8 +162,9 @@ #ifdef __cplusplus extern "C" { #endif -void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, - uint8_t ta); +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach); +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); #ifdef __cplusplus } #endif diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 37b7f78..8290a93 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -203,7 +203,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -248,7 +248,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 1c5ecc9..dfef239 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -188,7 +188,7 @@ get_meas(&meas, &data_ind->measParam); bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, - data_ind->u8Tn, qta2ta(meas.bto)); + data_ind->u8Tn, sign_qta2ta(meas.bto), false); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -237,7 +237,7 @@ DEBUGP(DL1IF, "Rx PH-RA.ind"); bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming)); + qta2ta(ra_ind->measParam.i16BurstTiming), true); return 0; } diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 1618260..cb2a6df 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -43,6 +43,34 @@ return qta >> 2; } +static inline int8_t sign_qta2ta(int16_t qta) +{ + int8_t ta_adj = 0; + + if (qta < -252) + qta = -252; + + if (qta > 252) + qta = 252; + + /* 1-bit TA adjustment if TA error reported by L1 is outside +/- 2 qbits */ + if (qta > 2) + ta_adj = 1; + if (qta < -2) + ta_adj = -1; + + return (qta >> 2) + ta_adj; +} + +static inline uint8_t ta_limit(int16_t ta) +{ + if (ta < 0) + ta = 0; + if (ta > 63) + ta = 63; + return ta; +} + /* * L1 Measurement values */ -- To view, visit https://gerrit.osmocom.org/4678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65212f8203f1a35278890f51db038d689b2493d5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Nov 20 12:25:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 12:25:54 +0000 Subject: [MERGED] osmo-pcu[master]: PCU: display TA information in TBF stats In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: PCU: display TA information in TBF stats ...................................................................... PCU: display TA information in TBF stats Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 --- M src/pcu_vty_functions.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index ce79e05..811801f 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -44,8 +44,9 @@ gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf); gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf); - vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(), + vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) TA=%u DIR=%s IMSI=%s%s", tbf->tfi(), tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid", + tbf->ta(), tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL", tbf->imsi(), VTY_NEWLINE); vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d " -- To view, visit https://gerrit.osmocom.org/4679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:02:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 13:02:30 +0000 Subject: [PATCH] osmo-bsc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3819 to look at the new patch set (#5). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Related: OS#1694 --- M configure.ac M contrib/jenkins.sh M debian/control M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_nat.c M tests/channel/Makefile.am 6 files changed, 8 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/3819/5 diff --git a/configure.ac b/configure.ac index a66ed26..efe4d94 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.3.2) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.2.0) PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 57954f0..6ae6732 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,7 +18,7 @@ mkdir "$deps" || true -osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false +osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") diff --git a/debian/control b/debian/control index 5e9ad60..fae280a 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ libtool, pkg-config, python-minimal, - libssl-dev (>= 0.9.5), libtalloc-dev, libosmocore-dev (>= 0.10.0), libosmo-sccp-dev (>= 0.0.2), diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index 23c2b67..ee0f1ae 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -12,7 +12,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -51,7 +50,6 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOLEGACYMGCP_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBRARY_GSM) \ -lrt \ $(NULL) diff --git a/src/osmo-bsc_nat/bsc_nat.c b/src/osmo-bsc_nat/bsc_nat.c index 1548ea3..5569d2f 100644 --- a/src/osmo-bsc_nat/bsc_nat.c +++ b/src/osmo-bsc_nat/bsc_nat.c @@ -74,8 +74,6 @@ #include -#include - #include "../../bscconfig.h" #define SCCP_CLOSE_TIME 20 @@ -208,7 +206,7 @@ 0x01, IPAC_IDTAG_UNITNAME, 0x01, IPAC_IDTAG_SERNR, }; - + int rc; uint8_t *mrand; uint8_t id_req[sizeof(s_id_req) + (2+16)]; uint8_t *buf = &id_req[sizeof(s_id_req)]; @@ -221,19 +219,17 @@ buf = v_put(buf, 0x23); mrand = bsc->last_rand; - if (RAND_bytes(mrand, 16) != 1) - goto failed_random; + rc = osmo_get_rand_id(mrand, 16); + if (rc < 0) { + /* the timeout will trigger and close this connection */ + LOGP(DNAT, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return; + } memcpy(buf, mrand, 16); buf += 16; bsc_send_data(bsc, id_req, sizeof(id_req), IPAC_PROTO_IPACCESS); - return; - -failed_random: - /* the timeout will trigger and close this connection */ - LOGP(DNAT, LOGL_ERROR, "Failed to read from urandom.\n"); - return; } static struct msgb *nat_create_rlsd(struct nat_sccp_connection *conn) diff --git a/tests/channel/Makefile.am b/tests/channel/Makefile.am index 395daf7..12f18f8 100644 --- a/tests/channel/Makefile.am +++ b/tests/channel/Makefile.am @@ -29,5 +29,4 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/3819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:22:37 +0000 Subject: [PATCH] libosmocore[master]: msgb: add inline msgb_queue_free() Message-ID: Review at https://gerrit.osmocom.org/4933 msgb: add inline msgb_queue_free() Related: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 (libosmo-netif) Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7 --- M TODO-RELEASE M include/osmocom/core/msgb.h 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/4933/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..99865c6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +core msgb_queue_free() add inline func to msgb.h diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 9c3ccf0..335067e 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -72,6 +72,15 @@ extern struct msgb *msgb_copy(const struct msgb *msg, const char *name); static int msgb_test_invariant(const struct msgb *msg) __attribute__((pure)); +/*! Free all msgbs from a queue built with msgb_enqueue(). + * \param[in] queue list head of a msgb queue. + */ +static inline void msgb_queue_free(struct llist_head *queue) +{ + struct msgb *msg; + while ((msg = msgb_dequeue(queue))) msgb_free(msg); +} + #ifdef MSGB_DEBUG #include #define MSGB_ABORT(msg, fmt, args ...) do { \ -- To view, visit https://gerrit.osmocom.org/4933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:23:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:23:38 +0000 Subject: [PATCH] libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4878 to look at the new patch set (#3). osmo_stream_{cli,srv}_destroy: fix mem leak: empty msgb queue On destroying a client or server stream, deallocate any msgbs that are still pending in the queue. In libosmo-sccp, the ss7_test.c in test_as(), messages are queued and were, before this, left floating after the stream was destroyed, causing a sanitizer memory leak. This patch fixes the leak. Depends: Ia291832ca445d4071f0ed9a01730d945ff691cf7 (libosmocore) Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 --- M src/stream.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/78/4878/3 diff --git a/src/stream.c b/src/stream.c index d9c3f62..8a1be38 100644 --- a/src/stream.c +++ b/src/stream.c @@ -430,6 +430,7 @@ { osmo_stream_cli_close(cli); osmo_timer_del(&cli->timer); + msgb_queue_free(&cli->tx_queue); talloc_free(cli); } @@ -924,6 +925,7 @@ osmo_fd_unregister(&conn->ofd); if (conn->closed_cb) conn->closed_cb(conn); + msgb_queue_free(&conn->tx_queue); talloc_free(conn); } -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:23:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:23:54 +0000 Subject: [PATCH] libosmo-netif[master]: gitignore: vim swp files Message-ID: Review at https://gerrit.osmocom.org/4934 gitignore: vim swp files Change-Id: I0013625df95c5600479953e6f83b848efadb525a --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/34/4934/1 diff --git a/.gitignore b/.gitignore index 4ee9929..350e975 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ Doxyfile /examples/udp-test-client /examples/udp-test-server + +.*.sw? -- To view, visit https://gerrit.osmocom.org/4934 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0013625df95c5600479953e6f83b848efadb525a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:25:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:25:04 +0000 Subject: libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4878/2/src/stream.c File src/stream.c: Line 437: talloc_free(msg); > msgb_free.. or we deprecate it.. (if you look at glib when they introduced ah, gotcha. Sorry, but I don't really understand the glib / "flush" hints? -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:39:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:39:35 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4868 to look at the new patch set (#4). rate_ctr: fix mem leak for mangled desc Using the NULL context creates mem leaks that bother sanitizer builds. Allocate as talloc "child" of the rate_ctr_group, so that the mangled desc (if any) gets freed when the rate_ctr group is freed. Remove the comment concerning osmo-msc: the way to fix the unexpected talloc state in osmo-msc tests is to have no invalid rate counter names in osmo-msc. See Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 (osmo-msc). Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b --- M src/rate_ctr.c 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/4868/4 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 5464490..477339f 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,15 +190,6 @@ unsigned int size; struct rate_ctr_group *group; - /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ - if (!rate_ctrl_group_desc_validate(desc, true)) { - /* don't use 'ctx' here as it would screw up memory leak debugging e.g. - * in osmo-msc */ - desc = rate_ctr_group_desc_mangle(NULL, desc); - if (!desc) - return NULL; - } - size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); @@ -209,6 +200,15 @@ if (!group) return NULL; + /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ + if (!rate_ctrl_group_desc_validate(desc, true)) { + desc = rate_ctr_group_desc_mangle(group, desc); + if (!desc) { + talloc_free(group); + return NULL; + } + } + group->desc = desc; group->idx = idx; -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:42:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:42:44 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Patch Set 1: > How does this help you? If that is the expected put it into the .ok > file? Not following you here. :) I'd have liked to put it in the .ok or .err files, but the talloc report contains memory addresses that aren't constant. Hence I only check the size and output the report if something is unexpected. At that point, there is no reference to compare to, hence the comment. Would be nice to have a talloc report that is fully reproducible. Those addresses usually don't help much anyway. -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:45:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:45:36 +0000 Subject: osmo-msc[master]: subscr_conn: don't close after conn timeout In-Reply-To: References: Message-ID: Patch Set 1: > Maybe return here instead to show that this is done? usually yes, IMHO in this case it makes for more lines and a longer / harder to read patch. -- To view, visit https://gerrit.osmocom.org/4925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:20 +0000 Subject: osmo-msc[master]: sub_pres_vlr_fsm_start: fix heap use after free In-Reply-To: References: Message-ID: Patch Set 1: > It does look like the easiest way. So the general rule of thumb is > that after an event dispatch the object could be invalidated? yep. That has caught me a number of times already. Another way actually is to never dispatch events in the construction function of an FSM, but rather only return the FSM pointer, and require the caller to issue the start event separately. > Separate construction from event transition? exactly. I've done so elsewhere (in libmsc/libvlr IIRC), but it does duplicate the event firing to all callers ... so ... yeah. -- To view, visit https://gerrit.osmocom.org/4923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:32 +0000 Subject: [MERGED] osmo-msc[master]: sub_pres_vlr_fsm_start: fix heap use after free In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: sub_pres_vlr_fsm_start: fix heap use after free ...................................................................... sub_pres_vlr_fsm_start: fix heap use after free When sub_pres_vlr_fsm_start() is called, it dispatches an event which may in some cases already cause tear down and free of the parent FSM instance, after which storing the returned instance pointer in that parent's metadata will use freed memory. Instead, pass the target pointer to remember the instance at to sub_pres_vlr_fsm_start() and assign the pointer *before* firing the event. Explain so in a new comment. I haven't checked whether that pointer is actually used at all -- this is the easiest way to fix the use-after-free without getting sucked into semantic questions. Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c 3 files changed, 20 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, but someone else must approve diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index d5306fa..9e6b12c 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -274,9 +274,10 @@ /* internal use only */ -struct osmo_fsm_inst *sub_pres_vlr_fsm_start(struct osmo_fsm_inst *parent, - struct vlr_subscr *vsub, - uint32_t term_event); +void sub_pres_vlr_fsm_start(struct osmo_fsm_inst **fsm, + struct osmo_fsm_inst *parent, + struct vlr_subscr *vsub, + uint32_t term_event); struct osmo_fsm_inst * upd_hlr_vlr_proc_start(struct osmo_fsm_inst *parent, struct vlr_subscr *vsub, diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 41620b9..e90d8de 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -241,8 +241,7 @@ if (vsub->ms_not_reachable_flag) { /* Start Subscriber_Present_VLR */ osmo_fsm_inst_state_chg(fi, PR_ARQ_S_WAIT_SUB_PRES, 0, 0); - par->sub_pres_vlr_fsm = sub_pres_vlr_fsm_start(fi, vsub, - PR_ARQ_E_PRES_RES); + sub_pres_vlr_fsm_start(&par->sub_pres_vlr_fsm, fi, vsub, PR_ARQ_E_PRES_RES); return; } _proc_arq_vlr_post_pres(fi); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 37fe235..a3a68ed 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -252,21 +252,29 @@ .event_names = sub_pres_vlr_event_names, }; -struct osmo_fsm_inst *sub_pres_vlr_fsm_start(struct osmo_fsm_inst *parent, - struct vlr_subscr *vsub, - uint32_t term_event) +/* Note that the start event is dispatched right away, so in case the FSM immediately concludes from that + * event, the created FSM struct may no longer be valid as it already deallocated again, and it may + * furthermore already have invoked the parent FSM instance's deallocation as well. Hence, instead of + * returning, store the created FSM instance address in *fi_p before dispatching the event. It is thus + * possible to store the instance's pointer in a parent FSM instance without running danger of using + * already freed memory. */ +void sub_pres_vlr_fsm_start(struct osmo_fsm_inst **fi_p, + struct osmo_fsm_inst *parent, + struct vlr_subscr *vsub, + uint32_t term_event) { struct osmo_fsm_inst *fi; + OSMO_ASSERT(fi_p); + fi = osmo_fsm_inst_alloc_child(&sub_pres_vlr_fsm, parent, term_event); + *fi_p = fi; if (!fi) - return NULL; + return; fi->priv = vsub; osmo_fsm_inst_dispatch(fi, SUB_PRES_VLR_E_START, NULL); - - return fi; } /*********************************************************************** @@ -384,9 +392,7 @@ osmo_fsm_inst_state_chg(fi, LU_COMPL_VLR_S_WAIT_SUB_PRES, LU_TIMEOUT_LONG, 0); - lcvp->sub_pres_vlr_fsm = sub_pres_vlr_fsm_start(fi, vsub, - LU_COMPL_VLR_E_SUB_PRES_COMPL); - + sub_pres_vlr_fsm_start(&lcvp->sub_pres_vlr_fsm, fi, vsub, LU_COMPL_VLR_E_SUB_PRES_COMPL); } static void lu_compl_vlr_new_tmsi(struct osmo_fsm_inst *fi) -- To view, visit https://gerrit.osmocom.org/4923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:33 +0000 Subject: [MERGED] osmo-msc[master]: subscr_conn: don't close after conn timeout In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: subscr_conn: don't close after conn timeout ...................................................................... subscr_conn: don't close after conn timeout If dispatching a conn timeout, the conn fsm will already have been discarded, and we cannot fire any more events to it. The expected test output changes illustrate that we are now omitting event dispatches that happen *after* the same FSM was already deallocated. Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 --- M src/libmsc/subscr_conn.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err 3 files changed, 2 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index 336637c..62b7619 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -233,7 +233,8 @@ struct gsm_subscriber_connection *conn = fi->priv; if (conn) vlr_subscr_conn_timeout(conn->vsub); - osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL); + else + osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL); return 0; } diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index e34490d..4caaf1e 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -71,8 +71,6 @@ DREF freeing VLR subscr IMSI:901700000004620 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -173,8 +171,6 @@ DREF freeing VLR subscr MSISDN:46071 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index e267c5b..47af359 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -91,8 +91,6 @@ DREF freeing VLR subscr IMSI:901700000004620 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -325,8 +323,6 @@ DREF VLR subscr MSISDN:46071 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE -DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 -- To view, visit https://gerrit.osmocom.org/4925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:33 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: msc_vlr_tests: add comment to show expected tallocs ...................................................................... cosmetic: msc_vlr_tests: add comment to show expected tallocs If something changed the talloc landscape, it is hard to find out what the test actually expected when it was written. Add the expectations in an inline comment. Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7b1db1b..7cd869b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -664,6 +664,19 @@ void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) { talloc_report_full(msgb_ctx, stderr); + /* Expecting these to stick around in tall_bsc_ctx: +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 +full talloc report on 'subscr_conn_test_ctx' (total 2658 bytes in 9 blocks) + struct gsup_client contains 248 bytes in 1 blocks (ref 0) 0x61300000dee0 + struct gsm_network contains 2410 bytes in 6 blocks (ref 0) 0x61700000fce0 + struct vlr_instance contains 160 bytes in 1 blocks (ref 0) 0x611000009a60 + no_gsup_server contains 15 bytes in 1 blocks (ref 0) 0x60b00000ade0 + ../../../src/libosmocore/src/rate_ctr.c:199 contains 1552 bytes in 1 blocks (ref 0) 0x61b00001eae0 + struct llist_head contains 16 bytes in 1 blocks (ref 0) 0x60b00000ae90 + .* contains 3 bytes in 1 blocks (ref 0) 0x60b00000af40 + msgb contains 0 bytes in 1 blocks (ref 0) 0x60800000bf80 + */ fprintf(stderr, "talloc_total_blocks(tall_bsc_ctx) == %zu\n", talloc_total_blocks(tall_bsc_ctx)); if (talloc_total_blocks(tall_bsc_ctx) != expected_blocks) -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:33 +0000 Subject: [MERGED] osmo-msc[master]: vlr_subscr_conn_timeout(): don't fire events to discarded fi In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vlr_subscr_conn_timeout(): don't fire events to discarded fi ...................................................................... vlr_subscr_conn_timeout(): don't fire events to discarded fi Terminating one of the FSM instances may effect termination and deallocation of the others, as well as the vlr_subscr itself. So, reserve the vlr_subscr locally, and then dispatch events to exactly those FSM instances that exist. The changes in expected output in the msc_vlr_tests shows that the subscriber was deallocated from the first FSM termination, and now sticks around until we've checked both FSMs are gone. Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err 3 files changed, 21 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, but someone else must approve diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 4ef52da..59eb37d 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -973,8 +973,12 @@ if (!vsub) return; - vlr_loc_update_conn_timeout(vsub->lu_fsm); - vlr_parq_conn_timeout(vsub->proc_arq_fsm); + vlr_subscr_get(vsub); + if (vsub->lu_fsm) + vlr_loc_update_conn_timeout(vsub->lu_fsm); + if (vsub->proc_arq_fsm) + vlr_parq_conn_timeout(vsub->proc_arq_fsm); + vlr_subscr_put(vsub); } struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops) diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 4caaf1e..8ca2991 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -46,6 +46,7 @@ llist_count(&net->subscr_conns) == 1 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Connection timed out - sending LU Reject for IMSI:901700000004620, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_DONE @@ -67,10 +68,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF IMSI:901700000004620: MSC conn use - 1 == 0 DRLL subscr IMSI:901700000004620: Freeing subscriber connection -DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 -DREF freeing VLR subscr IMSI:901700000004620 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 +DREF freeing VLR subscr IMSI:901700000004620 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -146,6 +148,7 @@ lu_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Connection timed out - sending LU Reject for MSISDN:46071, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_DONE @@ -167,10 +170,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF MSISDN:46071: MSC conn use - 1 == 0 DRLL subscr MSISDN:46071: Freeing subscriber connection -DREF VLR subscr MSISDN:46071 usage decreases to: 0 -DREF freeing VLR subscr MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 47af359..df34b86 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -66,6 +66,7 @@ lu_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Connection timed out - sending LU Reject for IMSI:901700000004620, cause 22 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_DONE @@ -87,10 +88,11 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF IMSI:901700000004620: MSC conn use - 1 == 0 DRLL subscr IMSI:901700000004620: Freeing subscriber connection -DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 -DREF freeing VLR subscr IMSI:901700000004620 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr IMSI:901700000004620 usage decreases to: 0 +DREF freeing VLR subscr IMSI:901700000004620 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 @@ -298,6 +300,7 @@ cm_service_result_sent == 0 - Total time passed: 5.001598 s DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Timeout of T0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Connection timed out DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_TIMEOUT) DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_DONE @@ -320,9 +323,10 @@ - BSSAP Clear --RAN_GERAN_A--> MS DREF MSISDN:46071: MSC conn use - 1 == 0 DRLL subscr MSISDN:46071: Freeing subscriber connection -DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 2 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 - SUBSCR_CONN_TIMEOUT has passed, conn is gone. bssap_clear_sent == 1 llist_count(&net->subscr_conns) == 0 -- To view, visit https://gerrit.osmocom.org/4926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56551ecc10f5295fe75944bdde4b583b1b621811 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:33 +0000 Subject: [MERGED] osmo-msc[master]: rate_ctr: don't use . as separator In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: rate_ctr: don't use . as separator ...................................................................... rate_ctr: don't use . as separator Use ':' as separator, so that no mangled rate_ctr descriptions are allocated. When '.' is used, the rate_ctr mangling code creates tallocs of mangled counter descriptors, and hence affects the amount of expected talloc contexts in msc_vlr_tests.c. Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 --- M include/osmocom/msc/gsm_data.h 1 file changed, 19 insertions(+), 19 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, but someone else must approve diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 4d493cb..e0fbcec 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -297,26 +297,26 @@ }; static const struct rate_ctr_desc msc_ctr_description[] = { - [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type.attach", "Received location update imsi attach requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type.normal", "Received location update normal requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type.periodic", "Received location update periodic requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type.detach", "Received location update detach indication."}, - [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp.failed", "Rejected location updates."}, - [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp.completed", "Successful location updates."}, - [MSC_CTR_SMS_SUBMITTED] = {"sms.submitted", "Received a RPDU from a MS (MO)."}, - [MSC_CTR_SMS_NO_RECEIVER] = {"sms.no_receiver", "Counts SMS which couldn't routed because no receiver found."}, - [MSC_CTR_SMS_DELIVERED] = {"sms.delivered", "Global SMS Deliver attempts."}, - [MSC_CTR_SMS_RP_ERR_MEM] = {"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, - [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."}, - [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms.deliver_unknown_error", "Unknown error occured during sms delivery."}, + [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type:attach", "Received location update imsi attach requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type:normal", "Received location update normal requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type:periodic", "Received location update periodic requests."}, + [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type:detach", "Received location update detach indication."}, + [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp:failed", "Rejected location updates."}, + [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp:completed", "Successful location updates."}, + [MSC_CTR_SMS_SUBMITTED] = {"sms:submitted", "Received a RPDU from a MS (MO)."}, + [MSC_CTR_SMS_NO_RECEIVER] = {"sms:no_receiver", "Counts SMS which couldn't routed because no receiver found."}, + [MSC_CTR_SMS_DELIVERED] = {"sms:delivered", "Global SMS Deliver attempts."}, + [MSC_CTR_SMS_RP_ERR_MEM] = {"sms:rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, + [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms:rp_err_other", "Other error of MS responses on a sms delive attempt."}, + [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Unknown error occured during sms delivery."}, /* FIXME: count also sms delivered */ - [MSC_CTR_CALL_MO_SETUP] = {"call.mo_setup", "Received setup requests from a MS to init a MO call."}, - [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, - [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, - [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, - [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, - [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, - [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, + [MSC_CTR_CALL_MO_SETUP] = {"call:mo_setup", "Received setup requests from a MS to init a MO call."}, + [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call:mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, + [MSC_CTR_CALL_MT_SETUP] = {"call:mt_setup", "Sent setup requests to the MS (MT)."}, + [MSC_CTR_CALL_MT_CONNECT] = {"call:mt_connect", "Sent a connect to the MS (MT)."}, + [MSC_CTR_CALL_ACTIVE] = {"call:active", "Count total amount of calls that ever reached active state."}, + [MSC_CTR_CALL_COMPLETE] = {"call:complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, + [MSC_CTR_CALL_INCOMPLETE] = {"call:incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, }; -- To view, visit https://gerrit.osmocom.org/4922 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:49:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:49:33 +0000 Subject: [MERGED] osmo-msc[master]: vlr_gsupc_read_cb: fix use after free of GSUP msgb In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vlr_gsupc_read_cb: fix use after free of GSUP msgb ...................................................................... vlr_gsupc_read_cb: fix use after free of GSUP msgb osmo_gsup_decode() doesn't actually decode everything, it does leave quite a number of pointers into the original msgb. Hence we must not deallocate the gsup msgb before dispatching GSUP events. Move msgb_free() to the bottom of vlr_gsupc_read_cb() and use rc and gotos to early-exit if needed. Change-Id: I16fc92dcf84e29fcf34712a2e8b0464ef08425ad --- M src/libvlr/vlr.c 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 07c31ee..4ef52da 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -804,12 +804,11 @@ osmo_hexdump_nospc(msgb_l2(msg), msgb_l2len(msg))); rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); - msgb_free(msg); if (rc < 0) { LOGP(DVLR, LOGL_ERROR, "decoding GSUP message fails with error '%s' (%d)\n", get_value_string(gsm48_gmm_cause_names, -rc), -rc); - return rc; + goto msgb_free_and_return; } if (!gsup.imsi[0]) { @@ -817,7 +816,8 @@ if (OSMO_GSUP_IS_MSGT_REQUEST(gsup.message_type)) vlr_tx_gsup_error_reply(vlr, &gsup, GMM_CAUSE_INV_MAND_INFO); - return -GMM_CAUSE_INV_MAND_INFO; + rc = -GMM_CAUSE_INV_MAND_INFO; + goto msgb_free_and_return; } vsub = vlr_subscr_find_by_imsi(vlr, gsup.imsi); @@ -825,9 +825,11 @@ switch (gsup.message_type) { case OSMO_GSUP_MSGT_PURGE_MS_RESULT: case OSMO_GSUP_MSGT_PURGE_MS_ERROR: - return vlr_rx_gsup_purge_no_subscr(vlr, &gsup); + rc = vlr_rx_gsup_purge_no_subscr(vlr, &gsup); + goto msgb_free_and_return; default: - return vlr_rx_gsup_unknown_imsi(vlr, &gsup); + rc = vlr_rx_gsup_unknown_imsi(vlr, &gsup); + goto msgb_free_and_return; } } @@ -865,6 +867,9 @@ } vlr_subscr_put(vsub); + +msgb_free_and_return: + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/4924 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16fc92dcf84e29fcf34712a2e8b0464ef08425ad Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:51:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 13:51:52 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Patch Set 2: > > How does this help you? If that is the expected put it into the > .ok > > file? Not following you here. :) > > I'd have liked to put it in the .ok or .err files, but the talloc > report contains memory addresses that aren't constant. Hence I only > check the size and output the report if something is unexpected. At > that point, there is no reference to compare to, hence the comment. > > Would be nice to have a talloc report that is fully reproducible. > Those addresses usually don't help much anyway. One would "simply" have to implement a talloc table walker similar to what Vadim has done for the "show talloc-context" VTY code. -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:55:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 13:55:07 +0000 Subject: libosmo-netif[master]: gitignore: vim swp files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4934 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0013625df95c5600479953e6f83b848efadb525a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:56:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 13:56:19 +0000 Subject: libosmocore[master]: msgb: add inline msgb_queue_free() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:56:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 13:56:30 +0000 Subject: libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:56:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 13:56:39 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: add IP forward and Masquerading section In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4912/1/OsmoGGSN/chapters/running.adoc File OsmoGGSN/chapters/running.adoc: Line 26: internet uplink, OsmoGGSN usually requires IP Forwarding and Masquerading to be > I don't really like the idea of telling people to outright enable masquerad I must admit that I'm not closely familiar with the finer points of masquerading and ip forwarding, all I know is that GPRS started working when I enabled those, and hence I'd like to see it in the manual so I can look it up... So I guess I'm not sufficiently qualified to write a manual section on the subject. I guess I could mold your comments into instructions in the hope that they will make sense. -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 13:56:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 13:56:58 +0000 Subject: libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 14:15:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 14:15:18 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: add Routing section for IP forward and masquerading In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4912 to look at the new patch set (#2). OsmoGGSN: add Routing section for IP forward and masquerading Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 --- M OsmoGGSN/chapters/running.adoc 1 file changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/12/4912/2 diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index ef899b5..83470e8 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -20,6 +20,38 @@ used. If none is specified, use `osmo-ggsn.cfg` in the current working directory. +=== Routing + +Operating the OpenGGSN tun device naturally creates a network setup with +multiple interfaces. Consider: + +* Typical Linux setups prevent forwarding of packets between separate + interfaces by default. To let subscribers reach the internet uplink from the + tun device, it may be required to enable IP forwarding. + +* Having a locally defined address range assigned to the tun device requires + either sensible routing for this address range, or that masquerading is + enabled to allow your single uplink IP address to "proxy" for the tun. + +These are decisions to be made on a network administration level. + +In a trivial case where you have a single box serving GPRS to few subscribers +on an arbitrary IP address range not known in the larger network, the easiest +way to enable GPRS uplink would be to enable IP forwarding and masquerading. + +To manually enable IPv4 forwarding and masquerading ad-hoc, you can do: + +---- +sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" +iptables -t nat -A POSTROUTING -o '*' -j MASQUERADE +---- + +(You may want to replace `*` with the network device name, like `-o eth0`) + +There are various ways to enable these settings persistently, please refer to +your distribution's documentation -- e.g. look for @net.ipv4.ip_forward=1@ in +@/etc/sysctl.d/@, and https://wiki.debian.org/iptables for masquerading. + === Multiple instances Running multiple instances of `osmo-ggsn` is possible if all GGSN instances -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 14:24:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 14:24:09 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: add Routing section for IP forward and masquerading In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4912/1/OsmoGGSN/chapters/running.adoc File OsmoGGSN/chapters/running.adoc: Line 26: internet uplink, OsmoGGSN usually requires IP Forwarding and Masquerading to be > I must admit that I'm not closely familiar with the finer points of masquer It's not about a "finer point" but about fundamental concepts of IP networks, such as routing. I would generally assume that somebody configuring a GGSN will at the very least have a good understanding of IP networks to begin with. Masquerading (like any form of NAT) is an ugly kludge primarily to deal with IPv4 address shortage. People should not use it as a preventive measure, but only when intended and not otherwise avoidable. -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 14:31:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 14:31:25 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4915 to look at the new patch set (#2). sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/2 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..a7160d2 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -27,7 +27,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +73,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +87,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +101,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..bca1015 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -159,6 +159,7 @@ .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; struct ul66_t eua; + uint32_t v4_addr; printf("testing in46a_to_eua()\n"); @@ -171,7 +172,9 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&v4_addr, &eua.v[2], sizeof(v4_addr)); + OSMO_ASSERT(v4_addr == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 14:36:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 14:36:20 +0000 Subject: [PATCH] osmo-iuh[master]: tests: sanitize: clean after tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4916 to look at the new patch set (#3). tests: sanitize: clean after tests Add test_common_cleanup() in test_common.c, call in test-{helpers,hnbap,ranap}.c, so that any memleaks a sanitize build finds are real bugs. Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c --- M src/tests/test-helpers.c M src/tests/test-hnbap.c M src/tests/test-ranap.c M src/tests/test_common.c M src/tests/test_common.h 5 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/16/4916/3 diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 44fd735..33ef2e1 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -211,5 +211,6 @@ test_asn1_helpers(); test_ranap_common(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index ef46070..1e3607b 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -175,6 +175,7 @@ test_asn1_decoding(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c1c7003..05be874 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -197,6 +197,8 @@ talloc_report(talloc_asn1_ctx, stdout); talloc_report(tall_msgb_ctx, stdout); //talloc_report(NULL, stdout); + + test_common_cleanup(); printf("exit\n"); exit(0); } diff --git a/src/tests/test_common.c b/src/tests/test_common.c index c8aafdd..a487d0d 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -69,11 +69,13 @@ .num_cat = ARRAY_SIZE(log_cat), }; +static void *msgb_ctx; + int test_common_init(void) { int rc; - msgb_talloc_ctx_init(NULL, 0); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); @@ -85,3 +87,14 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); } + +void test_common_cleanup(void) +{ + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + talloc_free(msgb_ctx); + + OSMO_ASSERT(talloc_total_blocks(talloc_asn1_ctx) == 1); + OSMO_ASSERT(talloc_total_size(talloc_asn1_ctx) == 0); + talloc_free(talloc_asn1_ctx); +} diff --git a/src/tests/test_common.h b/src/tests/test_common.h index 1af1abd..836d999 100644 --- a/src/tests/test_common.h +++ b/src/tests/test_common.h @@ -1,3 +1,4 @@ #pragma once int test_common_init(void); +void test_common_cleanup(void); -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 14:40:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 14:40:35 +0000 Subject: osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: talloc endp from cfg In-Reply-To: References: Message-ID: Patch Set 1: > so so. As a "policy" we didn't really want to rely on talloc > hierarchy (or it's destructor support). So here we "free" the > endpoint.. but what about the socket fd? you mean to use mgcp_release_endp() instead? since this is "just" a test case I didn't pay close attention, just wanted the build to pass ;) -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 15:42:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 15:42:55 +0000 Subject: osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 15:42:57 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 15:42:57 +0000 Subject: osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 15:43:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 15:43:00 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Move Test class to its own test.py module In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Move Test class to its own test.py module ...................................................................... Move Test class to its own test.py module Make the code more reachable for newcomers, as well as more organized for people who work a lot with it. SuiteRun in suite.py is already quite big, and having the Test class in there make it unnecessarily more big, and makes it difficult to find stuff. At the same time, having a test.py which does actually not contain the Test class but other stuff, makes it even more confusing. Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a --- M selftest/suite_test.ok M src/osmo_gsm_tester/report.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/test.py 4 files changed, 149 insertions(+), 123 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok index cd5a9e7..79c37cc 100644 --- a/selftest/suite_test.ok +++ b/selftest/suite_test.ok @@ -110,7 +110,7 @@ ---------------------------------------------- tst test_error.py:[LINENR]: I am 'test_suite' / 'test_error.py:[LINENR]' [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]] tst test_error.py:[LINENR]: ERR: AssertionError: test_error.py:[LINENR]: assert False [test_suite?test_error.py:[LINENR]] [test_error.py:[LINENR]: assert False] -tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [suite.py:[LINENR]] +tst test_error.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_error.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -133,7 +133,7 @@ ---------------------------------------------- tst test_fail.py:[LINENR]: I am 'test_suite' / 'test_fail.py:[LINENR]' [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] tst test_fail.py:[LINENR]: ERR: EpicFail: This failure is expected [test_suite?test_fail.py:[LINENR]] [test_fail.py:[LINENR]] -tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -155,7 +155,7 @@ trial test_suite test_fail_raise.py ---------------------------------------------- tst test_fail_raise.py:[LINENR]: ERR: ExpectedFail: This failure is expected [test_suite?test_fail_raise.py:[LINENR]] [test_fail_raise.py:[LINENR]: raise ExpectedFail('This failure is expected')] -tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [suite.py:[LINENR]] +tst test_fail_raise.py:[LINENR]: Test FAILED (N.N sec) [test_suite?test_fail_raise.py:[LINENR]] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite FAIL --------------------------------------------------------------------- @@ -233,7 +233,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- @@ -311,7 +311,7 @@ tst hello_world.py:[LINENR]: one [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: two [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] tst hello_world.py:[LINENR]: three [test_suite?hello_world.py:[LINENR]] [hello_world.py:[LINENR]] -tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [suite.py:[LINENR]] +tst hello_world.py:[LINENR] Test passed (N.N sec) [test_suite?hello_world.py] [test.py:[LINENR]] --------------------------------------------------------------------- trial test_suite PASS --------------------------------------------------------------------- diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py index 82b2f13..a53504b 100644 --- a/src/osmo_gsm_tester/report.py +++ b/src/osmo_gsm_tester/report.py @@ -21,7 +21,7 @@ import math from datetime import datetime import xml.etree.ElementTree as et -from . import log, suite +from . import log, suite, test def trial_to_junit_write(trial, junit_path): elements = et.ElementTree(element=trial_to_junit(trial)) @@ -48,20 +48,20 @@ testsuite.append(testcase) return testsuite -def test_to_junit(test): +def test_to_junit(t): testcase = et.Element('testcase') - testcase.set('name', test.name()) - testcase.set('time', str(math.ceil(test.duration))) - if test.status == suite.Test.SKIP: + testcase.set('name', t.name()) + testcase.set('time', str(math.ceil(t.duration))) + if t.status == test.Test.SKIP: skip = et.SubElement(testcase, 'skipped') - elif test.status == suite.Test.FAIL: + elif t.status == test.Test.FAIL: failure = et.SubElement(testcase, 'failure') - failure.set('type', test.fail_type or 'failure') - failure.text = test.fail_message - if test.fail_tb: + failure.set('type', t.fail_type or 'failure') + failure.text = t.fail_message + if t.fail_tb: system_err = et.SubElement(testcase, 'system-err') - system_err.text = test.fail_tb - elif test.status != suite.Test.PASS: + system_err.text = t.fail_tb + elif t.status != test.Test.PASS: error = et.SubElement(testcase, 'error') error.text = 'could not run' return testcase @@ -102,12 +102,12 @@ msgs.extend([test_to_text(t) for t in suite.tests]) return '\n '.join(msgs) -def test_to_text(test): - msgs = ['%s: %s' % (test.status, test.name())] - if test.start_timestamp: - msgs.append('(%.1f sec)' % test.duration) - if test.status == suite.Test.FAIL: - msgs.append('%s: %s' % (test.fail_type, test.fail_message)) +def test_to_text(t): + msgs = ['%s: %s' % (t.status, t.name())] + if t.start_timestamp: + msgs.append('(%.1f sec)' % t.duration) + if t.status == test.Test.FAIL: + msgs.append('%s: %s' % (t.fail_type, t.fail_message)) return ' '.join(msgs) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 5b9df76..25aef35 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -20,11 +20,9 @@ import os import sys import time -import traceback import pprint -from . import config, log, template, util, resource, schema, event_loop -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms -from . import testenv +from . import config, log, template, util, resource, schema, event_loop, test +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme class Timeout(Exception): pass @@ -59,94 +57,6 @@ continue self.test_basenames.append(basename) - -class Test(log.Origin): - UNKNOWN = 'UNKNOWN' - SKIP = 'skip' - PASS = 'pass' - FAIL = 'FAIL' - - _run_dir = None - - def __init__(self, suite_run, test_basename): - self.basename = test_basename - super().__init__(log.C_TST, self.basename) - self.suite_run = suite_run - self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) - self.status = Test.UNKNOWN - self.start_timestamp = 0 - self.duration = 0 - self.fail_type = None - self.fail_message = None - - def get_run_dir(self): - if self._run_dir is None: - self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) - return self._run_dir - - def run(self): - try: - log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) - self.status = Test.UNKNOWN - self.start_timestamp = time.time() - testenv.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) - with self.redirect_stdout(): - util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), - self.path) - if self.status == Test.UNKNOWN: - self.set_pass() - except Exception as e: - if hasattr(e, 'msg'): - msg = e.msg - else: - msg = str(e) - if isinstance(e, AssertionError): - # AssertionError lacks further information on what was - # asserted. Find the line where the code asserted: - msg += log.get_src_from_exc_info(sys.exc_info()) - # add source file information to failure report - if hasattr(e, 'origins'): - msg += ' [%s]' % e.origins - tb_str = traceback.format_exc() - if isinstance(e, resource.NoResourceExn): - tb_str += self.suite_run.resource_status_str() - self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) - except BaseException as e: - # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. - self.err('TEST RUN ABORTED: %s' % type(e).__name__) - raise - - def name(self): - l = log.get_line_for_src(self.path) - if l is not None: - return '%s:%s' % (self._name, l) - return super().name() - - def set_fail(self, fail_type, fail_message, tb_str=None, src=4): - self.status = Test.FAIL - self.duration = time.time() - self.start_timestamp - self.fail_type = fail_type - self.fail_message = fail_message - - if tb_str is None: - # populate an exception-less call to set_fail() with traceback info - tb_str = ''.join(traceback.format_stack()[:-1]) - - self.fail_tb = tb_str - self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) - if self.fail_tb: - self.log(self.fail_tb, _level=log.L_TRACEBACK) - self.log('Test FAILED (%.1f sec)' % self.duration) - - def set_pass(self): - self.status = Test.PASS - self.duration = time.time() - self.start_timestamp - self.log('Test passed (%.1f sec)' % self.duration) - - def set_skip(self): - self.status = Test.SKIP - self.duration = 0 - class SuiteRun(log.Origin): UNKNOWN = 'UNKNOWN' PASS = 'PASS' @@ -176,7 +86,7 @@ def load_tests(self): self.tests = [] for test_basename in self.definition.test_basenames: - self.tests.append(Test(self, test_basename)) + self.tests.append(test.Test(self, test_basename)) def register_for_cleanup(self, *obj): assert all([hasattr(o, 'cleanup') for o in obj]) @@ -243,12 +153,12 @@ event_loop.register_poll_func(self.poll) if not self.reserved_resources: self.reserve_resources() - for test in self.tests: - if names and not test.name() in names: - test.set_skip() + for t in self.tests: + if names and not t.name() in names: + t.set_skip() continue - self.current_test = test - test.run() + self.current_test = t + t.run() self.stop_processes() self.objects_cleanup() self.reserved_resources.put_all() @@ -284,10 +194,10 @@ passed = 0 skipped = 0 failed = 0 - for test in self.tests: - if test.status == Test.PASS: + for t in self.tests: + if t.status == test.Test.PASS: passed += 1 - elif test.status == Test.FAIL: + elif t.status == test.Test.FAIL: failed += 1 else: skipped += 1 diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py new file mode 100644 index 0000000..82b290f --- /dev/null +++ b/src/osmo_gsm_tester/test.py @@ -0,0 +1,116 @@ +# osmo_gsm_tester: test class +# +# Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import time +import traceback +from . import testenv + +from . import log, util, resource + +class Test(log.Origin): + UNKNOWN = 'UNKNOWN' + SKIP = 'skip' + PASS = 'pass' + FAIL = 'FAIL' + + _run_dir = None + + def __init__(self, suite_run, test_basename): + self.basename = test_basename + super().__init__(log.C_TST, self.basename) + self.suite_run = suite_run + self.path = os.path.join(self.suite_run.definition.suite_dir, self.basename) + self.status = Test.UNKNOWN + self.start_timestamp = 0 + self.duration = 0 + self.fail_type = None + self.fail_message = None + + def get_run_dir(self): + if self._run_dir is None: + self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) + return self._run_dir + + def run(self): + try: + log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) + self.status = Test.UNKNOWN + self.start_timestamp = time.time() + from . import suite, event_loop, sms + testenv.setup(self.suite_run, self, suite, event_loop, sms) + with self.redirect_stdout(): + util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), + self.path) + if self.status == Test.UNKNOWN: + self.set_pass() + except Exception as e: + if hasattr(e, 'msg'): + msg = e.msg + else: + msg = str(e) + if isinstance(e, AssertionError): + # AssertionError lacks further information on what was + # asserted. Find the line where the code asserted: + msg += log.get_src_from_exc_info(sys.exc_info()) + # add source file information to failure report + if hasattr(e, 'origins'): + msg += ' [%s]' % e.origins + tb_str = traceback.format_exc() + if isinstance(e, resource.NoResourceExn): + tb_str += self.suite_run.resource_status_str() + self.set_fail(type(e).__name__, msg, tb_str, log.get_src_from_exc_info()) + except BaseException as e: + # when the program is aborted by a signal (like Ctrl-C), escalate to abort all. + self.err('TEST RUN ABORTED: %s' % type(e).__name__) + raise + + def name(self): + l = log.get_line_for_src(self.path) + if l is not None: + return '%s:%s' % (self._name, l) + return super().name() + + def set_fail(self, fail_type, fail_message, tb_str=None, src=4): + self.status = Test.FAIL + self.duration = time.time() - self.start_timestamp + self.fail_type = fail_type + self.fail_message = fail_message + + if tb_str is None: + # populate an exception-less call to set_fail() with traceback info + tb_str = ''.join(traceback.format_stack()[:-1]) + + self.fail_tb = tb_str + self.err('%s: %s' % (self.fail_type, self.fail_message), _src=src) + if self.fail_tb: + self.log(self.fail_tb, _level=log.L_TRACEBACK) + self.log('Test FAILED (%.1f sec)' % self.duration) + + def set_pass(self): + self.status = Test.PASS + self.duration = time.time() - self.start_timestamp + self.log('Test passed (%.1f sec)' % self.duration) + + def set_skip(self): + self.status = Test.SKIP + self.duration = 0 + +# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/4764 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 20 15:43:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 15:43:00 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Rename test module to testenv and update references In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Rename test module to testenv and update references ...................................................................... Rename test module to testenv and update references Preparation to move current Test class into its own module test from suite module. Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 --- M selftest/suite_test/test_suite/hello_world.py M selftest/suite_test/test_suite/test_error.py M selftest/suite_test/test_suite/test_fail.py M src/osmo_gsm_tester/suite.py R src/osmo_gsm_tester/testenv.py M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_connect_policy_acceptall.py M suites/aoip_smpp/esme_connect_policy_closed.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/debug/error.py M suites/debug/fail.py M suites/debug/fail_raise.py M suites/debug/interactive.py M suites/debug/pass.py M suites/netreg/register.py M suites/netreg/register_default.py M suites/smpp/esme_connect_policy_acceptall.py M suites/smpp/esme_connect_policy_closed.py M suites/smpp/esme_ms_sms_storeforward.py M suites/smpp/esme_ms_sms_transaction.py M suites/sms/mo_mt_sms.py M suites/ussd/assert_extension.py M suites/voice/mo_mt_call.py 29 files changed, 30 insertions(+), 30 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/selftest/suite_test/test_suite/hello_world.py b/selftest/suite_test/test_suite/hello_world.py index 9f3bf4a..073d07f 100644 --- a/selftest/suite_test/test_suite/hello_world.py +++ b/selftest/suite_test/test_suite/hello_world.py @@ -1,4 +1,4 @@ -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('hello world') print('I am %r / %r' % (suite.name(), test.name())) diff --git a/selftest/suite_test/test_suite/test_error.py b/selftest/suite_test/test_suite/test_error.py index 17b05f4..c0583ff 100755 --- a/selftest/suite_test/test_suite/test_error.py +++ b/selftest/suite_test/test_suite/test_error.py @@ -1,4 +1,4 @@ -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('I am %r / %r' % (suite.name(), test.name())) diff --git a/selftest/suite_test/test_suite/test_fail.py b/selftest/suite_test/test_suite/test_fail.py index 6880c81..cbaeded 100755 --- a/selftest/suite_test/test_suite/test_fail.py +++ b/selftest/suite_test/test_suite/test_fail.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('I am %r / %r' % (suite.name(), test.name())) diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 1a96b1e..5b9df76 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -24,7 +24,7 @@ import pprint from . import config, log, template, util, resource, schema, event_loop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme, sms -from . import test +from . import testenv class Timeout(Exception): pass @@ -89,7 +89,7 @@ log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) self.status = Test.UNKNOWN self.start_timestamp = time.time() - test.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) + testenv.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), self.path) diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/testenv.py similarity index 97% rename from src/osmo_gsm_tester/test.py rename to src/osmo_gsm_tester/testenv.py index b939054..26b492e 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/testenv.py @@ -19,7 +19,7 @@ # These will be initialized before each test run. # A test script can thus establish its context by doing: -# from osmo_gsm_tester.test import * +# from osmo_gsm_tester.testenv import * trial = None suite = None test = None diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cfa5d6c..98b9170 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 6e5e459..f528742 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 428fc8d..a192ff3 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index 59e3fac..f5bccfb 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_smpp/esme_connect_policy_acceptall.py b/suites/aoip_smpp/esme_connect_policy_acceptall.py index 2a954d5..34516a3 100755 --- a/suites/aoip_smpp/esme_connect_policy_acceptall.py +++ b/suites/aoip_smpp/esme_connect_policy_acceptall.py @@ -4,7 +4,7 @@ # * SMPP interface of SMSC accepts SMPP clients (ESMEs) which do not appear on # the config file -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() # bts not started, only needed for mgcpgw diff --git a/suites/aoip_smpp/esme_connect_policy_closed.py b/suites/aoip_smpp/esme_connect_policy_closed.py index 29b25d1..79cb0c7 100755 --- a/suites/aoip_smpp/esme_connect_policy_closed.py +++ b/suites/aoip_smpp/esme_connect_policy_closed.py @@ -6,7 +6,7 @@ # * SMPP interface of SMSC rejects ESMEs with known system id but wrong password. # * SMPP interface of SMSC rejects ESEMs with unknown system id -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVPASWD = 0x0000000E SMPP_ESME_RINVSYSID = 0x0000000F diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index d49401f..f0d5dd5 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -8,7 +8,7 @@ # * When SMS is sent in 'store & forward' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'store & forward' mode, ESME receives a SMS receipt if it asked for it. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 6892a7e..2b12829 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -6,7 +6,7 @@ # * When SMS is sent in 'transaction' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'transaction' mode, ESME fails to send an SMS to non registered MS. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index a7c1f48..12f8f2b 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 36d6222..5204be8 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * USSD_COMMAND_GET_EXTENSION = '*#100#' diff --git a/suites/debug/error.py b/suites/debug/error.py index 8e146fa..032e26c 100644 --- a/suites/debug/error.py +++ b/suites/debug/error.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test error is reported properly. assert False diff --git a/suites/debug/fail.py b/suites/debug/fail.py index 8e30578..a2d9e3a 100644 --- a/suites/debug/fail.py +++ b/suites/debug/fail.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test failure is reported properly. test.set_fail('ExpectedFail', 'This failure is expected') diff --git a/suites/debug/fail_raise.py b/suites/debug/fail_raise.py index 336029b..c30a4f5 100644 --- a/suites/debug/fail_raise.py +++ b/suites/debug/fail_raise.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * class ExpectedExn(Exception): pass diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index d5f7615..6df5b6d 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/debug/pass.py b/suites/debug/pass.py index 42c1f25..c07f079 100644 --- a/suites/debug/pass.py +++ b/suites/debug/pass.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * # This can be used to verify that a test passes correctly. pass diff --git a/suites/netreg/register.py b/suites/netreg/register.py index 9141986..9807d2b 100755 --- a/suites/netreg/register.py +++ b/suites/netreg/register.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/netreg/register_default.py b/suites/netreg/register_default.py index d15b3f5..797b2c1 100755 --- a/suites/netreg/register_default.py +++ b/suites/netreg/register_default.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * print('use resources...') nitb = suite.nitb() diff --git a/suites/smpp/esme_connect_policy_acceptall.py b/suites/smpp/esme_connect_policy_acceptall.py index d22703d..904226b 100755 --- a/suites/smpp/esme_connect_policy_acceptall.py +++ b/suites/smpp/esme_connect_policy_acceptall.py @@ -4,7 +4,7 @@ # * SMPP interface of SMSC accepts SMPP clients (ESMEs) which do not appear on # the config file -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * nitb = suite.nitb() smsc = nitb.smsc diff --git a/suites/smpp/esme_connect_policy_closed.py b/suites/smpp/esme_connect_policy_closed.py index 7fac276..eaabb3d 100755 --- a/suites/smpp/esme_connect_policy_closed.py +++ b/suites/smpp/esme_connect_policy_closed.py @@ -6,7 +6,7 @@ # * SMPP interface of SMSC rejects ESMEs with known system id but wrong password. # * SMPP interface of SMSC rejects ESEMs with unknown system id -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVPASWD = 0x0000000E SMPP_ESME_RINVSYSID = 0x0000000F diff --git a/suites/smpp/esme_ms_sms_storeforward.py b/suites/smpp/esme_ms_sms_storeforward.py index 5ff6ad3..c35e3b1 100755 --- a/suites/smpp/esme_ms_sms_storeforward.py +++ b/suites/smpp/esme_ms_sms_storeforward.py @@ -8,7 +8,7 @@ # * When SMS is sent in 'store & forward' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'store & forward' mode, ESME receives a SMS receipt if it asked for it. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/smpp/esme_ms_sms_transaction.py b/suites/smpp/esme_ms_sms_transaction.py index a147754..efc244c 100755 --- a/suites/smpp/esme_ms_sms_transaction.py +++ b/suites/smpp/esme_ms_sms_transaction.py @@ -6,7 +6,7 @@ # * When SMS is sent in 'transaction' mode, ESME can send an SMS to an already registered MS. # * When SMS is sent in 'transaction' mode, ESME fails to send an SMS to non registered MS. -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * SMPP_ESME_RINVDSTADR = 0x0000000B diff --git a/suites/sms/mo_mt_sms.py b/suites/sms/mo_mt_sms.py index 4e0ba08..f729f99 100755 --- a/suites/sms/mo_mt_sms.py +++ b/suites/sms/mo_mt_sms.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * nitb = suite.nitb() bts = suite.bts() diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 717c58d..77e5423 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * USSD_COMMAND_GET_EXTENSION = '*#100#' diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index 8cd3b23..b2d6f8d 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() -- To view, visit https://gerrit.osmocom.org/4763 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:00:50 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: drop erratic log line on remote STP address Message-ID: Review at https://gerrit.osmocom.org/4935 osmo-hnbgw: drop erratic log line on remote STP address The stp_host is just the *default* that may be overridden by the VTY configuration. Don't log it as the one that is going to be used. It's not trivial to print the actual IP address being used, there may be any number of ASP, theoretically. Hence leave logging up to osmo_sccp_simple_client_on_ss7_id(), after another hypothetical patch. Change-Id: Ia438143606913faccc8cdf4fd5f7d376f93e7891 --- M src/hnbgw_cn.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/35/4935/1 diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 3b828b4..81ef670 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -474,8 +474,6 @@ local_pc = ss7->cfg.primary_pc; osmo_sccp_make_addr_pc_ssn(&gw->sccp.local_addr, local_pc, OSMO_SCCP_SSN_RANAP); - - LOGP(DRANAP, LOGL_NOTICE, "M3UA uplink to STP: %s %u\n", stp_host, stp_port); LOGP(DRANAP, LOGL_NOTICE, "Local SCCP addr: %s\n", osmo_sccp_addr_name(ss7, &gw->sccp.local_addr)); gw->sccp.client = osmo_sccp_simple_client_on_ss7_id(gw, ss7->cfg.id, "OsmoHNBGW", -- To view, visit https://gerrit.osmocom.org/4935 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia438143606913faccc8cdf4fd5f7d376f93e7891 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:05:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 16:05:34 +0000 Subject: osmo-gsm-tester[master]: Configure bsc and msc to connect to the specific stp provide... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4857 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:05:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 16:05:43 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Configure bsc and msc to connect to the specific stp provide... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Configure bsc and msc to connect to the specific stp provided in test ...................................................................... Configure bsc and msc to connect to the specific stp provided in test Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f --- M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_stp.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_connect_policy_acceptall.py M suites/aoip_smpp/esme_connect_policy_closed.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/voice/mo_mt_call.py 18 files changed, 53 insertions(+), 30 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 736fe8f..6d84cf5 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -31,14 +31,16 @@ bts = None encryption = None mgw = None + stp = None - def __init__(self, suite_run, msc, mgw, ip_address): + def __init__(self, suite_run, msc, mgw, stp, ip_address): super().__init__(log.C_RUN, 'osmo-bsc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.bts = [] self.msc = msc self.mgw = mgw + self.stp = stp def start(self): self.log('Starting osmo-bsc') @@ -76,6 +78,7 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(bsc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgw.conf_for_client()) + config.overlay(values, self.stp.conf_for_client()) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index 67234e3..cdeec1b 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -31,15 +31,17 @@ hlr = None config = None smsc = None + stp = None encryption = None authentication = None - def __init__(self, suite_run, hlr, mgcpgw, ip_address): + def __init__(self, suite_run, hlr, mgcpgw, stp, ip_address): super().__init__(log.C_RUN, 'osmo-msc_%s' % ip_address.get('addr')) self.suite_run = suite_run self.ip_address = ip_address self.hlr = hlr self.mgcpgw = mgcpgw + self.stp = stp self.smsc = smsc.Smsc((ip_address.get('addr'), 2775)) def start(self): @@ -77,6 +79,7 @@ config.overlay(values, dict(msc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgcpgw.conf_for_msc()) config.overlay(values, self.hlr.conf_for_msc()) + config.overlay(values, self.stp.conf_for_client()) config.overlay(values, self.smsc.get_config()) # runtime parameters: diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index cc3906f..c4c6c04 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,10 +48,9 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - # TODO: osmo-stp is not yet configurable to a specific IP address - #iface = util.ip_to_iface(self.addr()) - #pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, - # 'host %s and port not 22' % self.addr()) + iface = util.ip_to_iface(self.addr()) + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } @@ -78,6 +77,9 @@ self.dbg(r) f.write(r) + def conf_for_client(self): + return dict(stp=dict(ip_address=self.ip_address)) + def addr(self): return self.ip_address.get('addr') diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 25aef35..2d04937 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -240,15 +240,15 @@ ip_address = self.ip_address() return osmo_mgw.OsmoMgw(self, ip_address) - def msc(self, hlr, mgcpgw, ip_address=None): + def msc(self, hlr, mgcpgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_msc.OsmoMsc(self, hlr, mgcpgw, ip_address) + return osmo_msc.OsmoMsc(self, hlr, mgcpgw, stp, ip_address) - def bsc(self, msc, mgw, ip_address=None): + def bsc(self, msc, mgw, stp, ip_address=None): if ip_address is None: ip_address = self.ip_address() - return osmo_bsc.OsmoBsc(self, msc, mgw, ip_address) + return osmo_bsc.OsmoBsc(self, msc, mgw, stp, ip_address) def stp(self, ip_address=None): if ip_address is None: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2f06710..1b21e63 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -15,6 +15,11 @@ ipa bind ${bsc.ip_address.addr} cs7 instance 1 point-code 0.0.2 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 2 0.0.2 sccp-address bsc_local point-code 0.0.2 routing-indicator PC diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 9ac68b3..149833a 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -19,6 +19,11 @@ authentication ${msc.net.authentication} cs7 instance 0 point-code 0.0.1 + asp asp0 2905 0 m3ua + remote-ip ${stp.ip_address.addr} + as as0 m3ua + asp asp0 + routing-key 1 0.0.1 msc mgw remote-ip ${mgw.ip_address.addr} assign-tmsi diff --git a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl index eb6ac1d..6504b9e 100644 --- a/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-stp.cfg.tmpl @@ -14,3 +14,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + local-ip ${stp.ip_address.addr} diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 98b9170..cad68b7 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -4,9 +4,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) modems = suite.modems(int(prompt('How many modems?'))) hlr.start() diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index f528742..75614e2 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index a192ff3..07293d2 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index f5bccfb..190e5bb 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() print('start network...') diff --git a/suites/aoip_smpp/esme_connect_policy_acceptall.py b/suites/aoip_smpp/esme_connect_policy_acceptall.py index 34516a3..ef5db4e 100755 --- a/suites/aoip_smpp/esme_connect_policy_acceptall.py +++ b/suites/aoip_smpp/esme_connect_policy_acceptall.py @@ -9,7 +9,8 @@ hlr = suite.hlr() bts = suite.bts() # bts not started, only needed for mgcpgw mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -18,6 +19,7 @@ smsc.set_smsc_policy(smsc.SMSC_POLICY_ACCEPT_ALL) esme.set_smsc(smsc) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_connect_policy_closed.py b/suites/aoip_smpp/esme_connect_policy_closed.py index 79cb0c7..263b428 100755 --- a/suites/aoip_smpp/esme_connect_policy_closed.py +++ b/suites/aoip_smpp/esme_connect_policy_closed.py @@ -14,7 +14,8 @@ hlr = suite.hlr() bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) -msc = suite.msc(hlr, mgcpgw) +stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) smsc = msc.smsc esme = suite.esme() @@ -25,6 +26,7 @@ smsc.esme_add(esme) smsc.esme_add(esme_no_pwd) +stp.start() hlr.start() msc.start() mgcpgw.start() diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index f0d5dd5..79c570e 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -16,9 +16,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index 2b12829..e20b2b6 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -14,9 +14,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) bsc.bts_add(bts) ms = suite.modem() diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 12f8f2b..76b7e51 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 5204be8..181f07f 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -7,9 +7,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms = suite.modem() hlr.start() diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index b2d6f8d..46c5ec8 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -5,9 +5,9 @@ bts = suite.bts() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() -msc = suite.msc(hlr, mgcpgw) -bsc = suite.bsc(msc, mgw_bsc) stp = suite.stp() +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) ms_mo = suite.modem() ms_mt = suite.modem() -- To view, visit https://gerrit.osmocom.org/4857 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:07:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:07:22 +0000 Subject: [PATCH] osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4928 to look at the new patch set (#2). ranap_msg_factory: sanitize: memcpy instead of unaligned int copy The sanitize build complains about writing to a uint32_t that is not 4-byte aligned. Instead, write the uint32_t by memcpy. For that, move the common ntohl() to the top and store in a local uint32_t, memcpy() from that in both code paths. Change-Id: Iacdd15421f824dd009448a96355b533dff28258b --- M src/ranap_msg_factory.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/28/4928/2 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 64d87f9..7e99419 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -638,6 +638,7 @@ { uint8_t *buf; unsigned int len; + uint32_t ip_h = ntohl(ip); if (use_x213_nsap) { len = 160/8; @@ -645,11 +646,11 @@ buf[0] = 0x35; /* AFI For IANA ICP */ buf[1] = 0x00; /* See A.5.2.1.2.7 of X.213 */ buf[2] = 0x01; - *(uint32_t *)&buf[3] = ntohl(ip); + memcpy(&buf[3], &ip_h, sizeof(ip_h)); } else { - len = 4; + len = sizeof(ip_h); buf = CALLOC(len, sizeof(uint8_t)); - *(uint32_t *)buf = ntohl(ip); + memcpy(buf, &ip_h, sizeof(ip_h)); } out->buf = buf; out->size = len; -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:13:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:13:32 +0000 Subject: osmo-iuh[master]: cosmetic: ranap_msg_factory: htonl instead of ntohl In-Reply-To: References: Message-ID: Patch Set 1: hmm, actually you're right, I totally didn't check on it. The ip ultimately comes from mgcp_client_remote_addr_n() which says /* Return the MGCP GW binary IPv4 address in network byte order. */ and indeed libosmo-mgcp-client does mgcp->remote_addr = htonl(addr.sin_addr.s_addr); Kind of weird why we pass a network byte order address around, but there you have it. -- To view, visit https://gerrit.osmocom.org/4929 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07979252b7d5a92e8ba11fd088ee06f608fef489 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:13:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:13:37 +0000 Subject: [ABANDON] osmo-iuh[master]: cosmetic: ranap_msg_factory: htonl instead of ntohl In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: cosmetic: ranap_msg_factory: htonl instead of ntohl ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4929 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I07979252b7d5a92e8ba11fd088ee06f608fef489 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:18:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:18:55 +0000 Subject: [PATCH] osmo-iuh[master]: api doc: clarify byte order in ranap_new_msg_rab_assign_* Message-ID: Review at https://gerrit.osmocom.org/4936 api doc: clarify byte order in ranap_new_msg_rab_assign_* Change-Id: Ib0d2cc538488a995be5278092d3ac105be8aad33 --- M src/ranap_msg_factory.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/36/4936/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 64d87f9..ef3e9ef 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -716,7 +716,8 @@ /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice). * See 3GPP TS 25.413 8.2. - * RAB ID: 3GPP TS 25.413 9.2.1.2 + * RAB ID: 3GPP TS 25.413 9.2.1.2. + * \param rtp_ip MGW's RTP IPv4 address in *network* byte order. */ struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port, @@ -785,7 +786,8 @@ return msg; } -/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */ +/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) + * \param gtp_ip SGSN's GTP IPv4 address in *network* byte order. */ struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip, uint32_t gtp_tei, bool use_x213_nsap) { -- To view, visit https://gerrit.osmocom.org/4936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0d2cc538488a995be5278092d3ac105be8aad33 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:19:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:19:26 +0000 Subject: [MERGED] libosmo-netif[master]: gitignore: vim swp files In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: gitignore: vim swp files ...................................................................... gitignore: vim swp files Change-Id: I0013625df95c5600479953e6f83b848efadb525a --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 4ee9929..350e975 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ Doxyfile /examples/udp-test-client /examples/udp-test-server + +.*.sw? -- To view, visit https://gerrit.osmocom.org/4934 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0013625df95c5600479953e6f83b848efadb525a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:19:39 +0000 Subject: [MERGED] libosmocore[master]: msgb: add inline msgb_queue_free() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msgb: add inline msgb_queue_free() ...................................................................... msgb: add inline msgb_queue_free() Related: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 (libosmo-netif) Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7 --- M TODO-RELEASE M include/osmocom/core/msgb.h 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..99865c6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +core msgb_queue_free() add inline func to msgb.h diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 9c3ccf0..335067e 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -72,6 +72,15 @@ extern struct msgb *msgb_copy(const struct msgb *msg, const char *name); static int msgb_test_invariant(const struct msgb *msg) __attribute__((pure)); +/*! Free all msgbs from a queue built with msgb_enqueue(). + * \param[in] queue list head of a msgb queue. + */ +static inline void msgb_queue_free(struct llist_head *queue) +{ + struct msgb *msg; + while ((msg = msgb_dequeue(queue))) msgb_free(msg); +} + #ifdef MSGB_DEBUG #include #define MSGB_ABORT(msg, fmt, args ...) do { \ -- To view, visit https://gerrit.osmocom.org/4933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:21:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:21:44 +0000 Subject: [MERGED] libosmocore[master]: rate_ctr: fix mem leak for mangled desc In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: rate_ctr: fix mem leak for mangled desc ...................................................................... rate_ctr: fix mem leak for mangled desc Using the NULL context creates mem leaks that bother sanitizer builds. Allocate as talloc "child" of the rate_ctr_group, so that the mangled desc (if any) gets freed when the rate_ctr group is freed. Remove the comment concerning osmo-msc: the way to fix the unexpected talloc state in osmo-msc tests is to have no invalid rate counter names in osmo-msc. See Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 (osmo-msc). Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b --- M src/rate_ctr.c 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 5464490..477339f 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,15 +190,6 @@ unsigned int size; struct rate_ctr_group *group; - /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ - if (!rate_ctrl_group_desc_validate(desc, true)) { - /* don't use 'ctx' here as it would screw up memory leak debugging e.g. - * in osmo-msc */ - desc = rate_ctr_group_desc_mangle(NULL, desc); - if (!desc) - return NULL; - } - size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); @@ -209,6 +200,15 @@ if (!group) return NULL; + /* attempt to mangle all '.' in identifiers to ':' for backwards compat */ + if (!rate_ctrl_group_desc_validate(desc, true)) { + desc = rate_ctr_group_desc_mangle(group, desc); + if (!desc) { + talloc_free(group); + return NULL; + } + } + group->desc = desc; group->idx = idx; -- To view, visit https://gerrit.osmocom.org/4868 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:09 +0000 Subject: [MERGED] libosmocore[master]: sercomm_test: sanitize: fix msgb mem leak In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: sercomm_test: sanitize: fix msgb mem leak ...................................................................... sercomm_test: sanitize: fix msgb mem leak This should fix the last current remaining sanitizer build failure in libosmocore regression tests. Helps fix sanitizer build on debian 9. Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043 --- M tests/sercomm/sercomm_test.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index f4f1c22..058c9eb 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -47,6 +47,7 @@ static void dlci_rx_cb(struct osmo_sercomm_inst *sercomm, uint8_t dlci, struct msgb *msg) { printf("%s(): %s\n", __func__, msgb_hexdump(msg)); + msgb_free(msg); } static struct msgb *create_mahlzeit_msg(void) -- To view, visit https://gerrit.osmocom.org/4875 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:09 +0000 Subject: [MERGED] libosmocore[master]: tlv_put: guard against NULL val and 0 len In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: tlv_put: guard against NULL val and 0 len ...................................................................... tlv_put: guard against NULL val and 0 len For example encode_auth_info() from gsup.c calls msgb_tlv_put(msg, iei, 0, NULL) to put a tag and len with content data following later. However, this would cause a memcpy() from a NULL pointer, in tlv_put(). Allow passing NULL and len = 0 for cases like the above: If val is NULL, use memset(0) instead of memcpy(). If len is zero, do not copy nor memset anything. Hence make tlv_put() behave in a well-defined and valid way for any and all input args; no negative fallout is possible from this patch. Add proper API doc comment. Fixes a sanitizer build failure in gsup_test: ../../../../src/libosmocore/include/osmocom/gsm/tlv.h:99:2: runtime error: null pointer passed as argument 2, which is declared to never be null Helps fix sanitizer build on debian 9. Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64 --- M include/osmocom/gsm/tlv.h 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index 5bf4a87..8654893 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -90,13 +90,24 @@ return buf + len; } -/*! put (append) a TLV field */ +/*! Append a TLV field, a Tag-Length-Value field. + * \param[out] buf Location in a buffer to append TLV at. + * \param[in] tag Tag id to write. + * \param[in] len Length field to write and amount of bytes to append. + * \param[in] val Pointer to data to append, or NULL to append zero data. + * Always append tag and length. Append \a len bytes read from \a val. If val is NULL, append \a len zero + * bytes instead. If \a len is zero, do not append any data apart from tag and length. */ static inline uint8_t *tlv_put(uint8_t *buf, uint8_t tag, uint8_t len, const uint8_t *val) { *buf++ = tag; *buf++ = len; - memcpy(buf, val, len); + if (len) { + if (val) + memcpy(buf, val, len); + else + memset(buf, 0, len); + } return buf + len; } -- To view, visit https://gerrit.osmocom.org/4874 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:09 +0000 Subject: [MERGED] libosmocore[master]: bssgp_fc_test: sanitize: free fc struct when done In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bssgp_fc_test: sanitize: free fc struct when done ...................................................................... bssgp_fc_test: sanitize: free fc struct when done Helps fix sanitizer build on debian 9. Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181 --- M tests/gb/bssgp_fc_test.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 98e17cc..ac690a5 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -104,6 +104,8 @@ if (llist_empty(&fc->queue)) break; } + + talloc_free(fc); } static void help(void) -- To view, visit https://gerrit.osmocom.org/4873 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:10 +0000 Subject: [MERGED] libosmocore[master]: gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow ...................................................................... gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflow All successful and all error code paths of bssgp_fc_in() free the msgb, except the code path calling fc_enqueue() when the msg is dropped (due to queue being full, or failure to allocate). Callers could theoretically catch the -ENOSPC return value and discard the msgb. However, in other code paths, a callback's return value is returned, which is expected to free the msgb, so such callback would have to never return -ENOSPC when it freed the msgb. Much simpler semantics would be to free the msgb in every code path, no matter which kind of error occurred. Who is currently calling bssgp_fc_in and how do they handle the return value? - bssgp_fc_test.c ignores the return value (and hits a mem leak aka sanitizer build failure if the queue is full). - fc_timer_cb() ignores the return value. - bssgp_tx_dl_ud() returns the bssgp_fc_in() rc. - which is returned by a cascade of functions leading up to being returned, for example, by gprs_llgmm_reset(), which is usually called with ignored return code. At this point it is already fairly clear that bssgp_fc_in() should always free the msgb, since the callers don't seem to distinguish even between error or success, let alone between -ENOSPC or other errors. bssgp_fc_test: assert that no msgbs remain unfreed after the tests. Adjust expected results. Helps fix sanitizer build on debian 9. Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df --- M src/gb/gprs_bssgp.c M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 3 files changed, 9 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 520868e..d27a94f 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -764,7 +764,11 @@ } if (bssgp_fc_needs_queueing(fc, llc_pdu_len)) { - return fc_enqueue(fc, msg, llc_pdu_len, priv); + int rc; + rc = fc_enqueue(fc, msg, llc_pdu_len, priv); + if (rc) + msgb_free(msg); + return rc; } else { /* record the time we transmitted this PDU */ osmo_gettimeofday(&time_now, NULL); diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 7a75a4d..98e17cc 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -190,7 +190,8 @@ printf("msgb ctx: %zu b in %zu blocks (0 b in 1 block == just the context)\n", talloc_total_size(tall_msgb_ctx), talloc_total_blocks(tall_msgb_ctx)); - /* KNOWN BUG: expecting 0b in 1 block, but a full queue is still a mem leak */ + OSMO_ASSERT(talloc_total_size(tall_msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(tall_msgb_ctx) == 1); talloc_free(tall_msgb_ctx); printf("===== BSSGP flow-control test END\n\n"); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index d146843..30d9776 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -56,7 +56,7 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 -msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -229,6 +229,6 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 -msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END -- To view, visit https://gerrit.osmocom.org/4872 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:10 +0000 Subject: [MERGED] libosmocore[master]: bssgp_fc_test: sanitizer: free msgb context when done In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bssgp_fc_test: sanitizer: free msgb context when done ...................................................................... bssgp_fc_test: sanitizer: free msgb context when done Print remaining msgbs when done, then free the entire tall_msgb_context. To be able to do that, call msgb_talloc_ctx_init() and use its return value. A subsequent patch will fix a known mem leak and add assertions for 0b in 1 blocks remaining in the tall_msgb_context. Helps fix sanitizer build on debian 9. Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641 --- M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 6e4f747..7a75a4d 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -130,6 +130,7 @@ uint32_t pdu_length = 10; /* octets */ uint32_t pdu_count = 20; /* messages */ int c; + void *tall_msgb_ctx; static const struct option long_options[] = { { "bucket-size-max", 1, 0, 's' }, @@ -144,6 +145,8 @@ osmo_init_logging(&info); log_set_use_color(osmo_stderr_target, 0); log_set_print_filename(osmo_stderr_target, 0); + + tall_msgb_ctx = msgb_talloc_ctx_init(NULL, 0); while ((c = getopt_long(argc, argv, "s:r:d:l:c:", long_options, NULL)) != -1) { @@ -184,6 +187,11 @@ bucket_leak_rate, max_queue_depth, pdu_length, pdu_count); test_fc(bucket_size_max, bucket_leak_rate, max_queue_depth, pdu_length, pdu_count); + printf("msgb ctx: %zu b in %zu blocks (0 b in 1 block == just the context)\n", + talloc_total_size(tall_msgb_ctx), + talloc_total_blocks(tall_msgb_ctx)); + /* KNOWN BUG: expecting 0b in 1 block, but a full queue is still a mem leak */ + talloc_free(tall_msgb_ctx); printf("===== BSSGP flow-control test END\n\n"); exit(EXIT_SUCCESS); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index f8fca3c..d146843 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -56,6 +56,7 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 +msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -121,6 +122,7 @@ 80: FC OUT Nr 18 90: FC OUT Nr 19 100: FC OUT Nr 20 +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -166,6 +168,7 @@ -> -5: PDU too large, msg dropped. 0: FC IN Nr 20 -> -5: PDU too large, msg dropped. +msgb ctx: 0 b in 1 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -226,5 +229,6 @@ 30: FC OUT Nr 13 40: FC OUT Nr 14 50: FC OUT Nr 15 +msgb ctx: 685 b in 6 blocks (0 b in 1 block == just the context) ===== BSSGP flow-control test END -- To view, visit https://gerrit.osmocom.org/4871 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:11 +0000 Subject: [MERGED] libosmocore[master]: bssgp_fc_test: clarify by outputting ok / failure messages In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bssgp_fc_test: clarify by outputting ok / failure messages ...................................................................... bssgp_fc_test: clarify by outputting ok / failure messages The test fills up the queue / sends too large PDUs on purpose. Make that obvious by outputting returned errors in the expected output. Cosmetic: - fc_in()'s return value is ignored, hence don't return anything. - add comment. Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46 --- M tests/gb/bssgp_fc_test.c M tests/gb/bssgp_fc_tests.ok 2 files changed, 99 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 4719872..6e4f747 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -39,17 +39,31 @@ return 0; } -static int fc_in(struct bssgp_flow_control *fc, unsigned int pdu_len) +static void fc_in(struct bssgp_flow_control *fc, unsigned int pdu_len) { struct msgb *msg; unsigned int csecs = get_centisec_diff(); + int rc; msg = msgb_alloc(1, "fc test"); msg->cb[0] = in_ctr++; printf("%u: FC IN Nr %lu\n", csecs, msg->cb[0]); - bssgp_fc_in(fc, msg, pdu_len, NULL); - return 0; + rc = bssgp_fc_in(fc, msg, pdu_len, NULL); + switch (rc) { + case 0: + printf(" -> %d: ok\n", rc); + break; + case -ENOSPC: + printf(" -> %d: queue full, msg dropped.\n", rc); + break; + case -EIO: + printf(" -> %d: PDU too large, msg dropped.\n", rc); + break; + default: + printf(" -> %d: error, msg dropped.\n", rc); + break; + } } @@ -71,6 +85,8 @@ osmo_gettimeofday(&tv_start, NULL); + /* Fill the queue with PDUs, possibly beyond the queue being full. If it is full, additional PDUs + * are discarded. */ for (i = 0; i < pdu_count; i++) { fc_in(fc, pdu_len); osmo_timers_check(); diff --git a/tests/gb/bssgp_fc_tests.ok b/tests/gb/bssgp_fc_tests.ok index fda96f3..f8fca3c 100644 --- a/tests/gb/bssgp_fc_tests.ok +++ b/tests/gb/bssgp_fc_tests.ok @@ -3,34 +3,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> -28: queue full, msg dropped. 0: FC IN Nr 17 + -> -28: queue full, msg dropped. 0: FC IN Nr 18 + -> -28: queue full, msg dropped. 0: FC IN Nr 19 + -> -28: queue full, msg dropped. 0: FC IN Nr 20 + -> -28: queue full, msg dropped. 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 @@ -43,34 +63,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> 0: ok 0: FC IN Nr 17 + -> 0: ok 0: FC IN Nr 18 + -> 0: ok 0: FC IN Nr 19 + -> 0: ok 0: FC IN Nr 20 + -> 0: ok 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 @@ -87,25 +127,45 @@ size-max=100 oct, leak-rate=100 oct/s, queue-len=5 msgs, pdu_len=1000 oct, pdu_cnt=20 0: FC IN Nr 1 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 2 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 3 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 4 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 5 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 6 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 7 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 8 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 9 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 10 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 11 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 12 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 13 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 14 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 15 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 16 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 17 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 18 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 19 + -> -5: PDU too large, msg dropped. 0: FC IN Nr 20 + -> -5: PDU too large, msg dropped. ===== BSSGP flow-control test END ===== BSSGP flow-control test START @@ -113,34 +173,54 @@ 0: FC IN Nr 1 0: FC OUT Nr 1 + -> 0: ok 0: FC IN Nr 2 0: FC OUT Nr 2 + -> 0: ok 0: FC IN Nr 3 0: FC OUT Nr 3 + -> 0: ok 0: FC IN Nr 4 0: FC OUT Nr 4 + -> 0: ok 0: FC IN Nr 5 0: FC OUT Nr 5 + -> 0: ok 0: FC IN Nr 6 0: FC OUT Nr 6 + -> 0: ok 0: FC IN Nr 7 0: FC OUT Nr 7 + -> 0: ok 0: FC IN Nr 8 0: FC OUT Nr 8 + -> 0: ok 0: FC IN Nr 9 0: FC OUT Nr 9 + -> 0: ok 0: FC IN Nr 10 0: FC OUT Nr 10 + -> 0: ok 0: FC IN Nr 11 + -> 0: ok 0: FC IN Nr 12 + -> 0: ok 0: FC IN Nr 13 + -> 0: ok 0: FC IN Nr 14 + -> 0: ok 0: FC IN Nr 15 + -> 0: ok 0: FC IN Nr 16 + -> -28: queue full, msg dropped. 0: FC IN Nr 17 + -> -28: queue full, msg dropped. 0: FC IN Nr 18 + -> -28: queue full, msg dropped. 0: FC IN Nr 19 + -> -28: queue full, msg dropped. 0: FC IN Nr 20 + -> -28: queue full, msg dropped. 10: FC OUT Nr 11 20: FC OUT Nr 12 30: FC OUT Nr 13 -- To view, visit https://gerrit.osmocom.org/4870 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:11 +0000 Subject: [MERGED] libosmocore[master]: bssgp_fc_test: remove rounding to deciseconds In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bssgp_fc_test: remove rounding to deciseconds ...................................................................... bssgp_fc_test: remove rounding to deciseconds Ever since this test was changed to use osmo_gettimeofday_override, the times it sees are exact every time and don't need rounding to pass the expected output. Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740 --- M tests/gb/bssgp_fc_test.c 1 file changed, 0 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c index 27d8fcc..4719872 100644 --- a/tests/gb/bssgp_fc_test.c +++ b/tests/gb/bssgp_fc_test.c @@ -29,19 +29,10 @@ return tv.tv_sec * 100 + tv.tv_usec/10000; } -/* round to deciseconds to make sure test output is always consistent */ -int round_decisec(int csec_in) -{ - int tmp = csec_in / 10; - - return tmp * 10; -} - static int fc_out_cb(struct bssgp_flow_control *fc, struct msgb *msg, uint32_t llc_pdu_len, void *priv) { unsigned int csecs = get_centisec_diff(); - csecs = round_decisec(csecs); printf("%u: FC OUT Nr %lu\n", csecs, (unsigned long) msg->cb[0]); msgb_free(msg); @@ -52,7 +43,6 @@ { struct msgb *msg; unsigned int csecs = get_centisec_diff(); - csecs = round_decisec(csecs); msg = msgb_alloc(1, "fc test"); msg->cb[0] = in_ctr++; -- To view, visit https://gerrit.osmocom.org/4869 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:23:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:23:59 +0000 Subject: [MERGED] libosmo-netif[master]: osmo_stream_{cli, srv}_destroy: fix mem leak: empty msgb queue In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_stream_{cli,srv}_destroy: fix mem leak: empty msgb queue ...................................................................... osmo_stream_{cli,srv}_destroy: fix mem leak: empty msgb queue On destroying a client or server stream, deallocate any msgbs that are still pending in the queue. In libosmo-sccp, the ss7_test.c in test_as(), messages are queued and were, before this, left floating after the stream was destroyed, causing a sanitizer memory leak. This patch fixes the leak. Depends: Ia291832ca445d4071f0ed9a01730d945ff691cf7 (libosmocore) Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 --- M src/stream.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/stream.c b/src/stream.c index d9c3f62..8a1be38 100644 --- a/src/stream.c +++ b/src/stream.c @@ -430,6 +430,7 @@ { osmo_stream_cli_close(cli); osmo_timer_del(&cli->timer); + msgb_queue_free(&cli->tx_queue); talloc_free(cli); } @@ -924,6 +925,7 @@ osmo_fd_unregister(&conn->ofd); if (conn->closed_cb) conn->closed_cb(conn); + msgb_queue_free(&conn->tx_queue); talloc_free(conn); } -- To view, visit https://gerrit.osmocom.org/4878 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:24:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 16:24:38 +0000 Subject: osmo-iuh[master]: api doc: clarify byte order in ranap_new_msg_rab_assign_* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0d2cc538488a995be5278092d3ac105be8aad33 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:25:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 16:25:32 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: drop erratic log line on remote STP address In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4935 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia438143606913faccc8cdf4fd5f7d376f93e7891 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:25:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 16:25:33 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: drop erratic log line on remote STP address In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-hnbgw: drop erratic log line on remote STP address ...................................................................... osmo-hnbgw: drop erratic log line on remote STP address The stp_host is just the *default* that may be overridden by the VTY configuration. Don't log it as the one that is going to be used. It's not trivial to print the actual IP address being used, there may be any number of ASP, theoretically. Hence leave logging up to osmo_sccp_simple_client_on_ss7_id(), after another hypothetical patch. Change-Id: Ia438143606913faccc8cdf4fd5f7d376f93e7891 --- M src/hnbgw_cn.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 3b828b4..81ef670 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -474,8 +474,6 @@ local_pc = ss7->cfg.primary_pc; osmo_sccp_make_addr_pc_ssn(&gw->sccp.local_addr, local_pc, OSMO_SCCP_SSN_RANAP); - - LOGP(DRANAP, LOGL_NOTICE, "M3UA uplink to STP: %s %u\n", stp_host, stp_port); LOGP(DRANAP, LOGL_NOTICE, "Local SCCP addr: %s\n", osmo_sccp_addr_name(ss7, &gw->sccp.local_addr)); gw->sccp.client = osmo_sccp_simple_client_on_ss7_id(gw, ss7->cfg.id, "OsmoHNBGW", -- To view, visit https://gerrit.osmocom.org/4935 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia438143606913faccc8cdf4fd5f7d376f93e7891 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:26:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:26:03 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: add Routing section for IP forward and masquerading In-Reply-To: References: Message-ID: Patch Set 2: (just noting that your latest comment was on patchset 1 while patch set 2 was already submitted -- how about PS2?) -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:26:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:26:41 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: test_packet_error_detection: sanitize: free all c... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_test: test_packet_error_detection: sanitize: free all conns ...................................................................... mgcp_test: test_packet_error_detection: sanitize: free all conns Don't leave any memory leaks a sanitizer build will complain about. Change-Id: I6823653d5efcebaed40471123d21a9321cf633fd --- M tests/mgcp/mgcp_test.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index e14b7ee..3dee509 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1083,6 +1083,7 @@ } force_monotonic_time_us = -1; + mgcp_conn_free_all(&endp); } static void test_multilple_codec(void) -- To view, visit https://gerrit.osmocom.org/4918 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6823653d5efcebaed40471123d21a9321cf633fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:26:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:26:41 +0000 Subject: [MERGED] osmo-mgw[master]: legacy_mgcp: mgcp_test: sanitize: free msgb_ctx In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: legacy_mgcp: mgcp_test: sanitize: free msgb_ctx ...................................................................... legacy_mgcp: mgcp_test: sanitize: free msgb_ctx Ensure that all msgb were cleaned up, then free the overall msgb_ctx, in order to not leave any memory leaks the sanitizer build complains about. Change-Id: I84e0ac7f0928f04ffddd7da18200466841589c25 --- M tests/legacy_mgcp/mgcp_test.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/legacy_mgcp/mgcp_test.c b/tests/legacy_mgcp/mgcp_test.c index 1400893..a540b5f 100644 --- a/tests/legacy_mgcp/mgcp_test.c +++ b/tests/legacy_mgcp/mgcp_test.c @@ -1212,7 +1212,7 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); + void *msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); @@ -1231,6 +1231,9 @@ test_no_name(); test_osmux_cid(); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + talloc_free(msgb_ctx); printf("Done\n"); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4917 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84e0ac7f0928f04ffddd7da18200466841589c25 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:31:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 16:31:27 +0000 Subject: osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Patch Set 3: Tests are available in the previous commit - see gerrit 4636. -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:32:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 16:32:35 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: add Routing section for IP forward and masquerading In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:35:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 20 Nov 2017 16:35:15 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4915/2/tests/lib/in46a_test.c File tests/lib/in46a_test.c: Line 175: /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ Why not use osmo_load32 here too? -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:42:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 16:42:24 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Configure PcapRecorder to record on any iface Message-ID: Review at https://gerrit.osmocom.org/4937 Configure PcapRecorder to record on any iface Before this commit, tcpdump was instructed to listen only on the interface which had the IP assigned. However, local processes connecting to that IP are actually sending packets through the loopback interface. As we are not listening on it, all those packets are not being recorded. Let's record on all interfaces instead and rely on the ip filtering to record only the interesting packets. Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5 --- M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/osmo_mgw.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/osmo_stp.py 7 files changed, 7 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/37/4937/1 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 6d84cf5..7424fb4 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -56,8 +56,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index 0b763c7..b6ebf8a 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -63,8 +63,7 @@ raise log.Error('hlr.sql missing:', sql_input) self.run_local('create_hlr_db', ('/bin/sh', '-c', 'sqlite3 %r < %r' % (self.db_file, sql_input))) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index 665c151..bebb9d5 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -48,8 +48,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_mgw.py b/src/osmo_gsm_tester/osmo_mgw.py index fc242f4..abac4aa 100644 --- a/src/osmo_gsm_tester/osmo_mgw.py +++ b/src/osmo_gsm_tester/osmo_mgw.py @@ -46,8 +46,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index cdeec1b..ccf15fe 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -56,8 +56,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index b0a706d..6dd7342 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -52,8 +52,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index c4c6c04..ced138b 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,8 +48,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } -- To view, visit https://gerrit.osmocom.org/4937 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 20 16:43:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 16:43:25 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4915 to look at the new patch set (#3). sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/3 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..513b4ff 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "../../lib/syserr.h" #include "../../gtp/gtpie.h" @@ -27,7 +29,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +75,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +89,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +103,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..bca1015 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -159,6 +159,7 @@ .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; struct ul66_t eua; + uint32_t v4_addr; printf("testing in46a_to_eua()\n"); @@ -171,7 +172,9 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&v4_addr, &eua.v[2], sizeof(v4_addr)); + OSMO_ASSERT(v4_addr == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 20 18:08:09 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 18:08:09 +0000 Subject: osmo-gsm-tester[master]: Configure PcapRecorder to record on any iface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4937 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 18:08:10 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 Nov 2017 18:08:10 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Configure PcapRecorder to record on any iface In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Configure PcapRecorder to record on any iface ...................................................................... Configure PcapRecorder to record on any iface Before this commit, tcpdump was instructed to listen only on the interface which had the IP assigned. However, local processes connecting to that IP are actually sending packets through the loopback interface. As we are not listening on it, all those packets are not being recorded. Let's record on all interfaces instead and rely on the ip filtering to record only the interesting packets. Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5 --- M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/osmo_mgw.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/osmo_stp.py 7 files changed, 7 insertions(+), 14 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 6d84cf5..7424fb4 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -56,8 +56,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index 0b763c7..b6ebf8a 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -63,8 +63,7 @@ raise log.Error('hlr.sql missing:', sql_input) self.run_local('create_hlr_db', ('/bin/sh', '-c', 'sqlite3 %r < %r' % (self.db_file, sql_input))) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index 665c151..bebb9d5 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -48,8 +48,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_mgw.py b/src/osmo_gsm_tester/osmo_mgw.py index fc242f4..abac4aa 100644 --- a/src/osmo_gsm_tester/osmo_mgw.py +++ b/src/osmo_gsm_tester/osmo_mgw.py @@ -46,8 +46,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index cdeec1b..ccf15fe 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -56,8 +56,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index b0a706d..6dd7342 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -52,8 +52,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index c4c6c04..ced138b 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -48,8 +48,7 @@ if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % inst) - iface = util.ip_to_iface(self.addr()) - pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } -- To view, visit https://gerrit.osmocom.org/4937 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 20 18:32:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 18:32:03 +0000 Subject: [PATCH] libosmo-sccp[master]: Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers Message-ID: Review at https://gerrit.osmocom.org/4938 Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e --- M src/osmo_ss7_vty.c 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/38/4938/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 4c67508..0bfdbd1 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -497,6 +497,42 @@ vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } +static void vty_dump_xua_server(struct vty *vty, struct osmo_xua_server *xs) +{ + vty_out(vty, "xUA server for %s on %s:%u%s", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host ? xs->cfg.local.host : "0.0.0.0", + xs->cfg.local.port, VTY_NEWLINE); +} + +/* List all addressbook entries */ +DEFUN(show_cs7_xua, show_cs7_xua_cmd, + "show cs7 "XUA_VAR_STR" [<0-65534>]", + SHOW_STR CS7_STR XUA_VAR_HELP_STR "Port Number") +{ + struct osmo_ss7_instance *inst; + struct osmo_xua_server *xs; + enum osmo_ss7_asp_protocol proto = parse_asp_proto(argv[0]); + + llist_for_each_entry(inst, &osmo_ss7_instances, list) { + if (argc > 1) { + int port = atoi(argv[1]); + xs = osmo_ss7_xua_server_find(inst, proto, port); + if (!xs) { + vty_out(vty, "%% No matching server found%s", VTY_NEWLINE); + return CMD_WARNING; + } + vty_dump_xua_server(vty, xs); + } else { + llist_for_each_entry(xs, &inst->xua_servers, list) { + if (xs->cfg.proto == proto) + vty_dump_xua_server(vty, xs); + } + } + } + return CMD_SUCCESS; +} + /*********************************************************************** * Application Server Process @@ -1721,6 +1757,7 @@ g_ctx = ctx; install_element_ve(&show_cs7_user_cmd); + install_element_ve(&show_cs7_xua_cmd); /* the mother of all VTY config nodes */ install_element(CONFIG_NODE, &cs7_instance_cmd); -- To view, visit https://gerrit.osmocom.org/4938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:03:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:03:56 +0000 Subject: [PATCH] libosmo-sccp[master]: xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup Message-ID: Review at https://gerrit.osmocom.org/4939 xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup When we destroy a FSM, we (logically) must osmo_timer_del() any running timers that the FSM might have been using. This was not implemented for xua_as_fsm, xua_asp_fsm and also missing from ipa_asp_fsm. Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Related: OS#2668 --- M src/xua_as_fsm.c M src/xua_asp_fsm.c 2 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/39/4939/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 59a71ba..5757d63 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -315,6 +315,13 @@ } } +static void xua_as_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; + + osmo_timer_del(&xafp->recovery.t_r); +} + static const struct osmo_fsm_state xua_as_fsm_states[] = { [XUA_AS_S_DOWN] = { .in_event_mask = S(XUA_ASPAS_ASP_INACTIVE_IND) | @@ -368,6 +375,7 @@ .num_states = ARRAY_SIZE(xua_as_fsm_states), .log_subsys = DLSS7, .event_names = xua_as_event_names, + .cleanup = xua_as_fsm_cleanup, }; /*! \brief Start an AS FSM for a given Application Server diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 1b802ce..e81f0af 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -611,6 +611,13 @@ return 0; } +static void xua_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct xua_asp_fsm_priv *xafp = fi->priv; + + osmo_timer_del(&xafp->t_ack.timer); +} + static const struct osmo_fsm_state xua_asp_states[] = { [XUA_ASP_S_DOWN] = { .in_event_mask = S(XUA_ASP_E_M_ASP_UP_REQ) | @@ -668,6 +675,7 @@ S(XUA_ASP_E_ASPSM_BEAT) | S(XUA_ASP_E_ASPSM_BEAT_ACK), .allstate_action = xua_asp_allstate, + .cleanup = xua_asp_fsm_cleanup, }; static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, @@ -1040,6 +1048,7 @@ return; osmo_ss7_route_destroy(rt); + osmo_timer_del(&iafp->pong_timer); } struct osmo_fsm ipa_asp_fsm = { -- To view, visit https://gerrit.osmocom.org/4939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From admin at opensuse.org Mon Nov 20 20:10:09 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:10:09 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a1336ad88b1f_a94d30f7c4369421@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_8.0/i586 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 144s] | #define HAVE_STRING_H 1 [ 144s] | #define HAVE_MEMORY_H 1 [ 144s] | #define HAVE_STRINGS_H 1 [ 144s] | #define HAVE_INTTYPES_H 1 [ 144s] | #define HAVE_STDINT_H 1 [ 144s] | #define HAVE_UNISTD_H 1 [ 144s] | #define HAVE_DLFCN_H 1 [ 144s] | #define LT_OBJDIR ".libs/" [ 144s] | #define STDC_HEADERS 1 [ 144s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 144s] | [ 144s] | configure: exit 0 [ 144s] [ 144s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 144s] make[1]: *** [override_dh_auto_test] Error 1 [ 144s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 144s] debian/rules:45: recipe for target 'build' failed [ 144s] make: *** [build] Error 2 [ 144s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 144s] [ 144s] cloud121 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:09:57 UTC 2017. [ 144s] [ 144s] ### VM INTERACTION START ### [ 145s] Powering off. [ 145s] [ 126.678272] reboot: Power down [ 146s] ### VM INTERACTION END ### [ 146s] [ 146s] cloud121 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:10:00 UTC 2017. [ 146s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:10:26 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:10:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a1336cc35d06_a94d30f7c4369558@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 131s] | #define HAVE_STRING_H 1 [ 131s] | #define HAVE_MEMORY_H 1 [ 131s] | #define HAVE_STRINGS_H 1 [ 131s] | #define HAVE_INTTYPES_H 1 [ 131s] | #define HAVE_STDINT_H 1 [ 131s] | #define HAVE_UNISTD_H 1 [ 131s] | #define HAVE_DLFCN_H 1 [ 131s] | #define LT_OBJDIR ".libs/" [ 131s] | #define STDC_HEADERS 1 [ 131s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 131s] | [ 131s] | configure: exit 0 [ 131s] [ 131s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 131s] make[1]: *** [override_dh_auto_test] Error 1 [ 131s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 131s] debian/rules:45: recipe for target 'build' failed [ 131s] make: *** [build] Error 2 [ 131s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 131s] [ 131s] cloud118 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:10:17 UTC 2017. [ 131s] [ 131s] ### VM INTERACTION START ### [ 132s] Powering off. [ 132s] [ 117.915114] reboot: Power down [ 134s] ### VM INTERACTION END ### [ 134s] [ 134s] cloud118 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:10:20 UTC 2017. [ 134s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:12:59 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:12:59 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a1337613f5a4_a94d30f7c4369962@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 54s] | #define HAVE_STDLIB_H 1 [ 54s] | #define HAVE_STRING_H 1 [ 54s] | #define HAVE_MEMORY_H 1 [ 54s] | #define HAVE_STRINGS_H 1 [ 54s] | #define HAVE_INTTYPES_H 1 [ 54s] | #define HAVE_STDINT_H 1 [ 54s] | #define HAVE_UNISTD_H 1 [ 54s] | #define HAVE_DLFCN_H 1 [ 54s] | #define LT_OBJDIR ".libs/" [ 54s] | #define STDC_HEADERS 1 [ 54s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 54s] | [ 54s] | configure: exit 0 [ 54s] [ 54s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 54s] make[1]: *** [override_dh_auto_test] Error 1 [ 54s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 54s] debian/rules:45: recipe for target 'build' failed [ 54s] make: *** [build] Error 2 [ 54s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 54s] [ 54s] build82 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:12:43 UTC 2017. [ 54s] [ 54s] ### VM INTERACTION START ### [ 57s] [ 52.563428] reboot: Power down [ 57s] ### VM INTERACTION END ### [ 57s] [ 57s] build82 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:12:46 UTC 2017. [ 57s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:13:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:13:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a1337999c772_a94d30f7c43702d0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 97s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 97s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 19204 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 97s] --- expout 2017-11-20 20:13:36.128000000 +0000 [ 97s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:13:36.140000000 +0000 [ 97s] @@ -43,3 +43,7 @@ [ 97s] Testing APN matching [ 97s] Testing GGSN selection [ 97s] Done [ 97s] +backtrace() returned 4 addresses [ 97s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(+0x8950) [0x56144f66d950] [ 97s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fcff634f1c1] [ 97s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(+0x8f6a) [0x56144f66df6a] [ 97s] ./testsuite.at:20: exit code was 134, expected 0 [ 97s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 97s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 97s] make[1]: *** [override_dh_auto_test] Error 1 [ 97s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 97s] debian/rules:45: recipe for target 'build' failed [ 97s] make: *** [build] Error 2 [ 97s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 97s] [ 97s] lamb53 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:13:38 UTC 2017. [ 97s] [ 97s] ### VM INTERACTION START ### [ 100s] [ 92.751298] reboot: Power down [ 100s] ### VM INTERACTION END ### [ 100s] [ 100s] lamb53 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:13:41 UTC 2017. [ 100s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:13:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:13:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a13379a1cba5_a94d30f7c43703c2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 100s] | #define HAVE_STDLIB_H 1 [ 100s] | #define HAVE_STRING_H 1 [ 100s] | #define HAVE_MEMORY_H 1 [ 100s] | #define HAVE_STRINGS_H 1 [ 100s] | #define HAVE_INTTYPES_H 1 [ 100s] | #define HAVE_STDINT_H 1 [ 100s] | #define HAVE_UNISTD_H 1 [ 100s] | #define HAVE_DLFCN_H 1 [ 100s] | #define LT_OBJDIR ".libs/" [ 100s] | #define STDC_HEADERS 1 [ 100s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 100s] | [ 100s] | configure: exit 0 [ 100s] [ 100s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 100s] make[1]: *** [override_dh_auto_test] Error 1 [ 100s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 100s] debian/rules:45: recipe for target 'build' failed [ 100s] make: *** [build] Error 2 [ 100s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 100s] [ 100s] lamb58 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:13:44 UTC 2017. [ 100s] [ 100s] ### VM INTERACTION START ### [ 103s] [ 94.690967] reboot: Power down [ 103s] ### VM INTERACTION END ### [ 103s] [ 103s] lamb58 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:13:47 UTC 2017. [ 103s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:14:26 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:14:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a1337b990ef1_a94d30f7c4370468@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 99s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 99s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 19685 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 99s] --- expout 2017-11-20 20:14:12.148000000 +0000 [ 99s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:14:12.156000000 +0000 [ 99s] @@ -43,3 +43,7 @@ [ 99s] Testing APN matching [ 99s] Testing GGSN selection [ 99s] Done [ 99s] +backtrace() returned 4 addresses [ 99s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x804c4d3] [ 99s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf6dff276] [ 99s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x804d249] [ 99s] ./testsuite.at:20: exit code was 134, expected 0 [ 99s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 99s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 99s] make[1]: *** [override_dh_auto_test] Error 1 [ 99s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 99s] debian/rules:45: recipe for target 'build' failed [ 99s] make: *** [build] Error 2 [ 99s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 99s] [ 99s] lamb60 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:14:14 UTC 2017. [ 99s] [ 99s] ### VM INTERACTION START ### [ 102s] [ 94.567131] reboot: Power down [ 102s] ### VM INTERACTION END ### [ 102s] [ 102s] lamb60 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:14:17 UTC 2017. [ 102s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:15:18 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:15:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a1337d924a7a_a94d30f7c4370712@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/i586 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 112s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 112s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 18246 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 112s] --- expout 2017-11-20 20:15:06.418535801 +0000 [ 112s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:15:06.426535801 +0000 [ 112s] @@ -43,3 +43,7 @@ [ 112s] Testing APN matching [ 112s] Testing GGSN selection [ 112s] Done [ 112s] +backtrace() returned 4 addresses [ 112s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(main+0x187a) [0x565d4c7a] [ 112s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf6dd9276] [ 112s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(+0x6098) [0x565d6098] [ 112s] ./testsuite.at:20: exit code was 134, expected 0 [ 112s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 112s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 112s] make[1]: *** [override_dh_auto_test] Error 1 [ 112s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 112s] debian/rules:45: recipe for target 'build' failed [ 112s] make: *** [build] Error 2 [ 112s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 112s] [ 112s] wildcard2 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:07 UTC 2017. [ 112s] [ 112s] ### VM INTERACTION START ### [ 115s] [ 105.221841] reboot: Power down [ 115s] ### VM INTERACTION END ### [ 115s] [ 115s] wildcard2 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:10 UTC 2017. [ 115s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:15:35 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:15:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a1337f7ddec4_a94d30f7c43708de@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 121s] | #define HAVE_STDLIB_H 1 [ 121s] | #define HAVE_STRING_H 1 [ 121s] | #define HAVE_MEMORY_H 1 [ 121s] | #define HAVE_STRINGS_H 1 [ 121s] | #define HAVE_INTTYPES_H 1 [ 121s] | #define HAVE_STDINT_H 1 [ 121s] | #define HAVE_UNISTD_H 1 [ 121s] | #define HAVE_DLFCN_H 1 [ 121s] | #define LT_OBJDIR ".libs/" [ 121s] | #define STDC_HEADERS 1 [ 121s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 121s] | [ 121s] | configure: exit 0 [ 121s] [ 121s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 121s] make[1]: *** [override_dh_auto_test] Error 1 [ 121s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 121s] debian/rules:45: recipe for target 'build' failed [ 121s] make: *** [build] Error 2 [ 121s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 121s] [ 121s] cloud113 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:27 UTC 2017. [ 121s] [ 121s] ### VM INTERACTION START ### [ 125s] [ 110.381752] reboot: Power down [ 126s] ### VM INTERACTION END ### [ 126s] [ 126s] cloud113 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:31 UTC 2017. [ 126s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:15:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:15:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a13381193823_a94d30f7c4370956@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 117s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 117s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 23574 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 117s] --- expout 2017-11-20 20:15:40.712000000 +0000 [ 117s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:15:40.828000000 +0000 [ 117s] @@ -43,3 +43,7 @@ [ 117s] Testing APN matching [ 117s] Testing GGSN selection [ 117s] Done [ 117s] +backtrace() returned 4 addresses [ 117s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x804bf7b] [ 117s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xf6e85637] [ 117s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x804d2c1] [ 117s] ./testsuite.at:20: exit code was 134, expected 0 [ 117s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 117s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 117s] make[1]: *** [override_dh_auto_test] Error 1 [ 117s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 117s] debian/rules:45: recipe for target 'build' failed [ 117s] make: *** [build] Error 2 [ 117s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 117s] [ 117s] lamb02 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:42 UTC 2017. [ 117s] [ 117s] ### VM INTERACTION START ### [ 120s] [ 112.062243] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] lamb02 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:46 UTC 2017. [ 120s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:15:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:15:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a133811de7b8_a94d30f7c4371093@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 107s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 107s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 18233 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 107s] --- expout 2017-11-20 20:15:42.720585089 +0000 [ 107s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:15:42.728585089 +0000 [ 107s] @@ -43,3 +43,7 @@ [ 107s] Testing APN matching [ 107s] Testing GGSN selection [ 107s] Done [ 107s] +backtrace() returned 4 addresses [ 107s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(+0x7431) [0x5592d0e7a431] [ 107s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f02754de2b1] [ 107s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test(+0x8aaa) [0x5592d0e7baaa] [ 107s] ./testsuite.at:20: exit code was 134, expected 0 [ 107s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 107s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 107s] make[1]: *** [override_dh_auto_test] Error 1 [ 107s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 107s] debian/rules:45: recipe for target 'build' failed [ 107s] make: *** [build] Error 2 [ 107s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 107s] [ 107s] wildcard2 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:44 UTC 2017. [ 107s] [ 107s] ### VM INTERACTION START ### [ 110s] [ 95.895952] reboot: Power down [ 111s] ### VM INTERACTION END ### [ 111s] [ 111s] wildcard2 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:15:48 UTC 2017. [ 111s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 20 20:19:18 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 20:19:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a1338eb10a74_a94d30f7c4371745@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 119s] Assert failed talloc_total_blocks(tall_bsc_ctx) == 2 sgsn_test.c:2477 [ 119s] /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/test-source: line 38: 23708 Aborted $abs_top_builddir/tests/sgsn/sgsn_test [ 119s] --- expout 2017-11-20 20:19:06.656000000 +0000 [ 119s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/3/stdout 2017-11-20 20:19:06.704000000 +0000 [ 119s] @@ -43,3 +43,7 @@ [ 119s] Testing APN matching [ 119s] Testing GGSN selection [ 119s] Done [ 119s] +backtrace() returned 4 addresses [ 119s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x404f53] [ 119s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fcd19be1830] [ 119s] +/usr/src/packages/BUILD/tests/sgsn/sgsn_test() [0x4063d9] [ 119s] ./testsuite.at:20: exit code was 134, expected 0 [ 119s] 3. testsuite.at:16: 3. sgsn (testsuite.at:16): FAILED (testsuite.at:20) [ 119s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 119s] make[1]: *** [override_dh_auto_test] Error 1 [ 119s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 119s] debian/rules:45: recipe for target 'build' failed [ 119s] make: *** [build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 119s] [ 119s] lamb62 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:19:08 UTC 2017. [ 119s] [ 119s] ### VM INTERACTION START ### [ 122s] [ 114.175539] reboot: Power down [ 122s] ### VM INTERACTION END ### [ 122s] [ 122s] lamb62 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 20:19:12 UTC 2017. [ 122s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:48:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:48:32 +0000 Subject: libosmo-sccp[master]: xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:48:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:48:36 +0000 Subject: libosmo-sccp[master]: Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:48:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:48:39 +0000 Subject: [MERGED] libosmo-sccp[master]: Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers ...................................................................... Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e --- M src/osmo_ss7_vty.c 1 file changed, 37 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index cbbb9e3..403a9ac 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -497,6 +497,42 @@ vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE); } +static void vty_dump_xua_server(struct vty *vty, struct osmo_xua_server *xs) +{ + vty_out(vty, "xUA server for %s on %s:%u%s", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host ? xs->cfg.local.host : "0.0.0.0", + xs->cfg.local.port, VTY_NEWLINE); +} + +/* List all addressbook entries */ +DEFUN(show_cs7_xua, show_cs7_xua_cmd, + "show cs7 "XUA_VAR_STR" [<0-65534>]", + SHOW_STR CS7_STR XUA_VAR_HELP_STR "Port Number") +{ + struct osmo_ss7_instance *inst; + struct osmo_xua_server *xs; + enum osmo_ss7_asp_protocol proto = parse_asp_proto(argv[0]); + + llist_for_each_entry(inst, &osmo_ss7_instances, list) { + if (argc > 1) { + int port = atoi(argv[1]); + xs = osmo_ss7_xua_server_find(inst, proto, port); + if (!xs) { + vty_out(vty, "%% No matching server found%s", VTY_NEWLINE); + return CMD_WARNING; + } + vty_dump_xua_server(vty, xs); + } else { + llist_for_each_entry(xs, &inst->xua_servers, list) { + if (xs->cfg.proto == proto) + vty_dump_xua_server(vty, xs); + } + } + } + return CMD_SUCCESS; +} + /*********************************************************************** * Application Server Process @@ -1721,6 +1757,7 @@ g_ctx = ctx; install_element_ve(&show_cs7_user_cmd); + install_element_ve(&show_cs7_xua_cmd); /* the mother of all VTY config nodes */ install_element(CONFIG_NODE, &cs7_instance_cmd); -- To view, visit https://gerrit.osmocom.org/4938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:48:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:48:40 +0000 Subject: [MERGED] libosmo-sccp[master]: xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup ...................................................................... xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup When we destroy a FSM, we (logically) must osmo_timer_del() any running timers that the FSM might have been using. This was not implemented for xua_as_fsm, xua_asp_fsm and also missing from ipa_asp_fsm. Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Related: OS#2668 --- M src/xua_as_fsm.c M src/xua_asp_fsm.c 2 files changed, 17 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 59a71ba..5757d63 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -315,6 +315,13 @@ } } +static void xua_as_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; + + osmo_timer_del(&xafp->recovery.t_r); +} + static const struct osmo_fsm_state xua_as_fsm_states[] = { [XUA_AS_S_DOWN] = { .in_event_mask = S(XUA_ASPAS_ASP_INACTIVE_IND) | @@ -368,6 +375,7 @@ .num_states = ARRAY_SIZE(xua_as_fsm_states), .log_subsys = DLSS7, .event_names = xua_as_event_names, + .cleanup = xua_as_fsm_cleanup, }; /*! \brief Start an AS FSM for a given Application Server diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 1b802ce..e81f0af 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -611,6 +611,13 @@ return 0; } +static void xua_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct xua_asp_fsm_priv *xafp = fi->priv; + + osmo_timer_del(&xafp->t_ack.timer); +} + static const struct osmo_fsm_state xua_asp_states[] = { [XUA_ASP_S_DOWN] = { .in_event_mask = S(XUA_ASP_E_M_ASP_UP_REQ) | @@ -668,6 +675,7 @@ S(XUA_ASP_E_ASPSM_BEAT) | S(XUA_ASP_E_ASPSM_BEAT_ACK), .allstate_action = xua_asp_allstate, + .cleanup = xua_asp_fsm_cleanup, }; static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, @@ -1040,6 +1048,7 @@ return; osmo_ss7_route_destroy(rt); + osmo_timer_del(&iafp->pong_timer); } struct osmo_fsm ipa_asp_fsm = { -- To view, visit https://gerrit.osmocom.org/4939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 20 20:49:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 Nov 2017 20:49:05 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN: add Routing section for IP forward and masquerading In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN: add Routing section for IP forward and masquerading ...................................................................... OsmoGGSN: add Routing section for IP forward and masquerading Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 --- M OsmoGGSN/chapters/running.adoc 1 file changed, 32 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/chapters/running.adoc b/OsmoGGSN/chapters/running.adoc index ef899b5..83470e8 100644 --- a/OsmoGGSN/chapters/running.adoc +++ b/OsmoGGSN/chapters/running.adoc @@ -20,6 +20,38 @@ used. If none is specified, use `osmo-ggsn.cfg` in the current working directory. +=== Routing + +Operating the OpenGGSN tun device naturally creates a network setup with +multiple interfaces. Consider: + +* Typical Linux setups prevent forwarding of packets between separate + interfaces by default. To let subscribers reach the internet uplink from the + tun device, it may be required to enable IP forwarding. + +* Having a locally defined address range assigned to the tun device requires + either sensible routing for this address range, or that masquerading is + enabled to allow your single uplink IP address to "proxy" for the tun. + +These are decisions to be made on a network administration level. + +In a trivial case where you have a single box serving GPRS to few subscribers +on an arbitrary IP address range not known in the larger network, the easiest +way to enable GPRS uplink would be to enable IP forwarding and masquerading. + +To manually enable IPv4 forwarding and masquerading ad-hoc, you can do: + +---- +sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" +iptables -t nat -A POSTROUTING -o '*' -j MASQUERADE +---- + +(You may want to replace `*` with the network device name, like `-o eth0`) + +There are various ways to enable these settings persistently, please refer to +your distribution's documentation -- e.g. look for @net.ipv4.ip_forward=1@ in +@/etc/sysctl.d/@, and https://wiki.debian.org/iptables for masquerading. + === Multiple instances Running multiple instances of `osmo-ggsn` is possible if all GGSN instances -- To view, visit https://gerrit.osmocom.org/4912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Mon Nov 20 21:14:08 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 21:14:08 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a1345ad80f5_a94d30f7c4382413@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 308s] <0002> gprs_gmm.c:1608 -> GMM RA UPDATE REQUEST type="RA updating" [ 308s] <0002> gprs_gmm.c:1495 MM(12131415161718/c3b59322) <- ROUTING AREA UPDATE ACCEPT [ 308s] <0012> gprs_llc_parse.c:81 LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x910914 CMD=UI DATA  [ 308s] <0012> gprs_gb_parse.c:408 Got LLC message, CRC: 910914 (computed 910914) [ 308s] Got DL LLC message: RA_UPD_ACK [ 308s] <0002> gprs_gmm.c:1608 -> GMM RA UPDATE REQUEST type="RA updating" [ 308s] <0002> gprs_gmm.c:230 MM(12131415161718/c3b59322) Starting MM timer 3350 while old timer 3350 pending [ 308s] <0002> gprs_gmm.c:1495 MM(12131415161718/c3b59322) <- ROUTING AREA UPDATE ACCEPT [ 308s] <0012> gprs_llc_parse.c:81 LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0xc148a8 CMD=UI DATA  [ 308s] <0012> gprs_gb_parse.c:408 Got LLC message, CRC: c148a8 (computed c148a8) [ 308s] Got DL LLC message: RA_UPD_ACK [ 308s] <0002> gprs_gmm.c:2022 MM(12131415161718/c3b59322) -> ROUTING AREA UPDATE COMPLETE [ 308s] <0002> gprs_gmm.c:1463 MM(12131415161718/c3b59322) -> GMM DETACH REQUEST TLLI=0xc3b59322 type=GPRS detach Power-off [ 308s] <0002> gprs_gmm.c:315 MM(12131415161718/c3b59322) Cleaning MM context due to GPRS DETACH REQUEST [ 308s] <0012> gprs_llc.c:480 LLC: unknown TLLI 0x00000000, creating LLME on the fly [ 308s] <0002> gprs_gmm.c:1271 MM(---/ffffffff) -> GMM ATTACH REQUEST MI(12131415161718) type="GPRS attach"  [ 308s] <0002> gprs_sgsn.c:239 MM(/00000000) Allocated with GEA0 cipher. [ 308s] <0002> gprs_gmm.c:558 MM(12131415161718/ebc06895) <- GPRS IDENTITY REQUEST: mi_type=IMEI [ 308s] <0012> gprs_llc_parse.c:81 LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0x9a8ede CMD=UI DATA  [ 308s] <0012> gprs_gb_parse.c:408 Got LLC message, CRC: 9a8ede (computed 9a8ede) [ 308s] <0012> gprs_gb_parse.c:384 Unhandled GSM 04.08 message type IDENTITY REQUEST for protocol discriminator GSM48_PDISC_MM_GPRS. [ 308s] Got DL LLC message: GMM [ 308s] <0002> gprs_gmm.c:1194 MM(12131415161718/ebc06895) -> GMM IDENTITY RESPONSE: MI(IMEI)=987654321098765 [ 310s] <0002> sgsn_auth.c:160 MM(1213141516171[ 254.436574] SysRq : Power Off [ 310s] [ 254.437936] reboot: Power down [ 310s] ### VM INTERACTION END ### [ 310s] [ 310s] armbuild16 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 21:13:52 UTC 2017. [ 310s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 20 21:38:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 21:38:50 +0000 Subject: [MERGED] osmo-iuh[master]: api doc: clarify byte order in ranap_new_msg_rab_assign_* In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: api doc: clarify byte order in ranap_new_msg_rab_assign_* ...................................................................... api doc: clarify byte order in ranap_new_msg_rab_assign_* Change-Id: Ib0d2cc538488a995be5278092d3ac105be8aad33 --- M src/ranap_msg_factory.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 64d87f9..ef3e9ef 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -716,7 +716,8 @@ /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice). * See 3GPP TS 25.413 8.2. - * RAB ID: 3GPP TS 25.413 9.2.1.2 + * RAB ID: 3GPP TS 25.413 9.2.1.2. + * \param rtp_ip MGW's RTP IPv4 address in *network* byte order. */ struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port, @@ -785,7 +786,8 @@ return msg; } -/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */ +/*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) + * \param gtp_ip SGSN's GTP IPv4 address in *network* byte order. */ struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip, uint32_t gtp_tei, bool use_x213_nsap) { -- To view, visit https://gerrit.osmocom.org/4936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0d2cc538488a995be5278092d3ac105be8aad33 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 21:39:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 21:39:26 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN: typo: priveleges In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: OsmoGGSN: typo: priveleges ...................................................................... OsmoGGSN: typo: priveleges Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d --- M OsmoGGSN/chapters/configuration.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/chapters/configuration.adoc b/OsmoGGSN/chapters/configuration.adoc index 5f61c88..657a014 100644 --- a/OsmoGGSN/chapters/configuration.adoc +++ b/OsmoGGSN/chapters/configuration.adoc @@ -242,7 +242,7 @@ <5> Shut down the APN [[ggsn_no_root]] -=== Configuring for running without root priveleges +=== Configuring for running without root privileges It's possible to run OsmoGGSN without root privileges if the tun devices are already configured. -- To view, visit https://gerrit.osmocom.org/4913 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 20 21:39:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 20 Nov 2017 21:39:34 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: install doc: add asciidoc-dblatex dep In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: install doc: add asciidoc-dblatex dep ...................................................................... install doc: add asciidoc-dblatex dep On debian 9, apparently asciidoc-dblatex needs to be installed manually in order to be able to generate PDFs. Add asciidoc-dblatex dep to INSTALL.txt. Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 --- M INSTALL.txt 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/INSTALL.txt b/INSTALL.txt index 2669c0c..c06248a 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -3,6 +3,7 @@ apt-get install \ make \ asciidoc \ + asciidoc-dblatex \ xsltproc \ dblatex \ mscgen \ @@ -10,6 +11,8 @@ python-pychart \ python-nwdiag +(Note that asciidoc-dblatex is required from debian 9 on and did not exist before.) + Build PDFs, run: make or for a parallel build using more CPU cores: -- To view, visit https://gerrit.osmocom.org/4914 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24b606016e7f1c03bd73a3b0cf4fa3e5b89eb192 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Mon Nov 20 22:15:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 Nov 2017 22:15:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a13543398735_a94d30f7c4392760@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 522s] <0002> gprs_sgsn.c:725 MM(123456789012345/de3d7343) Subscriber data update [ 522s] <0002> sgsn_auth.c:219 MM(123456789012345/de3d7343) Updating authorization (unknown -> authenticate) [ 522s] <0002> sgsn_auth.c:248 MM(123456789012345/de3d7343) Got authorization update: state unknown -> authenticate [ 522s] <0002> gprs_gmm.c:592 MM(123456789012345/de3d7343) <- GPRS AUTH AND CIPHERING REQ (rand = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ) [ 522s] <0012> gprs_llc_parse.c:81 LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0x26b144 CMD=UI DATA  [ 522s] <0012> gprs_gb_parse.c:408 Got LLC message, CRC: 26b144 (computed 26b144) [ 522s] <0012> gprs_gb_parse.c:384 Unhandled GSM 04.08 message type AUTH & CIPHER REQUEST for protocol discriminator GSM48_PDISC_MM_GPRS. [ 522s] Got DL LLC message: GMM [ 522s] <0002> gprs_gmm.c:731 MM(123456789012345/de3d7343) -> GPRS AUTH AND CIPH RESPONSE [ 522s] <0002> gprs_gmm.c:778 MM(123456789012345/de3d7343) checking auth: received GSM SRES = 51 e5 51 e5 [ 522s] <0002> sgsn_auth.c:160 MM(123456789012345/de3d7343) Requesting authorization [ 522s] <0002> sgsn_auth.c:196 MM(123456789012345/de3d7343) Missing information, requesting subscriber data [ 522s] <0002> gprs_subscriber.c:869 MM(123456789012345/de3d7343) Requesting subscriber data update [ 523s] <000f> gprs_subscriber.c:808 SUBSCR(123456789012345) subscriber data is not available [ 523s] <000f> gprs_subscriber.c:206 SUBSCR(123456789012345) Sending GSUP, will send: 04 01 08 21 43 65 87 09 21 43 f5 28 01 01 [ 523s] <000f> gprs_subscriber.c:816 SUBSCR(123456789012345) Updating subscriber data [ 523s] <0002> gprs_sgsn.c:725 MM(123456789012345/de3d7343) Subscriber data update [ 523s] <0002> sgsn_auth.c:219 MM(123456789012345/de3d7343) Updating authorization (authenticate -> accepted) [ 523s] <0002> sgsn_auth.c:248 MM(123456789012345/de3d7343) Got authorization update: state authenticate -> accepted [ 523s] <0002> gprs_gmm.c:1118 MM(123456789012345/de3d7343) Authorized, continuing procedure, IMSI=123456789012345 [ 523s] <0002> gprs_gmm.c:439 MM(123456789012345/de3d7343) <- GPRS ATTACH ACCEPT (new P-TMSI=0xde3d7343) [ 523s] <0012> gprs_llc_parse.c:81 LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x972bbf CMD=UI DATA  [ 523s] <0012> gprs_gb_parse.c:408 Got LLC message, CRC: 972bbf (computed 972bbf) [ 525s] Got DL LLC message: ATTA[ 488.433091] sysrq: SysRq : Power Off [ 525s] [ 488.461637] reboot: Power down [ 525s] ### VM INTERACTION END ### [ 525s] [ 525s] obs-arm-2 failed "build osmo-sgsn_1.2.0.20171120.dsc" at Mon Nov 20 22:15:47 UTC 2017. [ 525s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 21 01:31:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 01:31:30 +0000 Subject: [PATCH] libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... Message-ID: Review at https://gerrit.osmocom.org/4940 osmo_strlcpy: sanitize: don't memcpy from NULL src even if len is 0 Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 --- M src/utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/4940/1 diff --git a/src/utils.c b/src/utils.c index f63ff89..bc5329d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -385,7 +385,8 @@ if (siz) { size_t len = (ret >= siz) ? siz - 1 : ret; - memcpy(dst, src, len); + if (src) + memcpy(dst, src, len); dst[len] = '\0'; } return ret; -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 01:31:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 01:31:32 +0000 Subject: [PATCH] libosmocore[master]: fsm_tmr_cb: don't set T=0, the fi may no longer exist Message-ID: Review at https://gerrit.osmocom.org/4941 fsm_tmr_cb: don't set T=0, the fi may no longer exist When calling the timer_cb, that may have effected an fi termination and deallocation, e.g. from dispatching events and/or complex choices made. Current timer_cb implementations expect T to reflect the fired timer number, so we can't actually set T=0 before calling the timer_cb. Instead, never reset T to zero, let it always reflect the timer that last fired. When a new timer starts, T will be set to its new value. Adding a T arg to the timer_cb() would have been the cleanest solution, so that fi->T can be set to zero before dispatching the timer_cb. But since we've already rolled out this FSM API, we should stay backwards compatible. In the case where the timer returned 1 to request termination, we can assume that the fi still exists, but to be consistent, don't set T = 0 in that code path either. Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a --- M src/fsm.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/4941/1 diff --git a/src/fsm.c b/src/fsm.c index 827e8b3..0bdcd9d 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -183,16 +183,17 @@ if (fsm->timer_cb) { int rc = fsm->timer_cb(fi); - if (rc != 1) { - fi->T = 0; + if (rc != 1) + /* We don't actually know whether fi exists anymore. + * Make sure to not access it and return right away. */ return; - } + /* The timer_cb told us to terminate, so we can safely assume + * that fi still exists. */ LOGPFSM(fi, "timer_cb requested termination\n"); } else LOGPFSM(fi, "No timer_cb, automatic termination\n"); /* if timer_cb returns 1 or there is no timer_cb */ - fi->T = 0; osmo_fsm_inst_term(fi, OSMO_FSM_TERM_TIMEOUT, &T); } -- To view, visit https://gerrit.osmocom.org/4941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:34:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:34:31 +0000 Subject: [PATCH] osmo-iuh[master]: Add "-Wall" to the compile rules of the non-asn1c-generated ... Message-ID: Review at https://gerrit.osmocom.org/4942 Add "-Wall" to the compile rules of the non-asn1c-generated source code This is actually default in all other osmocom projects, and it's a big surprise that it hadn't been enabled for osmo-iuh. Now we finally can see that there are e.g. unused static functions in the code. Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163 --- M src/Makefile.am M src/tests/Makefile.am 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/42/4942/1 diff --git a/src/Makefile.am b/src/Makefile.am index c9e1555..ab772a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp -AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ +AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 28ad56c..493bc18 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -g -I$(top_srcdir)/src/tests \ +AM_CFLAGS = -g -Wall -I$(top_srcdir)/src/tests \ -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -- To view, visit https://gerrit.osmocom.org/4942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:34:34 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw.c: Remove dead code creating libsctp linker dependency Message-ID: Review at https://gerrit.osmocom.org/4943 hnbgw.c: Remove dead code creating libsctp linker dependency Since I8ac15fa2fd25bedb26297177e416976a5389b573 in July 2017 we are not using sctp_*() functions directly anymore but go via libosmo-sigtran. However, some dead code remained in hnbgw.c, which means that linkage will fail if compiled without any optimization, i.e. without -O present. Change-Id: Ifbcb21d43e17bf512bc7b219e590410e06c434ca --- M src/hnbgw.c 1 file changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/43/4943/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index c9fdd53..97905b3 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -238,21 +238,6 @@ return rc; } -static int hnb_write_cb(struct osmo_fd *fd, struct msgb *msg) -{ - struct hnb_context *ctx = fd->data; - struct sctp_sndrcvinfo sinfo = { - .sinfo_ppid = htonl(msgb_sctp_ppid(msg)), - .sinfo_stream = ctx->hnbap_stream, - }; - int rc; - - rc = sctp_send(fd->fd, msgb_data(msg), msgb_length(msg), - &sinfo, 0); - /* we don't need to msgb_free(), write_queue does this for us */ - return rc; -} - struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_link *link, int new_fd) { struct hnb_context *ctx; -- To view, visit https://gerrit.osmocom.org/4943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbcb21d43e17bf512bc7b219e590410e06c434ca Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:34:34 +0000 Subject: [PATCH] osmo-iuh[master]: sccp_sap_up(): Fix never-hit "default" case in switch Message-ID: Review at https://gerrit.osmocom.org/4944 sccp_sap_up(): Fix never-hit "default" case in switch As the default was called "defualt", it became a standard C label and was never actually performing any default catch-all behavior. As we didn't use -Wall, gcc never warned us about it so far :/ Change-Id: I9dbad21e75a55ad91b12d3d3ee8bd6dfb5326c3e --- M src/hnbgw_cn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/44/4944/1 diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 81ef670..3238f00 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -389,7 +389,7 @@ case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): rc = handle_cn_disc_ind(cnlink, &prim->u.disconnect, oph); break; - defualt: + default: LOGP(DMAIN, LOGL_ERROR, "Received unknown prim %u from SCCP USER SAP\n", OSMO_PRIM_HDR(oph)); -- To view, visit https://gerrit.osmocom.org/4944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dbad21e75a55ad91b12d3d3ee8bd6dfb5326c3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:34:34 +0000 Subject: [PATCH] osmo-iuh[master]: Fix various compiler warnings in hnb-gw code Message-ID: Review at https://gerrit.osmocom.org/4945 Fix various compiler warnings in hnb-gw code Since we finally started to use -Wall, the related warnings became visible. Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 --- M src/context_map.c M src/hnbgw.c M src/hnbgw_cn.c M src/hnbgw_hnbap.c M src/hnbgw_ranap.c M src/hnbgw_rua.c M src/hnbgw_vty.c M src/iu_client.c M src/ranap_common_cn.c 9 files changed, 61 insertions(+), 76 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/4945/1 diff --git a/src/context_map.c b/src/context_map.c index 0960cb9..b90f555 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -169,4 +169,6 @@ context_map_tmr.cb = context_map_tmr_cb; context_map_tmr.data = gw; osmo_timer_schedule(&context_map_tmr, EXPIRY_TIMER_SECS, 0); + + return 0; } diff --git a/src/hnbgw.c b/src/hnbgw.c index 97905b3..5c0570e 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -44,8 +44,11 @@ #include #include +#include #include + +#include #include #include @@ -68,8 +71,6 @@ void *talloc_asn1_ctx; static struct hnb_gw *g_hnb_gw; - -static int listen_fd_cb(struct osmo_fd *fd, unsigned int what); static struct hnb_gw *hnb_gw_create(void *ctx) { @@ -175,13 +176,13 @@ } static int hnb_close_cb(struct osmo_stream_srv *conn) { + return 0; } static int hnb_read_cb(struct osmo_stream_srv *conn) { struct hnb_context *hnb = osmo_stream_srv_get_data(conn); struct msgb *msg = msgb_alloc(IUH_MSGB_SIZE, "Iuh rx"); - int flags = 0; int rc; if (!msg) @@ -222,12 +223,12 @@ case IUH_PPI_SABP: case IUH_PPI_RNA: case IUH_PPI_PUA: - LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; default: - LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; @@ -421,8 +422,6 @@ int main(int argc, char **argv) { - struct osmo_sccp_user *sccp_user; - struct osmo_sccp_link *sua_link; struct osmo_stream_srv_link *srv; int rc; diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 3238f00..a48b651 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -38,13 +38,12 @@ * Outbound RANAP RESET to CN ***********************************************************************/ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); static int transmit_rst(struct hnb_gw *gw, RANAP_CN_DomainIndicator_t domain, struct osmo_sccp_addr *remote_addr) { struct msgb *msg; - struct msgb *msgprim; RANAP_Cause_t cause = { .present = RANAP_Cause_PR_transmissionNetwork, .choice. transmissionNetwork = RANAP_CauseTransmissionNetwork_signalling_transport_resource_failure, @@ -71,7 +70,7 @@ } /* change the state of a CN Link */ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) { switch (state) { case CNLINK_S_NULL: @@ -127,9 +126,11 @@ struct hnb_gw *gw = cnlink->gw; struct hnb_context *hnb; RANAP_PagingIEs_t ies; - int rc = 0; + int rc; rc = ranap_decode_pagingies(&ies, &imsg->value); + if (rc < 0) + return rc; /* FIXME: determine which HNBs to send this Paging command, * rather than broadcasting to all HNBs */ @@ -145,8 +146,6 @@ RANAP_InitiatingMessage_t *imsg, const uint8_t *data, unsigned int len) { - int rc; - switch (imsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: return cn_ranap_rx_reset_cmd(cnlink, imsg); @@ -161,11 +160,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; } return 0; @@ -174,8 +173,6 @@ static int cn_ranap_rx_successful_msg(struct hnbgw_cnlink *cnlink, RANAP_SuccessfulOutcome_t *omsg) { - int rc; - switch (omsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: /* Reset acknowledge */ return cn_ranap_rx_reset_ack(cnlink, omsg); @@ -184,11 +181,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; } return 0; @@ -210,7 +207,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from CN, ignoring\n", + "unsuccessful outcome procedure %ld from CN, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -218,6 +215,8 @@ "presence %u from CN, ignoring\n", pdu->present); break; } + + return rc; } static int handle_cn_ranap(struct hnbgw_cnlink *cnlink, const uint8_t *data, @@ -357,7 +356,7 @@ struct osmo_sccp_user *scu = ctx; struct hnbgw_cnlink *cnlink; struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph; - int rc; + int rc = 0; LOGP(DMAIN, LOGL_DEBUG, "sccp_sap_up(%s)\n", osmo_scu_prim_name(oph)); @@ -398,7 +397,7 @@ msgb_free(oph->msg); - return 0; + return rc; } static bool addr_has_pc_and_ssn(const struct osmo_sccp_addr *addr) @@ -453,7 +452,6 @@ struct hnbgw_cnlink *cnlink; struct osmo_ss7_instance *ss7; uint32_t local_pc; - int rc; OSMO_ASSERT(!gw->sccp.client); OSMO_ASSERT(!gw->sccp.cnlink); diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 0473482..f96c733 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -356,7 +356,7 @@ return rc; DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%ld\n", - ies.cause); + hnbap_cause_str(&ies.cause)); hnbap_free_hnbde_registeries(&ies); hnb_context_release(ctx); @@ -457,7 +457,7 @@ ctxid = asn1bitstr_to_u24(&ies.context_ID); - DEBUGP(DHNBAP, "UE-DE-REGISTER context=%ld cause=%s\n", + DEBUGP(DHNBAP, "UE-DE-REGISTER context=%u cause=%s\n", ctxid, hnbap_cause_str(&ies.cause)); ue = ue_context_by_id(ctx->gw, ctxid); @@ -486,7 +486,7 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t *imsg) { - int rc; + int rc = 0; switch (imsg->procedureCode) { case ProcedureCode_id_HNBRegister: /* 8.2 */ @@ -517,6 +517,8 @@ imsg->procedureCode); break; } + + return rc; } static int hnbgw_rx_successful_outcome_msg(struct hnb_context *hnb, SuccessfulOutcome_t *msg) @@ -581,5 +583,5 @@ int hnbgw_hnbap_init(void) { - + return 0; } diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c index 7fd6d0a..6822752 100644 --- a/src/hnbgw_ranap.c +++ b/src/hnbgw_ranap.c @@ -77,7 +77,7 @@ static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in) { RANAP_ErrorIndicationIEs_t ies; - int rc, is_ps = 0; + int rc; rc = ranap_decode_errorindicationies(&ies, in); if (rc < 0) @@ -92,35 +92,9 @@ return 0; } -static int ranap_rx_dt(struct hnb_context *hnb, ANY_t *in) -{ - RANAP_DirectTransferIEs_t ies; - int sapi = 0; - int rc; - - rc = ranap_decode_directtransferies(&ies, in); - if (rc < 0) - return rc; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_SAPI_PRESENT) - sapi = ies.sapi; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_LAI_PRESENT) { - /* FIXME: Update LAI associated with UE */ - } - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_RAC_PRESENT) { - /* FIXME: Update RAC associated with UE */ - } - - DEBUGP(DRANAP, "DirectTransfer: %s\n", - osmo_hexdump(ies.nas_pdu.buf, ies.nas_pdu.size)); - /* FIXME: hand NAS PDU into MSC */ -} - static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMessage_t *imsg) { - int rc; + int rc = 0; /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset @@ -144,19 +118,19 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return rc; } static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg) { - int rc; - /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset * Resurce Acknowledge as connecitonless RANAP. There are some @@ -172,20 +146,22 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return 0; } static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu) { - int rc; + int rc = 0; switch (pdu->present) { case RANAP_RANAP_PDU_PR_initiatingMessage: @@ -196,7 +172,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from HNB, ignoring\n", + "unsuccessful outcome procedure %lu from HNB, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -204,6 +180,8 @@ "presence %u from HNB, ignoring\n", pdu->present); break; } + + return rc; } @@ -228,5 +206,5 @@ int hnbgw_ranap_init(void) { - + return 0; } diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 95979f5..305b8cc 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -418,7 +419,6 @@ static int rua_rx_init_udt(struct msgb *msg, ANY_t *in) { RUA_ConnectionlessTransferIEs_t ies; - RUA_CN_DomainIndicator_t domain; int rc; rc = rua_decode_connectionlesstransferies(&ies, in); @@ -483,7 +483,7 @@ rc = 0; break; default: - LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %u\n", + LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %lu\n", imsg->procedureCode); rc = -1; } diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index f504dd5..3d16970 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -18,6 +18,8 @@ * */ +#include + #include #include @@ -233,9 +235,6 @@ static int config_write_hnbgw_iucs(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iucs_remote_addr_name) return CMD_SUCCESS; @@ -248,9 +247,6 @@ static int config_write_hnbgw_iups(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iups_remote_addr_name) return CMD_SUCCESS; diff --git a/src/iu_client.c b/src/iu_client.c index 17d955d..3ee900c 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -25,12 +25,16 @@ #include #include +#include + #include #include #include #include #include +#include +#include #include #include diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index d02eb37..d2c875e 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -319,7 +319,7 @@ static int cn_ranap_rx_initiating_msg_cl(void *ctx, RANAP_InitiatingMessage_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -360,6 +360,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_initiating_msg_cl(ranap_message *message) @@ -403,7 +405,7 @@ static int cn_ranap_rx_successful_msg_cl(void *ctx, RANAP_SuccessfulOutcome_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -433,6 +435,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_successful_msg_cl(ranap_message *message) @@ -463,7 +467,7 @@ static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *message) { - int rc; + int rc = 0; /* Extend _cn_ranap_free_cl as well when extending this function */ @@ -488,6 +492,8 @@ get_value_string(ranap_presence_vals, pdu->present)); break; } + + return rc; } static void _cn_ranap_free_cl(ranap_message *message) @@ -505,7 +511,7 @@ break; default: LOGP(DRANAP, LOGL_NOTICE, "Suspicious RANAP " - "presence %s (CL) from RNC, ignoring\n", message->direction); + "presence %d (CL) from RNC, ignoring\n", message->direction); break; } } -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:41:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:41:18 +0000 Subject: osmo-iuh[master]: Add "-Wall" to the compile rules of the non-asn1c-generated ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:41:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:41:27 +0000 Subject: osmo-iuh[master]: hnbgw.c: Remove dead code creating libsctp linker dependency In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifbcb21d43e17bf512bc7b219e590410e06c434ca Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:41:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:41:32 +0000 Subject: osmo-iuh[master]: sccp_sap_up(): Fix never-hit "default" case in switch In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dbad21e75a55ad91b12d3d3ee8bd6dfb5326c3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:41:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:41:39 +0000 Subject: osmo-iuh[master]: Fix various compiler warnings in hnb-gw code In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 07:52:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 07:52:54 +0000 Subject: [PATCH] osmo-sgsn[master]: Replace '.' in counter names with ':' Message-ID: Review at https://gerrit.osmocom.org/4946 Replace '.' in counter names with ':' '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb --- M src/gprs/gprs_sgsn.c 1 file changed, 23 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/46/4946/1 diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 4cd3df1..5eff404 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -102,29 +102,29 @@ }; static const struct rate_ctr_desc sgsn_ctr_description[] = { - { "llc.dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, - { "llc.ul_bytes", "Count sucessful received LLC bytes (encrypt & fcs correct)" }, - { "llc.dl_packets", "Count sucessful sent LLC packets before giving it to the bssgp layer" }, - { "llc.ul_packets", "Count sucessful received LLC packets (encrypt & fcs correct)" }, - { "gprs.attach_requested", "Received attach requests" }, - { "gprs.attach_accepted", "Sent attach accepts" }, - { "gprs.attach_rejected", "Sent attach rejects" }, - { "gprs.detach_requested", "Received detach requests" }, - { "gprs.detach_acked", "Sent detach acks" }, - { "gprs.routing_area_requested", "Received routing area requests" }, - { "gprs.routing_area_requested", "Sent routing area acks" }, - { "gprs.routing_area_requested", "Sent routing area rejects" }, - { "pdp.activate_requested", "Received activate requests" }, - { "pdp.activate_rejected", "Sent activate rejects" }, - { "pdp.activate_accepted", "Sent activate accepts" }, - { "pdp.request_activated", "unused" }, - { "pdp.request_activate_rejected", "unused" }, - { "pdp.modify_requested", "unused" }, - { "pdp.modify_accepted", "unused" }, - { "pdp.dl_deactivate_requested", "Sent deactivate requests" }, - { "pdp.dl_deactivate_accepted", "Sent deactivate accepted" }, - { "pdp.ul_deactivate_requested", "Received deactivate requests" }, - { "pdp.ul_deactivate_accepted", "Received deactivate accepts" }, + { "llc:dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, + { "llc:ul_bytes", "Count sucessful received LLC bytes (encrypt & fcs correct)" }, + { "llc:dl_packets", "Count sucessful sent LLC packets before giving it to the bssgp layer" }, + { "llc:ul_packets", "Count sucessful received LLC packets (encrypt & fcs correct)" }, + { "gprs:attach_requested", "Received attach requests" }, + { "gprs:attach_accepted", "Sent attach accepts" }, + { "gprs:attach_rejected", "Sent attach rejects" }, + { "gprs:detach_requested", "Received detach requests" }, + { "gprs:detach_acked", "Sent detach acks" }, + { "gprs:routing_area_requested", "Received routing area requests" }, + { "gprs:routing_area_requested", "Sent routing area acks" }, + { "gprs:routing_area_requested", "Sent routing area rejects" }, + { "pdp:activate_requested", "Received activate requests" }, + { "pdp:activate_rejected", "Sent activate rejects" }, + { "pdp:activate_accepted", "Sent activate accepts" }, + { "pdp:request_activated", "unused" }, + { "pdp:request_activate_rejected", "unused" }, + { "pdp:modify_requested", "unused" }, + { "pdp:modify_accepted", "unused" }, + { "pdp:dl_deactivate_requested", "Sent deactivate requests" }, + { "pdp:dl_deactivate_accepted", "Sent deactivate accepted" }, + { "pdp:ul_deactivate_requested", "Received deactivate requests" }, + { "pdp:ul_deactivate_accepted", "Received deactivate accepts" }, }; static const struct rate_ctr_group_desc sgsn_ctrg_desc = { -- To view, visit https://gerrit.osmocom.org/4946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 09:43:59 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 21 Nov 2017 09:43:59 +0000 Subject: osmo-pcu[master]: Remove unused parameter In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 09:45:19 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 21 Nov 2017 09:45:19 +0000 Subject: osmo-pcu[master]: Move multislot table to separate file In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4635/1/src/mslot_class.c File src/mslot_class.c: Line 1: /* mslot_class.c What information does this have? -- To view, visit https://gerrit.osmocom.org/4635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 21 10:45:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 10:45:15 +0000 Subject: osmo-pcu[master]: Move multislot table to separate file In-Reply-To: References: Message-ID: Patch Set 1: > What information does this have? Same as gprs_rlcmac_ts_alloc.cpp which I've used as an example. What information should it have? -- To view, visit https://gerrit.osmocom.org/4635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 10:45:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 10:45:24 +0000 Subject: [MERGED] osmo-pcu[master]: Move multislot table to separate file In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Move multislot table to separate file ...................................................................... Move multislot table to separate file To facilitate testing and addition of support for new multislot classes, hide multislot class struct internals: * introduce mslot_class_get_*() functions * use those functions instead of direct access to array of structs * use ms_class as a parameter to find_multi_slot() instead of entire object Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 --- M src/Makefile.am M src/gprs_rlcmac_ts_alloc.cpp A src/mslot_class.c A src/mslot_class.h 4 files changed, 221 insertions(+), 109 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index 1543851..a6e98e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,6 +49,7 @@ pcu_l1_if.cpp \ pcu_vty.c \ pcu_vty_functions.cpp \ + mslot_class.c \ tbf.cpp \ tbf_ul.cpp \ tbf_dl.cpp \ @@ -81,6 +82,7 @@ gsm_timer.h \ pcu_vty.h \ pcu_vty_functions.h \ + mslot_class.h \ tbf.h \ bts.h \ poll_controller.h \ diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index dac9e63..5e670d7 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -29,58 +29,12 @@ #include #include +extern "C" { +#include "mslot_class.h" +} + /* Consider a PDCH as idle if has at most this number of TBFs assigned to it */ #define PDCH_IDLE_TBF_THRESH 1 - -/* 3GPP TS 05.02 Annex B.1 */ - -#define MS_NA 255 /* N/A */ -#define MS_A 254 /* 1 with hopping, 0 without */ -#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ -#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ - -struct gprs_ms_multislot_class { - uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ - uint8_t ta, tb, ra, rb; /* Minimum Number of Slots */ - uint8_t type; /* Type of Mobile */ -}; - -static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { - /* M-S Class | Max # of slots | Min # of slots | Type */ - /* | Rx Tx Sum | Tta Ttb Tra Trb | */ - /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, - /* 1 */ { 1, 1, 2, 3, 2, 4, 2, 1 }, - /* 2 */ { 2, 1, 3, 3, 2, 3, 1, 1 }, - /* 3 */ { 2, 2, 3, 3, 2, 3, 1, 1 }, - /* 4 */ { 3, 1, 4, 3, 1, 3, 1, 1 }, - /* 5 */ { 2, 2, 4, 3, 1, 3, 1, 1 }, - /* 6 */ { 3, 2, 4, 3, 1, 3, 1, 1 }, - /* 7 */ { 3, 3, 4, 3, 1, 3, 1, 1 }, - /* 8 */ { 4, 1, 5, 3, 1, 2, 1, 1 }, - /* 9 */ { 3, 2, 5, 3, 1, 2, 1, 1 }, - /* 10 */ { 4, 2, 5, 3, 1, 2, 1, 1 }, - /* 11 */ { 4, 3, 5, 3, 1, 2, 1, 1 }, - /* 12 */ { 4, 4, 5, 2, 1, 2, 1, 1 }, - /* 13 */ { 3, 3, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 14 */ { 4, 4, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 15 */ { 5, 5, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, - /* 16 */ { 6, 6, MS_NA, MS_NA, MS_A, 2, MS_A, 2 }, - /* 17 */ { 7, 7, MS_NA, MS_NA, MS_A, 1, 0, 2 }, - /* 18 */ { 8, 8, MS_NA, MS_NA, 0, 0, 0, 2 }, - /* 19 */ { 6, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 20 */ { 6, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 21 */ { 6, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 22 */ { 6, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 23 */ { 6, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 24 */ { 8, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 25 */ { 8, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 26 */ { 8, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, - /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, - /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -}; static char *set_flag_chars(char *buf, uint8_t val, char set_char, char unset_char = 0) { @@ -489,10 +443,8 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_trx *trx, - const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots) +static int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) { - const struct gprs_ms_multislot_class *ms_class; uint8_t Tx, Sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ uint8_t Tta, Ttb, Tra, Trb; /* Minimum Number of Slots */ uint8_t Type; /* Type of Mobile */ @@ -509,57 +461,30 @@ enum {MASK_TT, MASK_TR}; unsigned mask_sel; - if (ms->ms_class() >= 32) { - LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %d out of range.\n", - ms->ms_class()); + if (mslot_class) + LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for class %d\n", + mslot_class); + + Tx = mslot_class_get_tx(mslot_class); + Sum = mslot_class_get_sum(mslot_class); + Tta = mslot_class_get_ta(mslot_class); + Ttb = mslot_class_get_tb(mslot_class); + Tra = mslot_class_get_ra(mslot_class); + Trb = mslot_class_get_rb(mslot_class); + Type = mslot_class_get_type(mslot_class); + + if (Tx == MS_NA) { + LOGP(DRLCMAC, LOGL_NOTICE, "Multislot class %d not applicable.\n", + mslot_class); return -EINVAL; } - - if (ms->ms_class()) { - ms_class = &gprs_ms_multislot_class[ms->ms_class()]; - LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " - "class %d\n", ms->ms_class()); - } else { - ms_class = &gprs_ms_multislot_class[12]; - LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for " - "unknown class (assuming 12)\n"); - } - - if (ms_class->tx == MS_NA) { - LOGP(DRLCMAC, LOGL_NOTICE, "Multislot class %d not " - "applicable.\n", ms->ms_class()); - return -EINVAL; - } - - Tx = ms_class->tx; - Sum = ms_class->sum; - Tta = ms_class->ta; - Ttb = ms_class->tb; - Tra = ms_class->ra; - Trb = ms_class->rb; - Type = ms_class->type; - - /* MS_A maps to 0 if frequency hopping is disabled */ - /* TODO: Set it to 1 if FH is implemented and enabled */ - if (Ttb == MS_A) - Ttb = 0; - if (Trb == MS_A) - Trb = 0; - - /* MS_A and MS_B are 0 iff FH is disabled and there is no Tx/Rx change. - * This is never the case with the current implementation, so 1 will - * always be used. */ - if (Ttb == MS_B) - Ttb = 1; - if (Trb == MS_C) - Trb = 1; LOGP(DRLCMAC, LOGL_DEBUG, "- Rx=%d Tx=%d Sum Rx+Tx=%s Tta=%s Ttb=%d " - " Tra=%d Trb=%d Type=%d\n", ms_class->rx, Tx, + " Tra=%d Trb=%d Type=%d\n", mslot_class_get_rx(mslot_class), Tx, (Sum == MS_NA) ? "N/A" : digit[Sum], (Tta == MS_NA) ? "N/A" : digit[Tta], Ttb, Tra, Trb, Type); - max_slots = OSMO_MAX(ms_class->rx, ms_class->tx); + max_slots = OSMO_MAX(mslot_class_get_rx(mslot_class), Tx); if (*dl_slots == 0) *dl_slots = 0xff; @@ -585,11 +510,11 @@ max_dl_slots = 0; /* Iterate through possible numbers of TX slots */ - for (num_tx = 1; num_tx <= ms_class->tx; num_tx += 1) { + for (num_tx = 1; num_tx <= mslot_class_get_tx(mslot_class); num_tx += 1) { uint16_t tx_valid_win = (1 << num_tx) - 1; uint8_t rx_mask[MASK_TR+1]; - if (ms_class->type == 1) { + if (Type == 1) { rx_mask[MASK_TT] = (0x100 >> OSMO_MAX(Ttb, Tta)) - 1; rx_mask[MASK_TT] &= ~((1 << (Trb + num_tx)) - 1); rx_mask[MASK_TR] = (0x100 >> Ttb) - 1; @@ -629,7 +554,7 @@ tx_slot_count = pcu_bitcount(tx_window); - max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); + max_rx = OSMO_MIN(mslot_class_get_rx(mslot_class), Sum - num_tx); rx_valid_win = (1 << max_rx) - 1; /* Rotate group of RX slots: DDD-----, -DDD----, ..., DD-----D */ @@ -671,7 +596,7 @@ /* Whether to skip this round doesn not only depend on the bit * sets but also on mask_sel. Therefore this check must be done * before doing the test_and_set_bit shortcut. */ - if (ms_class->type == 1) { + if (Type == 1) { unsigned slot_sum = rx_slot_count + tx_slot_count; /* Assume down+up/dynamic. * TODO: For ext-dynamic, down only, up only add more @@ -723,7 +648,7 @@ /* Check number of common slots according to TS 54.002, 6.4.2.2 */ common_slot_count = pcu_bitcount(tx_window & rx_window); req_common_slots = OSMO_MIN(tx_slot_count, rx_slot_count); - if (ms_class->type == 1) + if (Type == 1) req_common_slots = OSMO_MIN(req_common_slots, 2); if (req_common_slots != common_slot_count) { @@ -858,7 +783,7 @@ trx = &bts->trx[trx_no]; if (!dl_slots || !ul_slots) { - rc = find_multi_slots(trx, ms, &ul_slots, &dl_slots); + rc = find_multi_slots(trx, ms->ms_class(), &ul_slots, &dl_slots); if (rc < 0) return rc; @@ -1063,12 +988,7 @@ int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts, uint8_t ms_class) { - int rx; - - if (ms_class >= ARRAY_SIZE(gprs_ms_multislot_class)) - ms_class = 0; - - rx = gprs_ms_multislot_class[ms_class].rx; + int rx = mslot_class_get_rx(ms_class); if (rx == MS_NA) rx = 4; diff --git a/src/mslot_class.c b/src/mslot_class.c new file mode 100644 index 0000000..6d7c09d --- /dev/null +++ b/src/mslot_class.c @@ -0,0 +1,144 @@ +/* mslot_class.c + * + * Copyright (C) 2012 Ivan Klyuchnikov + * Copyright (C) 2012 Andreas Eversberg + * Copyright (C) 2013 by Holger Hans Peter Freyther + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#include +#include + +#include + +/* 3GPP TS 05.02 Annex B.1 */ + +struct gprs_ms_multislot_class { + uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ + uint8_t ta, tb, ra, rb; /* Minimum Number of Slots */ + uint8_t type; /* Type of Mobile */ +}; + +static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { + /* M-S Class | Max # of slots | Min # of slots | Type */ + /* | Rx Tx Sum | Tta Ttb Tra Trb | */ + /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, + /* 1 */ { 1, 1, 2, 3, 2, 4, 2, 1 }, + /* 2 */ { 2, 1, 3, 3, 2, 3, 1, 1 }, + /* 3 */ { 2, 2, 3, 3, 2, 3, 1, 1 }, + /* 4 */ { 3, 1, 4, 3, 1, 3, 1, 1 }, + /* 5 */ { 2, 2, 4, 3, 1, 3, 1, 1 }, + /* 6 */ { 3, 2, 4, 3, 1, 3, 1, 1 }, + /* 7 */ { 3, 3, 4, 3, 1, 3, 1, 1 }, + /* 8 */ { 4, 1, 5, 3, 1, 2, 1, 1 }, + /* 9 */ { 3, 2, 5, 3, 1, 2, 1, 1 }, + /* 10 */ { 4, 2, 5, 3, 1, 2, 1, 1 }, + /* 11 */ { 4, 3, 5, 3, 1, 2, 1, 1 }, + /* 12 */ { 4, 4, 5, 2, 1, 2, 1, 1 }, + /* 13 */ { 3, 3, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 14 */ { 4, 4, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 15 */ { 5, 5, MS_NA, MS_NA, MS_A, 3, MS_A, 2 }, + /* 16 */ { 6, 6, MS_NA, MS_NA, MS_A, 2, MS_A, 2 }, + /* 17 */ { 7, 7, MS_NA, MS_NA, MS_A, 1, 0, 2 }, + /* 18 */ { 8, 8, MS_NA, MS_NA, 0, 0, 0, 2 }, + /* 19 */ { 6, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 20 */ { 6, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 21 */ { 6, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 22 */ { 6, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 23 */ { 6, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 24 */ { 8, 2, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 25 */ { 8, 3, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 26 */ { 8, 4, MS_NA, 3, MS_B, 2, MS_C, 1 }, + /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, + /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, +/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, +/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, +}; + +static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl) +{ + uint8_t index = ms_cl ? ms_cl : DEFAULT_MSLOT_CLASS; + + if (ms_cl >= ARRAY_SIZE(gprs_ms_multislot_class)) + index = 0; + + return &gprs_ms_multislot_class[index]; +} + +uint8_t mslot_class_get_ta(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->ta; +} + +/* TODO: Set it to 1 if FH is implemented and enabled + * MS_A and MS_B are 0 iff FH is disabled and there is no Tx/Rx change. + * This is never the case with the current implementation, so 1 will always be used. */ +uint8_t mslot_class_get_tb(uint8_t ms_cl) +{ + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->tb) { + case MS_A: + return 0; + case MS_B: + return 1; + default: + return t->tb; + } +} + +uint8_t mslot_class_get_ra(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->ra; +} + +uint8_t mslot_class_get_rb(uint8_t ms_cl) +{ + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->rb) { + case MS_A: + return 0; + case MS_C: + return 1; + default: + return t->rb; + } +} + +uint8_t mslot_class_get_tx(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->tx; +} + +uint8_t mslot_class_get_rx(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->rx; +} + +uint8_t mslot_class_get_sum(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->sum; +} + +uint8_t mslot_class_get_type(uint8_t ms_cl) +{ + return get_mslot_table(ms_cl)->type; +} diff --git a/src/mslot_class.h b/src/mslot_class.h new file mode 100644 index 0000000..f26bd64 --- /dev/null +++ b/src/mslot_class.h @@ -0,0 +1,46 @@ +/* mslot_class.h + * + * Copyright (C) 2012 Ivan Klyuchnikov + * Copyright (C) 2012 Andreas Eversberg + * Copyright (C) 2013 by Holger Hans Peter Freyther + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#pragma once + +#include +#include +#include + +/* 3GPP TS 05.02 Annex B.1 */ + +#define MS_NA 255 /* N/A */// +#define MS_A 254 /* 1 with hopping, 0 without */ +#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ +#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ + +#define DEFAULT_MSLOT_CLASS 12 + +/* multislot class selection routines */ +uint8_t mslot_class_get_ta(uint8_t ms_cl); +uint8_t mslot_class_get_tb(uint8_t ms_cl); +uint8_t mslot_class_get_ra(uint8_t ms_cl); +uint8_t mslot_class_get_rb(uint8_t ms_cl); +uint8_t mslot_class_get_tx(uint8_t ms_cl); +uint8_t mslot_class_get_rx(uint8_t ms_cl); +uint8_t mslot_class_get_sum(uint8_t ms_cl); +uint8_t mslot_class_get_type(uint8_t ms_cl); -- To view, visit https://gerrit.osmocom.org/4635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 10:45:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 10:45:24 +0000 Subject: [MERGED] osmo-pcu[master]: Remove unused parameter In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove unused parameter ...................................................................... Remove unused parameter Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 2b08cf6..dac9e63 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -489,8 +489,7 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_bts *bts, - struct gprs_rlcmac_trx *trx, +static int find_multi_slots(struct gprs_rlcmac_trx *trx, const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots) { const struct gprs_ms_multislot_class *ms_class; @@ -859,7 +858,7 @@ trx = &bts->trx[trx_no]; if (!dl_slots || !ul_slots) { - rc = find_multi_slots(bts, trx, ms, &ul_slots, &dl_slots); + rc = find_multi_slots(trx, ms, &ul_slots, &dl_slots); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 10:57:10 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 10:57:10 +0000 Subject: [PATCH] libosmo-abis[master]: unixsocket: fix a potential string overflow In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4213 to look at the new patch set (#2). unixsocket: fix a potential string overflow Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Found-by: coverity --- M src/input/unixsocket.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/13/4213/2 diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 03e2909..c49928d 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -233,7 +233,7 @@ int i; if (line->sock_path) - strcpy(sock_path, line->sock_path); + osmo_strlcpy(sock_path, line->sock_path, PATH_MAX); else sprintf(sock_path, "%s%d", UNIXSOCKET_SOCK_PATH_DEFAULT, line->num); -- To view, visit https://gerrit.osmocom.org/4213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:05:19 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 11:05:19 +0000 Subject: [PATCH] osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq Message-ID: Review at https://gerrit.osmocom.org/4947 use _NUM_CHREQ_T to define the size of ctype_by_chreq Make it future compatible for changes. Otherwise it will break when additional enums are adding to chreq in libosmocore. Depends on libosmocore Id67ba8de89dd6288e449197438e9e1c5d7f5a134 Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/4947/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b9427b8..837a876 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -435,7 +435,7 @@ enum rrlp_mode mode; } rrlp; - enum gsm_chan_t ctype_by_chreq[18]; + enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ int pag_any_tch; -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:05:50 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 11:05:50 +0000 Subject: [ABANDON] openbsc[master]: openbsc: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: lynxis lazus has abandoned this change. Change subject: openbsc: use _NUM_CHREQ_T to define the size of ctype_by_chreq ...................................................................... Abandoned moved to projecty osmo-bsc -- To view, visit https://gerrit.osmocom.org/2054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:07:05 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 11:07:05 +0000 Subject: openbsc[master]: openbsc: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Patch Set 2: https://gerrit.osmocom.org/#/c/4947/ -- To view, visit https://gerrit.osmocom.org/2054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:07:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:07:55 +0000 Subject: osmo-iuh[master]: Fix various compiler warnings in hnb-gw code In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4945/1/src/hnbgw_hnbap.c File src/hnbgw_hnbap.c: Line 358: DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%ld\n", %s -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:09:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:09:01 +0000 Subject: [PATCH] osmo-iuh[master]: Fix various compiler warnings in hnb-gw code In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4945 to look at the new patch set (#2). Fix various compiler warnings in hnb-gw code Since we finally started to use -Wall, the related warnings became visible. Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 --- M src/context_map.c M src/hnbgw.c M src/hnbgw_cn.c M src/hnbgw_hnbap.c M src/hnbgw_ranap.c M src/hnbgw_rua.c M src/hnbgw_vty.c M src/iu_client.c M src/ranap_common_cn.c 9 files changed, 62 insertions(+), 77 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/4945/2 diff --git a/src/context_map.c b/src/context_map.c index 0960cb9..b90f555 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -169,4 +169,6 @@ context_map_tmr.cb = context_map_tmr_cb; context_map_tmr.data = gw; osmo_timer_schedule(&context_map_tmr, EXPIRY_TIMER_SECS, 0); + + return 0; } diff --git a/src/hnbgw.c b/src/hnbgw.c index 97905b3..5c0570e 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -44,8 +44,11 @@ #include #include +#include #include + +#include #include #include @@ -68,8 +71,6 @@ void *talloc_asn1_ctx; static struct hnb_gw *g_hnb_gw; - -static int listen_fd_cb(struct osmo_fd *fd, unsigned int what); static struct hnb_gw *hnb_gw_create(void *ctx) { @@ -175,13 +176,13 @@ } static int hnb_close_cb(struct osmo_stream_srv *conn) { + return 0; } static int hnb_read_cb(struct osmo_stream_srv *conn) { struct hnb_context *hnb = osmo_stream_srv_get_data(conn); struct msgb *msg = msgb_alloc(IUH_MSGB_SIZE, "Iuh rx"); - int flags = 0; int rc; if (!msg) @@ -222,12 +223,12 @@ case IUH_PPI_SABP: case IUH_PPI_RNA: case IUH_PPI_PUA: - LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; default: - LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; @@ -421,8 +422,6 @@ int main(int argc, char **argv) { - struct osmo_sccp_user *sccp_user; - struct osmo_sccp_link *sua_link; struct osmo_stream_srv_link *srv; int rc; diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 3238f00..a48b651 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -38,13 +38,12 @@ * Outbound RANAP RESET to CN ***********************************************************************/ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); static int transmit_rst(struct hnb_gw *gw, RANAP_CN_DomainIndicator_t domain, struct osmo_sccp_addr *remote_addr) { struct msgb *msg; - struct msgb *msgprim; RANAP_Cause_t cause = { .present = RANAP_Cause_PR_transmissionNetwork, .choice. transmissionNetwork = RANAP_CauseTransmissionNetwork_signalling_transport_resource_failure, @@ -71,7 +70,7 @@ } /* change the state of a CN Link */ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) { switch (state) { case CNLINK_S_NULL: @@ -127,9 +126,11 @@ struct hnb_gw *gw = cnlink->gw; struct hnb_context *hnb; RANAP_PagingIEs_t ies; - int rc = 0; + int rc; rc = ranap_decode_pagingies(&ies, &imsg->value); + if (rc < 0) + return rc; /* FIXME: determine which HNBs to send this Paging command, * rather than broadcasting to all HNBs */ @@ -145,8 +146,6 @@ RANAP_InitiatingMessage_t *imsg, const uint8_t *data, unsigned int len) { - int rc; - switch (imsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: return cn_ranap_rx_reset_cmd(cnlink, imsg); @@ -161,11 +160,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; } return 0; @@ -174,8 +173,6 @@ static int cn_ranap_rx_successful_msg(struct hnbgw_cnlink *cnlink, RANAP_SuccessfulOutcome_t *omsg) { - int rc; - switch (omsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: /* Reset acknowledge */ return cn_ranap_rx_reset_ack(cnlink, omsg); @@ -184,11 +181,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; } return 0; @@ -210,7 +207,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from CN, ignoring\n", + "unsuccessful outcome procedure %ld from CN, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -218,6 +215,8 @@ "presence %u from CN, ignoring\n", pdu->present); break; } + + return rc; } static int handle_cn_ranap(struct hnbgw_cnlink *cnlink, const uint8_t *data, @@ -357,7 +356,7 @@ struct osmo_sccp_user *scu = ctx; struct hnbgw_cnlink *cnlink; struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph; - int rc; + int rc = 0; LOGP(DMAIN, LOGL_DEBUG, "sccp_sap_up(%s)\n", osmo_scu_prim_name(oph)); @@ -398,7 +397,7 @@ msgb_free(oph->msg); - return 0; + return rc; } static bool addr_has_pc_and_ssn(const struct osmo_sccp_addr *addr) @@ -453,7 +452,6 @@ struct hnbgw_cnlink *cnlink; struct osmo_ss7_instance *ss7; uint32_t local_pc; - int rc; OSMO_ASSERT(!gw->sccp.client); OSMO_ASSERT(!gw->sccp.cnlink); diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 0473482..7c1e239 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -355,8 +355,8 @@ if (rc < 0) return rc; - DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%ld\n", - ies.cause); + DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%s\n", + hnbap_cause_str(&ies.cause)); hnbap_free_hnbde_registeries(&ies); hnb_context_release(ctx); @@ -457,7 +457,7 @@ ctxid = asn1bitstr_to_u24(&ies.context_ID); - DEBUGP(DHNBAP, "UE-DE-REGISTER context=%ld cause=%s\n", + DEBUGP(DHNBAP, "UE-DE-REGISTER context=%u cause=%s\n", ctxid, hnbap_cause_str(&ies.cause)); ue = ue_context_by_id(ctx->gw, ctxid); @@ -486,7 +486,7 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t *imsg) { - int rc; + int rc = 0; switch (imsg->procedureCode) { case ProcedureCode_id_HNBRegister: /* 8.2 */ @@ -517,6 +517,8 @@ imsg->procedureCode); break; } + + return rc; } static int hnbgw_rx_successful_outcome_msg(struct hnb_context *hnb, SuccessfulOutcome_t *msg) @@ -581,5 +583,5 @@ int hnbgw_hnbap_init(void) { - + return 0; } diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c index 7fd6d0a..6822752 100644 --- a/src/hnbgw_ranap.c +++ b/src/hnbgw_ranap.c @@ -77,7 +77,7 @@ static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in) { RANAP_ErrorIndicationIEs_t ies; - int rc, is_ps = 0; + int rc; rc = ranap_decode_errorindicationies(&ies, in); if (rc < 0) @@ -92,35 +92,9 @@ return 0; } -static int ranap_rx_dt(struct hnb_context *hnb, ANY_t *in) -{ - RANAP_DirectTransferIEs_t ies; - int sapi = 0; - int rc; - - rc = ranap_decode_directtransferies(&ies, in); - if (rc < 0) - return rc; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_SAPI_PRESENT) - sapi = ies.sapi; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_LAI_PRESENT) { - /* FIXME: Update LAI associated with UE */ - } - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_RAC_PRESENT) { - /* FIXME: Update RAC associated with UE */ - } - - DEBUGP(DRANAP, "DirectTransfer: %s\n", - osmo_hexdump(ies.nas_pdu.buf, ies.nas_pdu.size)); - /* FIXME: hand NAS PDU into MSC */ -} - static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMessage_t *imsg) { - int rc; + int rc = 0; /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset @@ -144,19 +118,19 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return rc; } static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg) { - int rc; - /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset * Resurce Acknowledge as connecitonless RANAP. There are some @@ -172,20 +146,22 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return 0; } static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu) { - int rc; + int rc = 0; switch (pdu->present) { case RANAP_RANAP_PDU_PR_initiatingMessage: @@ -196,7 +172,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from HNB, ignoring\n", + "unsuccessful outcome procedure %lu from HNB, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -204,6 +180,8 @@ "presence %u from HNB, ignoring\n", pdu->present); break; } + + return rc; } @@ -228,5 +206,5 @@ int hnbgw_ranap_init(void) { - + return 0; } diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 95979f5..305b8cc 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -418,7 +419,6 @@ static int rua_rx_init_udt(struct msgb *msg, ANY_t *in) { RUA_ConnectionlessTransferIEs_t ies; - RUA_CN_DomainIndicator_t domain; int rc; rc = rua_decode_connectionlesstransferies(&ies, in); @@ -483,7 +483,7 @@ rc = 0; break; default: - LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %u\n", + LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %lu\n", imsg->procedureCode); rc = -1; } diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index f504dd5..3d16970 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -18,6 +18,8 @@ * */ +#include + #include #include @@ -233,9 +235,6 @@ static int config_write_hnbgw_iucs(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iucs_remote_addr_name) return CMD_SUCCESS; @@ -248,9 +247,6 @@ static int config_write_hnbgw_iups(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iups_remote_addr_name) return CMD_SUCCESS; diff --git a/src/iu_client.c b/src/iu_client.c index 17d955d..3ee900c 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -25,12 +25,16 @@ #include #include +#include + #include #include #include #include #include +#include +#include #include #include diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index d02eb37..d2c875e 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -319,7 +319,7 @@ static int cn_ranap_rx_initiating_msg_cl(void *ctx, RANAP_InitiatingMessage_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -360,6 +360,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_initiating_msg_cl(ranap_message *message) @@ -403,7 +405,7 @@ static int cn_ranap_rx_successful_msg_cl(void *ctx, RANAP_SuccessfulOutcome_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -433,6 +435,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_successful_msg_cl(ranap_message *message) @@ -463,7 +467,7 @@ static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *message) { - int rc; + int rc = 0; /* Extend _cn_ranap_free_cl as well when extending this function */ @@ -488,6 +492,8 @@ get_value_string(ranap_presence_vals, pdu->present)); break; } + + return rc; } static void _cn_ranap_free_cl(ranap_message *message) @@ -505,7 +511,7 @@ break; default: LOGP(DRANAP, LOGL_NOTICE, "Suspicious RANAP " - "presence %s (CL) from RNC, ignoring\n", message->direction); + "presence %d (CL) from RNC, ignoring\n", message->direction); break; } } -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:09:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:09:10 +0000 Subject: osmo-iuh[master]: Fix various compiler warnings in hnb-gw code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:31:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 11:31:14 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4915/3/tests/gtp/gtpie_test.c File tests/gtp/gtpie_test.c: Line 11: #include It's enough to just include bits.h - no need to use generated headers directly. -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:34:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:34:33 +0000 Subject: [PATCH] osmo-hlr[master]: db_test: don't verify SQLite issued error messages, they mig... Message-ID: Review at https://gerrit.osmocom.org/4948 db_test: don't verify SQLite issued error messages, they might change A user on openbsc@ complained that with SQLite 3.8.2, the db_test fails with --- expected +++ stderr -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi +DDB (2067) abort at 35 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi i.e. a trivial difference in the error message issued by SQLite. For db_test, don't output any SQLite error messages: Add argument enable_sqlite_logging, pass as true, except in db_test.c. Remove the SQLite error messages from expected output. (Note that there is a src/db_test.c program that's not of interest here, this is about the tests/db/db_test.c) Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229 --- M src/db.c M src/db.h M src/db_test.c M src/hlr.c M src/hlr_db_tool.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 13 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/48/4948/1 diff --git a/src/db.c b/src/db.c index d16f8ec..cc06ee6 100644 --- a/src/db.c +++ b/src/db.c @@ -211,7 +211,7 @@ return 0; } -struct db_context *db_open(void *ctx, const char *fname) +struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite_logging) { struct db_context *dbc = talloc_zero(ctx, struct db_context); unsigned int i; @@ -233,9 +233,11 @@ has_sqlite_config_sqllog = true; } - rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL); - if (rc != SQLITE_OK) - LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n"); + if (enable_sqlite_logging) { + rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL); + if (rc != SQLITE_OK) + LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n"); + } if (has_sqlite_config_sqllog) { rc = sqlite3_config(SQLITE_CONFIG_SQLLOG, sql3_sql_log_cb, NULL); diff --git a/src/db.h b/src/db.h index fc8e511..92fdac4 100644 --- a/src/db.h +++ b/src/db.h @@ -38,7 +38,7 @@ bool db_bind_int(sqlite3_stmt *stmt, const char *param_name, int nr); bool db_bind_int64(sqlite3_stmt *stmt, const char *param_name, int64_t nr); void db_close(struct db_context *dbc); -struct db_context *db_open(void *ctx, const char *fname); +struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite3_logging); #include diff --git a/src/db_test.c b/src/db_test.c index 0e823f9..7891c90 100644 --- a/src/db_test.c +++ b/src/db_test.c @@ -62,7 +62,7 @@ exit(1); } - g_hlr->dbc = db_open(NULL, "hlr.db"); + g_hlr->dbc = db_open(NULL, "hlr.db", true); if (!g_hlr->dbc) { LOGP(DMAIN, LOGL_ERROR, "Error opening database\n"); exit(1); diff --git a/src/hlr.c b/src/hlr.c index 78a7055..861597a 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -460,7 +460,7 @@ exit(1); } - g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file); + g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file, true); if (!g_hlr->dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(1); diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index d8a3584..318308c 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -409,7 +409,7 @@ exit(EXIT_FAILURE); } - g_hlr_db_tool_ctx->dbc = db_open(g_hlr_db_tool_ctx, cmdline_opts.db_file); + g_hlr_db_tool_ctx->dbc = db_open(g_hlr_db_tool_ctx, cmdline_opts.db_file, true); if (!g_hlr_db_tool_ctx->dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(EXIT_FAILURE); diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 389ed00..23b84cc 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -820,7 +820,9 @@ /* omit the SQLite version and compilation flags from test output */ log_set_log_level(osmo_stderr_target, LOGL_ERROR); - dbc = db_open(ctx, "db_test.db"); + /* Disable SQLite logging so that we're not vulnerable on SQLite error messages changing across + * library versions. */ + dbc = db_open(ctx, "db_test.db", false); log_set_log_level(osmo_stderr_target, 0); OSMO_ASSERT(dbc); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 0b09583..f7acfec 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -28,7 +28,6 @@ } db_subscr_create(dbc, imsi0) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000000': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 @@ -38,11 +37,9 @@ } db_subscr_create(dbc, imsi1) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_create(dbc, imsi1) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 @@ -52,11 +49,9 @@ } db_subscr_create(dbc, imsi2) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_create(dbc, imsi2) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 -- To view, visit https://gerrit.osmocom.org/4948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:35:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 11:35:25 +0000 Subject: osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:38:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 11:38:47 +0000 Subject: libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:54:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:54:06 +0000 Subject: osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 fixes build after Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b in libosmocore -- To view, visit https://gerrit.osmocom.org/4946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 11:54:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 11:54:09 +0000 Subject: [MERGED] osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Replace '.' in counter names with ':' ...................................................................... Replace '.' in counter names with ':' '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb --- M src/gprs/gprs_sgsn.c 1 file changed, 23 insertions(+), 23 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified Jenkins Builder: Verified diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 4cd3df1..5eff404 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -102,29 +102,29 @@ }; static const struct rate_ctr_desc sgsn_ctr_description[] = { - { "llc.dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, - { "llc.ul_bytes", "Count sucessful received LLC bytes (encrypt & fcs correct)" }, - { "llc.dl_packets", "Count sucessful sent LLC packets before giving it to the bssgp layer" }, - { "llc.ul_packets", "Count sucessful received LLC packets (encrypt & fcs correct)" }, - { "gprs.attach_requested", "Received attach requests" }, - { "gprs.attach_accepted", "Sent attach accepts" }, - { "gprs.attach_rejected", "Sent attach rejects" }, - { "gprs.detach_requested", "Received detach requests" }, - { "gprs.detach_acked", "Sent detach acks" }, - { "gprs.routing_area_requested", "Received routing area requests" }, - { "gprs.routing_area_requested", "Sent routing area acks" }, - { "gprs.routing_area_requested", "Sent routing area rejects" }, - { "pdp.activate_requested", "Received activate requests" }, - { "pdp.activate_rejected", "Sent activate rejects" }, - { "pdp.activate_accepted", "Sent activate accepts" }, - { "pdp.request_activated", "unused" }, - { "pdp.request_activate_rejected", "unused" }, - { "pdp.modify_requested", "unused" }, - { "pdp.modify_accepted", "unused" }, - { "pdp.dl_deactivate_requested", "Sent deactivate requests" }, - { "pdp.dl_deactivate_accepted", "Sent deactivate accepted" }, - { "pdp.ul_deactivate_requested", "Received deactivate requests" }, - { "pdp.ul_deactivate_accepted", "Received deactivate accepts" }, + { "llc:dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, + { "llc:ul_bytes", "Count sucessful received LLC bytes (encrypt & fcs correct)" }, + { "llc:dl_packets", "Count sucessful sent LLC packets before giving it to the bssgp layer" }, + { "llc:ul_packets", "Count sucessful received LLC packets (encrypt & fcs correct)" }, + { "gprs:attach_requested", "Received attach requests" }, + { "gprs:attach_accepted", "Sent attach accepts" }, + { "gprs:attach_rejected", "Sent attach rejects" }, + { "gprs:detach_requested", "Received detach requests" }, + { "gprs:detach_acked", "Sent detach acks" }, + { "gprs:routing_area_requested", "Received routing area requests" }, + { "gprs:routing_area_requested", "Sent routing area acks" }, + { "gprs:routing_area_requested", "Sent routing area rejects" }, + { "pdp:activate_requested", "Received activate requests" }, + { "pdp:activate_rejected", "Sent activate rejects" }, + { "pdp:activate_accepted", "Sent activate accepts" }, + { "pdp:request_activated", "unused" }, + { "pdp:request_activate_rejected", "unused" }, + { "pdp:modify_requested", "unused" }, + { "pdp:modify_accepted", "unused" }, + { "pdp:dl_deactivate_requested", "Sent deactivate requests" }, + { "pdp:dl_deactivate_accepted", "Sent deactivate accepted" }, + { "pdp:ul_deactivate_requested", "Received deactivate requests" }, + { "pdp:ul_deactivate_accepted", "Received deactivate accepts" }, }; static const struct rate_ctr_group_desc sgsn_ctrg_desc = { -- To view, visit https://gerrit.osmocom.org/4946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:29:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 13:29:09 +0000 Subject: [PATCH] libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4940 to look at the new patch set (#2). osmo_strlcpy: sanitize: don't memcpy from NULL src even if len is 0 Some callers pass NULL and len == 0. The semantics are that we then nul-terminate an emtpy string. Avoid a sanitizer warning by not calling memcpy() for the NULL case. Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 --- M src/utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/4940/2 diff --git a/src/utils.c b/src/utils.c index f63ff89..bc5329d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -385,7 +385,8 @@ if (siz) { size_t len = (ret >= siz) ? siz - 1 : ret; - memcpy(dst, src, len); + if (src) + memcpy(dst, src, len); dst[len] = '\0'; } return ret; -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:42:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 13:42:55 +0000 Subject: [PATCH] osmo-bsc[master]: bsc_init: fix Werror: define rc for 2quater with si2q_count ... Message-ID: Review at https://gerrit.osmocom.org/4949 bsc_init: fix Werror: define rc for 2quater with si2q_count == 0 src/libbsc/bsc_init.c: In function ?rsl_si?: src/libbsc/bsc_init.c:153:2: error: ?rc? may be used uninitialized in this function [-Werror=maybe-uninitialized] return rc; ^ Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 --- M src/libbsc/bsc_init.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/4949/1 diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 674813c..fa8c477 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -142,6 +142,7 @@ rc = rsl_bcch_info(trx, i, NULL, 0); break; } + rc = 0; for (j = 0; j <= bts->si2q_count; j++) rc = rsl_bcch_info(trx, i, (const uint8_t *)GSM_BTS_SI2Q(bts, j), GSM_MACBLOCK_LEN); break; -- To view, visit https://gerrit.osmocom.org/4949 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:42:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 13:42:56 +0000 Subject: [PATCH] osmo-bsc[master]: NOT FOR MERGE: testing gerrit build with V=1 Message-ID: Review at https://gerrit.osmocom.org/4950 NOT FOR MERGE: testing gerrit build with V=1 Change-Id: I48f65170cfd2319ffe19b12cfa01a70e7b8e779a --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/4950/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 57954f0..b5416f4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -41,8 +41,8 @@ cd "$base" autoreconf --install --force ./configure --enable-vty-tests --enable-external-tests -$MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check \ +$MAKE V=1 $PARALLEL_MAKE +LD_LIBRARY_PATH="$inst/lib" $MAKE V=1 check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests" \ -- To view, visit https://gerrit.osmocom.org/4950 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48f65170cfd2319ffe19b12cfa01a70e7b8e779a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:43:32 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 13:43:32 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-latest-packages: set -e: exit on any failure Message-ID: Review at https://gerrit.osmocom.org/4951 osmocom-latest-packages: set -e: exit on any failure Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d --- M scripts/osmocom-latest-packages.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/51/4951/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 2f0152e..ff1bc34 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -1,6 +1,6 @@ #!/bin/sh -#set -e +set -e # OBS project name PROJ=network:osmocom:latest -- To view, visit https://gerrit.osmocom.org/4951 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:43:32 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 13:43:32 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-latest-packages: introduce $TOP dir variable Message-ID: Review at https://gerrit.osmocom.org/4952 osmocom-latest-packages: introduce $TOP dir variable Using a $TOP variable makes directory paths more clear to understandable. Path now expressed starting from the TOP dir instead of using ../../../foo Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 --- M scripts/osmocom-latest-packages.sh 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/52/4952/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index ff1bc34..9deae23 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -6,6 +6,7 @@ PROJ=network:osmocom:latest DT=`date +%Y%m%d` +TOP=$(pwd) # start with a checkout of the project if [ -d $PROJ ]; then @@ -17,19 +18,20 @@ build() { echo echo "====> Building $1" + cd $TOP rm -rf data [ -d $1 ] || git clone git://git.osmocom.org/$1 cd $1 git fetch VER=`git describe --abbrev=0 --tags --match "*.*.*" origin/master` git checkout -f -B $VER refs/tags/$VER - gbp buildpackage -d -S -uc -us --git-export-dir=$PWD/../data --git-debian-branch=$VER - cd ../$PROJ/$1 + gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER + cd $TOP/$PROJ/$1 osc rm * || true - mv ../../data/*.dsc . - mv ../../data/*.tar* . + mv $TOP/data/*.dsc . + mv $TOP/data/*.tar* . osc add * - cd ../../ + cd $TOP } PACKAGES=" @@ -58,5 +60,5 @@ build $p done -cd $PROJ +cd $TOP/$PROJ osc ci -m "Latest Tagged versions of $DT" -- To view, visit https://gerrit.osmocom.org/4952 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:43:33 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 13:43:33 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-latest-packages: fix shellcheck warnings Message-ID: Review at https://gerrit.osmocom.org/4953 osmocom-latest-packages: fix shellcheck warnings Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f --- M scripts/osmocom-latest-packages.sh 1 file changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/53/4953/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 9deae23..23ee3dd 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -5,7 +5,7 @@ # OBS project name PROJ=network:osmocom:latest -DT=`date +%Y%m%d` +DT=$(date +%Y%m%d) TOP=$(pwd) # start with a checkout of the project @@ -18,20 +18,20 @@ build() { echo echo "====> Building $1" - cd $TOP + cd "$TOP" rm -rf data - [ -d $1 ] || git clone git://git.osmocom.org/$1 - cd $1 + [ -d "$1" ] || git clone "git://git.osmocom.org/$1" + cd "$1" git fetch - VER=`git describe --abbrev=0 --tags --match "*.*.*" origin/master` - git checkout -f -B $VER refs/tags/$VER - gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER - cd $TOP/$PROJ/$1 - osc rm * || true + VER=$(git describe --abbrev=0 --tags --match "*.*.*" origin/master) + git checkout -f -B "$VER" "refs/tags/$VER" + gbp buildpackage -d -S -uc -us "--git-export-dir=$TOP/data" "--git-debian-branch=$VER" + cd "$TOP/$PROJ/$1" + osc rm ./* || true mv $TOP/data/*.dsc . mv $TOP/data/*.tar* . - osc add * - cd $TOP + osc add ./* + cd "$TOP" } PACKAGES=" @@ -57,8 +57,8 @@ " for p in $PACKAGES; do - build $p + build "$p" done -cd $TOP/$PROJ +cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" -- To view, visit https://gerrit.osmocom.org/4953 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 13:43:33 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 13:43:33 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-latest-packages: only publish source tar balls if a ... Message-ID: Review at https://gerrit.osmocom.org/4954 osmocom-latest-packages: only publish source tar balls if a new tag was created OBS should only be updated if there is a new tag. Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 --- M scripts/osmocom-latest-packages.sh 1 file changed, 27 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/54/4954/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 23ee3dd..6933baa 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -16,21 +16,36 @@ fi build() { + project=$1 + output=$2 echo - echo "====> Building $1" + echo "====> Building $project" cd "$TOP" - rm -rf data [ -d "$1" ] || git clone "git://git.osmocom.org/$1" cd "$1" git fetch VER=$(git describe --abbrev=0 --tags --match "*.*.*" origin/master) git checkout -f -B "$VER" "refs/tags/$VER" - gbp buildpackage -d -S -uc -us "--git-export-dir=$TOP/data" "--git-debian-branch=$VER" - cd "$TOP/$PROJ/$1" - osc rm ./* || true - mv $TOP/data/*.dsc . - mv $TOP/data/*.tar* . - osc add ./* + gbp buildpackage -d -S -uc -us "--git-export-dir=$output" "--git-debian-branch=$VER" + + if [ ! -d "$TOP/$PROJ/$1" ] ; then + # creating a new package is different from using old ones + mkdir "$TOP/$PROJ/$1" + mv "$output/"*.dsc "$TOP/$PROJ/$1/" + cd "$TOP/$PROJ" + osc add "$1" + else + cd "$TOP/$PROJ/$1" + + # update OBS only if the filename doesn't match + file=$(cd "$output/" ; ls ./*.dsc) + if [ ! -e "$file" ] ; then + osc rm ./* || true + mv "$output/"*.dsc . + mv "$output/"*.tar* . + osc add ./* + fi + fi cd "$TOP" } @@ -56,8 +71,11 @@ osmo-bsc " +[ -d "$TOP/debsrc" ] && rm -rf "$TOP/debsrc" +mkdir "$TOP/debsrc" + for p in $PACKAGES; do - build "$p" + build "$p" "$TOP/debsrc/$p" done cd "$TOP/$PROJ" -- To view, visit https://gerrit.osmocom.org/4954 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:39 +0000 Subject: [PATCH] osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4072 to look at the new patch set (#4). Add multislot classes from latest spec The table B.1 is copy-pasted from 3GPP TS 45.002 and reformatted via Emacs macros into C struct to avoid typos. The test output expanded accordingly. The allocation test expectations and output are adjusted accordingly. Note: classes 35-45 which need TA offset are not properly supported yet. This can be extended once we have such devices available for tests. Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp M src/mslot_class.c M src/mslot_class.h M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok M tests/alloc/MslotTest.ok 7 files changed, 1,520 insertions(+), 800 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/72/4072/4 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 471b601..b5edf05 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -469,8 +469,12 @@ Sum = mslot_class_get_sum(mslot_class); Tta = mslot_class_get_ta(mslot_class); Ttb = mslot_class_get_tb(mslot_class); - Tra = mslot_class_get_ra(mslot_class); - Trb = mslot_class_get_rb(mslot_class); + + /* FIXME: use actual TA offset for computation - make sure to adjust "1 + MS_TO" accordingly + see also "Offset required" bit in 3GPP TS 24.008 ?10.5.1.7 */ + Tra = mslot_class_get_ra(mslot_class, 0); + Trb = mslot_class_get_rb(mslot_class, 0); + Type = mslot_class_get_type(mslot_class); if (Tx == MS_NA) { diff --git a/src/mslot_class.c b/src/mslot_class.c index 19fea3e..12d6d9e 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -27,7 +27,7 @@ #include -/* 3GPP TS 05.02 Annex B.1 */ +/* 3GPP TS 45.002 Annex B Table B.1 */ struct gprs_ms_multislot_class { uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ @@ -35,7 +35,7 @@ uint8_t type; /* Type of Mobile */ }; -static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = { +static const struct gprs_ms_multislot_class gprs_ms_multislot_class[] = { /* M-S Class | Max # of slots | Min # of slots | Type */ /* | Rx Tx Sum | Tta Ttb Tra Trb | */ /* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, @@ -68,8 +68,22 @@ /* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 }, /* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 }, /* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, -/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, + /* 30 */ { 5, 1, 6, 2, 1, 1, 1, 1 }, + /* 31 */ { 5, 2, 6, 2, 1, 1, 1, 1 }, + /* 32 */ { 5, 3, 6, 2, 1, 1, 1, 1 }, + /* 33 */ { 5, 4, 6, 2, 1, 1, 1, 1 }, + /* 34 */ { 5, 5, 6, 2, 1, 1, 1, 1 }, + /* 35 */ { 5, 1, 6, 2, 1, MS_TO, 1, 1 }, + /* 36 */ { 5, 2, 6, 2, 1, MS_TO, 1, 1 }, + /* 37 */ { 5, 3, 6, 2, 1, MS_TO, 1, 1 }, + /* 38 */ { 5, 4, 6, 2, 1, MS_TO, 1, 1 }, + /* 39 */ { 5, 5, 6, 2, 1, MS_TO, 1, 1 }, + /* 40 */ { 6, 1, 7, 1, 1, 1, MS_TO, 1 }, + /* 41 */ { 6, 2, 7, 1, 1, 1, MS_TO, 1 }, + /* 42 */ { 6, 3, 7, 1, 1, 1, MS_TO, 1 }, + /* 43 */ { 6, 4, 7, 1, 1, 1, MS_TO, 1 }, + /* 44 */ { 6, 5, 7, 1, 1, 1, MS_TO, 1 }, + /* 45 */ { 6, 6, 7, 1, 1, 1, MS_TO, 1 }, }; static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl) @@ -109,12 +123,19 @@ } } -uint8_t mslot_class_get_ra(uint8_t ms_cl) +uint8_t mslot_class_get_ra(uint8_t ms_cl, uint8_t ta) { - return get_mslot_table(ms_cl)->ra; + const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); + + switch (t->ra) { + case MS_TO: + return ta + 1; + default: + return t->ra; + } } -uint8_t mslot_class_get_rb(uint8_t ms_cl) +uint8_t mslot_class_get_rb(uint8_t ms_cl, uint8_t ta) { const struct gprs_ms_multislot_class *t = get_mslot_table(ms_cl); @@ -123,6 +144,8 @@ return 0; case MS_C: return 1; + case MS_TO: + return ta; default: return t->rb; } diff --git a/src/mslot_class.h b/src/mslot_class.h index cba9d58..3924770 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -32,14 +32,15 @@ #define MS_A 254 /* 1 with hopping, 0 without */ #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ +#define MS_TO 251 /* 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value) */ #define DEFAULT_MSLOT_CLASS 12 /* multislot class selection routines */ uint8_t mslot_class_get_ta(uint8_t ms_cl); uint8_t mslot_class_get_tb(uint8_t ms_cl); -uint8_t mslot_class_get_ra(uint8_t ms_cl); -uint8_t mslot_class_get_rb(uint8_t ms_cl); +uint8_t mslot_class_get_ra(uint8_t ms_cl, uint8_t ta); +uint8_t mslot_class_get_rb(uint8_t ms_cl, uint8_t ta); uint8_t mslot_class_get_tx(uint8_t ms_cl); uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index f0eb27c..9b3019f 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -775,7 +775,7 @@ test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B"); test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 29, "B"); + test_successive_allocation(alloc_algorithm_b, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 32, "B"); test_successive_allocation(alloc_algorithm_dynamic, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 35, "dynamic"); test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); @@ -852,7 +852,7 @@ test_alloc_b(); test_successive_allocations(); test_many_connections(alloc_algorithm_a, 160, "A"); - test_many_connections(alloc_algorithm_b, 29, "B"); + test_many_connections(alloc_algorithm_b, 32, "B"); test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err index 70e964b..9a5248a 100644 --- a/tests/alloc/AllocTest.err +++ b/tests/alloc/AllocTest.err @@ -18,8 +18,15 @@ No TFI available. No TFI available. - Failed to allocate a TFI -Multislot class 30 not applicable. -Multislot class 30 not applicable. +No TFI available. +No TFI available. +- Failed to allocate a TFI +No TFI available. +No TFI available. +- Failed to allocate a TFI +No TFI available. +No TFI available. +No TFI available. - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available No TFI available. @@ -554,15 +561,122 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) Allocated 160 TBFs (previously 160) -Multislot class 30 not applicable. - Allocated 29 TBFs (previously -1) +No TFI available. +No TFI available. +- Failed to allocate a TFI + Allocated 32 TBFs (previously -1) No USF available - Allocated 24 TBFs (previously 29) -Multislot class 30 not applicable. - Allocated 29 TBFs (previously 29) -Multislot class 30 not applicable. - Allocated 29 TBFs (previously 29) -Multislot class 30 not applicable. + Allocated 24 TBFs (previously 32) +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +- Failed to allocate a TFI + Allocated 32 TBFs (previously 32) +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +- Failed to allocate a TFI + Allocated 32 TBFs (previously 32) +No TFI available. +No TFI available. +- Failed to allocate a TFI +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. +No TFI available. No TFI available. No TFI available. No TFI available. @@ -584,9 +698,9 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 99 TBFs (previously -1) + Allocated 89 TBFs (previously -1) - Failed to allocate a TS, no USF available - Allocated 24 TBFs (previously 99) + Allocated 24 TBFs (previously 89) No TFI available. No TFI available. No TFI available. @@ -607,7 +721,7 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 160 TBFs (previously 99) + Allocated 160 TBFs (previously 89) No TFI available. No TFI available. No TFI available. diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index e5363b6..8427dae 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -8727,7 +8727,7 @@ TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) -Going to test assignment with many TBF, algorithm B class 1..32 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..46 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8757,8 +8757,11 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - Successfully allocated 29 UL TBFs, algorithm B class 1..32 (UL and DL) -Going to test assignment with many TBF, algorithm dynamic class 1..32 (UL and DL) + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDDC + Successfully allocated 32 UL TBFs, algorithm B class 1..46 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..46 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8788,13 +8791,13 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[1] class 30 reserves ...C.... - TBF[2] class 31 reserves ...C.... - TBF[0] class 32 reserves .......C - TBF[3] class 1 reserves ...C.... - TBF[0] class 2 reserves ......C. - TBF[0] class 3 reserves .....C.. - Successfully allocated 35 UL TBFs, algorithm dynamic class 1..32 (UL and DL) + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDDC + TBF[1] class 33 reserves ...C.... + TBF[2] class 34 reserves ...C.... + TBF[3] class 35 reserves ...C.... + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..46 (UL and DL) Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -9741,134 +9744,134 @@ TBF[5] class 30 reserves .......C TBF[6] class 31 reserves ...C.... TBF[6] class 32 reserves ....C... - TBF[6] class 1 reserves .....C.. - TBF[6] class 2 reserves ......C. - TBF[6] class 3 reserves .......C - TBF[7] class 4 reserves ...C.... - TBF[7] class 5 reserves ....C... - TBF[7] class 6 reserves .....C.. - TBF[7] class 7 reserves ......C. - TBF[7] class 8 reserves .......C - TBF[8] class 9 reserves ...C.... - TBF[8] class 10 reserves ....C... - TBF[8] class 11 reserves .....C.. - TBF[8] class 12 reserves ......C. - TBF[8] class 13 reserves .......C - TBF[9] class 14 reserves ...C.... - TBF[9] class 15 reserves ....C... - TBF[9] class 16 reserves .....C.. - TBF[9] class 17 reserves ......C. - TBF[9] class 18 reserves .......C - TBF[10] class 19 reserves ...C.... - TBF[10] class 20 reserves ....C... - TBF[10] class 21 reserves .....C.. - TBF[10] class 22 reserves ......C. - TBF[10] class 23 reserves .......C - TBF[11] class 24 reserves ...C.... - TBF[11] class 25 reserves ....C... - TBF[11] class 26 reserves .....C.. - TBF[11] class 27 reserves ......C. - TBF[11] class 28 reserves .......C - TBF[12] class 29 reserves ...C.... - TBF[12] class 30 reserves ....C... - TBF[12] class 31 reserves .....C.. - TBF[12] class 32 reserves ......C. - TBF[12] class 1 reserves .......C - TBF[13] class 2 reserves ...C.... - TBF[13] class 3 reserves ....C... - TBF[13] class 4 reserves .....C.. - TBF[13] class 5 reserves ......C. - TBF[13] class 6 reserves .......C - TBF[14] class 7 reserves ...C.... - TBF[14] class 8 reserves ....C... - TBF[14] class 9 reserves .....C.. - TBF[14] class 10 reserves ......C. - TBF[14] class 11 reserves .......C - TBF[15] class 12 reserves ...C.... - TBF[15] class 13 reserves ....C... - TBF[15] class 14 reserves .....C.. - TBF[15] class 15 reserves ......C. - TBF[15] class 16 reserves .......C - TBF[16] class 17 reserves ...C.... - TBF[16] class 18 reserves ....C... - TBF[16] class 19 reserves .....C.. - TBF[16] class 20 reserves ......C. - TBF[16] class 21 reserves .......C - TBF[17] class 22 reserves ...C.... - TBF[17] class 23 reserves ....C... - TBF[17] class 24 reserves .....C.. - TBF[17] class 25 reserves ......C. - TBF[17] class 26 reserves .......C - TBF[18] class 27 reserves ...C.... - TBF[18] class 28 reserves ....C... - TBF[18] class 29 reserves .....C.. - TBF[18] class 30 reserves ......C. - TBF[18] class 31 reserves .......C - TBF[19] class 32 reserves ...C.... - TBF[19] class 1 reserves ....C... - TBF[19] class 2 reserves .....C.. - TBF[19] class 3 reserves ......C. - TBF[19] class 4 reserves .......C - TBF[20] class 5 reserves ...C.... - TBF[20] class 6 reserves ....C... - TBF[20] class 7 reserves .....C.. - TBF[20] class 8 reserves ......C. - TBF[20] class 9 reserves .......C - TBF[21] class 10 reserves ...C.... - TBF[21] class 11 reserves ....C... - TBF[21] class 12 reserves .....C.. - TBF[21] class 13 reserves ......C. - TBF[21] class 14 reserves .......C - TBF[22] class 15 reserves ...C.... - TBF[22] class 16 reserves ....C... - TBF[22] class 17 reserves .....C.. - TBF[22] class 18 reserves ......C. - TBF[22] class 19 reserves .......C - TBF[23] class 20 reserves ...C.... - TBF[23] class 21 reserves ....C... - TBF[23] class 22 reserves .....C.. - TBF[23] class 23 reserves ......C. - TBF[23] class 24 reserves .......C - TBF[24] class 25 reserves ...C.... - TBF[24] class 26 reserves ....C... - TBF[24] class 27 reserves .....C.. - TBF[24] class 28 reserves ......C. - TBF[24] class 29 reserves .......C - TBF[25] class 30 reserves ...C.... - TBF[25] class 31 reserves ....C... - TBF[25] class 32 reserves .....C.. - TBF[25] class 1 reserves ......C. - TBF[25] class 2 reserves .......C - TBF[26] class 3 reserves ...C.... - TBF[26] class 4 reserves ....C... - TBF[26] class 5 reserves .....C.. - TBF[26] class 6 reserves ......C. - TBF[26] class 7 reserves .......C - TBF[27] class 8 reserves ...C.... - TBF[27] class 9 reserves ....C... - TBF[27] class 10 reserves .....C.. - TBF[27] class 11 reserves ......C. - TBF[27] class 12 reserves .......C - TBF[28] class 13 reserves ...C.... - TBF[28] class 14 reserves ....C... - TBF[28] class 15 reserves .....C.. - TBF[28] class 16 reserves ......C. - TBF[28] class 17 reserves .......C - TBF[29] class 18 reserves ...C.... - TBF[29] class 19 reserves ....C... - TBF[29] class 20 reserves .....C.. - TBF[29] class 21 reserves ......C. - TBF[29] class 22 reserves .......C - TBF[30] class 23 reserves ...C.... - TBF[30] class 24 reserves ....C... - TBF[30] class 25 reserves .....C.. - TBF[30] class 26 reserves ......C. - TBF[30] class 27 reserves .......C - TBF[31] class 28 reserves ...C.... - TBF[31] class 29 reserves ....C... - TBF[31] class 30 reserves .....C.. - TBF[31] class 31 reserves ......C. - TBF[31] class 32 reserves .......C + TBF[6] class 33 reserves .....C.. + TBF[6] class 34 reserves ......C. + TBF[6] class 35 reserves .......C + TBF[7] class 36 reserves ...C.... + TBF[7] class 37 reserves ....C... + TBF[7] class 38 reserves .....C.. + TBF[7] class 39 reserves ......C. + TBF[7] class 40 reserves .......C + TBF[8] class 41 reserves ...C.... + TBF[8] class 42 reserves ....C... + TBF[8] class 43 reserves .....C.. + TBF[8] class 44 reserves ......C. + TBF[8] class 45 reserves .......C + TBF[9] class 46 reserves ...C.... + TBF[9] class 1 reserves ....C... + TBF[9] class 2 reserves .....C.. + TBF[9] class 3 reserves ......C. + TBF[9] class 4 reserves .......C + TBF[10] class 5 reserves ...C.... + TBF[10] class 6 reserves ....C... + TBF[10] class 7 reserves .....C.. + TBF[10] class 8 reserves ......C. + TBF[10] class 9 reserves .......C + TBF[11] class 10 reserves ...C.... + TBF[11] class 11 reserves ....C... + TBF[11] class 12 reserves .....C.. + TBF[11] class 13 reserves ......C. + TBF[11] class 14 reserves .......C + TBF[12] class 15 reserves ...C.... + TBF[12] class 16 reserves ....C... + TBF[12] class 17 reserves .....C.. + TBF[12] class 18 reserves ......C. + TBF[12] class 19 reserves .......C + TBF[13] class 20 reserves ...C.... + TBF[13] class 21 reserves ....C... + TBF[13] class 22 reserves .....C.. + TBF[13] class 23 reserves ......C. + TBF[13] class 24 reserves .......C + TBF[14] class 25 reserves ...C.... + TBF[14] class 26 reserves ....C... + TBF[14] class 27 reserves .....C.. + TBF[14] class 28 reserves ......C. + TBF[14] class 29 reserves .......C + TBF[15] class 30 reserves ...C.... + TBF[15] class 31 reserves ....C... + TBF[15] class 32 reserves .....C.. + TBF[15] class 33 reserves ......C. + TBF[15] class 34 reserves .......C + TBF[16] class 35 reserves ...C.... + TBF[16] class 36 reserves ....C... + TBF[16] class 37 reserves .....C.. + TBF[16] class 38 reserves ......C. + TBF[16] class 39 reserves .......C + TBF[17] class 40 reserves ...C.... + TBF[17] class 41 reserves ....C... + TBF[17] class 42 reserves .....C.. + TBF[17] class 43 reserves ......C. + TBF[17] class 44 reserves .......C + TBF[18] class 45 reserves ...C.... + TBF[18] class 46 reserves ....C... + TBF[18] class 1 reserves .....C.. + TBF[18] class 2 reserves ......C. + TBF[18] class 3 reserves .......C + TBF[19] class 4 reserves ...C.... + TBF[19] class 5 reserves ....C... + TBF[19] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[19] class 8 reserves .......C + TBF[20] class 9 reserves ...C.... + TBF[20] class 10 reserves ....C... + TBF[20] class 11 reserves .....C.. + TBF[20] class 12 reserves ......C. + TBF[20] class 13 reserves .......C + TBF[21] class 14 reserves ...C.... + TBF[21] class 15 reserves ....C... + TBF[21] class 16 reserves .....C.. + TBF[21] class 17 reserves ......C. + TBF[21] class 18 reserves .......C + TBF[22] class 19 reserves ...C.... + TBF[22] class 20 reserves ....C... + TBF[22] class 21 reserves .....C.. + TBF[22] class 22 reserves ......C. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves ...C.... + TBF[23] class 25 reserves ....C... + TBF[23] class 26 reserves .....C.. + TBF[23] class 27 reserves ......C. + TBF[23] class 28 reserves .......C + TBF[24] class 29 reserves ...C.... + TBF[24] class 30 reserves ....C... + TBF[24] class 31 reserves .....C.. + TBF[24] class 32 reserves ......C. + TBF[24] class 33 reserves .......C + TBF[25] class 34 reserves ...C.... + TBF[25] class 35 reserves ....C... + TBF[25] class 36 reserves .....C.. + TBF[25] class 37 reserves ......C. + TBF[25] class 38 reserves .......C + TBF[26] class 39 reserves ...C.... + TBF[26] class 40 reserves ....C... + TBF[26] class 41 reserves .....C.. + TBF[26] class 42 reserves ......C. + TBF[26] class 43 reserves .......C + TBF[27] class 44 reserves ...C.... + TBF[27] class 45 reserves ....C... + TBF[27] class 46 reserves .....C.. + TBF[27] class 1 reserves ......C. + TBF[27] class 2 reserves .......C + TBF[28] class 3 reserves ...C.... + TBF[28] class 4 reserves ....C... + TBF[28] class 5 reserves .....C.. + TBF[28] class 6 reserves ......C. + TBF[28] class 7 reserves .......C + TBF[29] class 8 reserves ...C.... + TBF[29] class 9 reserves ....C... + TBF[29] class 10 reserves .....C.. + TBF[29] class 11 reserves ......C. + TBF[29] class 12 reserves .......C + TBF[30] class 13 reserves ...C.... + TBF[30] class 14 reserves ....C... + TBF[30] class 15 reserves .....C.. + TBF[30] class 16 reserves ......C. + TBF[30] class 17 reserves .......C + TBF[31] class 18 reserves ...C.... + TBF[31] class 19 reserves ....C... + TBF[31] class 20 reserves .....C.. + TBF[31] class 21 reserves ......C. + TBF[31] class 22 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9901,9 +9904,9 @@ TBF[5] class 30 reserves .......C TBF[6] class 31 reserves ...C.... TBF[6] class 32 reserves ....C... - TBF[6] class 1 reserves .....C.. - TBF[6] class 2 reserves ......C. - TBF[6] class 3 reserves .......C + TBF[6] class 33 reserves .....C.. + TBF[6] class 34 reserves ......C. + TBF[6] class 35 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9936,134 +9939,134 @@ TBF[5] class 30 reserves .......C TBF[6] class 31 reserves ...C.... TBF[6] class 32 reserves ....C... - TBF[6] class 1 reserves .....C.. - TBF[6] class 2 reserves ......C. - TBF[6] class 3 reserves .......C - TBF[7] class 4 reserves ...C.... - TBF[7] class 5 reserves ....C... - TBF[7] class 6 reserves .....C.. - TBF[7] class 7 reserves ......C. - TBF[7] class 8 reserves .......C - TBF[8] class 9 reserves ...C.... - TBF[8] class 10 reserves ....C... - TBF[8] class 11 reserves .....C.. - TBF[8] class 12 reserves ......C. - TBF[8] class 13 reserves .......C - TBF[9] class 14 reserves ...C.... - TBF[9] class 15 reserves ....C... - TBF[9] class 16 reserves .....C.. - TBF[9] class 17 reserves ......C. - TBF[9] class 18 reserves .......C - TBF[10] class 19 reserves ...C.... - TBF[10] class 20 reserves ....C... - TBF[10] class 21 reserves .....C.. - TBF[10] class 22 reserves ......C. - TBF[10] class 23 reserves .......C - TBF[11] class 24 reserves ...C.... - TBF[11] class 25 reserves ....C... - TBF[11] class 26 reserves .....C.. - TBF[11] class 27 reserves ......C. - TBF[11] class 28 reserves .......C - TBF[12] class 29 reserves ...C.... - TBF[12] class 30 reserves ....C... - TBF[12] class 31 reserves .....C.. - TBF[12] class 32 reserves ......C. - TBF[12] class 1 reserves .......C - TBF[13] class 2 reserves ...C.... - TBF[13] class 3 reserves ....C... - TBF[13] class 4 reserves .....C.. - TBF[13] class 5 reserves ......C. - TBF[13] class 6 reserves .......C - TBF[14] class 7 reserves ...C.... - TBF[14] class 8 reserves ....C... - TBF[14] class 9 reserves .....C.. - TBF[14] class 10 reserves ......C. - TBF[14] class 11 reserves .......C - TBF[15] class 12 reserves ...C.... - TBF[15] class 13 reserves ....C... - TBF[15] class 14 reserves .....C.. - TBF[15] class 15 reserves ......C. - TBF[15] class 16 reserves .......C - TBF[16] class 17 reserves ...C.... - TBF[16] class 18 reserves ....C... - TBF[16] class 19 reserves .....C.. - TBF[16] class 20 reserves ......C. - TBF[16] class 21 reserves .......C - TBF[17] class 22 reserves ...C.... - TBF[17] class 23 reserves ....C... - TBF[17] class 24 reserves .....C.. - TBF[17] class 25 reserves ......C. - TBF[17] class 26 reserves .......C - TBF[18] class 27 reserves ...C.... - TBF[18] class 28 reserves ....C... - TBF[18] class 29 reserves .....C.. - TBF[18] class 30 reserves ......C. - TBF[18] class 31 reserves .......C - TBF[19] class 32 reserves ...C.... - TBF[19] class 1 reserves ....C... - TBF[19] class 2 reserves .....C.. - TBF[19] class 3 reserves ......C. - TBF[19] class 4 reserves .......C - TBF[20] class 5 reserves ...C.... - TBF[20] class 6 reserves ....C... - TBF[20] class 7 reserves .....C.. - TBF[20] class 8 reserves ......C. - TBF[20] class 9 reserves .......C - TBF[21] class 10 reserves ...C.... - TBF[21] class 11 reserves ....C... - TBF[21] class 12 reserves .....C.. - TBF[21] class 13 reserves ......C. - TBF[21] class 14 reserves .......C - TBF[22] class 15 reserves ...C.... - TBF[22] class 16 reserves ....C... - TBF[22] class 17 reserves .....C.. - TBF[22] class 18 reserves ......C. - TBF[22] class 19 reserves .......C - TBF[23] class 20 reserves ...C.... - TBF[23] class 21 reserves ....C... - TBF[23] class 22 reserves .....C.. - TBF[23] class 23 reserves ......C. - TBF[23] class 24 reserves .......C - TBF[24] class 25 reserves ...C.... - TBF[24] class 26 reserves ....C... - TBF[24] class 27 reserves .....C.. - TBF[24] class 28 reserves ......C. - TBF[24] class 29 reserves .......C - TBF[25] class 30 reserves ...C.... - TBF[25] class 31 reserves ....C... - TBF[25] class 32 reserves .....C.. - TBF[25] class 1 reserves ......C. - TBF[25] class 2 reserves .......C - TBF[26] class 3 reserves ...C.... - TBF[26] class 4 reserves ....C... - TBF[26] class 5 reserves .....C.. - TBF[26] class 6 reserves ......C. - TBF[26] class 7 reserves .......C - TBF[27] class 8 reserves ...C.... - TBF[27] class 9 reserves ....C... - TBF[27] class 10 reserves .....C.. - TBF[27] class 11 reserves ......C. - TBF[27] class 12 reserves .......C - TBF[28] class 13 reserves ...C.... - TBF[28] class 14 reserves ....C... - TBF[28] class 15 reserves .....C.. - TBF[28] class 16 reserves ......C. - TBF[28] class 17 reserves .......C - TBF[29] class 18 reserves ...C.... - TBF[29] class 19 reserves ....C... - TBF[29] class 20 reserves .....C.. - TBF[29] class 21 reserves ......C. - TBF[29] class 22 reserves .......C - TBF[30] class 23 reserves ...C.... - TBF[30] class 24 reserves ....C... - TBF[30] class 25 reserves .....C.. - TBF[30] class 26 reserves ......C. - TBF[30] class 27 reserves .......C - TBF[31] class 28 reserves ...C.... - TBF[31] class 29 reserves ....C... - TBF[31] class 30 reserves .....C.. - TBF[31] class 31 reserves ......C. - TBF[31] class 32 reserves .......C + TBF[6] class 33 reserves .....C.. + TBF[6] class 34 reserves ......C. + TBF[6] class 35 reserves .......C + TBF[7] class 36 reserves ...C.... + TBF[7] class 37 reserves ....C... + TBF[7] class 38 reserves .....C.. + TBF[7] class 39 reserves ......C. + TBF[7] class 40 reserves .......C + TBF[8] class 41 reserves ...C.... + TBF[8] class 42 reserves ....C... + TBF[8] class 43 reserves .....C.. + TBF[8] class 44 reserves ......C. + TBF[8] class 45 reserves .......C + TBF[9] class 46 reserves ...C.... + TBF[9] class 1 reserves ....C... + TBF[9] class 2 reserves .....C.. + TBF[9] class 3 reserves ......C. + TBF[9] class 4 reserves .......C + TBF[10] class 5 reserves ...C.... + TBF[10] class 6 reserves ....C... + TBF[10] class 7 reserves .....C.. + TBF[10] class 8 reserves ......C. + TBF[10] class 9 reserves .......C + TBF[11] class 10 reserves ...C.... + TBF[11] class 11 reserves ....C... + TBF[11] class 12 reserves .....C.. + TBF[11] class 13 reserves ......C. + TBF[11] class 14 reserves .......C + TBF[12] class 15 reserves ...C.... + TBF[12] class 16 reserves ....C... + TBF[12] class 17 reserves .....C.. + TBF[12] class 18 reserves ......C. + TBF[12] class 19 reserves .......C + TBF[13] class 20 reserves ...C.... + TBF[13] class 21 reserves ....C... + TBF[13] class 22 reserves .....C.. + TBF[13] class 23 reserves ......C. + TBF[13] class 24 reserves .......C + TBF[14] class 25 reserves ...C.... + TBF[14] class 26 reserves ....C... + TBF[14] class 27 reserves .....C.. + TBF[14] class 28 reserves ......C. + TBF[14] class 29 reserves .......C + TBF[15] class 30 reserves ...C.... + TBF[15] class 31 reserves ....C... + TBF[15] class 32 reserves .....C.. + TBF[15] class 33 reserves ......C. + TBF[15] class 34 reserves .......C + TBF[16] class 35 reserves ...C.... + TBF[16] class 36 reserves ....C... + TBF[16] class 37 reserves .....C.. + TBF[16] class 38 reserves ......C. + TBF[16] class 39 reserves .......C + TBF[17] class 40 reserves ...C.... + TBF[17] class 41 reserves ....C... + TBF[17] class 42 reserves .....C.. + TBF[17] class 43 reserves ......C. + TBF[17] class 44 reserves .......C + TBF[18] class 45 reserves ...C.... + TBF[18] class 46 reserves ....C... + TBF[18] class 1 reserves .....C.. + TBF[18] class 2 reserves ......C. + TBF[18] class 3 reserves .......C + TBF[19] class 4 reserves ...C.... + TBF[19] class 5 reserves ....C... + TBF[19] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[19] class 8 reserves .......C + TBF[20] class 9 reserves ...C.... + TBF[20] class 10 reserves ....C... + TBF[20] class 11 reserves .....C.. + TBF[20] class 12 reserves ......C. + TBF[20] class 13 reserves .......C + TBF[21] class 14 reserves ...C.... + TBF[21] class 15 reserves ....C... + TBF[21] class 16 reserves .....C.. + TBF[21] class 17 reserves ......C. + TBF[21] class 18 reserves .......C + TBF[22] class 19 reserves ...C.... + TBF[22] class 20 reserves ....C... + TBF[22] class 21 reserves .....C.. + TBF[22] class 22 reserves ......C. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves ...C.... + TBF[23] class 25 reserves ....C... + TBF[23] class 26 reserves .....C.. + TBF[23] class 27 reserves ......C. + TBF[23] class 28 reserves .......C + TBF[24] class 29 reserves ...C.... + TBF[24] class 30 reserves ....C... + TBF[24] class 31 reserves .....C.. + TBF[24] class 32 reserves ......C. + TBF[24] class 33 reserves .......C + TBF[25] class 34 reserves ...C.... + TBF[25] class 35 reserves ....C... + TBF[25] class 36 reserves .....C.. + TBF[25] class 37 reserves ......C. + TBF[25] class 38 reserves .......C + TBF[26] class 39 reserves ...C.... + TBF[26] class 40 reserves ....C... + TBF[26] class 41 reserves .....C.. + TBF[26] class 42 reserves ......C. + TBF[26] class 43 reserves .......C + TBF[27] class 44 reserves ...C.... + TBF[27] class 45 reserves ....C... + TBF[27] class 46 reserves .....C.. + TBF[27] class 1 reserves ......C. + TBF[27] class 2 reserves .......C + TBF[28] class 3 reserves ...C.... + TBF[28] class 4 reserves ....C... + TBF[28] class 5 reserves .....C.. + TBF[28] class 6 reserves ......C. + TBF[28] class 7 reserves .......C + TBF[29] class 8 reserves ...C.... + TBF[29] class 9 reserves ....C... + TBF[29] class 10 reserves .....C.. + TBF[29] class 11 reserves ......C. + TBF[29] class 12 reserves .......C + TBF[30] class 13 reserves ...C.... + TBF[30] class 14 reserves ....C... + TBF[30] class 15 reserves .....C.. + TBF[30] class 16 reserves ......C. + TBF[30] class 17 reserves .......C + TBF[31] class 18 reserves ...C.... + TBF[31] class 19 reserves ....C... + TBF[31] class 20 reserves .....C.. + TBF[31] class 21 reserves ......C. + TBF[31] class 22 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -10096,134 +10099,134 @@ TBF[5] class 30 reserves .......C TBF[6] class 31 reserves ...C.... TBF[6] class 32 reserves ....C... - TBF[6] class 1 reserves .....C.. - TBF[6] class 2 reserves ......C. - TBF[6] class 3 reserves .......C - TBF[7] class 4 reserves ...C.... - TBF[7] class 5 reserves ....C... - TBF[7] class 6 reserves .....C.. - TBF[7] class 7 reserves ......C. - TBF[7] class 8 reserves .......C - TBF[8] class 9 reserves ...C.... - TBF[8] class 10 reserves ....C... - TBF[8] class 11 reserves .....C.. - TBF[8] class 12 reserves ......C. - TBF[8] class 13 reserves .......C - TBF[9] class 14 reserves ...C.... - TBF[9] class 15 reserves ....C... - TBF[9] class 16 reserves .....C.. - TBF[9] class 17 reserves ......C. - TBF[9] class 18 reserves .......C - TBF[10] class 19 reserves ...C.... - TBF[10] class 20 reserves ....C... - TBF[10] class 21 reserves .....C.. - TBF[10] class 22 reserves ......C. - TBF[10] class 23 reserves .......C - TBF[11] class 24 reserves ...C.... - TBF[11] class 25 reserves ....C... - TBF[11] class 26 reserves .....C.. - TBF[11] class 27 reserves ......C. - TBF[11] class 28 reserves .......C - TBF[12] class 29 reserves ...C.... - TBF[12] class 30 reserves ....C... - TBF[12] class 31 reserves .....C.. - TBF[12] class 32 reserves ......C. - TBF[12] class 1 reserves .......C - TBF[13] class 2 reserves ...C.... - TBF[13] class 3 reserves ....C... - TBF[13] class 4 reserves .....C.. - TBF[13] class 5 reserves ......C. - TBF[13] class 6 reserves .......C - TBF[14] class 7 reserves ...C.... - TBF[14] class 8 reserves ....C... - TBF[14] class 9 reserves .....C.. - TBF[14] class 10 reserves ......C. - TBF[14] class 11 reserves .......C - TBF[15] class 12 reserves ...C.... - TBF[15] class 13 reserves ....C... - TBF[15] class 14 reserves .....C.. - TBF[15] class 15 reserves ......C. - TBF[15] class 16 reserves .......C - TBF[16] class 17 reserves ...C.... - TBF[16] class 18 reserves ....C... - TBF[16] class 19 reserves .....C.. - TBF[16] class 20 reserves ......C. - TBF[16] class 21 reserves .......C - TBF[17] class 22 reserves ...C.... - TBF[17] class 23 reserves ....C... - TBF[17] class 24 reserves .....C.. - TBF[17] class 25 reserves ......C. - TBF[17] class 26 reserves .......C - TBF[18] class 27 reserves ...C.... - TBF[18] class 28 reserves ....C... - TBF[18] class 29 reserves .....C.. - TBF[18] class 30 reserves ......C. - TBF[18] class 31 reserves .......C - TBF[19] class 32 reserves ...C.... - TBF[19] class 1 reserves ....C... - TBF[19] class 2 reserves .....C.. - TBF[19] class 3 reserves ......C. - TBF[19] class 4 reserves .......C - TBF[20] class 5 reserves ...C.... - TBF[20] class 6 reserves ....C... - TBF[20] class 7 reserves .....C.. - TBF[20] class 8 reserves ......C. - TBF[20] class 9 reserves .......C - TBF[21] class 10 reserves ...C.... - TBF[21] class 11 reserves ....C... - TBF[21] class 12 reserves .....C.. - TBF[21] class 13 reserves ......C. - TBF[21] class 14 reserves .......C - TBF[22] class 15 reserves ...C.... - TBF[22] class 16 reserves ....C... - TBF[22] class 17 reserves .....C.. - TBF[22] class 18 reserves ......C. - TBF[22] class 19 reserves .......C - TBF[23] class 20 reserves ...C.... - TBF[23] class 21 reserves ....C... - TBF[23] class 22 reserves .....C.. - TBF[23] class 23 reserves ......C. - TBF[23] class 24 reserves .......C - TBF[24] class 25 reserves ...C.... - TBF[24] class 26 reserves ....C... - TBF[24] class 27 reserves .....C.. - TBF[24] class 28 reserves ......C. - TBF[24] class 29 reserves .......C - TBF[25] class 30 reserves ...C.... - TBF[25] class 31 reserves ....C... - TBF[25] class 32 reserves .....C.. - TBF[25] class 1 reserves ......C. - TBF[25] class 2 reserves .......C - TBF[26] class 3 reserves ...C.... - TBF[26] class 4 reserves ....C... - TBF[26] class 5 reserves .....C.. - TBF[26] class 6 reserves ......C. - TBF[26] class 7 reserves .......C - TBF[27] class 8 reserves ...C.... - TBF[27] class 9 reserves ....C... - TBF[27] class 10 reserves .....C.. - TBF[27] class 11 reserves ......C. - TBF[27] class 12 reserves .......C - TBF[28] class 13 reserves ...C.... - TBF[28] class 14 reserves ....C... - TBF[28] class 15 reserves .....C.. - TBF[28] class 16 reserves ......C. - TBF[28] class 17 reserves .......C - TBF[29] class 18 reserves ...C.... - TBF[29] class 19 reserves ....C... - TBF[29] class 20 reserves .....C.. - TBF[29] class 21 reserves ......C. - TBF[29] class 22 reserves .......C - TBF[30] class 23 reserves ...C.... - TBF[30] class 24 reserves ....C... - TBF[30] class 25 reserves .....C.. - TBF[30] class 26 reserves ......C. - TBF[30] class 27 reserves .......C - TBF[31] class 28 reserves ...C.... - TBF[31] class 29 reserves ....C... - TBF[31] class 30 reserves .....C.. - TBF[31] class 31 reserves ......C. - TBF[31] class 32 reserves .......C + TBF[6] class 33 reserves .....C.. + TBF[6] class 34 reserves ......C. + TBF[6] class 35 reserves .......C + TBF[7] class 36 reserves ...C.... + TBF[7] class 37 reserves ....C... + TBF[7] class 38 reserves .....C.. + TBF[7] class 39 reserves ......C. + TBF[7] class 40 reserves .......C + TBF[8] class 41 reserves ...C.... + TBF[8] class 42 reserves ....C... + TBF[8] class 43 reserves .....C.. + TBF[8] class 44 reserves ......C. + TBF[8] class 45 reserves .......C + TBF[9] class 46 reserves ...C.... + TBF[9] class 1 reserves ....C... + TBF[9] class 2 reserves .....C.. + TBF[9] class 3 reserves ......C. + TBF[9] class 4 reserves .......C + TBF[10] class 5 reserves ...C.... + TBF[10] class 6 reserves ....C... + TBF[10] class 7 reserves .....C.. + TBF[10] class 8 reserves ......C. + TBF[10] class 9 reserves .......C + TBF[11] class 10 reserves ...C.... + TBF[11] class 11 reserves ....C... + TBF[11] class 12 reserves .....C.. + TBF[11] class 13 reserves ......C. + TBF[11] class 14 reserves .......C + TBF[12] class 15 reserves ...C.... + TBF[12] class 16 reserves ....C... + TBF[12] class 17 reserves .....C.. + TBF[12] class 18 reserves ......C. + TBF[12] class 19 reserves .......C + TBF[13] class 20 reserves ...C.... + TBF[13] class 21 reserves ....C... + TBF[13] class 22 reserves .....C.. + TBF[13] class 23 reserves ......C. + TBF[13] class 24 reserves .......C + TBF[14] class 25 reserves ...C.... + TBF[14] class 26 reserves ....C... + TBF[14] class 27 reserves .....C.. + TBF[14] class 28 reserves ......C. + TBF[14] class 29 reserves .......C + TBF[15] class 30 reserves ...C.... + TBF[15] class 31 reserves ....C... + TBF[15] class 32 reserves .....C.. + TBF[15] class 33 reserves ......C. + TBF[15] class 34 reserves .......C + TBF[16] class 35 reserves ...C.... + TBF[16] class 36 reserves ....C... + TBF[16] class 37 reserves .....C.. + TBF[16] class 38 reserves ......C. + TBF[16] class 39 reserves .......C + TBF[17] class 40 reserves ...C.... + TBF[17] class 41 reserves ....C... + TBF[17] class 42 reserves .....C.. + TBF[17] class 43 reserves ......C. + TBF[17] class 44 reserves .......C + TBF[18] class 45 reserves ...C.... + TBF[18] class 46 reserves ....C... + TBF[18] class 1 reserves .....C.. + TBF[18] class 2 reserves ......C. + TBF[18] class 3 reserves .......C + TBF[19] class 4 reserves ...C.... + TBF[19] class 5 reserves ....C... + TBF[19] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[19] class 8 reserves .......C + TBF[20] class 9 reserves ...C.... + TBF[20] class 10 reserves ....C... + TBF[20] class 11 reserves .....C.. + TBF[20] class 12 reserves ......C. + TBF[20] class 13 reserves .......C + TBF[21] class 14 reserves ...C.... + TBF[21] class 15 reserves ....C... + TBF[21] class 16 reserves .....C.. + TBF[21] class 17 reserves ......C. + TBF[21] class 18 reserves .......C + TBF[22] class 19 reserves ...C.... + TBF[22] class 20 reserves ....C... + TBF[22] class 21 reserves .....C.. + TBF[22] class 22 reserves ......C. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves ...C.... + TBF[23] class 25 reserves ....C... + TBF[23] class 26 reserves .....C.. + TBF[23] class 27 reserves ......C. + TBF[23] class 28 reserves .......C + TBF[24] class 29 reserves ...C.... + TBF[24] class 30 reserves ....C... + TBF[24] class 31 reserves .....C.. + TBF[24] class 32 reserves ......C. + TBF[24] class 33 reserves .......C + TBF[25] class 34 reserves ...C.... + TBF[25] class 35 reserves ....C... + TBF[25] class 36 reserves .....C.. + TBF[25] class 37 reserves ......C. + TBF[25] class 38 reserves .......C + TBF[26] class 39 reserves ...C.... + TBF[26] class 40 reserves ....C... + TBF[26] class 41 reserves .....C.. + TBF[26] class 42 reserves ......C. + TBF[26] class 43 reserves .......C + TBF[27] class 44 reserves ...C.... + TBF[27] class 45 reserves ....C... + TBF[27] class 46 reserves .....C.. + TBF[27] class 1 reserves ......C. + TBF[27] class 2 reserves .......C + TBF[28] class 3 reserves ...C.... + TBF[28] class 4 reserves ....C... + TBF[28] class 5 reserves .....C.. + TBF[28] class 6 reserves ......C. + TBF[28] class 7 reserves .......C + TBF[29] class 8 reserves ...C.... + TBF[29] class 9 reserves ....C... + TBF[29] class 10 reserves .....C.. + TBF[29] class 11 reserves ......C. + TBF[29] class 12 reserves .......C + TBF[30] class 13 reserves ...C.... + TBF[30] class 14 reserves ....C... + TBF[30] class 15 reserves .....C.. + TBF[30] class 16 reserves ......C. + TBF[30] class 17 reserves .......C + TBF[31] class 18 reserves ...C.... + TBF[31] class 19 reserves ....C... + TBF[31] class 20 reserves .....C.. + TBF[31] class 21 reserves ......C. + TBF[31] class 22 reserves .......C Successfully allocated 160 TBFs Going to test assignment with many connections, algorithm B TBF[0] class 1 reserves ...C.... @@ -10255,6 +10258,9 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDCD TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -10308,20 +10314,23 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDCD TBF[0] class 1 reserves .......C TBF[1] class 2 reserves ......DC TBF[2] class 3 reserves ......DC - TBF[3] class 4 reserves ....DCD. + TBF[3] class 4 reserves ...DCD.. TBF[4] class 5 reserves ...CD... TBF[5] class 6 reserves ...CD... TBF[6] class 7 reserves ......CD TBF[7] class 8 reserves ...DDCD. TBF[8] class 9 reserves ...DCD.. - TBF[9] class 10 reserves ...DCD.. - TBF[10] class 11 reserves .....DCD - TBF[11] class 12 reserves ...DCD.. - TBF[12] class 13 reserves .....CDD - TBF[13] class 14 reserves ...CDDD. + TBF[9] class 10 reserves .....DCD + TBF[10] class 11 reserves ...DCD.. + TBF[11] class 12 reserves .....DCD + TBF[12] class 13 reserves ...CDD.. + TBF[13] class 14 reserves ....CDDD TBF[14] class 15 reserves ...CDDDD TBF[15] class 16 reserves ...CDDDD TBF[16] class 17 reserves ...CDDDD @@ -10335,9 +10344,12 @@ TBF[24] class 25 reserves .....DCD TBF[25] class 26 reserves ...DCD.. TBF[26] class 27 reserves .....DCD - TBF[27] class 28 reserves ...DCD.. - TBF[28] class 29 reserves .....DCD - Successfully allocated 29 TBFs + TBF[27] class 28 reserves ...CD... + TBF[28] class 29 reserves ...DCD.. + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDCD + Successfully allocated 32 TBFs Going to test assignment with many connections, algorithm dynamic TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. @@ -10368,76 +10380,66 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[0] class 30 reserves .......C - TBF[1] class 31 reserves .......C - TBF[1] class 32 reserves ...C.... - TBF[3] class 1 reserves .......C - TBF[2] class 2 reserves ...C.... - TBF[5] class 3 reserves .......C - TBF[4] class 4 reserves ...C.... - TBF[0] class 5 reserves ....C... - TBF[0] class 6 reserves ......C. - TBF[6] class 7 reserves .......C - TBF[6] class 8 reserves ...C.... - TBF[2] class 9 reserves ....C... - TBF[1] class 10 reserves ......C. - TBF[8] class 11 reserves .......C - TBF[7] class 12 reserves ...C.... - TBF[4] class 13 reserves ....C... - TBF[3] class 14 reserves ......C. - TBF[10] class 15 reserves .......C - TBF[9] class 16 reserves ...C.... - TBF[6] class 17 reserves ....C... - TBF[0] class 18 reserves .....C.. - TBF[5] class 19 reserves ......C. - TBF[12] class 20 reserves .......C - TBF[11] class 21 reserves ...C.... - TBF[9] class 22 reserves ....C... - TBF[2] class 23 reserves .....C.. - TBF[8] class 24 reserves ......C. - TBF[19] class 25 reserves .......C - TBF[13] class 26 reserves ...C.... - TBF[11] class 27 reserves ....C... - TBF[4] class 28 reserves .....C.. - TBF[10] class 29 reserves ......C. - TBF[21] class 30 reserves .......C - TBF[18] class 31 reserves ...C.... - TBF[18] class 32 reserves ....C... - TBF[5] class 1 reserves .....C.. - TBF[12] class 2 reserves ......C. - TBF[23] class 3 reserves .......C - TBF[20] class 4 reserves ...C.... - TBF[20] class 5 reserves ....C... - TBF[29] class 6 reserves .....C.. - TBF[19] class 7 reserves ......C. - TBF[25] class 8 reserves .......C - TBF[22] class 9 reserves ...C.... - TBF[22] class 10 reserves ....C... - TBF[30] class 11 reserves .....C.. - TBF[21] class 12 reserves ......C. - TBF[27] class 13 reserves .......C - TBF[24] class 14 reserves ...C.... - TBF[24] class 15 reserves ....C... - TBF[31] class 16 reserves .....C.. - TBF[23] class 17 reserves ......C. - TBF[29] class 18 reserves .......C - TBF[26] class 19 reserves ...C.... - TBF[26] class 20 reserves ....C... - TBF[25] class 21 reserves ......C. - TBF[30] class 22 reserves .......C - TBF[28] class 23 reserves ...C.... - TBF[28] class 24 reserves ....C... - TBF[27] class 25 reserves ......C. - TBF[31] class 26 reserves .......C - TBF[29] class 27 reserves ...C.... - TBF[29] class 28 reserves ....C... - TBF[29] class 29 reserves ......C. - TBF[30] class 30 reserves ...C.... - TBF[30] class 31 reserves ....C... - TBF[30] class 32 reserves ......C. - TBF[31] class 1 reserves ...C.... - TBF[31] class 2 reserves ....C... - TBF[31] class 3 reserves ......C. + TBF[29] class 30 reserves ...DDDCD + TBF[30] class 31 reserves ...DDCD. + TBF[31] class 32 reserves ....DDCD + TBF[0] class 33 reserves ......C. + TBF[0] class 34 reserves .......C + TBF[1] class 35 reserves .......C + TBF[1] class 36 reserves ...C.... + TBF[3] class 37 reserves .......C + TBF[2] class 38 reserves ...C.... + TBF[5] class 39 reserves .......C + TBF[4] class 40 reserves ...C.... + TBF[0] class 41 reserves ....C... + TBF[6] class 42 reserves .......C + TBF[6] class 43 reserves ...C.... + TBF[2] class 44 reserves ....C... + TBF[8] class 45 reserves .......C + TBF[7] class 46 reserves ...C.... + TBF[4] class 1 reserves ....C... + TBF[1] class 2 reserves ......C. + TBF[10] class 3 reserves .......C + TBF[9] class 4 reserves ...C.... + TBF[6] class 5 reserves ....C... + TBF[3] class 6 reserves ......C. + TBF[12] class 7 reserves .......C + TBF[11] class 8 reserves ...C.... + TBF[0] class 9 reserves .....C.. + TBF[9] class 10 reserves ....C... + TBF[5] class 11 reserves ......C. + TBF[19] class 12 reserves .......C + TBF[13] class 13 reserves ...C.... + TBF[2] class 14 reserves .....C.. + TBF[11] class 15 reserves ....C... + TBF[8] class 16 reserves ......C. + TBF[21] class 17 reserves .......C + TBF[18] class 18 reserves ...C.... + TBF[4] class 19 reserves .....C.. + TBF[18] class 20 reserves ....C... + TBF[10] class 21 reserves ......C. + TBF[23] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[5] class 24 reserves .....C.. + TBF[20] class 25 reserves ....C... + TBF[12] class 26 reserves ......C. + TBF[25] class 27 reserves .......C + TBF[22] class 28 reserves ...C.... + TBF[22] class 29 reserves ....C... + TBF[19] class 30 reserves ......C. + TBF[27] class 31 reserves .......C + TBF[24] class 32 reserves ...C.... + TBF[24] class 33 reserves ....C... + TBF[21] class 34 reserves ......C. + TBF[30] class 35 reserves .......C + TBF[26] class 36 reserves ...C.... + TBF[26] class 37 reserves ....C... + TBF[23] class 38 reserves ......C. + TBF[28] class 39 reserves ...C.... + TBF[28] class 40 reserves ....C... + TBF[25] class 41 reserves ......C. + TBF[31] class 42 reserves ...C.... + TBF[27] class 43 reserves ......C. TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....DC.. TBF[0] class 3 reserves ......DC @@ -10491,137 +10493,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[0] class 30 reserves .......C - TBF[1] class 31 reserves .......C - TBF[1] class 32 reserves ...C.... - TBF[3] class 1 reserves .......C - TBF[2] class 2 reserves ...C.... - TBF[4] class 3 reserves .......C - TBF[4] class 4 reserves ...C.... - TBF[0] class 5 reserves ....C... - TBF[0] class 6 reserves ......C. - TBF[5] class 7 reserves .......C - TBF[6] class 8 reserves ...C.... - TBF[2] class 9 reserves ....C... - TBF[1] class 10 reserves ......C. - TBF[6] class 11 reserves .......C - TBF[7] class 12 reserves ...C.... - TBF[4] class 13 reserves ....C... - TBF[3] class 14 reserves ......C. - TBF[7] class 15 reserves .......C - TBF[9] class 16 reserves ...C.... - TBF[6] class 17 reserves ....C... - TBF[0] class 18 reserves .....C.. - TBF[5] class 19 reserves ......C. - TBF[8] class 20 reserves .......C - TBF[11] class 21 reserves ...C.... - TBF[9] class 22 reserves ....C... - TBF[2] class 23 reserves .....C.. - TBF[8] class 24 reserves ......C. - TBF[9] class 25 reserves .......C - TBF[13] class 26 reserves ...C.... - TBF[11] class 27 reserves ....C... - TBF[4] class 28 reserves .....C.. - TBF[10] class 29 reserves ......C. - TBF[10] class 30 reserves .......C - TBF[15] class 31 reserves ...C.... - TBF[15] class 32 reserves ....C... - TBF[5] class 1 reserves .....C.. - TBF[12] class 2 reserves ......C. - TBF[11] class 3 reserves .......C - TBF[16] class 4 reserves ...C.... - TBF[16] class 5 reserves ....C... - TBF[6] class 6 reserves .....C.. - TBF[17] class 7 reserves ......C. - TBF[12] class 8 reserves .......C - TBF[17] class 9 reserves ...C.... - TBF[17] class 10 reserves ....C... - TBF[7] class 11 reserves .....C.. - TBF[18] class 12 reserves ......C. - TBF[13] class 13 reserves .......C - TBF[18] class 14 reserves ...C.... - TBF[18] class 15 reserves ....C... - TBF[8] class 16 reserves .....C.. - TBF[19] class 17 reserves ......C. - TBF[14] class 18 reserves .......C - TBF[19] class 19 reserves ...C.... - TBF[19] class 20 reserves ....C... - TBF[20] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[20] class 23 reserves ...C.... - TBF[20] class 24 reserves ....C... - TBF[21] class 25 reserves ......C. - TBF[16] class 26 reserves .......C - TBF[21] class 27 reserves ...C.... - TBF[21] class 28 reserves ....C... - TBF[22] class 29 reserves ......C. - TBF[22] class 30 reserves ...C.... - TBF[22] class 31 reserves ....C... - TBF[23] class 32 reserves ......C. - TBF[23] class 1 reserves ...C.... - TBF[23] class 2 reserves ....C... - TBF[24] class 3 reserves ......C. - TBF[9] class 4 reserves .....C.. - TBF[10] class 5 reserves .....C.. - TBF[11] class 6 reserves .....C.. - TBF[12] class 7 reserves .....C.. - TBF[13] class 8 reserves .....C.. - TBF[14] class 9 reserves .....C.. - TBF[15] class 10 reserves .....C.. - TBF[16] class 11 reserves .....C.. - TBF[17] class 12 reserves .....C.. - TBF[17] class 13 reserves .......C - TBF[18] class 14 reserves .....C.. - TBF[18] class 15 reserves .......C - TBF[19] class 16 reserves .....C.. - TBF[19] class 17 reserves .......C - TBF[20] class 18 reserves .....C.. - TBF[20] class 19 reserves .......C - TBF[21] class 20 reserves .....C.. - TBF[21] class 21 reserves .......C - TBF[22] class 22 reserves .....C.. - TBF[22] class 23 reserves .......C - TBF[23] class 24 reserves .....C.. - TBF[23] class 25 reserves .......C - TBF[24] class 26 reserves ...C.... - TBF[24] class 27 reserves ....C... - TBF[24] class 28 reserves .....C.. - TBF[24] class 29 reserves .......C - TBF[25] class 30 reserves ...C.... - TBF[25] class 31 reserves ....C... - TBF[25] class 32 reserves .....C.. - TBF[25] class 1 reserves ......C. - TBF[25] class 2 reserves .......C - TBF[26] class 3 reserves ...C.... - TBF[26] class 4 reserves ....C... - TBF[26] class 5 reserves .....C.. - TBF[26] class 6 reserves ......C. - TBF[26] class 7 reserves .......C - TBF[27] class 8 reserves ...C.... - TBF[27] class 9 reserves ....C... - TBF[27] class 10 reserves .....C.. - TBF[27] class 11 reserves ......C. - TBF[27] class 12 reserves .......C - TBF[28] class 13 reserves ...C.... - TBF[28] class 14 reserves ....C... - TBF[28] class 15 reserves .....C.. - TBF[28] class 16 reserves ......C. - TBF[28] class 17 reserves .......C - TBF[29] class 18 reserves ...C.... - TBF[29] class 19 reserves ....C... - TBF[29] class 20 reserves .....C.. - TBF[29] class 21 reserves ......C. - TBF[29] class 22 reserves .......C - TBF[30] class 23 reserves ...C.... - TBF[30] class 24 reserves ....C... - TBF[30] class 25 reserves .....C.. - TBF[30] class 26 reserves ......C. - TBF[30] class 27 reserves .......C - TBF[31] class 28 reserves ...C.... - TBF[31] class 29 reserves ....C... - TBF[31] class 30 reserves .....C.. - TBF[31] class 31 reserves ......C. - TBF[31] class 32 reserves .......C + TBF[17] class 30 reserves ......C. + TBF[6] class 31 reserves .....C.. + TBF[18] class 32 reserves ......C. + TBF[0] class 33 reserves ......C. + TBF[0] class 34 reserves .......C + TBF[1] class 35 reserves .......C + TBF[1] class 36 reserves ...C.... + TBF[3] class 37 reserves .......C + TBF[2] class 38 reserves ...C.... + TBF[4] class 39 reserves .......C + TBF[4] class 40 reserves ...C.... + TBF[0] class 41 reserves ....C... + TBF[5] class 42 reserves .......C + TBF[6] class 43 reserves ...C.... + TBF[2] class 44 reserves ....C... + TBF[6] class 45 reserves .......C + TBF[7] class 46 reserves ...C.... + TBF[4] class 1 reserves ....C... + TBF[1] class 2 reserves ......C. + TBF[7] class 3 reserves .......C + TBF[9] class 4 reserves ...C.... + TBF[6] class 5 reserves ....C... + TBF[3] class 6 reserves ......C. + TBF[8] class 7 reserves .......C + TBF[11] class 8 reserves ...C.... + TBF[0] class 9 reserves .....C.. + TBF[9] class 10 reserves ....C... + TBF[5] class 11 reserves ......C. + TBF[9] class 12 reserves .......C + TBF[13] class 13 reserves ...C.... + TBF[2] class 14 reserves .....C.. + TBF[11] class 15 reserves ....C... + TBF[8] class 16 reserves ......C. + TBF[10] class 17 reserves .......C + TBF[15] class 18 reserves ...C.... + TBF[4] class 19 reserves .....C.. + TBF[15] class 20 reserves ....C... + TBF[10] class 21 reserves ......C. + TBF[11] class 22 reserves .......C + TBF[16] class 23 reserves ...C.... + TBF[5] class 24 reserves .....C.. + TBF[16] class 25 reserves ....C... + TBF[12] class 26 reserves ......C. + TBF[12] class 27 reserves .......C + TBF[17] class 28 reserves ...C.... + TBF[17] class 29 reserves ....C... + TBF[19] class 30 reserves ......C. + TBF[13] class 31 reserves .......C + TBF[18] class 32 reserves ...C.... + TBF[18] class 33 reserves ....C... + TBF[20] class 34 reserves ......C. + TBF[14] class 35 reserves .......C + TBF[19] class 36 reserves ...C.... + TBF[19] class 37 reserves ....C... + TBF[21] class 38 reserves ......C. + TBF[20] class 39 reserves ...C.... + TBF[20] class 40 reserves ....C... + TBF[22] class 41 reserves ......C. + TBF[21] class 42 reserves ...C.... + TBF[23] class 43 reserves ......C. + TBF[7] class 44 reserves .....C.. + TBF[8] class 45 reserves .....C.. + TBF[9] class 46 reserves .....C.. + TBF[10] class 1 reserves .....C.. + TBF[11] class 2 reserves .....C.. + TBF[12] class 3 reserves .....C.. + TBF[13] class 4 reserves .....C.. + TBF[14] class 5 reserves .....C.. + TBF[15] class 6 reserves .....C.. + TBF[15] class 7 reserves .......C + TBF[16] class 8 reserves .....C.. + TBF[16] class 9 reserves .......C + TBF[17] class 10 reserves .....C.. + TBF[17] class 11 reserves .......C + TBF[18] class 12 reserves .....C.. + TBF[18] class 13 reserves .......C + TBF[19] class 14 reserves .....C.. + TBF[19] class 15 reserves .......C + TBF[20] class 16 reserves .....C.. + TBF[20] class 17 reserves .......C + TBF[21] class 18 reserves ....C... + TBF[21] class 19 reserves .....C.. + TBF[21] class 20 reserves .......C + TBF[22] class 21 reserves ...C.... + TBF[22] class 22 reserves ....C... + TBF[22] class 23 reserves .....C.. + TBF[22] class 24 reserves .......C + TBF[23] class 25 reserves ...C.... + TBF[23] class 26 reserves ....C... + TBF[23] class 27 reserves .....C.. + TBF[23] class 28 reserves .......C + TBF[24] class 29 reserves ...C.... + TBF[24] class 30 reserves ....C... + TBF[24] class 31 reserves .....C.. + TBF[24] class 32 reserves ......C. + TBF[24] class 33 reserves .......C + TBF[25] class 34 reserves ...C.... + TBF[25] class 35 reserves ....C... + TBF[25] class 36 reserves .....C.. + TBF[25] class 37 reserves ......C. + TBF[25] class 38 reserves .......C + TBF[26] class 39 reserves ...C.... + TBF[26] class 40 reserves ....C... + TBF[26] class 41 reserves .....C.. + TBF[26] class 42 reserves ......C. + TBF[26] class 43 reserves .......C + TBF[27] class 44 reserves ...C.... + TBF[27] class 45 reserves ....C... + TBF[27] class 46 reserves .....C.. + TBF[27] class 1 reserves ......C. + TBF[27] class 2 reserves .......C + TBF[28] class 3 reserves ...C.... + TBF[28] class 4 reserves ....C... + TBF[28] class 5 reserves .....C.. + TBF[28] class 6 reserves ......C. + TBF[28] class 7 reserves .......C + TBF[29] class 8 reserves ...C.... + TBF[29] class 9 reserves ....C... + TBF[29] class 10 reserves .....C.. + TBF[29] class 11 reserves ......C. + TBF[29] class 12 reserves .......C + TBF[30] class 13 reserves ...C.... + TBF[30] class 14 reserves ....C... + TBF[30] class 15 reserves .....C.. + TBF[30] class 16 reserves ......C. + TBF[30] class 17 reserves .......C + TBF[31] class 18 reserves ...C.... + TBF[31] class 19 reserves ....C... + TBF[31] class 20 reserves .....C.. + TBF[31] class 21 reserves ......C. + TBF[31] class 22 reserves .......C TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves .....C.. TBF[2] class 3 reserves .......C @@ -10651,137 +10653,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[0] class 30 reserves .......C - TBF[1] class 31 reserves .......C - TBF[1] class 32 reserves ...C.... - TBF[3] class 1 reserves .......C - TBF[2] class 2 reserves ...C.... - TBF[4] class 3 reserves .......C - TBF[4] class 4 reserves ...C.... - TBF[0] class 5 reserves ....C... - TBF[0] class 6 reserves ......C. - TBF[5] class 7 reserves .......C - TBF[6] class 8 reserves ...C.... - TBF[2] class 9 reserves ....C... - TBF[1] class 10 reserves ......C. - TBF[6] class 11 reserves .......C - TBF[7] class 12 reserves ...C.... - TBF[4] class 13 reserves ....C... - TBF[3] class 14 reserves ......C. - TBF[7] class 15 reserves .......C - TBF[9] class 16 reserves ...C.... - TBF[6] class 17 reserves ....C... - TBF[0] class 18 reserves .....C.. - TBF[5] class 19 reserves ......C. - TBF[8] class 20 reserves .......C - TBF[11] class 21 reserves ...C.... - TBF[9] class 22 reserves ....C... - TBF[2] class 23 reserves .....C.. - TBF[8] class 24 reserves ......C. - TBF[9] class 25 reserves .......C - TBF[13] class 26 reserves ...C.... - TBF[11] class 27 reserves ....C... - TBF[4] class 28 reserves .....C.. - TBF[10] class 29 reserves ......C. - TBF[10] class 30 reserves .......C - TBF[15] class 31 reserves ...C.... - TBF[15] class 32 reserves ....C... - TBF[5] class 1 reserves .....C.. - TBF[12] class 2 reserves ......C. - TBF[11] class 3 reserves .......C - TBF[16] class 4 reserves ...C.... - TBF[16] class 5 reserves ....C... - TBF[6] class 6 reserves .....C.. - TBF[17] class 7 reserves ......C. - TBF[12] class 8 reserves .......C - TBF[17] class 9 reserves ...C.... - TBF[17] class 10 reserves ....C... - TBF[7] class 11 reserves .....C.. - TBF[18] class 12 reserves ......C. - TBF[13] class 13 reserves .......C - TBF[18] class 14 reserves ...C.... - TBF[18] class 15 reserves ....C... - TBF[8] class 16 reserves .....C.. - TBF[19] class 17 reserves ......C. - TBF[14] class 18 reserves .......C - TBF[19] class 19 reserves ...C.... - TBF[19] class 20 reserves ....C... - TBF[20] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[20] class 23 reserves ...C.... - TBF[20] class 24 reserves ....C... - TBF[21] class 25 reserves ......C. - TBF[16] class 26 reserves .......C - TBF[21] class 27 reserves ...C.... - TBF[21] class 28 reserves ....C... - TBF[22] class 29 reserves ......C. - TBF[22] class 30 reserves ...C.... - TBF[22] class 31 reserves ....C... - TBF[23] class 32 reserves ......C. - TBF[23] class 1 reserves ...C.... - TBF[23] class 2 reserves ....C... - TBF[24] class 3 reserves ......C. - TBF[9] class 4 reserves .....C.. - TBF[10] class 5 reserves .....C.. - TBF[11] class 6 reserves .....C.. - TBF[12] class 7 reserves .....C.. - TBF[13] class 8 reserves .....C.. - TBF[14] class 9 reserves .....C.. - TBF[15] class 10 reserves .....C.. - TBF[16] class 11 reserves .....C.. - TBF[17] class 12 reserves .....C.. - TBF[17] class 13 reserves .......C - TBF[18] class 14 reserves .....C.. - TBF[18] class 15 reserves .......C - TBF[19] class 16 reserves .....C.. - TBF[19] class 17 reserves .......C - TBF[20] class 18 reserves .....C.. - TBF[20] class 19 reserves .......C - TBF[21] class 20 reserves .....C.. - TBF[21] class 21 reserves .......C - TBF[22] class 22 reserves .....C.. - TBF[22] class 23 reserves .......C - TBF[23] class 24 reserves .....C.. - TBF[23] class 25 reserves .......C - TBF[24] class 26 reserves ...C.... - TBF[24] class 27 reserves ....C... - TBF[24] class 28 reserves .....C.. - TBF[24] class 29 reserves .......C - TBF[25] class 30 reserves ...C.... - TBF[25] class 31 reserves ....C... - TBF[25] class 32 reserves .....C.. - TBF[25] class 1 reserves ......C. - TBF[25] class 2 reserves .......C - TBF[26] class 3 reserves ...C.... - TBF[26] class 4 reserves ....C... - TBF[26] class 5 reserves .....C.. - TBF[26] class 6 reserves ......C. - TBF[26] class 7 reserves .......C - TBF[27] class 8 reserves ...C.... - TBF[27] class 9 reserves ....C... - TBF[27] class 10 reserves .....C.. - TBF[27] class 11 reserves ......C. - TBF[27] class 12 reserves .......C - TBF[28] class 13 reserves ...C.... - TBF[28] class 14 reserves ....C... - TBF[28] class 15 reserves .....C.. - TBF[28] class 16 reserves ......C. - TBF[28] class 17 reserves .......C - TBF[29] class 18 reserves ...C.... - TBF[29] class 19 reserves ....C... - TBF[29] class 20 reserves .....C.. - TBF[29] class 21 reserves ......C. - TBF[29] class 22 reserves .......C - TBF[30] class 23 reserves ...C.... - TBF[30] class 24 reserves ....C... - TBF[30] class 25 reserves .....C.. - TBF[30] class 26 reserves ......C. - TBF[30] class 27 reserves .......C - TBF[31] class 28 reserves ...C.... - TBF[31] class 29 reserves ....C... - TBF[31] class 30 reserves .....C.. - TBF[31] class 31 reserves ......C. - TBF[31] class 32 reserves .......C + TBF[17] class 30 reserves ......C. + TBF[6] class 31 reserves .....C.. + TBF[18] class 32 reserves ......C. + TBF[0] class 33 reserves ......C. + TBF[0] class 34 reserves .......C + TBF[1] class 35 reserves .......C + TBF[1] class 36 reserves ...C.... + TBF[3] class 37 reserves .......C + TBF[2] class 38 reserves ...C.... + TBF[4] class 39 reserves .......C + TBF[4] class 40 reserves ...C.... + TBF[0] class 41 reserves ....C... + TBF[5] class 42 reserves .......C + TBF[6] class 43 reserves ...C.... + TBF[2] class 44 reserves ....C... + TBF[6] class 45 reserves .......C + TBF[7] class 46 reserves ...C.... + TBF[4] class 1 reserves ....C... + TBF[1] class 2 reserves ......C. + TBF[7] class 3 reserves .......C + TBF[9] class 4 reserves ...C.... + TBF[6] class 5 reserves ....C... + TBF[3] class 6 reserves ......C. + TBF[8] class 7 reserves .......C + TBF[11] class 8 reserves ...C.... + TBF[0] class 9 reserves .....C.. + TBF[9] class 10 reserves ....C... + TBF[5] class 11 reserves ......C. + TBF[9] class 12 reserves .......C + TBF[13] class 13 reserves ...C.... + TBF[2] class 14 reserves .....C.. + TBF[11] class 15 reserves ....C... + TBF[8] class 16 reserves ......C. + TBF[10] class 17 reserves .......C + TBF[15] class 18 reserves ...C.... + TBF[4] class 19 reserves .....C.. + TBF[15] class 20 reserves ....C... + TBF[10] class 21 reserves ......C. + TBF[11] class 22 reserves .......C + TBF[16] class 23 reserves ...C.... + TBF[5] class 24 reserves .....C.. + TBF[16] class 25 reserves ....C... + TBF[12] class 26 reserves ......C. + TBF[12] class 27 reserves .......C + TBF[17] class 28 reserves ...C.... + TBF[17] class 29 reserves ....C... + TBF[19] class 30 reserves ......C. + TBF[13] class 31 reserves .......C + TBF[18] class 32 reserves ...C.... + TBF[18] class 33 reserves ....C... + TBF[20] class 34 reserves ......C. + TBF[14] class 35 reserves .......C + TBF[19] class 36 reserves ...C.... + TBF[19] class 37 reserves ....C... + TBF[21] class 38 reserves ......C. + TBF[20] class 39 reserves ...C.... + TBF[20] class 40 reserves ....C... + TBF[22] class 41 reserves ......C. + TBF[21] class 42 reserves ...C.... + TBF[23] class 43 reserves ......C. + TBF[7] class 44 reserves .....C.. + TBF[8] class 45 reserves .....C.. + TBF[9] class 46 reserves .....C.. + TBF[10] class 1 reserves .....C.. + TBF[11] class 2 reserves .....C.. + TBF[12] class 3 reserves .....C.. + TBF[13] class 4 reserves .....C.. + TBF[14] class 5 reserves .....C.. + TBF[15] class 6 reserves .....C.. + TBF[15] class 7 reserves .......C + TBF[16] class 8 reserves .....C.. + TBF[16] class 9 reserves .......C + TBF[17] class 10 reserves .....C.. + TBF[17] class 11 reserves .......C + TBF[18] class 12 reserves .....C.. + TBF[18] class 13 reserves .......C + TBF[19] class 14 reserves .....C.. + TBF[19] class 15 reserves .......C + TBF[20] class 16 reserves .....C.. + TBF[20] class 17 reserves .......C + TBF[21] class 18 reserves ....C... + TBF[21] class 19 reserves .....C.. + TBF[21] class 20 reserves .......C + TBF[22] class 21 reserves ...C.... + TBF[22] class 22 reserves ....C... + TBF[22] class 23 reserves .....C.. + TBF[22] class 24 reserves .......C + TBF[23] class 25 reserves ...C.... + TBF[23] class 26 reserves ....C... + TBF[23] class 27 reserves .....C.. + TBF[23] class 28 reserves .......C + TBF[24] class 29 reserves ...C.... + TBF[24] class 30 reserves ....C... + TBF[24] class 31 reserves .....C.. + TBF[24] class 32 reserves ......C. + TBF[24] class 33 reserves .......C + TBF[25] class 34 reserves ...C.... + TBF[25] class 35 reserves ....C... + TBF[25] class 36 reserves .....C.. + TBF[25] class 37 reserves ......C. + TBF[25] class 38 reserves .......C + TBF[26] class 39 reserves ...C.... + TBF[26] class 40 reserves ....C... + TBF[26] class 41 reserves .....C.. + TBF[26] class 42 reserves ......C. + TBF[26] class 43 reserves .......C + TBF[27] class 44 reserves ...C.... + TBF[27] class 45 reserves ....C... + TBF[27] class 46 reserves .....C.. + TBF[27] class 1 reserves ......C. + TBF[27] class 2 reserves .......C + TBF[28] class 3 reserves ...C.... + TBF[28] class 4 reserves ....C... + TBF[28] class 5 reserves .....C.. + TBF[28] class 6 reserves ......C. + TBF[28] class 7 reserves .......C + TBF[29] class 8 reserves ...C.... + TBF[29] class 9 reserves ....C... + TBF[29] class 10 reserves .....C.. + TBF[29] class 11 reserves ......C. + TBF[29] class 12 reserves .......C + TBF[30] class 13 reserves ...C.... + TBF[30] class 14 reserves ....C... + TBF[30] class 15 reserves .....C.. + TBF[30] class 16 reserves ......C. + TBF[30] class 17 reserves .......C + TBF[31] class 18 reserves ...C.... + TBF[31] class 19 reserves ....C... + TBF[31] class 20 reserves .....C.. + TBF[31] class 21 reserves ......C. + TBF[31] class 22 reserves .......C Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) diff --git a/tests/alloc/MslotTest.ok b/tests/alloc/MslotTest.ok index 0cd50c8..86526bf 100644 --- a/tests/alloc/MslotTest.ok +++ b/tests/alloc/MslotTest.ok @@ -30,7 +30,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: .......1 [0] [SEQ] multislot class 28 - UL: .......1 DL: .......1 [0] [SEQ] multislot class 29 - UL: .......1 DL: .......1 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 31 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 32 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 33 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 34 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 35 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 36 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 37 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 38 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 39 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 40 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 41 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 42 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 43 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 44 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 45 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 1 for multislot tests... [SEQ] multislot class 0 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -62,7 +78,23 @@ [SEQ] multislot class 27 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 28 - UL: ......11 DL: ......11 [0] [SEQ] multislot class 29 - UL: ......11 DL: ......11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 31 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 32 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 33 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 34 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 36 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 37 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 38 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 39 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 41 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 42 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 43 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 44 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 45 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 2 for multislot tests... [SEQ] multislot class 0 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -94,7 +126,23 @@ [SEQ] multislot class 27 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 28 - UL: .....11. DL: .....111 [0] [SEQ] multislot class 29 - UL: .....11. DL: .....111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 31 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 32 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 33 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 34 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 35 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 36 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 37 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 38 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 39 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 40 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 41 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 42 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 43 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 44 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 45 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 3 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -126,7 +174,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 31 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 32 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 33 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 34 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 35 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 36 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 37 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 38 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 39 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 40 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 41 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 42 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 43 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 44 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 45 - UL: ....11.. DL: ....1111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 4 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -158,7 +222,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 41 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 42 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 43 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 44 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 45 - UL: ...11... DL: ...11111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 5 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -190,7 +270,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 41 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 42 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 43 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 44 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 45 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 6 for multislot tests... [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -222,7 +318,23 @@ [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 31 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 32 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 33 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 34 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 36 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 37 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 38 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 39 - UL: ....1... DL: ...11111 [0] + [SEQ] multislot class 40 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 41 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 42 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 43 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 44 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 45 - UL: ...1.... DL: ..111111 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 7 for multislot tests... [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -254,7 +366,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 31 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 32 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 33 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 34 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 36 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 37 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 38 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 39 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 41 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 42 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 43 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 44 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 45 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_total_ascending(): accumulative Enabled PDCH 0 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: .......1 [0] @@ -287,7 +415,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] Enabled PDCH 1 for multislot tests... [ACC] multislot class 0 - UL: ......11 DL: ......11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -319,7 +463,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] Enabled PDCH 2 for multislot tests... [ACC] multislot class 0 - UL: .....11. DL: .....111 [0] [ACC] multislot class 1 - UL: ......1. DL: ......1. [0] @@ -351,7 +511,23 @@ [ACC] multislot class 27 - UL: ......1. DL: ......1. [0] [ACC] multislot class 28 - UL: ......1. DL: ......1. [0] [ACC] multislot class 29 - UL: ......1. DL: ......1. [0] - [ACC] multislot class 30 - UL: ......1. DL: ......1. [-22] + [ACC] multislot class 30 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 31 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 32 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 33 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 34 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 35 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 36 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 37 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 38 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 39 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 40 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 41 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 42 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 43 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 44 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 45 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 46 - UL: ......1. DL: ......1. [-22] Enabled PDCH 3 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -383,7 +559,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 4 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -415,7 +607,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 5 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -447,7 +655,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 6 for multislot tests... [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -479,7 +703,23 @@ [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] - [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 31 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 32 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 33 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 34 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 35 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 36 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 37 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 38 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 39 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 40 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 41 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 42 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 43 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 44 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 45 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 46 - UL: .....1.. DL: .....1.. [-22] Enabled PDCH 7 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -511,7 +751,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] test_multislot_total_descending(): sequential Enabled PDCH 7 for multislot tests... [SEQ] multislot class 0 - UL: 1....... DL: 1....... [0] @@ -544,7 +800,23 @@ [SEQ] multislot class 27 - UL: 1....... DL: 1....... [0] [SEQ] multislot class 28 - UL: 1....... DL: 1....... [0] [SEQ] multislot class 29 - UL: 1....... DL: 1....... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 31 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 32 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 33 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 34 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 35 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 36 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 37 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 38 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 39 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 40 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 41 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 42 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 43 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 44 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 45 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 6 for multislot tests... [SEQ] multislot class 0 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -576,7 +848,23 @@ [SEQ] multislot class 27 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 28 - UL: 11...... DL: 11...... [0] [SEQ] multislot class 29 - UL: 11...... DL: 11...... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 5 for multislot tests... [SEQ] multislot class 0 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 1 - UL: ..1..... DL: ..1..... [0] @@ -608,7 +896,23 @@ [SEQ] multislot class 27 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 28 - UL: 11...... DL: 111..... [0] [SEQ] multislot class 29 - UL: 11...... DL: 111..... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 4 for multislot tests... [SEQ] multislot class 0 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 1 - UL: ...1.... DL: ...1.... [0] @@ -640,7 +944,23 @@ [SEQ] multislot class 27 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 28 - UL: .1...... DL: 1111.... [0] [SEQ] multislot class 29 - UL: .1...... DL: 1111.... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 31 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 32 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 33 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 34 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 36 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 37 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 38 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 39 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 1111.... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 3 for multislot tests... [SEQ] multislot class 0 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -672,7 +992,23 @@ [SEQ] multislot class 27 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 28 - UL: ..1..... DL: .1111... [0] [SEQ] multislot class 29 - UL: ..1..... DL: .1111... [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 31 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 32 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 33 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 34 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 35 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 36 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 37 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 38 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 39 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 40 - UL: .1...... DL: 11111... [0] + [SEQ] multislot class 41 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 42 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 43 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 44 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 45 - UL: 11...... DL: 11111... [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 2 for multislot tests... [SEQ] multislot class 0 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -704,7 +1040,23 @@ [SEQ] multislot class 27 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 28 - UL: ...1.... DL: ..1111.. [0] [SEQ] multislot class 29 - UL: ...1.... DL: ..1111.. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 31 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 32 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 33 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 34 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 35 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 36 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 37 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 38 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 39 - UL: ..1..... DL: .11111.. [0] + [SEQ] multislot class 40 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 41 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 42 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 43 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 44 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 45 - UL: .1...... DL: 111111.. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 1 for multislot tests... [SEQ] multislot class 0 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 1 - UL: ......1. DL: ......1. [0] @@ -736,7 +1088,23 @@ [SEQ] multislot class 27 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 28 - UL: ....1... DL: ...1111. [0] [SEQ] multislot class 29 - UL: ....1... DL: ...1111. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 31 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 32 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 33 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 34 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 35 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 36 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 37 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 38 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 39 - UL: ...1.... DL: ..11111. [0] + [SEQ] multislot class 40 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 41 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 42 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 43 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 44 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 45 - UL: ..1..... DL: .111111. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] Enabled PDCH 0 for multislot tests... [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -768,7 +1136,23 @@ [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 31 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 32 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 33 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 34 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 36 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 37 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 38 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 39 - UL: .......1 DL: 111...11 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 41 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 42 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 43 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 44 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 45 - UL: .......1 DL: 1111..11 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_total_descending(): accumulative Enabled PDCH 7 for multislot tests... [ACC] multislot class 0 - UL: 1....... DL: 1....... [0] @@ -801,7 +1185,23 @@ [ACC] multislot class 27 - UL: 1....... DL: 1....... [0] [ACC] multislot class 28 - UL: 1....... DL: 1....... [0] [ACC] multislot class 29 - UL: 1....... DL: 1....... [0] - [ACC] multislot class 30 - UL: 1....... DL: 1....... [-22] + [ACC] multislot class 30 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 31 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 32 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 33 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 34 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 35 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 36 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 37 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 38 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 39 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 40 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 41 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 42 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 43 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 44 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 45 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 46 - UL: 1....... DL: 1....... [-22] Enabled PDCH 6 for multislot tests... [ACC] multislot class 0 - UL: 11...... DL: 11...... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -833,7 +1233,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 5 for multislot tests... [ACC] multislot class 0 - UL: 11...... DL: 111..... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -865,7 +1281,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 4 for multislot tests... [ACC] multislot class 0 - UL: .1...... DL: 1111.... [0] [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] @@ -897,7 +1329,23 @@ [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] - [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 31 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 32 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 33 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 34 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 35 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 36 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 37 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 38 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 39 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 40 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 41 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 42 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 43 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 44 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 45 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 46 - UL: .1...... DL: .1...... [-22] Enabled PDCH 3 for multislot tests... [ACC] multislot class 0 - UL: ..1..... DL: .1111... [0] [ACC] multislot class 1 - UL: ..1..... DL: ..1..... [0] @@ -929,7 +1377,23 @@ [ACC] multislot class 27 - UL: ..1..... DL: ..1..... [0] [ACC] multislot class 28 - UL: ..1..... DL: ..1..... [0] [ACC] multislot class 29 - UL: ..1..... DL: ..1..... [0] - [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [-22] + [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 31 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 32 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 33 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 34 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 35 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 36 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 37 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 38 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 39 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 40 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 41 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 42 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 43 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 44 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 45 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 46 - UL: ..1..... DL: ..1..... [-22] Enabled PDCH 2 for multislot tests... [ACC] multislot class 0 - UL: ...1.... DL: ..1111.. [0] [ACC] multislot class 1 - UL: ...1.... DL: ...1.... [0] @@ -961,7 +1425,23 @@ [ACC] multislot class 27 - UL: ...1.... DL: ...1.... [0] [ACC] multislot class 28 - UL: ...1.... DL: ...1.... [0] [ACC] multislot class 29 - UL: ...1.... DL: ...1.... [0] - [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [-22] + [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 31 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 32 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 33 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 34 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 35 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 36 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 37 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 38 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 39 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 40 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 41 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 42 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 43 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 44 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 45 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 46 - UL: ...1.... DL: ...1.... [-22] Enabled PDCH 1 for multislot tests... [ACC] multislot class 0 - UL: ....1... DL: ...1111. [0] [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -993,7 +1473,23 @@ [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] - [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 31 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 32 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 33 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 34 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 35 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 36 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 37 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 38 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 39 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 40 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 41 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 42 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 43 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 44 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 45 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 46 - UL: ....1... DL: ....1... [-22] Enabled PDCH 0 for multislot tests... [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1025,7 +1521,23 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] test_multislot_middle(): sequential [SEQ] multislot class 0 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] @@ -1057,7 +1569,23 @@ [SEQ] multislot class 27 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 28 - UL: ...11... DL: ...111.. [0] [SEQ] multislot class 29 - UL: ...11... DL: ...111.. [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 31 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 32 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 33 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 34 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 35 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 36 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 37 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 38 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 39 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 40 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 41 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 42 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 43 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 44 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 45 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_middle(): accumulative [ACC] multislot class 0 - UL: ...11... DL: ...111.. [0] [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] @@ -1089,7 +1617,23 @@ [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] - [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 31 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 32 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 33 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 34 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 35 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 36 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 37 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 38 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 39 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 40 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 41 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 42 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 43 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 44 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 45 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 46 - UL: ....1... DL: ....1... [-22] test_multislot_ends(): sequential [SEQ] multislot class 0 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1121,7 +1665,23 @@ [SEQ] multislot class 27 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 28 - UL: 1......1 DL: 1......1 [0] [SEQ] multislot class 29 - UL: 1......1 DL: 1......1 [0] - [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + [SEQ] multislot class 30 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 31 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 32 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 33 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 34 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 35 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 36 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 37 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 38 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 39 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 40 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 41 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 42 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 43 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 44 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 45 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 46 - UL: ........ DL: ........ [-22] test_multislot_ends(): accumulative [ACC] multislot class 0 - UL: 1......1 DL: 1......1 [0] [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] @@ -1153,4 +1713,20 @@ [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] - [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 31 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 32 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 33 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 34 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 35 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 36 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 37 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 38 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 39 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 40 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 41 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 42 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 43 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 44 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 45 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 46 - UL: .......1 DL: .......1 [-22] -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:39 +0000 Subject: [PATCH] osmo-pcu[master]: Add tests for find_multi_slots() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4636 to look at the new patch set (#2). Add tests for find_multi_slots() * make function public * add tests Change-Id: I4174703808335c19341cd5b5f4422496d958967f --- M src/gprs_rlcmac.h M src/gprs_rlcmac_ts_alloc.cpp M tests/Makefile.am A tests/alloc/MslotTest.cpp A tests/alloc/MslotTest.ok M tests/testsuite.at 6 files changed, 1,342 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/4636/2 diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index be1e686..ed366cf 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -63,6 +63,9 @@ uint8_t block_payload; }; +/* TS allocation internal functions */ +int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots); + int gprs_rlcmac_received_lost(struct gprs_rlcmac_dl_tbf *tbf, uint16_t received, uint16_t lost); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 5e670d7..471b601 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -443,7 +443,7 @@ return 0; } -static int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) +int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots) { uint8_t Tx, Sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ uint8_t Tta, Ttb, Tra, Trb; /* Minimum Number of Slots */ diff --git a/tests/Makefile.am b/tests/Makefile.am index 04136f5..1595a07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ -I$(top_srcdir)/include/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest fn/FnTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest alloc/MslotTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest fn/FnTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -12,6 +12,14 @@ alloc_AllocTest_SOURCES = alloc/AllocTest.cpp alloc_AllocTest_LDADD = \ + $(top_builddir)/src/libgprs.la \ + $(LIBOSMOGB_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +alloc_MslotTest_SOURCES = alloc/MslotTest.cpp +alloc_MslotTest_LDADD = \ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ @@ -124,7 +132,7 @@ tbf/TbfTest.ok tbf/TbfTest.err \ bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ - ms/MsTest.ok ms/MsTest.err \ + ms/MsTest.ok ms/MsTest.err alloc/MslotTest.ok \ llc/LlcTest.ok llc/LlcTest.err \ llist/LListTest.ok llist/LListTest.err \ codel/codel_test.ok \ diff --git a/tests/alloc/MslotTest.cpp b/tests/alloc/MslotTest.cpp new file mode 100644 index 0000000..059b5bc --- /dev/null +++ b/tests/alloc/MslotTest.cpp @@ -0,0 +1,166 @@ +/* MslotTest.cpp + * + * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "gprs_rlcmac.h" +#include "gprs_debug.h" +#include "tbf.h" +#include "bts.h" + +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +/* globals used by the code */ +void *tall_pcu_ctx; +int16_t spoof_mnc = 0, spoof_mcc = 0; + +static inline void test_all_classes(struct gprs_rlcmac_trx *trx, bool clear_masks) +{ + int i, rc; + uint8_t dl_slots = 0, ul_slots = 0; + + for (i = 0; i < 64; i++) { + rc = find_multi_slots(trx, i, &ul_slots, &dl_slots); + + printf(" [%s] multislot class %3u - UL: " OSMO_BIT_SPEC " DL: " OSMO_BIT_SPEC " [%d]\n", + clear_masks ? "SEQ" : "ACC", i, OSMO_BIT_PRINT(ul_slots), OSMO_BIT_PRINT(dl_slots), rc); + + if (rc == -EINVAL) + return; + + if (clear_masks) { + dl_slots = 0; + ul_slots = 0; + } + } +} + +static inline void test_multislot_total_ascending(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + int i; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + for (i = 0; i < 8; i++) { + printf(" Enabled PDCH %u for multislot tests...\n", i); + trx->pdch[i].enable(); + + test_all_classes(trx, seq); + } +} + +static inline void test_multislot_total_descending(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + int i; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + for (i = 7; i >= 0; i--) { + printf(" Enabled PDCH %u for multislot tests...\n", i); + trx->pdch[i].enable(); + + test_all_classes(trx, seq); + } +} + +static inline void test_multislot_middle(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + trx->pdch[2].enable(); + trx->pdch[3].enable(); + trx->pdch[4].enable(); + + test_all_classes(trx, seq); +} + +static inline void test_multislot_ends(bool seq) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts; + struct gprs_rlcmac_trx *trx; + + printf("%s(): %s\n", __func__, seq ? "sequential" : "accumulative"); + + bts = the_bts.bts_data(); + + trx = &bts->trx[0]; + + trx->pdch[0].enable(); + trx->pdch[7].enable(); + + test_all_classes(trx, seq); +} + + +int main(int argc, char **argv) +{ + tall_pcu_ctx = talloc_named_const(NULL, 1, "MslotTest context"); + if (!tall_pcu_ctx) + abort(); + + msgb_talloc_ctx_init(tall_pcu_ctx, 0); + + osmo_init_logging(&gprs_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + + test_multislot_total_ascending(true); + test_multislot_total_ascending(false); + + test_multislot_total_descending(true); + test_multislot_total_descending(false); + + test_multislot_middle(true); + test_multislot_middle(false); + + test_multislot_ends(true); + test_multislot_ends(false); + + return EXIT_SUCCESS; +} diff --git a/tests/alloc/MslotTest.ok b/tests/alloc/MslotTest.ok new file mode 100644 index 0000000..0cd50c8 --- /dev/null +++ b/tests/alloc/MslotTest.ok @@ -0,0 +1,1156 @@ +test_multislot_total_ascending(): sequential + Enabled PDCH 0 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 5 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 6 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 7 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 8 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 9 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 10 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 11 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 12 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 13 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 14 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 15 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 16 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 17 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 18 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 19 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 20 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 21 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 22 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 23 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 24 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 25 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 26 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 27 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 28 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 29 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 1 for multislot tests... + [SEQ] multislot class 0 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 7 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: ......11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 10 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 11 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 12 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 13 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 14 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 15 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 16 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 17 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 18 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 19 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 20 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 21 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 22 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 23 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 24 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 25 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 26 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 27 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 28 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 29 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 2 for multislot tests... + [SEQ] multislot class 0 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 11 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 12 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 15 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 16 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 17 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 18 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 19 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 20 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 21 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 22 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 23 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 24 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 25 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 26 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 27 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 28 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 29 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 3 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 16 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 17 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 18 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 4 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 17 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 18 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 5 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 18 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 6 for multislot tests... + [SEQ] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 3 - UL: ......1. DL: ......11 [0] + [SEQ] multislot class 4 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 7 - UL: ......1. DL: .....111 [0] + [SEQ] multislot class 8 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 9 - UL: .....11. DL: .....111 [0] + [SEQ] multislot class 10 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 11 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 12 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 19 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 20 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 21 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 22 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 23 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 24 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 25 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 26 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 27 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 28 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 29 - UL: .....1.. DL: ....1111 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 7 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 7 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: 1.....11 [0] + [SEQ] multislot class 10 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 11 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 12 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: 11111111 DL: 11111111 [0] + [SEQ] multislot class 19 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 20 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 21 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 22 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 23 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 24 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 25 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 26 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_total_ascending(): accumulative + Enabled PDCH 0 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + Enabled PDCH 1 for multislot tests... + [ACC] multislot class 0 - UL: ......11 DL: ......11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] + Enabled PDCH 2 for multislot tests... + [ACC] multislot class 0 - UL: .....11. DL: .....111 [0] + [ACC] multislot class 1 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 2 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 3 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 4 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 5 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 6 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 7 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 8 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 9 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 10 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 11 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 12 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 13 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 14 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 15 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 16 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 17 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 18 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 19 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 20 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 21 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 22 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 23 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 24 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 25 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 26 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 27 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 28 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 29 - UL: ......1. DL: ......1. [0] + [ACC] multislot class 30 - UL: ......1. DL: ......1. [-22] + Enabled PDCH 3 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 4 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 5 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 6 for multislot tests... + [ACC] multislot class 0 - UL: .....1.. DL: ....1111 [0] + [ACC] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 2 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 3 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 4 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 5 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 6 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 7 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 8 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 9 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 10 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 11 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 12 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 13 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 14 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 15 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 16 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 17 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 18 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 19 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 20 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 21 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 22 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 23 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 24 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 25 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 26 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 27 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 28 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 29 - UL: .....1.. DL: .....1.. [0] + [ACC] multislot class 30 - UL: .....1.. DL: .....1.. [-22] + Enabled PDCH 7 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] +test_multislot_total_descending(): sequential + Enabled PDCH 7 for multislot tests... + [SEQ] multislot class 0 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 1 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 2 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 3 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 4 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 5 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 6 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 7 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 8 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 9 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 10 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 11 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 12 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 13 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 14 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 15 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 16 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 17 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 18 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 19 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 20 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 21 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 22 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 23 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 24 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 25 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 26 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 27 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 28 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 29 - UL: 1....... DL: 1....... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 6 for multislot tests... + [SEQ] multislot class 0 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 1 - UL: .1...... DL: .1...... [0] + [SEQ] multislot class 2 - UL: 1....... DL: 11...... [0] + [SEQ] multislot class 3 - UL: 1....... DL: 11...... [0] + [SEQ] multislot class 4 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 5 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 6 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 7 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 11...... [0] + [SEQ] multislot class 9 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 10 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 11 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 12 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 13 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 14 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 15 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 16 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 17 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 18 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 19 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 20 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 21 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 22 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 23 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 24 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 25 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 26 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 27 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 28 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 29 - UL: 11...... DL: 11...... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 5 for multislot tests... + [SEQ] multislot class 0 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 1 - UL: ..1..... DL: ..1..... [0] + [SEQ] multislot class 2 - UL: .1...... DL: .11..... [0] + [SEQ] multislot class 3 - UL: .1...... DL: .11..... [0] + [SEQ] multislot class 4 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 5 - UL: .11..... DL: .11..... [0] + [SEQ] multislot class 6 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 7 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 111..... [0] + [SEQ] multislot class 9 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 10 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 11 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 12 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 13 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 14 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 15 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 16 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 17 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 18 - UL: 111..... DL: 111..... [0] + [SEQ] multislot class 19 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 20 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 21 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 22 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 23 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 24 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 25 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 26 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 27 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 28 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 29 - UL: 11...... DL: 111..... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 4 for multislot tests... + [SEQ] multislot class 0 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 1 - UL: ...1.... DL: ...1.... [0] + [SEQ] multislot class 2 - UL: ..1..... DL: ..11.... [0] + [SEQ] multislot class 3 - UL: ..1..... DL: ..11.... [0] + [SEQ] multislot class 4 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 5 - UL: ..11.... DL: ..11.... [0] + [SEQ] multislot class 6 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 7 - UL: ..1..... DL: .111.... [0] + [SEQ] multislot class 8 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 9 - UL: .11..... DL: .111.... [0] + [SEQ] multislot class 10 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 11 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 12 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 13 - UL: .111.... DL: .111.... [0] + [SEQ] multislot class 14 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 15 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 16 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 17 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 18 - UL: 1111.... DL: 1111.... [0] + [SEQ] multislot class 19 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 20 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 21 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 22 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 23 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 24 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 25 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 26 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 27 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 28 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 29 - UL: .1...... DL: 1111.... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 3 for multislot tests... + [SEQ] multislot class 0 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 1 - UL: ....1... DL: ....1... [0] + [SEQ] multislot class 2 - UL: ...1.... DL: ...11... [0] + [SEQ] multislot class 3 - UL: ...1.... DL: ...11... [0] + [SEQ] multislot class 4 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 5 - UL: ...11... DL: ...11... [0] + [SEQ] multislot class 6 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 7 - UL: ...1.... DL: ..111... [0] + [SEQ] multislot class 8 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 9 - UL: ..11.... DL: ..111... [0] + [SEQ] multislot class 10 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 11 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 12 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 13 - UL: ..111... DL: ..111... [0] + [SEQ] multislot class 14 - UL: .1111... DL: .1111... [0] + [SEQ] multislot class 15 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 16 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 17 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 18 - UL: 11111... DL: 11111... [0] + [SEQ] multislot class 19 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 20 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 21 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 22 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 23 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 24 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 25 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 26 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 27 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 28 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 29 - UL: ..1..... DL: .1111... [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 2 for multislot tests... + [SEQ] multislot class 0 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [SEQ] multislot class 2 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 3 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 4 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 5 - UL: ....11.. DL: ....11.. [0] + [SEQ] multislot class 6 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 7 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 8 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 9 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 10 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 11 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 12 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 13 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 14 - UL: ..1111.. DL: ..1111.. [0] + [SEQ] multislot class 15 - UL: .11111.. DL: .11111.. [0] + [SEQ] multislot class 16 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 17 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 18 - UL: 111111.. DL: 111111.. [0] + [SEQ] multislot class 19 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 20 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 21 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 22 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 23 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 24 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 25 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 26 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 27 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 28 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 29 - UL: ...1.... DL: ..1111.. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 1 for multislot tests... + [SEQ] multislot class 0 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 1 - UL: ......1. DL: ......1. [0] + [SEQ] multislot class 2 - UL: .....1.. DL: .....11. [0] + [SEQ] multislot class 3 - UL: .....1.. DL: .....11. [0] + [SEQ] multislot class 4 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 5 - UL: .....11. DL: .....11. [0] + [SEQ] multislot class 6 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 7 - UL: .....1.. DL: ....111. [0] + [SEQ] multislot class 8 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 9 - UL: ....11.. DL: ....111. [0] + [SEQ] multislot class 10 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 11 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 12 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 13 - UL: ....111. DL: ....111. [0] + [SEQ] multislot class 14 - UL: ...1111. DL: ...1111. [0] + [SEQ] multislot class 15 - UL: ..11111. DL: ..11111. [0] + [SEQ] multislot class 16 - UL: .111111. DL: .111111. [0] + [SEQ] multislot class 17 - UL: 1111111. DL: 1111111. [0] + [SEQ] multislot class 18 - UL: 1111111. DL: 1111111. [0] + [SEQ] multislot class 19 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 20 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 21 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 22 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 23 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 24 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 25 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 26 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 27 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 28 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 29 - UL: ....1... DL: ...1111. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] + Enabled PDCH 0 for multislot tests... + [SEQ] multislot class 0 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 5 - UL: ......11 DL: ......11 [0] + [SEQ] multislot class 6 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 7 - UL: .......1 DL: 1.....11 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 9 - UL: ......11 DL: 1.....11 [0] + [SEQ] multislot class 10 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 11 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 12 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 13 - UL: .....111 DL: .....111 [0] + [SEQ] multislot class 14 - UL: ....1111 DL: ....1111 [0] + [SEQ] multislot class 15 - UL: ...11111 DL: ...11111 [0] + [SEQ] multislot class 16 - UL: ..111111 DL: ..111111 [0] + [SEQ] multislot class 17 - UL: .1111111 DL: .1111111 [0] + [SEQ] multislot class 18 - UL: 11111111 DL: 11111111 [0] + [SEQ] multislot class 19 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 20 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 21 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 22 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 23 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 24 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 25 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 26 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 27 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 28 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 29 - UL: .......1 DL: 11....11 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_total_descending(): accumulative + Enabled PDCH 7 for multislot tests... + [ACC] multislot class 0 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 1 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 2 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 3 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 4 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 5 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 6 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 7 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 8 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 9 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 10 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 11 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 12 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 13 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 14 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 15 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 16 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 17 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 18 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 19 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 20 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 21 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 22 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 23 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 24 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 25 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 26 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 27 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 28 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 29 - UL: 1....... DL: 1....... [0] + [ACC] multislot class 30 - UL: 1....... DL: 1....... [-22] + Enabled PDCH 6 for multislot tests... + [ACC] multislot class 0 - UL: 11...... DL: 11...... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 5 for multislot tests... + [ACC] multislot class 0 - UL: 11...... DL: 111..... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 4 for multislot tests... + [ACC] multislot class 0 - UL: .1...... DL: 1111.... [0] + [ACC] multislot class 1 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 2 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 3 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 4 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 5 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 6 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 7 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 8 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 9 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 10 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 11 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 12 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 13 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 14 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 15 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 16 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 17 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 18 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 19 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 20 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 21 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 22 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 23 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 24 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 25 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 26 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 27 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 28 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 29 - UL: .1...... DL: .1...... [0] + [ACC] multislot class 30 - UL: .1...... DL: .1...... [-22] + Enabled PDCH 3 for multislot tests... + [ACC] multislot class 0 - UL: ..1..... DL: .1111... [0] + [ACC] multislot class 1 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 2 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 3 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 4 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 5 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 6 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 7 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 8 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 9 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 10 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 11 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 12 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 13 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 14 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 15 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 16 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 17 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 18 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 19 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 20 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 21 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 22 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 23 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 24 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 25 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 26 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 27 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 28 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 29 - UL: ..1..... DL: ..1..... [0] + [ACC] multislot class 30 - UL: ..1..... DL: ..1..... [-22] + Enabled PDCH 2 for multislot tests... + [ACC] multislot class 0 - UL: ...1.... DL: ..1111.. [0] + [ACC] multislot class 1 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 2 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 3 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 4 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 5 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 6 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 7 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 8 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 9 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 10 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 11 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 12 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 13 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 14 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 15 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 16 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 17 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 18 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 19 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 20 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 21 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 22 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 23 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 24 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 25 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 26 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 27 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 28 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 29 - UL: ...1.... DL: ...1.... [0] + [ACC] multislot class 30 - UL: ...1.... DL: ...1.... [-22] + Enabled PDCH 1 for multislot tests... + [ACC] multislot class 0 - UL: ....1... DL: ...1111. [0] + [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 2 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 3 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 4 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 5 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 6 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 7 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 8 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 9 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 10 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 11 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 12 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 13 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 14 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 15 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 16 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 17 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 18 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 19 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 20 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 21 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 22 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 23 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 24 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 25 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 26 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] + Enabled PDCH 0 for multislot tests... + [ACC] multislot class 0 - UL: .......1 DL: 11....11 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] +test_multislot_middle(): sequential + [SEQ] multislot class 0 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 1 - UL: .....1.. DL: .....1.. [0] + [SEQ] multislot class 2 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 3 - UL: ....1... DL: ....11.. [0] + [SEQ] multislot class 4 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 5 - UL: ....11.. DL: ....11.. [0] + [SEQ] multislot class 6 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 7 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 8 - UL: ....1... DL: ...111.. [0] + [SEQ] multislot class 9 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 10 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 11 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 12 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 13 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 14 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 15 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 16 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 17 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 18 - UL: ...111.. DL: ...111.. [0] + [SEQ] multislot class 19 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 20 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 21 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 22 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 23 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 24 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 25 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 26 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 27 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 28 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 29 - UL: ...11... DL: ...111.. [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_middle(): accumulative + [ACC] multislot class 0 - UL: ...11... DL: ...111.. [0] + [ACC] multislot class 1 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 2 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 3 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 4 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 5 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 6 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 7 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 8 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 9 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 10 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 11 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 12 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 13 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 14 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 15 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 16 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 17 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 18 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 19 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 20 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 21 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 22 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 23 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 24 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 25 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 26 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 27 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 28 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 29 - UL: ....1... DL: ....1... [0] + [ACC] multislot class 30 - UL: ....1... DL: ....1... [-22] +test_multislot_ends(): sequential + [SEQ] multislot class 0 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 1 - UL: .......1 DL: .......1 [0] + [SEQ] multislot class 2 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 3 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 4 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 5 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 6 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 7 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 8 - UL: .......1 DL: 1......1 [0] + [SEQ] multislot class 9 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 10 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 11 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 12 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 13 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 14 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 15 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 16 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 17 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 18 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 19 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 20 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 21 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 22 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 23 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 24 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 25 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 26 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 27 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 28 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 29 - UL: 1......1 DL: 1......1 [0] + [SEQ] multislot class 30 - UL: ........ DL: ........ [-22] +test_multislot_ends(): accumulative + [ACC] multislot class 0 - UL: 1......1 DL: 1......1 [0] + [ACC] multislot class 1 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 2 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 3 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 4 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 5 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 6 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 7 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 8 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 9 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 10 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 11 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 12 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 13 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 14 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 15 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 16 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 17 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 18 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 19 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 20 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 21 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 22 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 23 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 24 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 25 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 26 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 27 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 28 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 29 - UL: .......1 DL: .......1 [0] + [ACC] multislot class 30 - UL: .......1 DL: .......1 [-22] diff --git a/tests/testsuite.at b/tests/testsuite.at index d8f8f9a..86f45a8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -9,6 +9,12 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([multi_slot]) +AT_KEYWORDS([multi_slot]) +cat $abs_srcdir/alloc/MslotTest.ok > expout +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/alloc/MslotTest], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([ts_alloc]) AT_KEYWORDS([ts_alloc]) cat $abs_srcdir/alloc/AllocTest.ok > expout -- To view, visit https://gerrit.osmocom.org/4636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4174703808335c19341cd5b5f4422496d958967f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:40 +0000 Subject: [PATCH] osmo-pcu[master]: Add function to get max supported MS class Message-ID: Review at https://gerrit.osmocom.org/4955 Add function to get max supported MS class It's useful for allocation tests. Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Related: OS#2282 --- M src/mslot_class.c M src/mslot_class.h 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/55/4955/1 diff --git a/src/mslot_class.c b/src/mslot_class.c index 6d7c09d..19fea3e 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -82,6 +82,11 @@ return &gprs_ms_multislot_class[index]; } +uint8_t mslot_class_max() +{ + return ARRAY_SIZE(gprs_ms_multislot_class); +} + uint8_t mslot_class_get_ta(uint8_t ms_cl) { return get_mslot_table(ms_cl)->ta; diff --git a/src/mslot_class.h b/src/mslot_class.h index f26bd64..cba9d58 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -44,3 +44,4 @@ uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); uint8_t mslot_class_get_type(uint8_t ms_cl); +uint8_t mslot_class_max(); -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:41 +0000 Subject: [PATCH] osmo-pcu[master]: Clarify alloc tests Message-ID: Review at https://gerrit.osmocom.org/4956 Clarify alloc tests * add wrapper for single-class tests * rename top-level function to avoid confusion * reformat to improve readability * drop confusing wrapper Change-Id: I3feeb92237ffb9557ac6998540b740f1f67186b3 Related: OS#2282 --- M tests/alloc/AllocTest.cpp 1 file changed, 48 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/56/4956/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index a88f477..cd24de1 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -475,6 +475,19 @@ TEST_MODE_UL_AFTER_DL, }; +static inline char *test_mode_descr(enum test_mode t) +{ + switch (t) { + case TEST_MODE_UL_ONLY: return (char*)"UL only"; + case TEST_MODE_DL_ONLY: return (char*)"DL ONLY"; + case TEST_MODE_UL_AND_DL: return (char*)"UL and DL"; + case TEST_MODE_DL_AND_UL: return (char*)"DL and UL"; + case TEST_MODE_DL_AFTER_UL: return (char*)"DL after UL"; + case TEST_MODE_UL_AFTER_DL: return (char*)"UL after DL"; + default: return NULL; + } +} + static GprsMs *alloc_tbfs(BTS *the_bts, GprsMs *ms, unsigned ms_class, enum test_mode mode) { @@ -660,7 +673,8 @@ struct gprs_rlcmac_trx *trx; unsigned counter; - printf("Going to test assignment with many TBF, %s\n", text); + printf("Going to test assignment with many TBF, algorithm %s (%s)\n", + text, test_mode_descr(mode)); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -683,6 +697,12 @@ check_tfi_usage(&the_bts); } +static inline void test_successive_allocation_single(algo_t algo, unsigned ms_class, enum test_mode mode, + unsigned expect_num, const char *text) +{ + test_successive_allocation(algo, ms_class, ms_class, mode, expect_num, text); +} + static void test_many_connections(algo_t algo, unsigned expect_num, const char *text) { @@ -698,7 +718,7 @@ TEST_MODE_DL_ONLY, }; - printf("Going to test assignment with many connections, %s\n", text); + printf("Going to test assignment with many connections, algorithm %s\n", text); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -738,62 +758,35 @@ OSMO_ASSERT(expect_num == (unsigned)counter1); } -static void test_successive_allocation() +static void test_successive_allocations() { - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AND_DL, - 35, "algorithm A (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 10 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 12 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 1-12 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 1-29 (UL and DL)"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, - 35, "algorithm dynamic class 1-29 (UL and DL)"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AND_DL, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B class 12"); - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL, - 35, "algorithm A (DL and UL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AND_UL, - 32, "algorithm B class 10 (DL and UL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_AND_UL, - 32, "algorithm dynamic class 10 (DL and UL)"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B class 1-12"); + test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B class 1-29"); + test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic class 1-29"); - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AFTER_UL, - 160, "algorithm A (DL after UL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AFTER_UL, - 32, "algorithm B class 10 (DL after UL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_AFTER_UL, - 95, "algorithm dynamic class 10 (DL after UL)"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AND_UL, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AND_UL, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AND_UL, 32, "dynamic class 10"); - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AFTER_DL, - 35, "algorithm A (UL after DL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AFTER_DL, - 32, "algorithm B class 10 (UL after DL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_UL_AFTER_DL, - 35, "algorithm dynamic class 10 (UL after DL)"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AFTER_UL, 160, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AFTER_UL, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AFTER_UL, 95, "dynamic class 10"); - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_ONLY, - 35, "algorithm A (UL only)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_ONLY, - 32, "algorithm B class 10 (UL only)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_UL_ONLY, - 35, "algorithm dynamic class 10 (UL only)"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AFTER_DL, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AFTER_DL, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_AFTER_DL, 35, "dynamic class 10"); - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_ONLY, - 160, "algorithm A (DL ONLY)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_ONLY, - 32, "algorithm B class 10 (DL ONLY)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_ONLY, - 101, "algorithm dynamic class 10 (DL ONLY)"); -} + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_ONLY, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_ONLY, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_ONLY, 35, "dynamic class 10"); -static void test_many_connections() -{ - test_many_connections(alloc_algorithm_a, 160, "algorithm A"); - test_many_connections(alloc_algorithm_b, 32, "algorithm B"); - test_many_connections(alloc_algorithm_dynamic, 160, "algorithm dynamic"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_ONLY, 160, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_ONLY, 32, "B class 10"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_ONLY, 101, "dynamic class 10"); } static void test_2_consecutive_dl_tbfs() @@ -861,8 +854,10 @@ test_alloc_a(); test_alloc_b(); - test_successive_allocation(); - test_many_connections(); + test_successive_allocations(); + test_many_connections(alloc_algorithm_a, 160, "A"); + test_many_connections(alloc_algorithm_b, 32, "B"); + test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4956 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3feeb92237ffb9557ac6998540b740f1f67186b3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:41 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: expand test output Message-ID: Review at https://gerrit.osmocom.org/4957 AllocTest: expand test output * print MS classes * unify test mode description * print additional info on test completion Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.ok 2 files changed, 68 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/57/4957/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index cd24de1..9477295 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -479,7 +479,7 @@ { switch (t) { case TEST_MODE_UL_ONLY: return (char*)"UL only"; - case TEST_MODE_DL_ONLY: return (char*)"DL ONLY"; + case TEST_MODE_DL_ONLY: return (char*)"DL only"; case TEST_MODE_UL_AND_DL: return (char*)"UL and DL"; case TEST_MODE_DL_AND_UL: return (char*)"DL and UL"; case TEST_MODE_DL_AFTER_UL: return (char*)"DL after UL"; @@ -673,8 +673,8 @@ struct gprs_rlcmac_trx *trx; unsigned counter; - printf("Going to test assignment with many TBF, algorithm %s (%s)\n", - text, test_mode_descr(mode)); + printf("Going to test assignment with many TBF, algorithm %s class %u..%u (%s)\n", + text, min_class, max_class, test_mode_descr(mode)); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -688,9 +688,11 @@ counter = alloc_many_tbfs(&the_bts, min_class, max_class, mode); - printf(" Successfully allocated %d UL TBFs\n", counter); + printf(" Successfully allocated %u UL TBFs, algorithm %s class %u..%u (%s)\n", + counter, text, min_class, max_class, test_mode_descr(mode)); if (counter != expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %u TBFs (got %u), algorithm %s class %u..%u (%s)\n", + expect_num, counter, text, min_class, max_class, test_mode_descr(mode)); OSMO_ASSERT(counter == expect_num); @@ -753,40 +755,33 @@ printf(" Successfully allocated %d TBFs\n", counter1); if (counter1 != (int)expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %d TBFs (got %d) for algorithm %s\n", expect_num, counter1, text); OSMO_ASSERT(expect_num == (unsigned)counter1); } +static inline void test_a_b_dyn(enum test_mode mode, uint8_t exp_A, uint8_t exp_B, uint8_t exp_dyn) +{ + test_successive_allocation_single(alloc_algorithm_a, 1, mode, exp_A, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, mode, exp_B, "B"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, mode, exp_dyn, "dynamic"); +} + static void test_successive_allocations() { - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AND_DL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B class 12"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AND_DL, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B class 1-12"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B class 1-29"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic class 1-29"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AND_UL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AND_UL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AND_UL, 32, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AFTER_UL, 160, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AFTER_UL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AFTER_UL, 95, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AFTER_DL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AFTER_DL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_AFTER_DL, 35, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_ONLY, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_ONLY, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_ONLY, 35, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_ONLY, 160, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_ONLY, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_ONLY, 101, "dynamic class 10"); + test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); + test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); + test_a_b_dyn(TEST_MODE_UL_AFTER_DL, 35, 32, 35); + test_a_b_dyn(TEST_MODE_UL_ONLY, 35, 32, 35); + test_a_b_dyn(TEST_MODE_DL_ONLY, 160, 32, 101); } static void test_2_consecutive_dl_tbfs() diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index cbb65aa..a46bedb 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -8588,7 +8588,7 @@ Mass test: TS0(OOOOOOOO)TS7 MS_Class=27 Mass test: TS0(OOOOOOOO)TS7 MS_Class=28 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29 -Going to test assignment with many TBF, algorithm A (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8624,8 +8624,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL and DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL and DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL and DL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8658,8 +8658,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 12 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL and DL) +Going to test assignment with many TBF, algorithm B class 12..12 (UL and DL) TBF[0] class 12 reserves ...DDCD. TBF[1] class 12 reserves .....DCD TBF[2] class 12 reserves ...DCD.. @@ -8692,8 +8692,8 @@ TBF[29] class 12 reserves ...CD... TBF[30] class 12 reserves ...CD... TBF[31] class 12 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 1-12 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 12..12 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..12 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8726,8 +8726,8 @@ TBF[29] class 6 reserves ......CD TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 1-29 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..29 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8760,8 +8760,8 @@ TBF[29] class 1 reserves ...C.... TBF[30] class 2 reserves ......DC TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 1-29 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8797,8 +8797,8 @@ TBF[1] class 4 reserves ...C.... TBF[2] class 5 reserves ...C.... TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL and UL) + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8834,8 +8834,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL and UL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (DL and UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8868,8 +8868,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL and UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8902,8 +8902,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm A (DL after UL) + Successfully allocated 32 UL TBFs, algorithm dynamic class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL after UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9064,8 +9064,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL after UL) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL after UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9098,8 +9098,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...DCD.. TBF[31] class 10 reserves .....DCD - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL after UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9195,8 +9195,8 @@ TBF[28] class 10 reserves ......C. TBF[31] class 10 reserves ....C... TBF[30] class 10 reserves ......C. - Successfully allocated 95 UL TBFs -Going to test assignment with many TBF, algorithm A (UL after DL) + Successfully allocated 95 UL TBFs, algorithm dynamic class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL after DL) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9232,8 +9232,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL after DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL after DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9266,8 +9266,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves .......U TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL after DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9303,8 +9303,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (UL only) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL only) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9340,8 +9340,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL only) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL only) +Going to test assignment with many TBF, algorithm B class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9374,8 +9374,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves ...U.... TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL only) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9411,8 +9411,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL ONLY) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL only) +Going to test assignment with many TBF, algorithm A class 1..1 (DL only) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9573,8 +9573,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL ONLY) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL only) +Going to test assignment with many TBF, algorithm B class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9607,8 +9607,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL ONLY) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9710,7 +9710,7 @@ TBF[29] class 10 reserves ....C... TBF[31] class 10 reserves ......C. TBF[31] class 10 reserves .......C - Successfully allocated 101 UL TBFs + Successfully allocated 101 UL TBFs, algorithm dynamic class 10..10 (DL only) Going to test assignment with many connections, algorithm A TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... -- To view, visit https://gerrit.osmocom.org/4957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:07:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:07:41 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: remove assumption on max MS class Message-ID: Review at https://gerrit.osmocom.org/4958 AllocTest: remove assumption on max MS class So far the allocation was only tested up to hardcoded MS class 29. Drop that assumption and test for all supported MS classes. Adjust expected test output as necessary. Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok 3 files changed, 766 insertions(+), 897 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/4958/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 9477295..f0eb27c 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -26,6 +26,7 @@ #include extern "C" { +#include "mslot_class.h" #include #include #include @@ -733,7 +734,7 @@ trx->pdch[7].enable(); for (i = 0; i < ARRAY_SIZE(mode_seq); i += 1) { - counter1 = alloc_many_tbfs(&the_bts, 1, 29, mode_seq[i]); + counter1 = alloc_many_tbfs(&the_bts, 1, mslot_class_max(), mode_seq[i]); fprintf(stderr, " Allocated %d TBFs (previously %d)\n", counter1, counter2); @@ -773,9 +774,9 @@ test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B"); test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 29, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 35, "dynamic"); test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); @@ -851,7 +852,7 @@ test_alloc_b(); test_successive_allocations(); test_many_connections(alloc_algorithm_a, 160, "A"); - test_many_connections(alloc_algorithm_b, 32, "B"); + test_many_connections(alloc_algorithm_b, 29, "B"); test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err index a74c42b..70e964b 100644 --- a/tests/alloc/AllocTest.err +++ b/tests/alloc/AllocTest.err @@ -18,15 +18,8 @@ No TFI available. No TFI available. - Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. +Multislot class 30 not applicable. +Multislot class 30 not applicable. - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available No TFI available. @@ -561,130 +554,15 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) Allocated 160 TBFs (previously 160) -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously -1) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously -1) No USF available - Allocated 24 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. + Allocated 24 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. No TFI available. No TFI available. No TFI available. @@ -706,9 +584,9 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 97 TBFs (previously -1) + Allocated 99 TBFs (previously -1) - Failed to allocate a TS, no USF available - Allocated 24 TBFs (previously 97) + Allocated 24 TBFs (previously 99) No TFI available. No TFI available. No TFI available. @@ -729,7 +607,7 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 160 TBFs (previously 97) + Allocated 160 TBFs (previously 99) No TFI available. No TFI available. No TFI available. diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index a46bedb..e5363b6 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -8727,7 +8727,7 @@ TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) -Going to test assignment with many TBF, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8757,11 +8757,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) -Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) + Successfully allocated 29 UL TBFs, algorithm B class 1..32 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8791,13 +8788,13 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - TBF[1] class 4 reserves ...C.... - TBF[2] class 5 reserves ...C.... - TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) + TBF[1] class 30 reserves ...C.... + TBF[2] class 31 reserves ...C.... + TBF[0] class 32 reserves .......C + TBF[3] class 1 reserves ...C.... + TBF[0] class 2 reserves ......C. + TBF[0] class 3 reserves .....C.. + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..32 (UL and DL) Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -9741,137 +9738,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9901,12 +9898,12 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9936,137 +9933,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -10096,137 +10093,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Going to test assignment with many connections, algorithm B TBF[0] class 1 reserves ...C.... @@ -10258,9 +10255,6 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -10314,11 +10308,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 1 reserves ...C.... - TBF[1] class 2 reserves ...DC... + TBF[0] class 1 reserves .......C + TBF[1] class 2 reserves ......DC TBF[2] class 3 reserves ......DC TBF[3] class 4 reserves ....DCD. TBF[4] class 5 reserves ...CD... @@ -10326,9 +10317,9 @@ TBF[6] class 7 reserves ......CD TBF[7] class 8 reserves ...DDCD. TBF[8] class 9 reserves ...DCD.. - TBF[9] class 10 reserves ....DCD. - TBF[10] class 11 reserves ...DCD.. - TBF[11] class 12 reserves .....DCD + TBF[9] class 10 reserves ...DCD.. + TBF[10] class 11 reserves .....DCD + TBF[11] class 12 reserves ...DCD.. TBF[12] class 13 reserves .....CDD TBF[13] class 14 reserves ...CDDD. TBF[14] class 15 reserves ...CDDDD @@ -10346,10 +10337,7 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - Successfully allocated 32 TBFs + Successfully allocated 29 TBFs Going to test assignment with many connections, algorithm dynamic TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. @@ -10380,74 +10368,76 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[12] class 8 reserves .......C - TBF[20] class 9 reserves ...C.... - TBF[20] class 10 reserves ....C... - TBF[29] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[22] class 14 reserves ...C.... - TBF[22] class 15 reserves ....C... - TBF[30] class 16 reserves .....C.. - TBF[19] class 17 reserves ......C. - TBF[21] class 18 reserves .......C - TBF[24] class 19 reserves ...C.... - TBF[24] class 20 reserves ....C... - TBF[31] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[23] class 23 reserves .......C - TBF[26] class 24 reserves ...C.... - TBF[26] class 25 reserves ....C... - TBF[23] class 26 reserves ......C. - TBF[25] class 27 reserves .......C - TBF[28] class 28 reserves ...C.... - TBF[28] class 29 reserves ....C... - TBF[25] class 1 reserves ......C. - TBF[27] class 2 reserves .......C - TBF[29] class 3 reserves ...C.... - TBF[29] class 4 reserves ....C... - TBF[27] class 5 reserves ......C. - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[29] class 8 reserves ......C. - TBF[31] class 9 reserves ...C.... - TBF[31] class 10 reserves ....C... + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[5] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[6] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[8] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[10] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[12] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[19] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[21] class 30 reserves .......C + TBF[18] class 31 reserves ...C.... + TBF[18] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[23] class 3 reserves .......C + TBF[20] class 4 reserves ...C.... + TBF[20] class 5 reserves ....C... + TBF[29] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[25] class 8 reserves .......C + TBF[22] class 9 reserves ...C.... + TBF[22] class 10 reserves ....C... + TBF[30] class 11 reserves .....C.. + TBF[21] class 12 reserves ......C. + TBF[27] class 13 reserves .......C + TBF[24] class 14 reserves ...C.... + TBF[24] class 15 reserves ....C... + TBF[31] class 16 reserves .....C.. + TBF[23] class 17 reserves ......C. + TBF[29] class 18 reserves .......C + TBF[26] class 19 reserves ...C.... + TBF[26] class 20 reserves ....C... + TBF[25] class 21 reserves ......C. + TBF[30] class 22 reserves .......C + TBF[28] class 23 reserves ...C.... + TBF[28] class 24 reserves ....C... + TBF[27] class 25 reserves ......C. + TBF[31] class 26 reserves .......C + TBF[29] class 27 reserves ...C.... + TBF[29] class 28 reserves ....C... + TBF[29] class 29 reserves ......C. + TBF[30] class 30 reserves ...C.... + TBF[30] class 31 reserves ....C... + TBF[30] class 32 reserves ......C. + TBF[31] class 1 reserves ...C.... + TBF[31] class 2 reserves ....C... + TBF[31] class 3 reserves ......C. TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....DC.. TBF[0] class 3 reserves ......DC @@ -10501,137 +10491,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves .....C.. TBF[2] class 3 reserves .......C @@ -10661,137 +10651,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) -- To view, visit https://gerrit.osmocom.org/4958 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:19:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:19:11 +0000 Subject: osmo-bsc[master]: bsc_init: fix Werror: define rc for 2quater with si2q_count ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4949 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:20:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:20:30 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: fix shellcheck warnings In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4953 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:20:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:20:57 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: set -e: exit on any failure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4951 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:21:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:21:26 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: introduce $TOP dir variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4952 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:21:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 14:21:55 +0000 Subject: libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 14:25:06 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 21 Nov 2017 14:25:06 +0000 Subject: osmo-pcu[master]: AllocTest: remove assumption on max MS class In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (3 comments) Well. There are more assumptions in this code.. I pointed to two.. there is probably another one... https://gerrit.osmocom.org/#/c/4958/1/tests/alloc/AllocTest.cpp File tests/alloc/AllocTest.cpp: Line 444: for (int ms_class = 0; ms_class < 30; ++ms_class) missing.. Line 450: for (int i = 0; i < 30; ++i) missing.. Line 855: test_many_connections(alloc_algorithm_b, 29, "B"); surprising... any explanation? -- To view, visit https://gerrit.osmocom.org/4958 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 21 16:35:26 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 21 Nov 2017 16:35:26 +0000 Subject: [PATCH] osmo-msc[master]: libmsc/vty: don't access old bsc rate counters Message-ID: Review at https://gerrit.osmocom.org/4959 libmsc/vty: don't access old bsc rate counters The BSC rate counters are a leftover from the nitb split. Accessing them would result into a null-pointer exception, because the struct isn't initialized. Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b --- M src/libmsc/vty_interface_layer3.c 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/4959/1 diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index 6211d48..02a3600 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -659,14 +659,6 @@ net->msc_ctrs->ctr[MSC_CTR_LOC_UPDATE_COMPLETED].current, net->msc_ctrs->ctr[MSC_CTR_LOC_UPDATE_FAILED].current, VTY_NEWLINE); - vty_out(vty, "Handover : %lu attempted, %lu no_channel, %lu timeout, " - "%lu completed, %lu failed%s", - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_ATTEMPTED].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_NO_CHANNEL].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_TIMEOUT].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_FAILED].current, - VTY_NEWLINE); vty_out(vty, "SMS MO : %lu submitted, %lu no receiver%s", net->msc_ctrs->ctr[MSC_CTR_SMS_SUBMITTED].current, net->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER].current, -- To view, visit https://gerrit.osmocom.org/4959 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:22:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 18:22:26 +0000 Subject: [PATCH] osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4072 to look at the new patch set (#5). Add multislot classes from latest spec The table B.1 is copy-pasted from 3GPP TS 45.002 and reformatted via Emacs macros into C struct to avoid typos. The test output expanded accordingly. The allocation test expectations and output are adjusted accordingly. Note: classes 35-45 which need TA offset are not properly supported yet. This can be extended once we have such devices available for tests. Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp M src/mslot_class.c M src/mslot_class.h M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok M tests/alloc/MslotTest.ok 7 files changed, 5,598 insertions(+), 1,312 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/72/4072/5 -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:22:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 18:22:26 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: remove assumption on max MS class In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4958 to look at the new patch set (#2). AllocTest: remove assumption on max MS class So far the allocation was only tested up to hardcoded MS class 29. Drop that assumption and test for all supported MS classes. Adjust expected test output as necessary. Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok 3 files changed, 1,794 insertions(+), 899 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/4958/2 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 617834b..4f2c2c1 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -26,6 +26,7 @@ #include extern "C" { +#include "mslot_class.h" #include #include #include @@ -397,13 +398,13 @@ for (uint8_t ts5 = 0; ts5 < 2; ++ts5) for (uint8_t ts6 = 0; ts6 < 2; ++ts6) for (uint8_t ts7 = 0; ts7 < 2; ++ts7) - for (int ms_class = 0; ms_class < 30; ++ms_class) + for (int ms_class = 0; ms_class < mslot_class_max(); ++ms_class) test_alloc_mass(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class); } static void test_alloc_b() { - for (int i = 0; i < 30; ++i) + for (int i = 0; i < mslot_class_max(); ++i) test_alloc_b_for_ms(i); test_all_alloc_b(); @@ -690,7 +691,7 @@ trx->pdch[7].enable(); for (i = 0; i < ARRAY_SIZE(mode_seq); i += 1) { - counter1 = alloc_many_tbfs(&the_bts, 1, 29, mode_seq[i]); + counter1 = alloc_many_tbfs(&the_bts, 1, mslot_class_max(), mode_seq[i]); fprintf(stderr, " Allocated %d TBFs (previously %d)\n", counter1, counter2); @@ -730,9 +731,9 @@ test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B"); test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 29, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 35, "dynamic"); test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); @@ -808,7 +809,7 @@ test_alloc_b(); test_successive_allocations(); test_many_connections(alloc_algorithm_a, 160, "A"); - test_many_connections(alloc_algorithm_b, 32, "B"); + test_many_connections(alloc_algorithm_b, 29, "B"); test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err index a74c42b..2e87c04 100644 --- a/tests/alloc/AllocTest.err +++ b/tests/alloc/AllocTest.err @@ -8,6 +8,518 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) - Failed to allocate a TS, no USF available +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. - Failed to allocate a TS, no USF available No TFI available. No TFI available. @@ -18,15 +530,8 @@ No TFI available. No TFI available. - Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. +Multislot class 30 not applicable. +Multislot class 30 not applicable. - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available No TFI available. @@ -561,130 +1066,15 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) Allocated 160 TBFs (previously 160) -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously -1) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously -1) No USF available - Allocated 24 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. + Allocated 24 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. No TFI available. No TFI available. No TFI available. @@ -706,9 +1096,9 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 97 TBFs (previously -1) + Allocated 99 TBFs (previously -1) - Failed to allocate a TS, no USF available - Allocated 24 TBFs (previously 97) + Allocated 24 TBFs (previously 99) No TFI available. No TFI available. No TFI available. @@ -729,7 +1119,7 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 160 TBFs (previously 97) + Allocated 160 TBFs (previously 99) No TFI available. No TFI available. No TFI available. diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index a46bedb..a63f933 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -938,6 +938,10 @@ PDCH[4] is used for DL PDCH[3] is control_ts for DL PDCH[3] is first common for DL +Going to test multislot assignment MS_CLASS=30 +Testing UL then DL assignment. +Going to test multislot assignment MS_CLASS=31 +Testing UL then DL assignment. Mass test: TS0(xxxxxxxO)TS7 MS_Class=0 Mass test: TS0(xxxxxxxO)TS7 MS_Class=1 Mass test: TS0(xxxxxxxO)TS7 MS_Class=2 @@ -968,6 +972,8 @@ Mass test: TS0(xxxxxxxO)TS7 MS_Class=27 Mass test: TS0(xxxxxxxO)TS7 MS_Class=28 Mass test: TS0(xxxxxxxO)TS7 MS_Class=29 +Mass test: TS0(xxxxxxxO)TS7 MS_Class=30 +Mass test: TS0(xxxxxxxO)TS7 MS_Class=31 Mass test: TS0(xxxxxxOx)TS7 MS_Class=0 Mass test: TS0(xxxxxxOx)TS7 MS_Class=1 Mass test: TS0(xxxxxxOx)TS7 MS_Class=2 @@ -998,6 +1004,8 @@ Mass test: TS0(xxxxxxOx)TS7 MS_Class=27 Mass test: TS0(xxxxxxOx)TS7 MS_Class=28 Mass test: TS0(xxxxxxOx)TS7 MS_Class=29 +Mass test: TS0(xxxxxxOx)TS7 MS_Class=30 +Mass test: TS0(xxxxxxOx)TS7 MS_Class=31 Mass test: TS0(xxxxxxOO)TS7 MS_Class=0 Mass test: TS0(xxxxxxOO)TS7 MS_Class=1 Mass test: TS0(xxxxxxOO)TS7 MS_Class=2 @@ -1028,6 +1036,8 @@ Mass test: TS0(xxxxxxOO)TS7 MS_Class=27 Mass test: TS0(xxxxxxOO)TS7 MS_Class=28 Mass test: TS0(xxxxxxOO)TS7 MS_Class=29 +Mass test: TS0(xxxxxxOO)TS7 MS_Class=30 +Mass test: TS0(xxxxxxOO)TS7 MS_Class=31 Mass test: TS0(xxxxxOxx)TS7 MS_Class=0 Mass test: TS0(xxxxxOxx)TS7 MS_Class=1 Mass test: TS0(xxxxxOxx)TS7 MS_Class=2 @@ -1058,6 +1068,8 @@ Mass test: TS0(xxxxxOxx)TS7 MS_Class=27 Mass test: TS0(xxxxxOxx)TS7 MS_Class=28 Mass test: TS0(xxxxxOxx)TS7 MS_Class=29 +Mass test: TS0(xxxxxOxx)TS7 MS_Class=30 +Mass test: TS0(xxxxxOxx)TS7 MS_Class=31 Mass test: TS0(xxxxxOxO)TS7 MS_Class=0 Mass test: TS0(xxxxxOxO)TS7 MS_Class=1 Mass test: TS0(xxxxxOxO)TS7 MS_Class=2 @@ -1088,6 +1100,8 @@ Mass test: TS0(xxxxxOxO)TS7 MS_Class=27 Mass test: TS0(xxxxxOxO)TS7 MS_Class=28 Mass test: TS0(xxxxxOxO)TS7 MS_Class=29 +Mass test: TS0(xxxxxOxO)TS7 MS_Class=30 +Mass test: TS0(xxxxxOxO)TS7 MS_Class=31 Mass test: TS0(xxxxxOOx)TS7 MS_Class=0 Mass test: TS0(xxxxxOOx)TS7 MS_Class=1 Mass test: TS0(xxxxxOOx)TS7 MS_Class=2 @@ -1118,6 +1132,8 @@ Mass test: TS0(xxxxxOOx)TS7 MS_Class=27 Mass test: TS0(xxxxxOOx)TS7 MS_Class=28 Mass test: TS0(xxxxxOOx)TS7 MS_Class=29 +Mass test: TS0(xxxxxOOx)TS7 MS_Class=30 +Mass test: TS0(xxxxxOOx)TS7 MS_Class=31 Mass test: TS0(xxxxxOOO)TS7 MS_Class=0 Mass test: TS0(xxxxxOOO)TS7 MS_Class=1 Mass test: TS0(xxxxxOOO)TS7 MS_Class=2 @@ -1148,6 +1164,8 @@ Mass test: TS0(xxxxxOOO)TS7 MS_Class=27 Mass test: TS0(xxxxxOOO)TS7 MS_Class=28 Mass test: TS0(xxxxxOOO)TS7 MS_Class=29 +Mass test: TS0(xxxxxOOO)TS7 MS_Class=30 +Mass test: TS0(xxxxxOOO)TS7 MS_Class=31 Mass test: TS0(xxxxOxxx)TS7 MS_Class=0 Mass test: TS0(xxxxOxxx)TS7 MS_Class=1 Mass test: TS0(xxxxOxxx)TS7 MS_Class=2 @@ -1178,6 +1196,8 @@ Mass test: TS0(xxxxOxxx)TS7 MS_Class=27 Mass test: TS0(xxxxOxxx)TS7 MS_Class=28 Mass test: TS0(xxxxOxxx)TS7 MS_Class=29 +Mass test: TS0(xxxxOxxx)TS7 MS_Class=30 +Mass test: TS0(xxxxOxxx)TS7 MS_Class=31 Mass test: TS0(xxxxOxxO)TS7 MS_Class=0 Mass test: TS0(xxxxOxxO)TS7 MS_Class=1 Mass test: TS0(xxxxOxxO)TS7 MS_Class=2 @@ -1208,6 +1228,8 @@ Mass test: TS0(xxxxOxxO)TS7 MS_Class=27 Mass test: TS0(xxxxOxxO)TS7 MS_Class=28 Mass test: TS0(xxxxOxxO)TS7 MS_Class=29 +Mass test: TS0(xxxxOxxO)TS7 MS_Class=30 +Mass test: TS0(xxxxOxxO)TS7 MS_Class=31 Mass test: TS0(xxxxOxOx)TS7 MS_Class=0 Mass test: TS0(xxxxOxOx)TS7 MS_Class=1 Mass test: TS0(xxxxOxOx)TS7 MS_Class=2 @@ -1238,6 +1260,8 @@ Mass test: TS0(xxxxOxOx)TS7 MS_Class=27 Mass test: TS0(xxxxOxOx)TS7 MS_Class=28 Mass test: TS0(xxxxOxOx)TS7 MS_Class=29 +Mass test: TS0(xxxxOxOx)TS7 MS_Class=30 +Mass test: TS0(xxxxOxOx)TS7 MS_Class=31 Mass test: TS0(xxxxOxOO)TS7 MS_Class=0 Mass test: TS0(xxxxOxOO)TS7 MS_Class=1 Mass test: TS0(xxxxOxOO)TS7 MS_Class=2 @@ -1268,6 +1292,8 @@ Mass test: TS0(xxxxOxOO)TS7 MS_Class=27 Mass test: TS0(xxxxOxOO)TS7 MS_Class=28 Mass test: TS0(xxxxOxOO)TS7 MS_Class=29 +Mass test: TS0(xxxxOxOO)TS7 MS_Class=30 +Mass test: TS0(xxxxOxOO)TS7 MS_Class=31 Mass test: TS0(xxxxOOxx)TS7 MS_Class=0 Mass test: TS0(xxxxOOxx)TS7 MS_Class=1 Mass test: TS0(xxxxOOxx)TS7 MS_Class=2 @@ -1298,6 +1324,8 @@ Mass test: TS0(xxxxOOxx)TS7 MS_Class=27 Mass test: TS0(xxxxOOxx)TS7 MS_Class=28 Mass test: TS0(xxxxOOxx)TS7 MS_Class=29 +Mass test: TS0(xxxxOOxx)TS7 MS_Class=30 +Mass test: TS0(xxxxOOxx)TS7 MS_Class=31 Mass test: TS0(xxxxOOxO)TS7 MS_Class=0 Mass test: TS0(xxxxOOxO)TS7 MS_Class=1 Mass test: TS0(xxxxOOxO)TS7 MS_Class=2 @@ -1328,6 +1356,8 @@ Mass test: TS0(xxxxOOxO)TS7 MS_Class=27 Mass test: TS0(xxxxOOxO)TS7 MS_Class=28 Mass test: TS0(xxxxOOxO)TS7 MS_Class=29 +Mass test: TS0(xxxxOOxO)TS7 MS_Class=30 +Mass test: TS0(xxxxOOxO)TS7 MS_Class=31 Mass test: TS0(xxxxOOOx)TS7 MS_Class=0 Mass test: TS0(xxxxOOOx)TS7 MS_Class=1 Mass test: TS0(xxxxOOOx)TS7 MS_Class=2 @@ -1358,6 +1388,8 @@ Mass test: TS0(xxxxOOOx)TS7 MS_Class=27 Mass test: TS0(xxxxOOOx)TS7 MS_Class=28 Mass test: TS0(xxxxOOOx)TS7 MS_Class=29 +Mass test: TS0(xxxxOOOx)TS7 MS_Class=30 +Mass test: TS0(xxxxOOOx)TS7 MS_Class=31 Mass test: TS0(xxxxOOOO)TS7 MS_Class=0 Mass test: TS0(xxxxOOOO)TS7 MS_Class=1 Mass test: TS0(xxxxOOOO)TS7 MS_Class=2 @@ -1388,6 +1420,8 @@ Mass test: TS0(xxxxOOOO)TS7 MS_Class=27 Mass test: TS0(xxxxOOOO)TS7 MS_Class=28 Mass test: TS0(xxxxOOOO)TS7 MS_Class=29 +Mass test: TS0(xxxxOOOO)TS7 MS_Class=30 +Mass test: TS0(xxxxOOOO)TS7 MS_Class=31 Mass test: TS0(xxxOxxxx)TS7 MS_Class=0 Mass test: TS0(xxxOxxxx)TS7 MS_Class=1 Mass test: TS0(xxxOxxxx)TS7 MS_Class=2 @@ -1418,6 +1452,8 @@ Mass test: TS0(xxxOxxxx)TS7 MS_Class=27 Mass test: TS0(xxxOxxxx)TS7 MS_Class=28 Mass test: TS0(xxxOxxxx)TS7 MS_Class=29 +Mass test: TS0(xxxOxxxx)TS7 MS_Class=30 +Mass test: TS0(xxxOxxxx)TS7 MS_Class=31 Mass test: TS0(xxxOxxxO)TS7 MS_Class=0 Mass test: TS0(xxxOxxxO)TS7 MS_Class=1 Mass test: TS0(xxxOxxxO)TS7 MS_Class=2 @@ -1448,6 +1484,8 @@ Mass test: TS0(xxxOxxxO)TS7 MS_Class=27 Mass test: TS0(xxxOxxxO)TS7 MS_Class=28 Mass test: TS0(xxxOxxxO)TS7 MS_Class=29 +Mass test: TS0(xxxOxxxO)TS7 MS_Class=30 +Mass test: TS0(xxxOxxxO)TS7 MS_Class=31 Mass test: TS0(xxxOxxOx)TS7 MS_Class=0 Mass test: TS0(xxxOxxOx)TS7 MS_Class=1 Mass test: TS0(xxxOxxOx)TS7 MS_Class=2 @@ -1478,6 +1516,8 @@ Mass test: TS0(xxxOxxOx)TS7 MS_Class=27 Mass test: TS0(xxxOxxOx)TS7 MS_Class=28 Mass test: TS0(xxxOxxOx)TS7 MS_Class=29 +Mass test: TS0(xxxOxxOx)TS7 MS_Class=30 +Mass test: TS0(xxxOxxOx)TS7 MS_Class=31 Mass test: TS0(xxxOxxOO)TS7 MS_Class=0 Mass test: TS0(xxxOxxOO)TS7 MS_Class=1 Mass test: TS0(xxxOxxOO)TS7 MS_Class=2 @@ -1508,6 +1548,8 @@ Mass test: TS0(xxxOxxOO)TS7 MS_Class=27 Mass test: TS0(xxxOxxOO)TS7 MS_Class=28 Mass test: TS0(xxxOxxOO)TS7 MS_Class=29 +Mass test: TS0(xxxOxxOO)TS7 MS_Class=30 +Mass test: TS0(xxxOxxOO)TS7 MS_Class=31 Mass test: TS0(xxxOxOxx)TS7 MS_Class=0 Mass test: TS0(xxxOxOxx)TS7 MS_Class=1 Mass test: TS0(xxxOxOxx)TS7 MS_Class=2 @@ -1538,6 +1580,8 @@ Mass test: TS0(xxxOxOxx)TS7 MS_Class=27 Mass test: TS0(xxxOxOxx)TS7 MS_Class=28 Mass test: TS0(xxxOxOxx)TS7 MS_Class=29 +Mass test: TS0(xxxOxOxx)TS7 MS_Class=30 +Mass test: TS0(xxxOxOxx)TS7 MS_Class=31 Mass test: TS0(xxxOxOxO)TS7 MS_Class=0 Mass test: TS0(xxxOxOxO)TS7 MS_Class=1 Mass test: TS0(xxxOxOxO)TS7 MS_Class=2 @@ -1568,6 +1612,8 @@ Mass test: TS0(xxxOxOxO)TS7 MS_Class=27 Mass test: TS0(xxxOxOxO)TS7 MS_Class=28 Mass test: TS0(xxxOxOxO)TS7 MS_Class=29 +Mass test: TS0(xxxOxOxO)TS7 MS_Class=30 +Mass test: TS0(xxxOxOxO)TS7 MS_Class=31 Mass test: TS0(xxxOxOOx)TS7 MS_Class=0 Mass test: TS0(xxxOxOOx)TS7 MS_Class=1 Mass test: TS0(xxxOxOOx)TS7 MS_Class=2 @@ -1598,6 +1644,8 @@ Mass test: TS0(xxxOxOOx)TS7 MS_Class=27 Mass test: TS0(xxxOxOOx)TS7 MS_Class=28 Mass test: TS0(xxxOxOOx)TS7 MS_Class=29 +Mass test: TS0(xxxOxOOx)TS7 MS_Class=30 +Mass test: TS0(xxxOxOOx)TS7 MS_Class=31 Mass test: TS0(xxxOxOOO)TS7 MS_Class=0 Mass test: TS0(xxxOxOOO)TS7 MS_Class=1 Mass test: TS0(xxxOxOOO)TS7 MS_Class=2 @@ -1628,6 +1676,8 @@ Mass test: TS0(xxxOxOOO)TS7 MS_Class=27 Mass test: TS0(xxxOxOOO)TS7 MS_Class=28 Mass test: TS0(xxxOxOOO)TS7 MS_Class=29 +Mass test: TS0(xxxOxOOO)TS7 MS_Class=30 +Mass test: TS0(xxxOxOOO)TS7 MS_Class=31 Mass test: TS0(xxxOOxxx)TS7 MS_Class=0 Mass test: TS0(xxxOOxxx)TS7 MS_Class=1 Mass test: TS0(xxxOOxxx)TS7 MS_Class=2 @@ -1658,6 +1708,8 @@ Mass test: TS0(xxxOOxxx)TS7 MS_Class=27 Mass test: TS0(xxxOOxxx)TS7 MS_Class=28 Mass test: TS0(xxxOOxxx)TS7 MS_Class=29 +Mass test: TS0(xxxOOxxx)TS7 MS_Class=30 +Mass test: TS0(xxxOOxxx)TS7 MS_Class=31 Mass test: TS0(xxxOOxxO)TS7 MS_Class=0 Mass test: TS0(xxxOOxxO)TS7 MS_Class=1 Mass test: TS0(xxxOOxxO)TS7 MS_Class=2 @@ -1688,6 +1740,8 @@ Mass test: TS0(xxxOOxxO)TS7 MS_Class=27 Mass test: TS0(xxxOOxxO)TS7 MS_Class=28 Mass test: TS0(xxxOOxxO)TS7 MS_Class=29 +Mass test: TS0(xxxOOxxO)TS7 MS_Class=30 +Mass test: TS0(xxxOOxxO)TS7 MS_Class=31 Mass test: TS0(xxxOOxOx)TS7 MS_Class=0 Mass test: TS0(xxxOOxOx)TS7 MS_Class=1 Mass test: TS0(xxxOOxOx)TS7 MS_Class=2 @@ -1718,6 +1772,8 @@ Mass test: TS0(xxxOOxOx)TS7 MS_Class=27 Mass test: TS0(xxxOOxOx)TS7 MS_Class=28 Mass test: TS0(xxxOOxOx)TS7 MS_Class=29 +Mass test: TS0(xxxOOxOx)TS7 MS_Class=30 +Mass test: TS0(xxxOOxOx)TS7 MS_Class=31 Mass test: TS0(xxxOOxOO)TS7 MS_Class=0 Mass test: TS0(xxxOOxOO)TS7 MS_Class=1 Mass test: TS0(xxxOOxOO)TS7 MS_Class=2 @@ -1748,6 +1804,8 @@ Mass test: TS0(xxxOOxOO)TS7 MS_Class=27 Mass test: TS0(xxxOOxOO)TS7 MS_Class=28 Mass test: TS0(xxxOOxOO)TS7 MS_Class=29 +Mass test: TS0(xxxOOxOO)TS7 MS_Class=30 +Mass test: TS0(xxxOOxOO)TS7 MS_Class=31 Mass test: TS0(xxxOOOxx)TS7 MS_Class=0 Mass test: TS0(xxxOOOxx)TS7 MS_Class=1 Mass test: TS0(xxxOOOxx)TS7 MS_Class=2 @@ -1778,6 +1836,8 @@ Mass test: TS0(xxxOOOxx)TS7 MS_Class=27 Mass test: TS0(xxxOOOxx)TS7 MS_Class=28 Mass test: TS0(xxxOOOxx)TS7 MS_Class=29 +Mass test: TS0(xxxOOOxx)TS7 MS_Class=30 +Mass test: TS0(xxxOOOxx)TS7 MS_Class=31 Mass test: TS0(xxxOOOxO)TS7 MS_Class=0 Mass test: TS0(xxxOOOxO)TS7 MS_Class=1 Mass test: TS0(xxxOOOxO)TS7 MS_Class=2 @@ -1808,6 +1868,8 @@ Mass test: TS0(xxxOOOxO)TS7 MS_Class=27 Mass test: TS0(xxxOOOxO)TS7 MS_Class=28 Mass test: TS0(xxxOOOxO)TS7 MS_Class=29 +Mass test: TS0(xxxOOOxO)TS7 MS_Class=30 +Mass test: TS0(xxxOOOxO)TS7 MS_Class=31 Mass test: TS0(xxxOOOOx)TS7 MS_Class=0 Mass test: TS0(xxxOOOOx)TS7 MS_Class=1 Mass test: TS0(xxxOOOOx)TS7 MS_Class=2 @@ -1838,6 +1900,8 @@ Mass test: TS0(xxxOOOOx)TS7 MS_Class=27 Mass test: TS0(xxxOOOOx)TS7 MS_Class=28 Mass test: TS0(xxxOOOOx)TS7 MS_Class=29 +Mass test: TS0(xxxOOOOx)TS7 MS_Class=30 +Mass test: TS0(xxxOOOOx)TS7 MS_Class=31 Mass test: TS0(xxxOOOOO)TS7 MS_Class=0 Mass test: TS0(xxxOOOOO)TS7 MS_Class=1 Mass test: TS0(xxxOOOOO)TS7 MS_Class=2 @@ -1868,6 +1932,8 @@ Mass test: TS0(xxxOOOOO)TS7 MS_Class=27 Mass test: TS0(xxxOOOOO)TS7 MS_Class=28 Mass test: TS0(xxxOOOOO)TS7 MS_Class=29 +Mass test: TS0(xxxOOOOO)TS7 MS_Class=30 +Mass test: TS0(xxxOOOOO)TS7 MS_Class=31 Mass test: TS0(xxOxxxxx)TS7 MS_Class=0 Mass test: TS0(xxOxxxxx)TS7 MS_Class=1 Mass test: TS0(xxOxxxxx)TS7 MS_Class=2 @@ -1898,6 +1964,8 @@ Mass test: TS0(xxOxxxxx)TS7 MS_Class=27 Mass test: TS0(xxOxxxxx)TS7 MS_Class=28 Mass test: TS0(xxOxxxxx)TS7 MS_Class=29 +Mass test: TS0(xxOxxxxx)TS7 MS_Class=30 +Mass test: TS0(xxOxxxxx)TS7 MS_Class=31 Mass test: TS0(xxOxxxxO)TS7 MS_Class=0 Mass test: TS0(xxOxxxxO)TS7 MS_Class=1 Mass test: TS0(xxOxxxxO)TS7 MS_Class=2 @@ -1928,6 +1996,8 @@ Mass test: TS0(xxOxxxxO)TS7 MS_Class=27 Mass test: TS0(xxOxxxxO)TS7 MS_Class=28 Mass test: TS0(xxOxxxxO)TS7 MS_Class=29 +Mass test: TS0(xxOxxxxO)TS7 MS_Class=30 +Mass test: TS0(xxOxxxxO)TS7 MS_Class=31 Mass test: TS0(xxOxxxOx)TS7 MS_Class=0 Mass test: TS0(xxOxxxOx)TS7 MS_Class=1 Mass test: TS0(xxOxxxOx)TS7 MS_Class=2 @@ -1958,6 +2028,8 @@ Mass test: TS0(xxOxxxOx)TS7 MS_Class=27 Mass test: TS0(xxOxxxOx)TS7 MS_Class=28 Mass test: TS0(xxOxxxOx)TS7 MS_Class=29 +Mass test: TS0(xxOxxxOx)TS7 MS_Class=30 +Mass test: TS0(xxOxxxOx)TS7 MS_Class=31 Mass test: TS0(xxOxxxOO)TS7 MS_Class=0 Mass test: TS0(xxOxxxOO)TS7 MS_Class=1 Mass test: TS0(xxOxxxOO)TS7 MS_Class=2 @@ -1988,6 +2060,8 @@ Mass test: TS0(xxOxxxOO)TS7 MS_Class=27 Mass test: TS0(xxOxxxOO)TS7 MS_Class=28 Mass test: TS0(xxOxxxOO)TS7 MS_Class=29 +Mass test: TS0(xxOxxxOO)TS7 MS_Class=30 +Mass test: TS0(xxOxxxOO)TS7 MS_Class=31 Mass test: TS0(xxOxxOxx)TS7 MS_Class=0 Mass test: TS0(xxOxxOxx)TS7 MS_Class=1 Mass test: TS0(xxOxxOxx)TS7 MS_Class=2 @@ -2018,6 +2092,8 @@ Mass test: TS0(xxOxxOxx)TS7 MS_Class=27 Mass test: TS0(xxOxxOxx)TS7 MS_Class=28 Mass test: TS0(xxOxxOxx)TS7 MS_Class=29 +Mass test: TS0(xxOxxOxx)TS7 MS_Class=30 +Mass test: TS0(xxOxxOxx)TS7 MS_Class=31 Mass test: TS0(xxOxxOxO)TS7 MS_Class=0 Mass test: TS0(xxOxxOxO)TS7 MS_Class=1 Mass test: TS0(xxOxxOxO)TS7 MS_Class=2 @@ -2048,6 +2124,8 @@ Mass test: TS0(xxOxxOxO)TS7 MS_Class=27 Mass test: TS0(xxOxxOxO)TS7 MS_Class=28 Mass test: TS0(xxOxxOxO)TS7 MS_Class=29 +Mass test: TS0(xxOxxOxO)TS7 MS_Class=30 +Mass test: TS0(xxOxxOxO)TS7 MS_Class=31 Mass test: TS0(xxOxxOOx)TS7 MS_Class=0 Mass test: TS0(xxOxxOOx)TS7 MS_Class=1 Mass test: TS0(xxOxxOOx)TS7 MS_Class=2 @@ -2078,6 +2156,8 @@ Mass test: TS0(xxOxxOOx)TS7 MS_Class=27 Mass test: TS0(xxOxxOOx)TS7 MS_Class=28 Mass test: TS0(xxOxxOOx)TS7 MS_Class=29 +Mass test: TS0(xxOxxOOx)TS7 MS_Class=30 +Mass test: TS0(xxOxxOOx)TS7 MS_Class=31 Mass test: TS0(xxOxxOOO)TS7 MS_Class=0 Mass test: TS0(xxOxxOOO)TS7 MS_Class=1 Mass test: TS0(xxOxxOOO)TS7 MS_Class=2 @@ -2108,6 +2188,8 @@ Mass test: TS0(xxOxxOOO)TS7 MS_Class=27 Mass test: TS0(xxOxxOOO)TS7 MS_Class=28 Mass test: TS0(xxOxxOOO)TS7 MS_Class=29 +Mass test: TS0(xxOxxOOO)TS7 MS_Class=30 +Mass test: TS0(xxOxxOOO)TS7 MS_Class=31 Mass test: TS0(xxOxOxxx)TS7 MS_Class=0 Mass test: TS0(xxOxOxxx)TS7 MS_Class=1 Mass test: TS0(xxOxOxxx)TS7 MS_Class=2 @@ -2138,6 +2220,8 @@ Mass test: TS0(xxOxOxxx)TS7 MS_Class=27 Mass test: TS0(xxOxOxxx)TS7 MS_Class=28 Mass test: TS0(xxOxOxxx)TS7 MS_Class=29 +Mass test: TS0(xxOxOxxx)TS7 MS_Class=30 +Mass test: TS0(xxOxOxxx)TS7 MS_Class=31 Mass test: TS0(xxOxOxxO)TS7 MS_Class=0 Mass test: TS0(xxOxOxxO)TS7 MS_Class=1 Mass test: TS0(xxOxOxxO)TS7 MS_Class=2 @@ -2168,6 +2252,8 @@ Mass test: TS0(xxOxOxxO)TS7 MS_Class=27 Mass test: TS0(xxOxOxxO)TS7 MS_Class=28 Mass test: TS0(xxOxOxxO)TS7 MS_Class=29 +Mass test: TS0(xxOxOxxO)TS7 MS_Class=30 +Mass test: TS0(xxOxOxxO)TS7 MS_Class=31 Mass test: TS0(xxOxOxOx)TS7 MS_Class=0 Mass test: TS0(xxOxOxOx)TS7 MS_Class=1 Mass test: TS0(xxOxOxOx)TS7 MS_Class=2 @@ -2198,6 +2284,8 @@ Mass test: TS0(xxOxOxOx)TS7 MS_Class=27 Mass test: TS0(xxOxOxOx)TS7 MS_Class=28 Mass test: TS0(xxOxOxOx)TS7 MS_Class=29 +Mass test: TS0(xxOxOxOx)TS7 MS_Class=30 +Mass test: TS0(xxOxOxOx)TS7 MS_Class=31 Mass test: TS0(xxOxOxOO)TS7 MS_Class=0 Mass test: TS0(xxOxOxOO)TS7 MS_Class=1 Mass test: TS0(xxOxOxOO)TS7 MS_Class=2 @@ -2228,6 +2316,8 @@ Mass test: TS0(xxOxOxOO)TS7 MS_Class=27 Mass test: TS0(xxOxOxOO)TS7 MS_Class=28 Mass test: TS0(xxOxOxOO)TS7 MS_Class=29 +Mass test: TS0(xxOxOxOO)TS7 MS_Class=30 +Mass test: TS0(xxOxOxOO)TS7 MS_Class=31 Mass test: TS0(xxOxOOxx)TS7 MS_Class=0 Mass test: TS0(xxOxOOxx)TS7 MS_Class=1 Mass test: TS0(xxOxOOxx)TS7 MS_Class=2 @@ -2258,6 +2348,8 @@ Mass test: TS0(xxOxOOxx)TS7 MS_Class=27 Mass test: TS0(xxOxOOxx)TS7 MS_Class=28 Mass test: TS0(xxOxOOxx)TS7 MS_Class=29 +Mass test: TS0(xxOxOOxx)TS7 MS_Class=30 +Mass test: TS0(xxOxOOxx)TS7 MS_Class=31 Mass test: TS0(xxOxOOxO)TS7 MS_Class=0 Mass test: TS0(xxOxOOxO)TS7 MS_Class=1 Mass test: TS0(xxOxOOxO)TS7 MS_Class=2 @@ -2288,6 +2380,8 @@ Mass test: TS0(xxOxOOxO)TS7 MS_Class=27 Mass test: TS0(xxOxOOxO)TS7 MS_Class=28 Mass test: TS0(xxOxOOxO)TS7 MS_Class=29 +Mass test: TS0(xxOxOOxO)TS7 MS_Class=30 +Mass test: TS0(xxOxOOxO)TS7 MS_Class=31 Mass test: TS0(xxOxOOOx)TS7 MS_Class=0 Mass test: TS0(xxOxOOOx)TS7 MS_Class=1 Mass test: TS0(xxOxOOOx)TS7 MS_Class=2 @@ -2318,6 +2412,8 @@ Mass test: TS0(xxOxOOOx)TS7 MS_Class=27 Mass test: TS0(xxOxOOOx)TS7 MS_Class=28 Mass test: TS0(xxOxOOOx)TS7 MS_Class=29 +Mass test: TS0(xxOxOOOx)TS7 MS_Class=30 +Mass test: TS0(xxOxOOOx)TS7 MS_Class=31 Mass test: TS0(xxOxOOOO)TS7 MS_Class=0 Mass test: TS0(xxOxOOOO)TS7 MS_Class=1 Mass test: TS0(xxOxOOOO)TS7 MS_Class=2 @@ -2348,6 +2444,8 @@ Mass test: TS0(xxOxOOOO)TS7 MS_Class=27 Mass test: TS0(xxOxOOOO)TS7 MS_Class=28 Mass test: TS0(xxOxOOOO)TS7 MS_Class=29 +Mass test: TS0(xxOxOOOO)TS7 MS_Class=30 +Mass test: TS0(xxOxOOOO)TS7 MS_Class=31 Mass test: TS0(xxOOxxxx)TS7 MS_Class=0 Mass test: TS0(xxOOxxxx)TS7 MS_Class=1 Mass test: TS0(xxOOxxxx)TS7 MS_Class=2 @@ -2378,6 +2476,8 @@ Mass test: TS0(xxOOxxxx)TS7 MS_Class=27 Mass test: TS0(xxOOxxxx)TS7 MS_Class=28 Mass test: TS0(xxOOxxxx)TS7 MS_Class=29 +Mass test: TS0(xxOOxxxx)TS7 MS_Class=30 +Mass test: TS0(xxOOxxxx)TS7 MS_Class=31 Mass test: TS0(xxOOxxxO)TS7 MS_Class=0 Mass test: TS0(xxOOxxxO)TS7 MS_Class=1 Mass test: TS0(xxOOxxxO)TS7 MS_Class=2 @@ -2408,6 +2508,8 @@ Mass test: TS0(xxOOxxxO)TS7 MS_Class=27 Mass test: TS0(xxOOxxxO)TS7 MS_Class=28 Mass test: TS0(xxOOxxxO)TS7 MS_Class=29 +Mass test: TS0(xxOOxxxO)TS7 MS_Class=30 +Mass test: TS0(xxOOxxxO)TS7 MS_Class=31 Mass test: TS0(xxOOxxOx)TS7 MS_Class=0 Mass test: TS0(xxOOxxOx)TS7 MS_Class=1 Mass test: TS0(xxOOxxOx)TS7 MS_Class=2 @@ -2438,6 +2540,8 @@ Mass test: TS0(xxOOxxOx)TS7 MS_Class=27 Mass test: TS0(xxOOxxOx)TS7 MS_Class=28 Mass test: TS0(xxOOxxOx)TS7 MS_Class=29 +Mass test: TS0(xxOOxxOx)TS7 MS_Class=30 +Mass test: TS0(xxOOxxOx)TS7 MS_Class=31 Mass test: TS0(xxOOxxOO)TS7 MS_Class=0 Mass test: TS0(xxOOxxOO)TS7 MS_Class=1 Mass test: TS0(xxOOxxOO)TS7 MS_Class=2 @@ -2468,6 +2572,8 @@ Mass test: TS0(xxOOxxOO)TS7 MS_Class=27 Mass test: TS0(xxOOxxOO)TS7 MS_Class=28 Mass test: TS0(xxOOxxOO)TS7 MS_Class=29 +Mass test: TS0(xxOOxxOO)TS7 MS_Class=30 +Mass test: TS0(xxOOxxOO)TS7 MS_Class=31 Mass test: TS0(xxOOxOxx)TS7 MS_Class=0 Mass test: TS0(xxOOxOxx)TS7 MS_Class=1 Mass test: TS0(xxOOxOxx)TS7 MS_Class=2 @@ -2498,6 +2604,8 @@ Mass test: TS0(xxOOxOxx)TS7 MS_Class=27 Mass test: TS0(xxOOxOxx)TS7 MS_Class=28 Mass test: TS0(xxOOxOxx)TS7 MS_Class=29 +Mass test: TS0(xxOOxOxx)TS7 MS_Class=30 +Mass test: TS0(xxOOxOxx)TS7 MS_Class=31 Mass test: TS0(xxOOxOxO)TS7 MS_Class=0 Mass test: TS0(xxOOxOxO)TS7 MS_Class=1 Mass test: TS0(xxOOxOxO)TS7 MS_Class=2 @@ -2528,6 +2636,8 @@ Mass test: TS0(xxOOxOxO)TS7 MS_Class=27 Mass test: TS0(xxOOxOxO)TS7 MS_Class=28 Mass test: TS0(xxOOxOxO)TS7 MS_Class=29 +Mass test: TS0(xxOOxOxO)TS7 MS_Class=30 +Mass test: TS0(xxOOxOxO)TS7 MS_Class=31 Mass test: TS0(xxOOxOOx)TS7 MS_Class=0 Mass test: TS0(xxOOxOOx)TS7 MS_Class=1 Mass test: TS0(xxOOxOOx)TS7 MS_Class=2 @@ -2558,6 +2668,8 @@ Mass test: TS0(xxOOxOOx)TS7 MS_Class=27 Mass test: TS0(xxOOxOOx)TS7 MS_Class=28 Mass test: TS0(xxOOxOOx)TS7 MS_Class=29 +Mass test: TS0(xxOOxOOx)TS7 MS_Class=30 +Mass test: TS0(xxOOxOOx)TS7 MS_Class=31 Mass test: TS0(xxOOxOOO)TS7 MS_Class=0 Mass test: TS0(xxOOxOOO)TS7 MS_Class=1 Mass test: TS0(xxOOxOOO)TS7 MS_Class=2 @@ -2588,6 +2700,8 @@ Mass test: TS0(xxOOxOOO)TS7 MS_Class=27 Mass test: TS0(xxOOxOOO)TS7 MS_Class=28 Mass test: TS0(xxOOxOOO)TS7 MS_Class=29 +Mass test: TS0(xxOOxOOO)TS7 MS_Class=30 +Mass test: TS0(xxOOxOOO)TS7 MS_Class=31 Mass test: TS0(xxOOOxxx)TS7 MS_Class=0 Mass test: TS0(xxOOOxxx)TS7 MS_Class=1 Mass test: TS0(xxOOOxxx)TS7 MS_Class=2 @@ -2618,6 +2732,8 @@ Mass test: TS0(xxOOOxxx)TS7 MS_Class=27 Mass test: TS0(xxOOOxxx)TS7 MS_Class=28 Mass test: TS0(xxOOOxxx)TS7 MS_Class=29 +Mass test: TS0(xxOOOxxx)TS7 MS_Class=30 +Mass test: TS0(xxOOOxxx)TS7 MS_Class=31 Mass test: TS0(xxOOOxxO)TS7 MS_Class=0 Mass test: TS0(xxOOOxxO)TS7 MS_Class=1 Mass test: TS0(xxOOOxxO)TS7 MS_Class=2 @@ -2648,6 +2764,8 @@ Mass test: TS0(xxOOOxxO)TS7 MS_Class=27 Mass test: TS0(xxOOOxxO)TS7 MS_Class=28 Mass test: TS0(xxOOOxxO)TS7 MS_Class=29 +Mass test: TS0(xxOOOxxO)TS7 MS_Class=30 +Mass test: TS0(xxOOOxxO)TS7 MS_Class=31 Mass test: TS0(xxOOOxOx)TS7 MS_Class=0 Mass test: TS0(xxOOOxOx)TS7 MS_Class=1 Mass test: TS0(xxOOOxOx)TS7 MS_Class=2 @@ -2678,6 +2796,8 @@ Mass test: TS0(xxOOOxOx)TS7 MS_Class=27 Mass test: TS0(xxOOOxOx)TS7 MS_Class=28 Mass test: TS0(xxOOOxOx)TS7 MS_Class=29 +Mass test: TS0(xxOOOxOx)TS7 MS_Class=30 +Mass test: TS0(xxOOOxOx)TS7 MS_Class=31 Mass test: TS0(xxOOOxOO)TS7 MS_Class=0 Mass test: TS0(xxOOOxOO)TS7 MS_Class=1 Mass test: TS0(xxOOOxOO)TS7 MS_Class=2 @@ -2708,6 +2828,8 @@ Mass test: TS0(xxOOOxOO)TS7 MS_Class=27 Mass test: TS0(xxOOOxOO)TS7 MS_Class=28 Mass test: TS0(xxOOOxOO)TS7 MS_Class=29 +Mass test: TS0(xxOOOxOO)TS7 MS_Class=30 +Mass test: TS0(xxOOOxOO)TS7 MS_Class=31 Mass test: TS0(xxOOOOxx)TS7 MS_Class=0 Mass test: TS0(xxOOOOxx)TS7 MS_Class=1 Mass test: TS0(xxOOOOxx)TS7 MS_Class=2 @@ -2738,6 +2860,8 @@ Mass test: TS0(xxOOOOxx)TS7 MS_Class=27 Mass test: TS0(xxOOOOxx)TS7 MS_Class=28 Mass test: TS0(xxOOOOxx)TS7 MS_Class=29 +Mass test: TS0(xxOOOOxx)TS7 MS_Class=30 +Mass test: TS0(xxOOOOxx)TS7 MS_Class=31 Mass test: TS0(xxOOOOxO)TS7 MS_Class=0 Mass test: TS0(xxOOOOxO)TS7 MS_Class=1 Mass test: TS0(xxOOOOxO)TS7 MS_Class=2 @@ -2768,6 +2892,8 @@ Mass test: TS0(xxOOOOxO)TS7 MS_Class=27 Mass test: TS0(xxOOOOxO)TS7 MS_Class=28 Mass test: TS0(xxOOOOxO)TS7 MS_Class=29 +Mass test: TS0(xxOOOOxO)TS7 MS_Class=30 +Mass test: TS0(xxOOOOxO)TS7 MS_Class=31 Mass test: TS0(xxOOOOOx)TS7 MS_Class=0 Mass test: TS0(xxOOOOOx)TS7 MS_Class=1 Mass test: TS0(xxOOOOOx)TS7 MS_Class=2 @@ -2798,6 +2924,8 @@ Mass test: TS0(xxOOOOOx)TS7 MS_Class=27 Mass test: TS0(xxOOOOOx)TS7 MS_Class=28 Mass test: TS0(xxOOOOOx)TS7 MS_Class=29 +Mass test: TS0(xxOOOOOx)TS7 MS_Class=30 +Mass test: TS0(xxOOOOOx)TS7 MS_Class=31 Mass test: TS0(xxOOOOOO)TS7 MS_Class=0 Mass test: TS0(xxOOOOOO)TS7 MS_Class=1 Mass test: TS0(xxOOOOOO)TS7 MS_Class=2 @@ -2828,6 +2956,8 @@ Mass test: TS0(xxOOOOOO)TS7 MS_Class=27 Mass test: TS0(xxOOOOOO)TS7 MS_Class=28 Mass test: TS0(xxOOOOOO)TS7 MS_Class=29 +Mass test: TS0(xxOOOOOO)TS7 MS_Class=30 +Mass test: TS0(xxOOOOOO)TS7 MS_Class=31 Mass test: TS0(xOxxxxxx)TS7 MS_Class=0 Mass test: TS0(xOxxxxxx)TS7 MS_Class=1 Mass test: TS0(xOxxxxxx)TS7 MS_Class=2 @@ -2858,6 +2988,8 @@ Mass test: TS0(xOxxxxxx)TS7 MS_Class=27 Mass test: TS0(xOxxxxxx)TS7 MS_Class=28 Mass test: TS0(xOxxxxxx)TS7 MS_Class=29 +Mass test: TS0(xOxxxxxx)TS7 MS_Class=30 +Mass test: TS0(xOxxxxxx)TS7 MS_Class=31 Mass test: TS0(xOxxxxxO)TS7 MS_Class=0 Mass test: TS0(xOxxxxxO)TS7 MS_Class=1 Mass test: TS0(xOxxxxxO)TS7 MS_Class=2 @@ -2888,6 +3020,8 @@ Mass test: TS0(xOxxxxxO)TS7 MS_Class=27 Mass test: TS0(xOxxxxxO)TS7 MS_Class=28 Mass test: TS0(xOxxxxxO)TS7 MS_Class=29 +Mass test: TS0(xOxxxxxO)TS7 MS_Class=30 +Mass test: TS0(xOxxxxxO)TS7 MS_Class=31 Mass test: TS0(xOxxxxOx)TS7 MS_Class=0 Mass test: TS0(xOxxxxOx)TS7 MS_Class=1 Mass test: TS0(xOxxxxOx)TS7 MS_Class=2 @@ -2918,6 +3052,8 @@ Mass test: TS0(xOxxxxOx)TS7 MS_Class=27 Mass test: TS0(xOxxxxOx)TS7 MS_Class=28 Mass test: TS0(xOxxxxOx)TS7 MS_Class=29 +Mass test: TS0(xOxxxxOx)TS7 MS_Class=30 +Mass test: TS0(xOxxxxOx)TS7 MS_Class=31 Mass test: TS0(xOxxxxOO)TS7 MS_Class=0 Mass test: TS0(xOxxxxOO)TS7 MS_Class=1 Mass test: TS0(xOxxxxOO)TS7 MS_Class=2 @@ -2948,6 +3084,8 @@ Mass test: TS0(xOxxxxOO)TS7 MS_Class=27 Mass test: TS0(xOxxxxOO)TS7 MS_Class=28 Mass test: TS0(xOxxxxOO)TS7 MS_Class=29 +Mass test: TS0(xOxxxxOO)TS7 MS_Class=30 +Mass test: TS0(xOxxxxOO)TS7 MS_Class=31 Mass test: TS0(xOxxxOxx)TS7 MS_Class=0 Mass test: TS0(xOxxxOxx)TS7 MS_Class=1 Mass test: TS0(xOxxxOxx)TS7 MS_Class=2 @@ -2978,6 +3116,8 @@ Mass test: TS0(xOxxxOxx)TS7 MS_Class=27 Mass test: TS0(xOxxxOxx)TS7 MS_Class=28 Mass test: TS0(xOxxxOxx)TS7 MS_Class=29 +Mass test: TS0(xOxxxOxx)TS7 MS_Class=30 +Mass test: TS0(xOxxxOxx)TS7 MS_Class=31 Mass test: TS0(xOxxxOxO)TS7 MS_Class=0 Mass test: TS0(xOxxxOxO)TS7 MS_Class=1 Mass test: TS0(xOxxxOxO)TS7 MS_Class=2 @@ -3008,6 +3148,8 @@ Mass test: TS0(xOxxxOxO)TS7 MS_Class=27 Mass test: TS0(xOxxxOxO)TS7 MS_Class=28 Mass test: TS0(xOxxxOxO)TS7 MS_Class=29 +Mass test: TS0(xOxxxOxO)TS7 MS_Class=30 +Mass test: TS0(xOxxxOxO)TS7 MS_Class=31 Mass test: TS0(xOxxxOOx)TS7 MS_Class=0 Mass test: TS0(xOxxxOOx)TS7 MS_Class=1 Mass test: TS0(xOxxxOOx)TS7 MS_Class=2 @@ -3038,6 +3180,8 @@ Mass test: TS0(xOxxxOOx)TS7 MS_Class=27 Mass test: TS0(xOxxxOOx)TS7 MS_Class=28 Mass test: TS0(xOxxxOOx)TS7 MS_Class=29 +Mass test: TS0(xOxxxOOx)TS7 MS_Class=30 +Mass test: TS0(xOxxxOOx)TS7 MS_Class=31 Mass test: TS0(xOxxxOOO)TS7 MS_Class=0 Mass test: TS0(xOxxxOOO)TS7 MS_Class=1 Mass test: TS0(xOxxxOOO)TS7 MS_Class=2 @@ -3068,6 +3212,8 @@ Mass test: TS0(xOxxxOOO)TS7 MS_Class=27 Mass test: TS0(xOxxxOOO)TS7 MS_Class=28 Mass test: TS0(xOxxxOOO)TS7 MS_Class=29 +Mass test: TS0(xOxxxOOO)TS7 MS_Class=30 +Mass test: TS0(xOxxxOOO)TS7 MS_Class=31 Mass test: TS0(xOxxOxxx)TS7 MS_Class=0 Mass test: TS0(xOxxOxxx)TS7 MS_Class=1 Mass test: TS0(xOxxOxxx)TS7 MS_Class=2 @@ -3098,6 +3244,8 @@ Mass test: TS0(xOxxOxxx)TS7 MS_Class=27 Mass test: TS0(xOxxOxxx)TS7 MS_Class=28 Mass test: TS0(xOxxOxxx)TS7 MS_Class=29 +Mass test: TS0(xOxxOxxx)TS7 MS_Class=30 +Mass test: TS0(xOxxOxxx)TS7 MS_Class=31 Mass test: TS0(xOxxOxxO)TS7 MS_Class=0 Mass test: TS0(xOxxOxxO)TS7 MS_Class=1 Mass test: TS0(xOxxOxxO)TS7 MS_Class=2 @@ -3128,6 +3276,8 @@ Mass test: TS0(xOxxOxxO)TS7 MS_Class=27 Mass test: TS0(xOxxOxxO)TS7 MS_Class=28 Mass test: TS0(xOxxOxxO)TS7 MS_Class=29 +Mass test: TS0(xOxxOxxO)TS7 MS_Class=30 +Mass test: TS0(xOxxOxxO)TS7 MS_Class=31 Mass test: TS0(xOxxOxOx)TS7 MS_Class=0 Mass test: TS0(xOxxOxOx)TS7 MS_Class=1 Mass test: TS0(xOxxOxOx)TS7 MS_Class=2 @@ -3158,6 +3308,8 @@ Mass test: TS0(xOxxOxOx)TS7 MS_Class=27 Mass test: TS0(xOxxOxOx)TS7 MS_Class=28 Mass test: TS0(xOxxOxOx)TS7 MS_Class=29 +Mass test: TS0(xOxxOxOx)TS7 MS_Class=30 +Mass test: TS0(xOxxOxOx)TS7 MS_Class=31 Mass test: TS0(xOxxOxOO)TS7 MS_Class=0 Mass test: TS0(xOxxOxOO)TS7 MS_Class=1 Mass test: TS0(xOxxOxOO)TS7 MS_Class=2 @@ -3188,6 +3340,8 @@ Mass test: TS0(xOxxOxOO)TS7 MS_Class=27 Mass test: TS0(xOxxOxOO)TS7 MS_Class=28 Mass test: TS0(xOxxOxOO)TS7 MS_Class=29 +Mass test: TS0(xOxxOxOO)TS7 MS_Class=30 +Mass test: TS0(xOxxOxOO)TS7 MS_Class=31 Mass test: TS0(xOxxOOxx)TS7 MS_Class=0 Mass test: TS0(xOxxOOxx)TS7 MS_Class=1 Mass test: TS0(xOxxOOxx)TS7 MS_Class=2 @@ -3218,6 +3372,8 @@ Mass test: TS0(xOxxOOxx)TS7 MS_Class=27 Mass test: TS0(xOxxOOxx)TS7 MS_Class=28 Mass test: TS0(xOxxOOxx)TS7 MS_Class=29 +Mass test: TS0(xOxxOOxx)TS7 MS_Class=30 +Mass test: TS0(xOxxOOxx)TS7 MS_Class=31 Mass test: TS0(xOxxOOxO)TS7 MS_Class=0 Mass test: TS0(xOxxOOxO)TS7 MS_Class=1 Mass test: TS0(xOxxOOxO)TS7 MS_Class=2 @@ -3248,6 +3404,8 @@ Mass test: TS0(xOxxOOxO)TS7 MS_Class=27 Mass test: TS0(xOxxOOxO)TS7 MS_Class=28 Mass test: TS0(xOxxOOxO)TS7 MS_Class=29 +Mass test: TS0(xOxxOOxO)TS7 MS_Class=30 +Mass test: TS0(xOxxOOxO)TS7 MS_Class=31 Mass test: TS0(xOxxOOOx)TS7 MS_Class=0 Mass test: TS0(xOxxOOOx)TS7 MS_Class=1 Mass test: TS0(xOxxOOOx)TS7 MS_Class=2 @@ -3278,6 +3436,8 @@ Mass test: TS0(xOxxOOOx)TS7 MS_Class=27 Mass test: TS0(xOxxOOOx)TS7 MS_Class=28 Mass test: TS0(xOxxOOOx)TS7 MS_Class=29 +Mass test: TS0(xOxxOOOx)TS7 MS_Class=30 +Mass test: TS0(xOxxOOOx)TS7 MS_Class=31 Mass test: TS0(xOxxOOOO)TS7 MS_Class=0 Mass test: TS0(xOxxOOOO)TS7 MS_Class=1 Mass test: TS0(xOxxOOOO)TS7 MS_Class=2 @@ -3308,6 +3468,8 @@ Mass test: TS0(xOxxOOOO)TS7 MS_Class=27 Mass test: TS0(xOxxOOOO)TS7 MS_Class=28 Mass test: TS0(xOxxOOOO)TS7 MS_Class=29 +Mass test: TS0(xOxxOOOO)TS7 MS_Class=30 +Mass test: TS0(xOxxOOOO)TS7 MS_Class=31 Mass test: TS0(xOxOxxxx)TS7 MS_Class=0 Mass test: TS0(xOxOxxxx)TS7 MS_Class=1 Mass test: TS0(xOxOxxxx)TS7 MS_Class=2 @@ -3338,6 +3500,8 @@ Mass test: TS0(xOxOxxxx)TS7 MS_Class=27 Mass test: TS0(xOxOxxxx)TS7 MS_Class=28 Mass test: TS0(xOxOxxxx)TS7 MS_Class=29 +Mass test: TS0(xOxOxxxx)TS7 MS_Class=30 +Mass test: TS0(xOxOxxxx)TS7 MS_Class=31 Mass test: TS0(xOxOxxxO)TS7 MS_Class=0 Mass test: TS0(xOxOxxxO)TS7 MS_Class=1 Mass test: TS0(xOxOxxxO)TS7 MS_Class=2 @@ -3368,6 +3532,8 @@ Mass test: TS0(xOxOxxxO)TS7 MS_Class=27 Mass test: TS0(xOxOxxxO)TS7 MS_Class=28 Mass test: TS0(xOxOxxxO)TS7 MS_Class=29 +Mass test: TS0(xOxOxxxO)TS7 MS_Class=30 +Mass test: TS0(xOxOxxxO)TS7 MS_Class=31 Mass test: TS0(xOxOxxOx)TS7 MS_Class=0 Mass test: TS0(xOxOxxOx)TS7 MS_Class=1 Mass test: TS0(xOxOxxOx)TS7 MS_Class=2 @@ -3398,6 +3564,8 @@ Mass test: TS0(xOxOxxOx)TS7 MS_Class=27 Mass test: TS0(xOxOxxOx)TS7 MS_Class=28 Mass test: TS0(xOxOxxOx)TS7 MS_Class=29 +Mass test: TS0(xOxOxxOx)TS7 MS_Class=30 +Mass test: TS0(xOxOxxOx)TS7 MS_Class=31 Mass test: TS0(xOxOxxOO)TS7 MS_Class=0 Mass test: TS0(xOxOxxOO)TS7 MS_Class=1 Mass test: TS0(xOxOxxOO)TS7 MS_Class=2 @@ -3428,6 +3596,8 @@ Mass test: TS0(xOxOxxOO)TS7 MS_Class=27 Mass test: TS0(xOxOxxOO)TS7 MS_Class=28 Mass test: TS0(xOxOxxOO)TS7 MS_Class=29 +Mass test: TS0(xOxOxxOO)TS7 MS_Class=30 +Mass test: TS0(xOxOxxOO)TS7 MS_Class=31 Mass test: TS0(xOxOxOxx)TS7 MS_Class=0 Mass test: TS0(xOxOxOxx)TS7 MS_Class=1 Mass test: TS0(xOxOxOxx)TS7 MS_Class=2 @@ -3458,6 +3628,8 @@ Mass test: TS0(xOxOxOxx)TS7 MS_Class=27 Mass test: TS0(xOxOxOxx)TS7 MS_Class=28 Mass test: TS0(xOxOxOxx)TS7 MS_Class=29 +Mass test: TS0(xOxOxOxx)TS7 MS_Class=30 +Mass test: TS0(xOxOxOxx)TS7 MS_Class=31 Mass test: TS0(xOxOxOxO)TS7 MS_Class=0 Mass test: TS0(xOxOxOxO)TS7 MS_Class=1 Mass test: TS0(xOxOxOxO)TS7 MS_Class=2 @@ -3488,6 +3660,8 @@ Mass test: TS0(xOxOxOxO)TS7 MS_Class=27 Mass test: TS0(xOxOxOxO)TS7 MS_Class=28 Mass test: TS0(xOxOxOxO)TS7 MS_Class=29 +Mass test: TS0(xOxOxOxO)TS7 MS_Class=30 +Mass test: TS0(xOxOxOxO)TS7 MS_Class=31 Mass test: TS0(xOxOxOOx)TS7 MS_Class=0 Mass test: TS0(xOxOxOOx)TS7 MS_Class=1 Mass test: TS0(xOxOxOOx)TS7 MS_Class=2 @@ -3518,6 +3692,8 @@ Mass test: TS0(xOxOxOOx)TS7 MS_Class=27 Mass test: TS0(xOxOxOOx)TS7 MS_Class=28 Mass test: TS0(xOxOxOOx)TS7 MS_Class=29 +Mass test: TS0(xOxOxOOx)TS7 MS_Class=30 +Mass test: TS0(xOxOxOOx)TS7 MS_Class=31 Mass test: TS0(xOxOxOOO)TS7 MS_Class=0 Mass test: TS0(xOxOxOOO)TS7 MS_Class=1 Mass test: TS0(xOxOxOOO)TS7 MS_Class=2 @@ -3548,6 +3724,8 @@ Mass test: TS0(xOxOxOOO)TS7 MS_Class=27 Mass test: TS0(xOxOxOOO)TS7 MS_Class=28 Mass test: TS0(xOxOxOOO)TS7 MS_Class=29 +Mass test: TS0(xOxOxOOO)TS7 MS_Class=30 +Mass test: TS0(xOxOxOOO)TS7 MS_Class=31 Mass test: TS0(xOxOOxxx)TS7 MS_Class=0 Mass test: TS0(xOxOOxxx)TS7 MS_Class=1 Mass test: TS0(xOxOOxxx)TS7 MS_Class=2 @@ -3578,6 +3756,8 @@ Mass test: TS0(xOxOOxxx)TS7 MS_Class=27 Mass test: TS0(xOxOOxxx)TS7 MS_Class=28 Mass test: TS0(xOxOOxxx)TS7 MS_Class=29 +Mass test: TS0(xOxOOxxx)TS7 MS_Class=30 +Mass test: TS0(xOxOOxxx)TS7 MS_Class=31 Mass test: TS0(xOxOOxxO)TS7 MS_Class=0 Mass test: TS0(xOxOOxxO)TS7 MS_Class=1 Mass test: TS0(xOxOOxxO)TS7 MS_Class=2 @@ -3608,6 +3788,8 @@ Mass test: TS0(xOxOOxxO)TS7 MS_Class=27 Mass test: TS0(xOxOOxxO)TS7 MS_Class=28 Mass test: TS0(xOxOOxxO)TS7 MS_Class=29 +Mass test: TS0(xOxOOxxO)TS7 MS_Class=30 +Mass test: TS0(xOxOOxxO)TS7 MS_Class=31 Mass test: TS0(xOxOOxOx)TS7 MS_Class=0 Mass test: TS0(xOxOOxOx)TS7 MS_Class=1 Mass test: TS0(xOxOOxOx)TS7 MS_Class=2 @@ -3638,6 +3820,8 @@ Mass test: TS0(xOxOOxOx)TS7 MS_Class=27 Mass test: TS0(xOxOOxOx)TS7 MS_Class=28 Mass test: TS0(xOxOOxOx)TS7 MS_Class=29 +Mass test: TS0(xOxOOxOx)TS7 MS_Class=30 +Mass test: TS0(xOxOOxOx)TS7 MS_Class=31 Mass test: TS0(xOxOOxOO)TS7 MS_Class=0 Mass test: TS0(xOxOOxOO)TS7 MS_Class=1 Mass test: TS0(xOxOOxOO)TS7 MS_Class=2 @@ -3668,6 +3852,8 @@ Mass test: TS0(xOxOOxOO)TS7 MS_Class=27 Mass test: TS0(xOxOOxOO)TS7 MS_Class=28 Mass test: TS0(xOxOOxOO)TS7 MS_Class=29 +Mass test: TS0(xOxOOxOO)TS7 MS_Class=30 +Mass test: TS0(xOxOOxOO)TS7 MS_Class=31 Mass test: TS0(xOxOOOxx)TS7 MS_Class=0 Mass test: TS0(xOxOOOxx)TS7 MS_Class=1 Mass test: TS0(xOxOOOxx)TS7 MS_Class=2 @@ -3698,6 +3884,8 @@ Mass test: TS0(xOxOOOxx)TS7 MS_Class=27 Mass test: TS0(xOxOOOxx)TS7 MS_Class=28 Mass test: TS0(xOxOOOxx)TS7 MS_Class=29 +Mass test: TS0(xOxOOOxx)TS7 MS_Class=30 +Mass test: TS0(xOxOOOxx)TS7 MS_Class=31 Mass test: TS0(xOxOOOxO)TS7 MS_Class=0 Mass test: TS0(xOxOOOxO)TS7 MS_Class=1 Mass test: TS0(xOxOOOxO)TS7 MS_Class=2 @@ -3728,6 +3916,8 @@ Mass test: TS0(xOxOOOxO)TS7 MS_Class=27 Mass test: TS0(xOxOOOxO)TS7 MS_Class=28 Mass test: TS0(xOxOOOxO)TS7 MS_Class=29 +Mass test: TS0(xOxOOOxO)TS7 MS_Class=30 +Mass test: TS0(xOxOOOxO)TS7 MS_Class=31 Mass test: TS0(xOxOOOOx)TS7 MS_Class=0 Mass test: TS0(xOxOOOOx)TS7 MS_Class=1 Mass test: TS0(xOxOOOOx)TS7 MS_Class=2 @@ -3758,6 +3948,8 @@ Mass test: TS0(xOxOOOOx)TS7 MS_Class=27 Mass test: TS0(xOxOOOOx)TS7 MS_Class=28 Mass test: TS0(xOxOOOOx)TS7 MS_Class=29 +Mass test: TS0(xOxOOOOx)TS7 MS_Class=30 +Mass test: TS0(xOxOOOOx)TS7 MS_Class=31 Mass test: TS0(xOxOOOOO)TS7 MS_Class=0 Mass test: TS0(xOxOOOOO)TS7 MS_Class=1 Mass test: TS0(xOxOOOOO)TS7 MS_Class=2 @@ -3788,6 +3980,8 @@ Mass test: TS0(xOxOOOOO)TS7 MS_Class=27 Mass test: TS0(xOxOOOOO)TS7 MS_Class=28 Mass test: TS0(xOxOOOOO)TS7 MS_Class=29 +Mass test: TS0(xOxOOOOO)TS7 MS_Class=30 +Mass test: TS0(xOxOOOOO)TS7 MS_Class=31 Mass test: TS0(xOOxxxxx)TS7 MS_Class=0 Mass test: TS0(xOOxxxxx)TS7 MS_Class=1 Mass test: TS0(xOOxxxxx)TS7 MS_Class=2 @@ -3818,6 +4012,8 @@ Mass test: TS0(xOOxxxxx)TS7 MS_Class=27 Mass test: TS0(xOOxxxxx)TS7 MS_Class=28 Mass test: TS0(xOOxxxxx)TS7 MS_Class=29 +Mass test: TS0(xOOxxxxx)TS7 MS_Class=30 +Mass test: TS0(xOOxxxxx)TS7 MS_Class=31 Mass test: TS0(xOOxxxxO)TS7 MS_Class=0 Mass test: TS0(xOOxxxxO)TS7 MS_Class=1 Mass test: TS0(xOOxxxxO)TS7 MS_Class=2 @@ -3848,6 +4044,8 @@ Mass test: TS0(xOOxxxxO)TS7 MS_Class=27 Mass test: TS0(xOOxxxxO)TS7 MS_Class=28 Mass test: TS0(xOOxxxxO)TS7 MS_Class=29 +Mass test: TS0(xOOxxxxO)TS7 MS_Class=30 +Mass test: TS0(xOOxxxxO)TS7 MS_Class=31 Mass test: TS0(xOOxxxOx)TS7 MS_Class=0 Mass test: TS0(xOOxxxOx)TS7 MS_Class=1 Mass test: TS0(xOOxxxOx)TS7 MS_Class=2 @@ -3878,6 +4076,8 @@ Mass test: TS0(xOOxxxOx)TS7 MS_Class=27 Mass test: TS0(xOOxxxOx)TS7 MS_Class=28 Mass test: TS0(xOOxxxOx)TS7 MS_Class=29 +Mass test: TS0(xOOxxxOx)TS7 MS_Class=30 +Mass test: TS0(xOOxxxOx)TS7 MS_Class=31 Mass test: TS0(xOOxxxOO)TS7 MS_Class=0 Mass test: TS0(xOOxxxOO)TS7 MS_Class=1 Mass test: TS0(xOOxxxOO)TS7 MS_Class=2 @@ -3908,6 +4108,8 @@ Mass test: TS0(xOOxxxOO)TS7 MS_Class=27 Mass test: TS0(xOOxxxOO)TS7 MS_Class=28 Mass test: TS0(xOOxxxOO)TS7 MS_Class=29 +Mass test: TS0(xOOxxxOO)TS7 MS_Class=30 +Mass test: TS0(xOOxxxOO)TS7 MS_Class=31 Mass test: TS0(xOOxxOxx)TS7 MS_Class=0 Mass test: TS0(xOOxxOxx)TS7 MS_Class=1 Mass test: TS0(xOOxxOxx)TS7 MS_Class=2 @@ -3938,6 +4140,8 @@ Mass test: TS0(xOOxxOxx)TS7 MS_Class=27 Mass test: TS0(xOOxxOxx)TS7 MS_Class=28 Mass test: TS0(xOOxxOxx)TS7 MS_Class=29 +Mass test: TS0(xOOxxOxx)TS7 MS_Class=30 +Mass test: TS0(xOOxxOxx)TS7 MS_Class=31 Mass test: TS0(xOOxxOxO)TS7 MS_Class=0 Mass test: TS0(xOOxxOxO)TS7 MS_Class=1 Mass test: TS0(xOOxxOxO)TS7 MS_Class=2 @@ -3968,6 +4172,8 @@ Mass test: TS0(xOOxxOxO)TS7 MS_Class=27 Mass test: TS0(xOOxxOxO)TS7 MS_Class=28 Mass test: TS0(xOOxxOxO)TS7 MS_Class=29 +Mass test: TS0(xOOxxOxO)TS7 MS_Class=30 +Mass test: TS0(xOOxxOxO)TS7 MS_Class=31 Mass test: TS0(xOOxxOOx)TS7 MS_Class=0 Mass test: TS0(xOOxxOOx)TS7 MS_Class=1 Mass test: TS0(xOOxxOOx)TS7 MS_Class=2 @@ -3998,6 +4204,8 @@ Mass test: TS0(xOOxxOOx)TS7 MS_Class=27 Mass test: TS0(xOOxxOOx)TS7 MS_Class=28 Mass test: TS0(xOOxxOOx)TS7 MS_Class=29 +Mass test: TS0(xOOxxOOx)TS7 MS_Class=30 +Mass test: TS0(xOOxxOOx)TS7 MS_Class=31 Mass test: TS0(xOOxxOOO)TS7 MS_Class=0 Mass test: TS0(xOOxxOOO)TS7 MS_Class=1 Mass test: TS0(xOOxxOOO)TS7 MS_Class=2 @@ -4028,6 +4236,8 @@ Mass test: TS0(xOOxxOOO)TS7 MS_Class=27 Mass test: TS0(xOOxxOOO)TS7 MS_Class=28 Mass test: TS0(xOOxxOOO)TS7 MS_Class=29 +Mass test: TS0(xOOxxOOO)TS7 MS_Class=30 +Mass test: TS0(xOOxxOOO)TS7 MS_Class=31 Mass test: TS0(xOOxOxxx)TS7 MS_Class=0 Mass test: TS0(xOOxOxxx)TS7 MS_Class=1 Mass test: TS0(xOOxOxxx)TS7 MS_Class=2 @@ -4058,6 +4268,8 @@ Mass test: TS0(xOOxOxxx)TS7 MS_Class=27 Mass test: TS0(xOOxOxxx)TS7 MS_Class=28 Mass test: TS0(xOOxOxxx)TS7 MS_Class=29 +Mass test: TS0(xOOxOxxx)TS7 MS_Class=30 +Mass test: TS0(xOOxOxxx)TS7 MS_Class=31 Mass test: TS0(xOOxOxxO)TS7 MS_Class=0 Mass test: TS0(xOOxOxxO)TS7 MS_Class=1 Mass test: TS0(xOOxOxxO)TS7 MS_Class=2 @@ -4088,6 +4300,8 @@ Mass test: TS0(xOOxOxxO)TS7 MS_Class=27 Mass test: TS0(xOOxOxxO)TS7 MS_Class=28 Mass test: TS0(xOOxOxxO)TS7 MS_Class=29 +Mass test: TS0(xOOxOxxO)TS7 MS_Class=30 +Mass test: TS0(xOOxOxxO)TS7 MS_Class=31 Mass test: TS0(xOOxOxOx)TS7 MS_Class=0 Mass test: TS0(xOOxOxOx)TS7 MS_Class=1 Mass test: TS0(xOOxOxOx)TS7 MS_Class=2 @@ -4118,6 +4332,8 @@ Mass test: TS0(xOOxOxOx)TS7 MS_Class=27 Mass test: TS0(xOOxOxOx)TS7 MS_Class=28 Mass test: TS0(xOOxOxOx)TS7 MS_Class=29 +Mass test: TS0(xOOxOxOx)TS7 MS_Class=30 +Mass test: TS0(xOOxOxOx)TS7 MS_Class=31 Mass test: TS0(xOOxOxOO)TS7 MS_Class=0 Mass test: TS0(xOOxOxOO)TS7 MS_Class=1 Mass test: TS0(xOOxOxOO)TS7 MS_Class=2 @@ -4148,6 +4364,8 @@ Mass test: TS0(xOOxOxOO)TS7 MS_Class=27 Mass test: TS0(xOOxOxOO)TS7 MS_Class=28 Mass test: TS0(xOOxOxOO)TS7 MS_Class=29 +Mass test: TS0(xOOxOxOO)TS7 MS_Class=30 +Mass test: TS0(xOOxOxOO)TS7 MS_Class=31 Mass test: TS0(xOOxOOxx)TS7 MS_Class=0 Mass test: TS0(xOOxOOxx)TS7 MS_Class=1 Mass test: TS0(xOOxOOxx)TS7 MS_Class=2 @@ -4178,6 +4396,8 @@ Mass test: TS0(xOOxOOxx)TS7 MS_Class=27 Mass test: TS0(xOOxOOxx)TS7 MS_Class=28 Mass test: TS0(xOOxOOxx)TS7 MS_Class=29 +Mass test: TS0(xOOxOOxx)TS7 MS_Class=30 +Mass test: TS0(xOOxOOxx)TS7 MS_Class=31 Mass test: TS0(xOOxOOxO)TS7 MS_Class=0 Mass test: TS0(xOOxOOxO)TS7 MS_Class=1 Mass test: TS0(xOOxOOxO)TS7 MS_Class=2 @@ -4208,6 +4428,8 @@ Mass test: TS0(xOOxOOxO)TS7 MS_Class=27 Mass test: TS0(xOOxOOxO)TS7 MS_Class=28 Mass test: TS0(xOOxOOxO)TS7 MS_Class=29 +Mass test: TS0(xOOxOOxO)TS7 MS_Class=30 +Mass test: TS0(xOOxOOxO)TS7 MS_Class=31 Mass test: TS0(xOOxOOOx)TS7 MS_Class=0 Mass test: TS0(xOOxOOOx)TS7 MS_Class=1 Mass test: TS0(xOOxOOOx)TS7 MS_Class=2 @@ -4238,6 +4460,8 @@ Mass test: TS0(xOOxOOOx)TS7 MS_Class=27 Mass test: TS0(xOOxOOOx)TS7 MS_Class=28 Mass test: TS0(xOOxOOOx)TS7 MS_Class=29 +Mass test: TS0(xOOxOOOx)TS7 MS_Class=30 +Mass test: TS0(xOOxOOOx)TS7 MS_Class=31 Mass test: TS0(xOOxOOOO)TS7 MS_Class=0 Mass test: TS0(xOOxOOOO)TS7 MS_Class=1 Mass test: TS0(xOOxOOOO)TS7 MS_Class=2 @@ -4268,6 +4492,8 @@ Mass test: TS0(xOOxOOOO)TS7 MS_Class=27 Mass test: TS0(xOOxOOOO)TS7 MS_Class=28 Mass test: TS0(xOOxOOOO)TS7 MS_Class=29 +Mass test: TS0(xOOxOOOO)TS7 MS_Class=30 +Mass test: TS0(xOOxOOOO)TS7 MS_Class=31 Mass test: TS0(xOOOxxxx)TS7 MS_Class=0 Mass test: TS0(xOOOxxxx)TS7 MS_Class=1 Mass test: TS0(xOOOxxxx)TS7 MS_Class=2 @@ -4298,6 +4524,8 @@ Mass test: TS0(xOOOxxxx)TS7 MS_Class=27 Mass test: TS0(xOOOxxxx)TS7 MS_Class=28 Mass test: TS0(xOOOxxxx)TS7 MS_Class=29 +Mass test: TS0(xOOOxxxx)TS7 MS_Class=30 +Mass test: TS0(xOOOxxxx)TS7 MS_Class=31 Mass test: TS0(xOOOxxxO)TS7 MS_Class=0 Mass test: TS0(xOOOxxxO)TS7 MS_Class=1 Mass test: TS0(xOOOxxxO)TS7 MS_Class=2 @@ -4328,6 +4556,8 @@ Mass test: TS0(xOOOxxxO)TS7 MS_Class=27 Mass test: TS0(xOOOxxxO)TS7 MS_Class=28 Mass test: TS0(xOOOxxxO)TS7 MS_Class=29 +Mass test: TS0(xOOOxxxO)TS7 MS_Class=30 +Mass test: TS0(xOOOxxxO)TS7 MS_Class=31 Mass test: TS0(xOOOxxOx)TS7 MS_Class=0 Mass test: TS0(xOOOxxOx)TS7 MS_Class=1 Mass test: TS0(xOOOxxOx)TS7 MS_Class=2 @@ -4358,6 +4588,8 @@ Mass test: TS0(xOOOxxOx)TS7 MS_Class=27 Mass test: TS0(xOOOxxOx)TS7 MS_Class=28 Mass test: TS0(xOOOxxOx)TS7 MS_Class=29 +Mass test: TS0(xOOOxxOx)TS7 MS_Class=30 +Mass test: TS0(xOOOxxOx)TS7 MS_Class=31 Mass test: TS0(xOOOxxOO)TS7 MS_Class=0 Mass test: TS0(xOOOxxOO)TS7 MS_Class=1 Mass test: TS0(xOOOxxOO)TS7 MS_Class=2 @@ -4388,6 +4620,8 @@ Mass test: TS0(xOOOxxOO)TS7 MS_Class=27 Mass test: TS0(xOOOxxOO)TS7 MS_Class=28 Mass test: TS0(xOOOxxOO)TS7 MS_Class=29 +Mass test: TS0(xOOOxxOO)TS7 MS_Class=30 +Mass test: TS0(xOOOxxOO)TS7 MS_Class=31 Mass test: TS0(xOOOxOxx)TS7 MS_Class=0 Mass test: TS0(xOOOxOxx)TS7 MS_Class=1 Mass test: TS0(xOOOxOxx)TS7 MS_Class=2 @@ -4418,6 +4652,8 @@ Mass test: TS0(xOOOxOxx)TS7 MS_Class=27 Mass test: TS0(xOOOxOxx)TS7 MS_Class=28 Mass test: TS0(xOOOxOxx)TS7 MS_Class=29 +Mass test: TS0(xOOOxOxx)TS7 MS_Class=30 +Mass test: TS0(xOOOxOxx)TS7 MS_Class=31 Mass test: TS0(xOOOxOxO)TS7 MS_Class=0 Mass test: TS0(xOOOxOxO)TS7 MS_Class=1 Mass test: TS0(xOOOxOxO)TS7 MS_Class=2 @@ -4448,6 +4684,8 @@ Mass test: TS0(xOOOxOxO)TS7 MS_Class=27 Mass test: TS0(xOOOxOxO)TS7 MS_Class=28 Mass test: TS0(xOOOxOxO)TS7 MS_Class=29 +Mass test: TS0(xOOOxOxO)TS7 MS_Class=30 +Mass test: TS0(xOOOxOxO)TS7 MS_Class=31 Mass test: TS0(xOOOxOOx)TS7 MS_Class=0 Mass test: TS0(xOOOxOOx)TS7 MS_Class=1 Mass test: TS0(xOOOxOOx)TS7 MS_Class=2 @@ -4478,6 +4716,8 @@ Mass test: TS0(xOOOxOOx)TS7 MS_Class=27 Mass test: TS0(xOOOxOOx)TS7 MS_Class=28 Mass test: TS0(xOOOxOOx)TS7 MS_Class=29 +Mass test: TS0(xOOOxOOx)TS7 MS_Class=30 +Mass test: TS0(xOOOxOOx)TS7 MS_Class=31 Mass test: TS0(xOOOxOOO)TS7 MS_Class=0 Mass test: TS0(xOOOxOOO)TS7 MS_Class=1 Mass test: TS0(xOOOxOOO)TS7 MS_Class=2 @@ -4508,6 +4748,8 @@ Mass test: TS0(xOOOxOOO)TS7 MS_Class=27 Mass test: TS0(xOOOxOOO)TS7 MS_Class=28 Mass test: TS0(xOOOxOOO)TS7 MS_Class=29 +Mass test: TS0(xOOOxOOO)TS7 MS_Class=30 +Mass test: TS0(xOOOxOOO)TS7 MS_Class=31 Mass test: TS0(xOOOOxxx)TS7 MS_Class=0 Mass test: TS0(xOOOOxxx)TS7 MS_Class=1 Mass test: TS0(xOOOOxxx)TS7 MS_Class=2 @@ -4538,6 +4780,8 @@ Mass test: TS0(xOOOOxxx)TS7 MS_Class=27 Mass test: TS0(xOOOOxxx)TS7 MS_Class=28 Mass test: TS0(xOOOOxxx)TS7 MS_Class=29 +Mass test: TS0(xOOOOxxx)TS7 MS_Class=30 +Mass test: TS0(xOOOOxxx)TS7 MS_Class=31 Mass test: TS0(xOOOOxxO)TS7 MS_Class=0 Mass test: TS0(xOOOOxxO)TS7 MS_Class=1 Mass test: TS0(xOOOOxxO)TS7 MS_Class=2 @@ -4568,6 +4812,8 @@ Mass test: TS0(xOOOOxxO)TS7 MS_Class=27 Mass test: TS0(xOOOOxxO)TS7 MS_Class=28 Mass test: TS0(xOOOOxxO)TS7 MS_Class=29 +Mass test: TS0(xOOOOxxO)TS7 MS_Class=30 +Mass test: TS0(xOOOOxxO)TS7 MS_Class=31 Mass test: TS0(xOOOOxOx)TS7 MS_Class=0 Mass test: TS0(xOOOOxOx)TS7 MS_Class=1 Mass test: TS0(xOOOOxOx)TS7 MS_Class=2 @@ -4598,6 +4844,8 @@ Mass test: TS0(xOOOOxOx)TS7 MS_Class=27 Mass test: TS0(xOOOOxOx)TS7 MS_Class=28 Mass test: TS0(xOOOOxOx)TS7 MS_Class=29 +Mass test: TS0(xOOOOxOx)TS7 MS_Class=30 +Mass test: TS0(xOOOOxOx)TS7 MS_Class=31 Mass test: TS0(xOOOOxOO)TS7 MS_Class=0 Mass test: TS0(xOOOOxOO)TS7 MS_Class=1 Mass test: TS0(xOOOOxOO)TS7 MS_Class=2 @@ -4628,6 +4876,8 @@ Mass test: TS0(xOOOOxOO)TS7 MS_Class=27 Mass test: TS0(xOOOOxOO)TS7 MS_Class=28 Mass test: TS0(xOOOOxOO)TS7 MS_Class=29 +Mass test: TS0(xOOOOxOO)TS7 MS_Class=30 +Mass test: TS0(xOOOOxOO)TS7 MS_Class=31 Mass test: TS0(xOOOOOxx)TS7 MS_Class=0 Mass test: TS0(xOOOOOxx)TS7 MS_Class=1 Mass test: TS0(xOOOOOxx)TS7 MS_Class=2 @@ -4658,6 +4908,8 @@ Mass test: TS0(xOOOOOxx)TS7 MS_Class=27 Mass test: TS0(xOOOOOxx)TS7 MS_Class=28 Mass test: TS0(xOOOOOxx)TS7 MS_Class=29 +Mass test: TS0(xOOOOOxx)TS7 MS_Class=30 +Mass test: TS0(xOOOOOxx)TS7 MS_Class=31 Mass test: TS0(xOOOOOxO)TS7 MS_Class=0 Mass test: TS0(xOOOOOxO)TS7 MS_Class=1 Mass test: TS0(xOOOOOxO)TS7 MS_Class=2 @@ -4688,6 +4940,8 @@ Mass test: TS0(xOOOOOxO)TS7 MS_Class=27 Mass test: TS0(xOOOOOxO)TS7 MS_Class=28 Mass test: TS0(xOOOOOxO)TS7 MS_Class=29 +Mass test: TS0(xOOOOOxO)TS7 MS_Class=30 +Mass test: TS0(xOOOOOxO)TS7 MS_Class=31 Mass test: TS0(xOOOOOOx)TS7 MS_Class=0 Mass test: TS0(xOOOOOOx)TS7 MS_Class=1 Mass test: TS0(xOOOOOOx)TS7 MS_Class=2 @@ -4718,6 +4972,8 @@ Mass test: TS0(xOOOOOOx)TS7 MS_Class=27 Mass test: TS0(xOOOOOOx)TS7 MS_Class=28 Mass test: TS0(xOOOOOOx)TS7 MS_Class=29 +Mass test: TS0(xOOOOOOx)TS7 MS_Class=30 +Mass test: TS0(xOOOOOOx)TS7 MS_Class=31 Mass test: TS0(xOOOOOOO)TS7 MS_Class=0 Mass test: TS0(xOOOOOOO)TS7 MS_Class=1 Mass test: TS0(xOOOOOOO)TS7 MS_Class=2 @@ -4748,6 +5004,8 @@ Mass test: TS0(xOOOOOOO)TS7 MS_Class=27 Mass test: TS0(xOOOOOOO)TS7 MS_Class=28 Mass test: TS0(xOOOOOOO)TS7 MS_Class=29 +Mass test: TS0(xOOOOOOO)TS7 MS_Class=30 +Mass test: TS0(xOOOOOOO)TS7 MS_Class=31 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=0 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=1 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=2 @@ -4778,6 +5036,8 @@ Mass test: TS0(Oxxxxxxx)TS7 MS_Class=27 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=28 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=29 +Mass test: TS0(Oxxxxxxx)TS7 MS_Class=30 +Mass test: TS0(Oxxxxxxx)TS7 MS_Class=31 Mass test: TS0(OxxxxxxO)TS7 MS_Class=0 Mass test: TS0(OxxxxxxO)TS7 MS_Class=1 Mass test: TS0(OxxxxxxO)TS7 MS_Class=2 @@ -4808,6 +5068,8 @@ Mass test: TS0(OxxxxxxO)TS7 MS_Class=27 Mass test: TS0(OxxxxxxO)TS7 MS_Class=28 Mass test: TS0(OxxxxxxO)TS7 MS_Class=29 +Mass test: TS0(OxxxxxxO)TS7 MS_Class=30 +Mass test: TS0(OxxxxxxO)TS7 MS_Class=31 Mass test: TS0(OxxxxxOx)TS7 MS_Class=0 Mass test: TS0(OxxxxxOx)TS7 MS_Class=1 Mass test: TS0(OxxxxxOx)TS7 MS_Class=2 @@ -4838,6 +5100,8 @@ Mass test: TS0(OxxxxxOx)TS7 MS_Class=27 Mass test: TS0(OxxxxxOx)TS7 MS_Class=28 Mass test: TS0(OxxxxxOx)TS7 MS_Class=29 +Mass test: TS0(OxxxxxOx)TS7 MS_Class=30 +Mass test: TS0(OxxxxxOx)TS7 MS_Class=31 Mass test: TS0(OxxxxxOO)TS7 MS_Class=0 Mass test: TS0(OxxxxxOO)TS7 MS_Class=1 Mass test: TS0(OxxxxxOO)TS7 MS_Class=2 @@ -4868,6 +5132,8 @@ Mass test: TS0(OxxxxxOO)TS7 MS_Class=27 Mass test: TS0(OxxxxxOO)TS7 MS_Class=28 Mass test: TS0(OxxxxxOO)TS7 MS_Class=29 +Mass test: TS0(OxxxxxOO)TS7 MS_Class=30 +Mass test: TS0(OxxxxxOO)TS7 MS_Class=31 Mass test: TS0(OxxxxOxx)TS7 MS_Class=0 Mass test: TS0(OxxxxOxx)TS7 MS_Class=1 Mass test: TS0(OxxxxOxx)TS7 MS_Class=2 @@ -4898,6 +5164,8 @@ Mass test: TS0(OxxxxOxx)TS7 MS_Class=27 Mass test: TS0(OxxxxOxx)TS7 MS_Class=28 Mass test: TS0(OxxxxOxx)TS7 MS_Class=29 +Mass test: TS0(OxxxxOxx)TS7 MS_Class=30 +Mass test: TS0(OxxxxOxx)TS7 MS_Class=31 Mass test: TS0(OxxxxOxO)TS7 MS_Class=0 Mass test: TS0(OxxxxOxO)TS7 MS_Class=1 Mass test: TS0(OxxxxOxO)TS7 MS_Class=2 @@ -4928,6 +5196,8 @@ Mass test: TS0(OxxxxOxO)TS7 MS_Class=27 Mass test: TS0(OxxxxOxO)TS7 MS_Class=28 Mass test: TS0(OxxxxOxO)TS7 MS_Class=29 +Mass test: TS0(OxxxxOxO)TS7 MS_Class=30 +Mass test: TS0(OxxxxOxO)TS7 MS_Class=31 Mass test: TS0(OxxxxOOx)TS7 MS_Class=0 Mass test: TS0(OxxxxOOx)TS7 MS_Class=1 Mass test: TS0(OxxxxOOx)TS7 MS_Class=2 @@ -4958,6 +5228,8 @@ Mass test: TS0(OxxxxOOx)TS7 MS_Class=27 Mass test: TS0(OxxxxOOx)TS7 MS_Class=28 Mass test: TS0(OxxxxOOx)TS7 MS_Class=29 +Mass test: TS0(OxxxxOOx)TS7 MS_Class=30 +Mass test: TS0(OxxxxOOx)TS7 MS_Class=31 Mass test: TS0(OxxxxOOO)TS7 MS_Class=0 Mass test: TS0(OxxxxOOO)TS7 MS_Class=1 Mass test: TS0(OxxxxOOO)TS7 MS_Class=2 @@ -4988,6 +5260,8 @@ Mass test: TS0(OxxxxOOO)TS7 MS_Class=27 Mass test: TS0(OxxxxOOO)TS7 MS_Class=28 Mass test: TS0(OxxxxOOO)TS7 MS_Class=29 +Mass test: TS0(OxxxxOOO)TS7 MS_Class=30 +Mass test: TS0(OxxxxOOO)TS7 MS_Class=31 Mass test: TS0(OxxxOxxx)TS7 MS_Class=0 Mass test: TS0(OxxxOxxx)TS7 MS_Class=1 Mass test: TS0(OxxxOxxx)TS7 MS_Class=2 @@ -5018,6 +5292,8 @@ Mass test: TS0(OxxxOxxx)TS7 MS_Class=27 Mass test: TS0(OxxxOxxx)TS7 MS_Class=28 Mass test: TS0(OxxxOxxx)TS7 MS_Class=29 +Mass test: TS0(OxxxOxxx)TS7 MS_Class=30 +Mass test: TS0(OxxxOxxx)TS7 MS_Class=31 Mass test: TS0(OxxxOxxO)TS7 MS_Class=0 Mass test: TS0(OxxxOxxO)TS7 MS_Class=1 Mass test: TS0(OxxxOxxO)TS7 MS_Class=2 @@ -5048,6 +5324,8 @@ Mass test: TS0(OxxxOxxO)TS7 MS_Class=27 Mass test: TS0(OxxxOxxO)TS7 MS_Class=28 Mass test: TS0(OxxxOxxO)TS7 MS_Class=29 +Mass test: TS0(OxxxOxxO)TS7 MS_Class=30 +Mass test: TS0(OxxxOxxO)TS7 MS_Class=31 Mass test: TS0(OxxxOxOx)TS7 MS_Class=0 Mass test: TS0(OxxxOxOx)TS7 MS_Class=1 Mass test: TS0(OxxxOxOx)TS7 MS_Class=2 @@ -5078,6 +5356,8 @@ Mass test: TS0(OxxxOxOx)TS7 MS_Class=27 Mass test: TS0(OxxxOxOx)TS7 MS_Class=28 Mass test: TS0(OxxxOxOx)TS7 MS_Class=29 +Mass test: TS0(OxxxOxOx)TS7 MS_Class=30 +Mass test: TS0(OxxxOxOx)TS7 MS_Class=31 Mass test: TS0(OxxxOxOO)TS7 MS_Class=0 Mass test: TS0(OxxxOxOO)TS7 MS_Class=1 Mass test: TS0(OxxxOxOO)TS7 MS_Class=2 @@ -5108,6 +5388,8 @@ Mass test: TS0(OxxxOxOO)TS7 MS_Class=27 Mass test: TS0(OxxxOxOO)TS7 MS_Class=28 Mass test: TS0(OxxxOxOO)TS7 MS_Class=29 +Mass test: TS0(OxxxOxOO)TS7 MS_Class=30 +Mass test: TS0(OxxxOxOO)TS7 MS_Class=31 Mass test: TS0(OxxxOOxx)TS7 MS_Class=0 Mass test: TS0(OxxxOOxx)TS7 MS_Class=1 Mass test: TS0(OxxxOOxx)TS7 MS_Class=2 @@ -5138,6 +5420,8 @@ Mass test: TS0(OxxxOOxx)TS7 MS_Class=27 Mass test: TS0(OxxxOOxx)TS7 MS_Class=28 Mass test: TS0(OxxxOOxx)TS7 MS_Class=29 +Mass test: TS0(OxxxOOxx)TS7 MS_Class=30 +Mass test: TS0(OxxxOOxx)TS7 MS_Class=31 Mass test: TS0(OxxxOOxO)TS7 MS_Class=0 Mass test: TS0(OxxxOOxO)TS7 MS_Class=1 Mass test: TS0(OxxxOOxO)TS7 MS_Class=2 @@ -5168,6 +5452,8 @@ Mass test: TS0(OxxxOOxO)TS7 MS_Class=27 Mass test: TS0(OxxxOOxO)TS7 MS_Class=28 Mass test: TS0(OxxxOOxO)TS7 MS_Class=29 +Mass test: TS0(OxxxOOxO)TS7 MS_Class=30 +Mass test: TS0(OxxxOOxO)TS7 MS_Class=31 Mass test: TS0(OxxxOOOx)TS7 MS_Class=0 Mass test: TS0(OxxxOOOx)TS7 MS_Class=1 Mass test: TS0(OxxxOOOx)TS7 MS_Class=2 @@ -5198,6 +5484,8 @@ Mass test: TS0(OxxxOOOx)TS7 MS_Class=27 Mass test: TS0(OxxxOOOx)TS7 MS_Class=28 Mass test: TS0(OxxxOOOx)TS7 MS_Class=29 +Mass test: TS0(OxxxOOOx)TS7 MS_Class=30 +Mass test: TS0(OxxxOOOx)TS7 MS_Class=31 Mass test: TS0(OxxxOOOO)TS7 MS_Class=0 Mass test: TS0(OxxxOOOO)TS7 MS_Class=1 Mass test: TS0(OxxxOOOO)TS7 MS_Class=2 @@ -5228,6 +5516,8 @@ Mass test: TS0(OxxxOOOO)TS7 MS_Class=27 Mass test: TS0(OxxxOOOO)TS7 MS_Class=28 Mass test: TS0(OxxxOOOO)TS7 MS_Class=29 +Mass test: TS0(OxxxOOOO)TS7 MS_Class=30 +Mass test: TS0(OxxxOOOO)TS7 MS_Class=31 Mass test: TS0(OxxOxxxx)TS7 MS_Class=0 Mass test: TS0(OxxOxxxx)TS7 MS_Class=1 Mass test: TS0(OxxOxxxx)TS7 MS_Class=2 @@ -5258,6 +5548,8 @@ Mass test: TS0(OxxOxxxx)TS7 MS_Class=27 Mass test: TS0(OxxOxxxx)TS7 MS_Class=28 Mass test: TS0(OxxOxxxx)TS7 MS_Class=29 +Mass test: TS0(OxxOxxxx)TS7 MS_Class=30 +Mass test: TS0(OxxOxxxx)TS7 MS_Class=31 Mass test: TS0(OxxOxxxO)TS7 MS_Class=0 Mass test: TS0(OxxOxxxO)TS7 MS_Class=1 Mass test: TS0(OxxOxxxO)TS7 MS_Class=2 @@ -5288,6 +5580,8 @@ Mass test: TS0(OxxOxxxO)TS7 MS_Class=27 Mass test: TS0(OxxOxxxO)TS7 MS_Class=28 Mass test: TS0(OxxOxxxO)TS7 MS_Class=29 +Mass test: TS0(OxxOxxxO)TS7 MS_Class=30 +Mass test: TS0(OxxOxxxO)TS7 MS_Class=31 Mass test: TS0(OxxOxxOx)TS7 MS_Class=0 Mass test: TS0(OxxOxxOx)TS7 MS_Class=1 Mass test: TS0(OxxOxxOx)TS7 MS_Class=2 @@ -5318,6 +5612,8 @@ Mass test: TS0(OxxOxxOx)TS7 MS_Class=27 Mass test: TS0(OxxOxxOx)TS7 MS_Class=28 Mass test: TS0(OxxOxxOx)TS7 MS_Class=29 +Mass test: TS0(OxxOxxOx)TS7 MS_Class=30 +Mass test: TS0(OxxOxxOx)TS7 MS_Class=31 Mass test: TS0(OxxOxxOO)TS7 MS_Class=0 Mass test: TS0(OxxOxxOO)TS7 MS_Class=1 Mass test: TS0(OxxOxxOO)TS7 MS_Class=2 @@ -5348,6 +5644,8 @@ Mass test: TS0(OxxOxxOO)TS7 MS_Class=27 Mass test: TS0(OxxOxxOO)TS7 MS_Class=28 Mass test: TS0(OxxOxxOO)TS7 MS_Class=29 +Mass test: TS0(OxxOxxOO)TS7 MS_Class=30 +Mass test: TS0(OxxOxxOO)TS7 MS_Class=31 Mass test: TS0(OxxOxOxx)TS7 MS_Class=0 Mass test: TS0(OxxOxOxx)TS7 MS_Class=1 Mass test: TS0(OxxOxOxx)TS7 MS_Class=2 @@ -5378,6 +5676,8 @@ Mass test: TS0(OxxOxOxx)TS7 MS_Class=27 Mass test: TS0(OxxOxOxx)TS7 MS_Class=28 Mass test: TS0(OxxOxOxx)TS7 MS_Class=29 +Mass test: TS0(OxxOxOxx)TS7 MS_Class=30 +Mass test: TS0(OxxOxOxx)TS7 MS_Class=31 Mass test: TS0(OxxOxOxO)TS7 MS_Class=0 Mass test: TS0(OxxOxOxO)TS7 MS_Class=1 Mass test: TS0(OxxOxOxO)TS7 MS_Class=2 @@ -5408,6 +5708,8 @@ Mass test: TS0(OxxOxOxO)TS7 MS_Class=27 Mass test: TS0(OxxOxOxO)TS7 MS_Class=28 Mass test: TS0(OxxOxOxO)TS7 MS_Class=29 +Mass test: TS0(OxxOxOxO)TS7 MS_Class=30 +Mass test: TS0(OxxOxOxO)TS7 MS_Class=31 Mass test: TS0(OxxOxOOx)TS7 MS_Class=0 Mass test: TS0(OxxOxOOx)TS7 MS_Class=1 Mass test: TS0(OxxOxOOx)TS7 MS_Class=2 @@ -5438,6 +5740,8 @@ Mass test: TS0(OxxOxOOx)TS7 MS_Class=27 Mass test: TS0(OxxOxOOx)TS7 MS_Class=28 Mass test: TS0(OxxOxOOx)TS7 MS_Class=29 +Mass test: TS0(OxxOxOOx)TS7 MS_Class=30 +Mass test: TS0(OxxOxOOx)TS7 MS_Class=31 Mass test: TS0(OxxOxOOO)TS7 MS_Class=0 Mass test: TS0(OxxOxOOO)TS7 MS_Class=1 Mass test: TS0(OxxOxOOO)TS7 MS_Class=2 @@ -5468,6 +5772,8 @@ Mass test: TS0(OxxOxOOO)TS7 MS_Class=27 Mass test: TS0(OxxOxOOO)TS7 MS_Class=28 Mass test: TS0(OxxOxOOO)TS7 MS_Class=29 +Mass test: TS0(OxxOxOOO)TS7 MS_Class=30 +Mass test: TS0(OxxOxOOO)TS7 MS_Class=31 Mass test: TS0(OxxOOxxx)TS7 MS_Class=0 Mass test: TS0(OxxOOxxx)TS7 MS_Class=1 Mass test: TS0(OxxOOxxx)TS7 MS_Class=2 @@ -5498,6 +5804,8 @@ Mass test: TS0(OxxOOxxx)TS7 MS_Class=27 Mass test: TS0(OxxOOxxx)TS7 MS_Class=28 Mass test: TS0(OxxOOxxx)TS7 MS_Class=29 +Mass test: TS0(OxxOOxxx)TS7 MS_Class=30 +Mass test: TS0(OxxOOxxx)TS7 MS_Class=31 Mass test: TS0(OxxOOxxO)TS7 MS_Class=0 Mass test: TS0(OxxOOxxO)TS7 MS_Class=1 Mass test: TS0(OxxOOxxO)TS7 MS_Class=2 @@ -5528,6 +5836,8 @@ Mass test: TS0(OxxOOxxO)TS7 MS_Class=27 Mass test: TS0(OxxOOxxO)TS7 MS_Class=28 Mass test: TS0(OxxOOxxO)TS7 MS_Class=29 +Mass test: TS0(OxxOOxxO)TS7 MS_Class=30 +Mass test: TS0(OxxOOxxO)TS7 MS_Class=31 Mass test: TS0(OxxOOxOx)TS7 MS_Class=0 Mass test: TS0(OxxOOxOx)TS7 MS_Class=1 Mass test: TS0(OxxOOxOx)TS7 MS_Class=2 @@ -5558,6 +5868,8 @@ Mass test: TS0(OxxOOxOx)TS7 MS_Class=27 Mass test: TS0(OxxOOxOx)TS7 MS_Class=28 Mass test: TS0(OxxOOxOx)TS7 MS_Class=29 +Mass test: TS0(OxxOOxOx)TS7 MS_Class=30 +Mass test: TS0(OxxOOxOx)TS7 MS_Class=31 Mass test: TS0(OxxOOxOO)TS7 MS_Class=0 Mass test: TS0(OxxOOxOO)TS7 MS_Class=1 Mass test: TS0(OxxOOxOO)TS7 MS_Class=2 @@ -5588,6 +5900,8 @@ Mass test: TS0(OxxOOxOO)TS7 MS_Class=27 Mass test: TS0(OxxOOxOO)TS7 MS_Class=28 Mass test: TS0(OxxOOxOO)TS7 MS_Class=29 +Mass test: TS0(OxxOOxOO)TS7 MS_Class=30 +Mass test: TS0(OxxOOxOO)TS7 MS_Class=31 Mass test: TS0(OxxOOOxx)TS7 MS_Class=0 Mass test: TS0(OxxOOOxx)TS7 MS_Class=1 Mass test: TS0(OxxOOOxx)TS7 MS_Class=2 @@ -5618,6 +5932,8 @@ Mass test: TS0(OxxOOOxx)TS7 MS_Class=27 Mass test: TS0(OxxOOOxx)TS7 MS_Class=28 Mass test: TS0(OxxOOOxx)TS7 MS_Class=29 +Mass test: TS0(OxxOOOxx)TS7 MS_Class=30 +Mass test: TS0(OxxOOOxx)TS7 MS_Class=31 Mass test: TS0(OxxOOOxO)TS7 MS_Class=0 Mass test: TS0(OxxOOOxO)TS7 MS_Class=1 Mass test: TS0(OxxOOOxO)TS7 MS_Class=2 @@ -5648,6 +5964,8 @@ Mass test: TS0(OxxOOOxO)TS7 MS_Class=27 Mass test: TS0(OxxOOOxO)TS7 MS_Class=28 Mass test: TS0(OxxOOOxO)TS7 MS_Class=29 +Mass test: TS0(OxxOOOxO)TS7 MS_Class=30 +Mass test: TS0(OxxOOOxO)TS7 MS_Class=31 Mass test: TS0(OxxOOOOx)TS7 MS_Class=0 Mass test: TS0(OxxOOOOx)TS7 MS_Class=1 Mass test: TS0(OxxOOOOx)TS7 MS_Class=2 @@ -5678,6 +5996,8 @@ Mass test: TS0(OxxOOOOx)TS7 MS_Class=27 Mass test: TS0(OxxOOOOx)TS7 MS_Class=28 Mass test: TS0(OxxOOOOx)TS7 MS_Class=29 +Mass test: TS0(OxxOOOOx)TS7 MS_Class=30 +Mass test: TS0(OxxOOOOx)TS7 MS_Class=31 Mass test: TS0(OxxOOOOO)TS7 MS_Class=0 Mass test: TS0(OxxOOOOO)TS7 MS_Class=1 Mass test: TS0(OxxOOOOO)TS7 MS_Class=2 @@ -5708,6 +6028,8 @@ Mass test: TS0(OxxOOOOO)TS7 MS_Class=27 Mass test: TS0(OxxOOOOO)TS7 MS_Class=28 Mass test: TS0(OxxOOOOO)TS7 MS_Class=29 +Mass test: TS0(OxxOOOOO)TS7 MS_Class=30 +Mass test: TS0(OxxOOOOO)TS7 MS_Class=31 Mass test: TS0(OxOxxxxx)TS7 MS_Class=0 Mass test: TS0(OxOxxxxx)TS7 MS_Class=1 Mass test: TS0(OxOxxxxx)TS7 MS_Class=2 @@ -5738,6 +6060,8 @@ Mass test: TS0(OxOxxxxx)TS7 MS_Class=27 Mass test: TS0(OxOxxxxx)TS7 MS_Class=28 Mass test: TS0(OxOxxxxx)TS7 MS_Class=29 +Mass test: TS0(OxOxxxxx)TS7 MS_Class=30 +Mass test: TS0(OxOxxxxx)TS7 MS_Class=31 Mass test: TS0(OxOxxxxO)TS7 MS_Class=0 Mass test: TS0(OxOxxxxO)TS7 MS_Class=1 Mass test: TS0(OxOxxxxO)TS7 MS_Class=2 @@ -5768,6 +6092,8 @@ Mass test: TS0(OxOxxxxO)TS7 MS_Class=27 Mass test: TS0(OxOxxxxO)TS7 MS_Class=28 Mass test: TS0(OxOxxxxO)TS7 MS_Class=29 +Mass test: TS0(OxOxxxxO)TS7 MS_Class=30 +Mass test: TS0(OxOxxxxO)TS7 MS_Class=31 Mass test: TS0(OxOxxxOx)TS7 MS_Class=0 Mass test: TS0(OxOxxxOx)TS7 MS_Class=1 Mass test: TS0(OxOxxxOx)TS7 MS_Class=2 @@ -5798,6 +6124,8 @@ Mass test: TS0(OxOxxxOx)TS7 MS_Class=27 Mass test: TS0(OxOxxxOx)TS7 MS_Class=28 Mass test: TS0(OxOxxxOx)TS7 MS_Class=29 +Mass test: TS0(OxOxxxOx)TS7 MS_Class=30 +Mass test: TS0(OxOxxxOx)TS7 MS_Class=31 Mass test: TS0(OxOxxxOO)TS7 MS_Class=0 Mass test: TS0(OxOxxxOO)TS7 MS_Class=1 Mass test: TS0(OxOxxxOO)TS7 MS_Class=2 @@ -5828,6 +6156,8 @@ Mass test: TS0(OxOxxxOO)TS7 MS_Class=27 Mass test: TS0(OxOxxxOO)TS7 MS_Class=28 Mass test: TS0(OxOxxxOO)TS7 MS_Class=29 +Mass test: TS0(OxOxxxOO)TS7 MS_Class=30 +Mass test: TS0(OxOxxxOO)TS7 MS_Class=31 Mass test: TS0(OxOxxOxx)TS7 MS_Class=0 Mass test: TS0(OxOxxOxx)TS7 MS_Class=1 Mass test: TS0(OxOxxOxx)TS7 MS_Class=2 @@ -5858,6 +6188,8 @@ Mass test: TS0(OxOxxOxx)TS7 MS_Class=27 Mass test: TS0(OxOxxOxx)TS7 MS_Class=28 Mass test: TS0(OxOxxOxx)TS7 MS_Class=29 +Mass test: TS0(OxOxxOxx)TS7 MS_Class=30 +Mass test: TS0(OxOxxOxx)TS7 MS_Class=31 Mass test: TS0(OxOxxOxO)TS7 MS_Class=0 Mass test: TS0(OxOxxOxO)TS7 MS_Class=1 Mass test: TS0(OxOxxOxO)TS7 MS_Class=2 @@ -5888,6 +6220,8 @@ Mass test: TS0(OxOxxOxO)TS7 MS_Class=27 Mass test: TS0(OxOxxOxO)TS7 MS_Class=28 Mass test: TS0(OxOxxOxO)TS7 MS_Class=29 +Mass test: TS0(OxOxxOxO)TS7 MS_Class=30 +Mass test: TS0(OxOxxOxO)TS7 MS_Class=31 Mass test: TS0(OxOxxOOx)TS7 MS_Class=0 Mass test: TS0(OxOxxOOx)TS7 MS_Class=1 Mass test: TS0(OxOxxOOx)TS7 MS_Class=2 @@ -5918,6 +6252,8 @@ Mass test: TS0(OxOxxOOx)TS7 MS_Class=27 Mass test: TS0(OxOxxOOx)TS7 MS_Class=28 Mass test: TS0(OxOxxOOx)TS7 MS_Class=29 +Mass test: TS0(OxOxxOOx)TS7 MS_Class=30 +Mass test: TS0(OxOxxOOx)TS7 MS_Class=31 Mass test: TS0(OxOxxOOO)TS7 MS_Class=0 Mass test: TS0(OxOxxOOO)TS7 MS_Class=1 Mass test: TS0(OxOxxOOO)TS7 MS_Class=2 @@ -5948,6 +6284,8 @@ Mass test: TS0(OxOxxOOO)TS7 MS_Class=27 Mass test: TS0(OxOxxOOO)TS7 MS_Class=28 Mass test: TS0(OxOxxOOO)TS7 MS_Class=29 +Mass test: TS0(OxOxxOOO)TS7 MS_Class=30 +Mass test: TS0(OxOxxOOO)TS7 MS_Class=31 Mass test: TS0(OxOxOxxx)TS7 MS_Class=0 Mass test: TS0(OxOxOxxx)TS7 MS_Class=1 Mass test: TS0(OxOxOxxx)TS7 MS_Class=2 @@ -5978,6 +6316,8 @@ Mass test: TS0(OxOxOxxx)TS7 MS_Class=27 Mass test: TS0(OxOxOxxx)TS7 MS_Class=28 Mass test: TS0(OxOxOxxx)TS7 MS_Class=29 +Mass test: TS0(OxOxOxxx)TS7 MS_Class=30 +Mass test: TS0(OxOxOxxx)TS7 MS_Class=31 Mass test: TS0(OxOxOxxO)TS7 MS_Class=0 Mass test: TS0(OxOxOxxO)TS7 MS_Class=1 Mass test: TS0(OxOxOxxO)TS7 MS_Class=2 @@ -6008,6 +6348,8 @@ Mass test: TS0(OxOxOxxO)TS7 MS_Class=27 Mass test: TS0(OxOxOxxO)TS7 MS_Class=28 Mass test: TS0(OxOxOxxO)TS7 MS_Class=29 +Mass test: TS0(OxOxOxxO)TS7 MS_Class=30 +Mass test: TS0(OxOxOxxO)TS7 MS_Class=31 Mass test: TS0(OxOxOxOx)TS7 MS_Class=0 Mass test: TS0(OxOxOxOx)TS7 MS_Class=1 Mass test: TS0(OxOxOxOx)TS7 MS_Class=2 @@ -6038,6 +6380,8 @@ Mass test: TS0(OxOxOxOx)TS7 MS_Class=27 Mass test: TS0(OxOxOxOx)TS7 MS_Class=28 Mass test: TS0(OxOxOxOx)TS7 MS_Class=29 +Mass test: TS0(OxOxOxOx)TS7 MS_Class=30 +Mass test: TS0(OxOxOxOx)TS7 MS_Class=31 Mass test: TS0(OxOxOxOO)TS7 MS_Class=0 Mass test: TS0(OxOxOxOO)TS7 MS_Class=1 Mass test: TS0(OxOxOxOO)TS7 MS_Class=2 @@ -6068,6 +6412,8 @@ Mass test: TS0(OxOxOxOO)TS7 MS_Class=27 Mass test: TS0(OxOxOxOO)TS7 MS_Class=28 Mass test: TS0(OxOxOxOO)TS7 MS_Class=29 +Mass test: TS0(OxOxOxOO)TS7 MS_Class=30 +Mass test: TS0(OxOxOxOO)TS7 MS_Class=31 Mass test: TS0(OxOxOOxx)TS7 MS_Class=0 Mass test: TS0(OxOxOOxx)TS7 MS_Class=1 Mass test: TS0(OxOxOOxx)TS7 MS_Class=2 @@ -6098,6 +6444,8 @@ Mass test: TS0(OxOxOOxx)TS7 MS_Class=27 Mass test: TS0(OxOxOOxx)TS7 MS_Class=28 Mass test: TS0(OxOxOOxx)TS7 MS_Class=29 +Mass test: TS0(OxOxOOxx)TS7 MS_Class=30 +Mass test: TS0(OxOxOOxx)TS7 MS_Class=31 Mass test: TS0(OxOxOOxO)TS7 MS_Class=0 Mass test: TS0(OxOxOOxO)TS7 MS_Class=1 Mass test: TS0(OxOxOOxO)TS7 MS_Class=2 @@ -6128,6 +6476,8 @@ Mass test: TS0(OxOxOOxO)TS7 MS_Class=27 Mass test: TS0(OxOxOOxO)TS7 MS_Class=28 Mass test: TS0(OxOxOOxO)TS7 MS_Class=29 +Mass test: TS0(OxOxOOxO)TS7 MS_Class=30 +Mass test: TS0(OxOxOOxO)TS7 MS_Class=31 Mass test: TS0(OxOxOOOx)TS7 MS_Class=0 Mass test: TS0(OxOxOOOx)TS7 MS_Class=1 Mass test: TS0(OxOxOOOx)TS7 MS_Class=2 @@ -6158,6 +6508,8 @@ Mass test: TS0(OxOxOOOx)TS7 MS_Class=27 Mass test: TS0(OxOxOOOx)TS7 MS_Class=28 Mass test: TS0(OxOxOOOx)TS7 MS_Class=29 +Mass test: TS0(OxOxOOOx)TS7 MS_Class=30 +Mass test: TS0(OxOxOOOx)TS7 MS_Class=31 Mass test: TS0(OxOxOOOO)TS7 MS_Class=0 Mass test: TS0(OxOxOOOO)TS7 MS_Class=1 Mass test: TS0(OxOxOOOO)TS7 MS_Class=2 @@ -6188,6 +6540,8 @@ Mass test: TS0(OxOxOOOO)TS7 MS_Class=27 Mass test: TS0(OxOxOOOO)TS7 MS_Class=28 Mass test: TS0(OxOxOOOO)TS7 MS_Class=29 +Mass test: TS0(OxOxOOOO)TS7 MS_Class=30 +Mass test: TS0(OxOxOOOO)TS7 MS_Class=31 Mass test: TS0(OxOOxxxx)TS7 MS_Class=0 Mass test: TS0(OxOOxxxx)TS7 MS_Class=1 Mass test: TS0(OxOOxxxx)TS7 MS_Class=2 @@ -6218,6 +6572,8 @@ Mass test: TS0(OxOOxxxx)TS7 MS_Class=27 Mass test: TS0(OxOOxxxx)TS7 MS_Class=28 Mass test: TS0(OxOOxxxx)TS7 MS_Class=29 +Mass test: TS0(OxOOxxxx)TS7 MS_Class=30 +Mass test: TS0(OxOOxxxx)TS7 MS_Class=31 Mass test: TS0(OxOOxxxO)TS7 MS_Class=0 Mass test: TS0(OxOOxxxO)TS7 MS_Class=1 Mass test: TS0(OxOOxxxO)TS7 MS_Class=2 @@ -6248,6 +6604,8 @@ Mass test: TS0(OxOOxxxO)TS7 MS_Class=27 Mass test: TS0(OxOOxxxO)TS7 MS_Class=28 Mass test: TS0(OxOOxxxO)TS7 MS_Class=29 +Mass test: TS0(OxOOxxxO)TS7 MS_Class=30 +Mass test: TS0(OxOOxxxO)TS7 MS_Class=31 Mass test: TS0(OxOOxxOx)TS7 MS_Class=0 Mass test: TS0(OxOOxxOx)TS7 MS_Class=1 Mass test: TS0(OxOOxxOx)TS7 MS_Class=2 @@ -6278,6 +6636,8 @@ Mass test: TS0(OxOOxxOx)TS7 MS_Class=27 Mass test: TS0(OxOOxxOx)TS7 MS_Class=28 Mass test: TS0(OxOOxxOx)TS7 MS_Class=29 +Mass test: TS0(OxOOxxOx)TS7 MS_Class=30 +Mass test: TS0(OxOOxxOx)TS7 MS_Class=31 Mass test: TS0(OxOOxxOO)TS7 MS_Class=0 Mass test: TS0(OxOOxxOO)TS7 MS_Class=1 Mass test: TS0(OxOOxxOO)TS7 MS_Class=2 @@ -6308,6 +6668,8 @@ Mass test: TS0(OxOOxxOO)TS7 MS_Class=27 Mass test: TS0(OxOOxxOO)TS7 MS_Class=28 Mass test: TS0(OxOOxxOO)TS7 MS_Class=29 +Mass test: TS0(OxOOxxOO)TS7 MS_Class=30 +Mass test: TS0(OxOOxxOO)TS7 MS_Class=31 Mass test: TS0(OxOOxOxx)TS7 MS_Class=0 Mass test: TS0(OxOOxOxx)TS7 MS_Class=1 Mass test: TS0(OxOOxOxx)TS7 MS_Class=2 @@ -6338,6 +6700,8 @@ Mass test: TS0(OxOOxOxx)TS7 MS_Class=27 Mass test: TS0(OxOOxOxx)TS7 MS_Class=28 Mass test: TS0(OxOOxOxx)TS7 MS_Class=29 +Mass test: TS0(OxOOxOxx)TS7 MS_Class=30 +Mass test: TS0(OxOOxOxx)TS7 MS_Class=31 Mass test: TS0(OxOOxOxO)TS7 MS_Class=0 Mass test: TS0(OxOOxOxO)TS7 MS_Class=1 Mass test: TS0(OxOOxOxO)TS7 MS_Class=2 @@ -6368,6 +6732,8 @@ Mass test: TS0(OxOOxOxO)TS7 MS_Class=27 Mass test: TS0(OxOOxOxO)TS7 MS_Class=28 Mass test: TS0(OxOOxOxO)TS7 MS_Class=29 +Mass test: TS0(OxOOxOxO)TS7 MS_Class=30 +Mass test: TS0(OxOOxOxO)TS7 MS_Class=31 Mass test: TS0(OxOOxOOx)TS7 MS_Class=0 Mass test: TS0(OxOOxOOx)TS7 MS_Class=1 Mass test: TS0(OxOOxOOx)TS7 MS_Class=2 @@ -6398,6 +6764,8 @@ Mass test: TS0(OxOOxOOx)TS7 MS_Class=27 Mass test: TS0(OxOOxOOx)TS7 MS_Class=28 Mass test: TS0(OxOOxOOx)TS7 MS_Class=29 +Mass test: TS0(OxOOxOOx)TS7 MS_Class=30 +Mass test: TS0(OxOOxOOx)TS7 MS_Class=31 Mass test: TS0(OxOOxOOO)TS7 MS_Class=0 Mass test: TS0(OxOOxOOO)TS7 MS_Class=1 Mass test: TS0(OxOOxOOO)TS7 MS_Class=2 @@ -6428,6 +6796,8 @@ Mass test: TS0(OxOOxOOO)TS7 MS_Class=27 Mass test: TS0(OxOOxOOO)TS7 MS_Class=28 Mass test: TS0(OxOOxOOO)TS7 MS_Class=29 +Mass test: TS0(OxOOxOOO)TS7 MS_Class=30 +Mass test: TS0(OxOOxOOO)TS7 MS_Class=31 Mass test: TS0(OxOOOxxx)TS7 MS_Class=0 Mass test: TS0(OxOOOxxx)TS7 MS_Class=1 Mass test: TS0(OxOOOxxx)TS7 MS_Class=2 @@ -6458,6 +6828,8 @@ Mass test: TS0(OxOOOxxx)TS7 MS_Class=27 Mass test: TS0(OxOOOxxx)TS7 MS_Class=28 Mass test: TS0(OxOOOxxx)TS7 MS_Class=29 +Mass test: TS0(OxOOOxxx)TS7 MS_Class=30 +Mass test: TS0(OxOOOxxx)TS7 MS_Class=31 Mass test: TS0(OxOOOxxO)TS7 MS_Class=0 Mass test: TS0(OxOOOxxO)TS7 MS_Class=1 Mass test: TS0(OxOOOxxO)TS7 MS_Class=2 @@ -6488,6 +6860,8 @@ Mass test: TS0(OxOOOxxO)TS7 MS_Class=27 Mass test: TS0(OxOOOxxO)TS7 MS_Class=28 Mass test: TS0(OxOOOxxO)TS7 MS_Class=29 +Mass test: TS0(OxOOOxxO)TS7 MS_Class=30 +Mass test: TS0(OxOOOxxO)TS7 MS_Class=31 Mass test: TS0(OxOOOxOx)TS7 MS_Class=0 Mass test: TS0(OxOOOxOx)TS7 MS_Class=1 Mass test: TS0(OxOOOxOx)TS7 MS_Class=2 @@ -6518,6 +6892,8 @@ Mass test: TS0(OxOOOxOx)TS7 MS_Class=27 Mass test: TS0(OxOOOxOx)TS7 MS_Class=28 Mass test: TS0(OxOOOxOx)TS7 MS_Class=29 +Mass test: TS0(OxOOOxOx)TS7 MS_Class=30 +Mass test: TS0(OxOOOxOx)TS7 MS_Class=31 Mass test: TS0(OxOOOxOO)TS7 MS_Class=0 Mass test: TS0(OxOOOxOO)TS7 MS_Class=1 Mass test: TS0(OxOOOxOO)TS7 MS_Class=2 @@ -6548,6 +6924,8 @@ Mass test: TS0(OxOOOxOO)TS7 MS_Class=27 Mass test: TS0(OxOOOxOO)TS7 MS_Class=28 Mass test: TS0(OxOOOxOO)TS7 MS_Class=29 +Mass test: TS0(OxOOOxOO)TS7 MS_Class=30 +Mass test: TS0(OxOOOxOO)TS7 MS_Class=31 Mass test: TS0(OxOOOOxx)TS7 MS_Class=0 Mass test: TS0(OxOOOOxx)TS7 MS_Class=1 Mass test: TS0(OxOOOOxx)TS7 MS_Class=2 @@ -6578,6 +6956,8 @@ Mass test: TS0(OxOOOOxx)TS7 MS_Class=27 Mass test: TS0(OxOOOOxx)TS7 MS_Class=28 Mass test: TS0(OxOOOOxx)TS7 MS_Class=29 +Mass test: TS0(OxOOOOxx)TS7 MS_Class=30 +Mass test: TS0(OxOOOOxx)TS7 MS_Class=31 Mass test: TS0(OxOOOOxO)TS7 MS_Class=0 Mass test: TS0(OxOOOOxO)TS7 MS_Class=1 Mass test: TS0(OxOOOOxO)TS7 MS_Class=2 @@ -6608,6 +6988,8 @@ Mass test: TS0(OxOOOOxO)TS7 MS_Class=27 Mass test: TS0(OxOOOOxO)TS7 MS_Class=28 Mass test: TS0(OxOOOOxO)TS7 MS_Class=29 +Mass test: TS0(OxOOOOxO)TS7 MS_Class=30 +Mass test: TS0(OxOOOOxO)TS7 MS_Class=31 Mass test: TS0(OxOOOOOx)TS7 MS_Class=0 Mass test: TS0(OxOOOOOx)TS7 MS_Class=1 Mass test: TS0(OxOOOOOx)TS7 MS_Class=2 @@ -6638,6 +7020,8 @@ Mass test: TS0(OxOOOOOx)TS7 MS_Class=27 Mass test: TS0(OxOOOOOx)TS7 MS_Class=28 Mass test: TS0(OxOOOOOx)TS7 MS_Class=29 +Mass test: TS0(OxOOOOOx)TS7 MS_Class=30 +Mass test: TS0(OxOOOOOx)TS7 MS_Class=31 Mass test: TS0(OxOOOOOO)TS7 MS_Class=0 Mass test: TS0(OxOOOOOO)TS7 MS_Class=1 Mass test: TS0(OxOOOOOO)TS7 MS_Class=2 @@ -6668,6 +7052,8 @@ Mass test: TS0(OxOOOOOO)TS7 MS_Class=27 Mass test: TS0(OxOOOOOO)TS7 MS_Class=28 Mass test: TS0(OxOOOOOO)TS7 MS_Class=29 +Mass test: TS0(OxOOOOOO)TS7 MS_Class=30 +Mass test: TS0(OxOOOOOO)TS7 MS_Class=31 Mass test: TS0(OOxxxxxx)TS7 MS_Class=0 Mass test: TS0(OOxxxxxx)TS7 MS_Class=1 Mass test: TS0(OOxxxxxx)TS7 MS_Class=2 @@ -6698,6 +7084,8 @@ Mass test: TS0(OOxxxxxx)TS7 MS_Class=27 Mass test: TS0(OOxxxxxx)TS7 MS_Class=28 Mass test: TS0(OOxxxxxx)TS7 MS_Class=29 +Mass test: TS0(OOxxxxxx)TS7 MS_Class=30 +Mass test: TS0(OOxxxxxx)TS7 MS_Class=31 Mass test: TS0(OOxxxxxO)TS7 MS_Class=0 Mass test: TS0(OOxxxxxO)TS7 MS_Class=1 Mass test: TS0(OOxxxxxO)TS7 MS_Class=2 @@ -6728,6 +7116,8 @@ Mass test: TS0(OOxxxxxO)TS7 MS_Class=27 Mass test: TS0(OOxxxxxO)TS7 MS_Class=28 Mass test: TS0(OOxxxxxO)TS7 MS_Class=29 +Mass test: TS0(OOxxxxxO)TS7 MS_Class=30 +Mass test: TS0(OOxxxxxO)TS7 MS_Class=31 Mass test: TS0(OOxxxxOx)TS7 MS_Class=0 Mass test: TS0(OOxxxxOx)TS7 MS_Class=1 Mass test: TS0(OOxxxxOx)TS7 MS_Class=2 @@ -6758,6 +7148,8 @@ Mass test: TS0(OOxxxxOx)TS7 MS_Class=27 Mass test: TS0(OOxxxxOx)TS7 MS_Class=28 Mass test: TS0(OOxxxxOx)TS7 MS_Class=29 +Mass test: TS0(OOxxxxOx)TS7 MS_Class=30 +Mass test: TS0(OOxxxxOx)TS7 MS_Class=31 Mass test: TS0(OOxxxxOO)TS7 MS_Class=0 Mass test: TS0(OOxxxxOO)TS7 MS_Class=1 Mass test: TS0(OOxxxxOO)TS7 MS_Class=2 @@ -6788,6 +7180,8 @@ Mass test: TS0(OOxxxxOO)TS7 MS_Class=27 Mass test: TS0(OOxxxxOO)TS7 MS_Class=28 Mass test: TS0(OOxxxxOO)TS7 MS_Class=29 +Mass test: TS0(OOxxxxOO)TS7 MS_Class=30 +Mass test: TS0(OOxxxxOO)TS7 MS_Class=31 Mass test: TS0(OOxxxOxx)TS7 MS_Class=0 Mass test: TS0(OOxxxOxx)TS7 MS_Class=1 Mass test: TS0(OOxxxOxx)TS7 MS_Class=2 @@ -6818,6 +7212,8 @@ Mass test: TS0(OOxxxOxx)TS7 MS_Class=27 Mass test: TS0(OOxxxOxx)TS7 MS_Class=28 Mass test: TS0(OOxxxOxx)TS7 MS_Class=29 +Mass test: TS0(OOxxxOxx)TS7 MS_Class=30 +Mass test: TS0(OOxxxOxx)TS7 MS_Class=31 Mass test: TS0(OOxxxOxO)TS7 MS_Class=0 Mass test: TS0(OOxxxOxO)TS7 MS_Class=1 Mass test: TS0(OOxxxOxO)TS7 MS_Class=2 @@ -6848,6 +7244,8 @@ Mass test: TS0(OOxxxOxO)TS7 MS_Class=27 Mass test: TS0(OOxxxOxO)TS7 MS_Class=28 Mass test: TS0(OOxxxOxO)TS7 MS_Class=29 +Mass test: TS0(OOxxxOxO)TS7 MS_Class=30 +Mass test: TS0(OOxxxOxO)TS7 MS_Class=31 Mass test: TS0(OOxxxOOx)TS7 MS_Class=0 Mass test: TS0(OOxxxOOx)TS7 MS_Class=1 Mass test: TS0(OOxxxOOx)TS7 MS_Class=2 @@ -6878,6 +7276,8 @@ Mass test: TS0(OOxxxOOx)TS7 MS_Class=27 Mass test: TS0(OOxxxOOx)TS7 MS_Class=28 Mass test: TS0(OOxxxOOx)TS7 MS_Class=29 +Mass test: TS0(OOxxxOOx)TS7 MS_Class=30 +Mass test: TS0(OOxxxOOx)TS7 MS_Class=31 Mass test: TS0(OOxxxOOO)TS7 MS_Class=0 Mass test: TS0(OOxxxOOO)TS7 MS_Class=1 Mass test: TS0(OOxxxOOO)TS7 MS_Class=2 @@ -6908,6 +7308,8 @@ Mass test: TS0(OOxxxOOO)TS7 MS_Class=27 Mass test: TS0(OOxxxOOO)TS7 MS_Class=28 Mass test: TS0(OOxxxOOO)TS7 MS_Class=29 +Mass test: TS0(OOxxxOOO)TS7 MS_Class=30 +Mass test: TS0(OOxxxOOO)TS7 MS_Class=31 Mass test: TS0(OOxxOxxx)TS7 MS_Class=0 Mass test: TS0(OOxxOxxx)TS7 MS_Class=1 Mass test: TS0(OOxxOxxx)TS7 MS_Class=2 @@ -6938,6 +7340,8 @@ Mass test: TS0(OOxxOxxx)TS7 MS_Class=27 Mass test: TS0(OOxxOxxx)TS7 MS_Class=28 Mass test: TS0(OOxxOxxx)TS7 MS_Class=29 +Mass test: TS0(OOxxOxxx)TS7 MS_Class=30 +Mass test: TS0(OOxxOxxx)TS7 MS_Class=31 Mass test: TS0(OOxxOxxO)TS7 MS_Class=0 Mass test: TS0(OOxxOxxO)TS7 MS_Class=1 Mass test: TS0(OOxxOxxO)TS7 MS_Class=2 @@ -6968,6 +7372,8 @@ Mass test: TS0(OOxxOxxO)TS7 MS_Class=27 Mass test: TS0(OOxxOxxO)TS7 MS_Class=28 Mass test: TS0(OOxxOxxO)TS7 MS_Class=29 +Mass test: TS0(OOxxOxxO)TS7 MS_Class=30 +Mass test: TS0(OOxxOxxO)TS7 MS_Class=31 Mass test: TS0(OOxxOxOx)TS7 MS_Class=0 Mass test: TS0(OOxxOxOx)TS7 MS_Class=1 Mass test: TS0(OOxxOxOx)TS7 MS_Class=2 @@ -6998,6 +7404,8 @@ Mass test: TS0(OOxxOxOx)TS7 MS_Class=27 Mass test: TS0(OOxxOxOx)TS7 MS_Class=28 Mass test: TS0(OOxxOxOx)TS7 MS_Class=29 +Mass test: TS0(OOxxOxOx)TS7 MS_Class=30 +Mass test: TS0(OOxxOxOx)TS7 MS_Class=31 Mass test: TS0(OOxxOxOO)TS7 MS_Class=0 Mass test: TS0(OOxxOxOO)TS7 MS_Class=1 Mass test: TS0(OOxxOxOO)TS7 MS_Class=2 @@ -7028,6 +7436,8 @@ Mass test: TS0(OOxxOxOO)TS7 MS_Class=27 Mass test: TS0(OOxxOxOO)TS7 MS_Class=28 Mass test: TS0(OOxxOxOO)TS7 MS_Class=29 +Mass test: TS0(OOxxOxOO)TS7 MS_Class=30 +Mass test: TS0(OOxxOxOO)TS7 MS_Class=31 Mass test: TS0(OOxxOOxx)TS7 MS_Class=0 Mass test: TS0(OOxxOOxx)TS7 MS_Class=1 Mass test: TS0(OOxxOOxx)TS7 MS_Class=2 @@ -7058,6 +7468,8 @@ Mass test: TS0(OOxxOOxx)TS7 MS_Class=27 Mass test: TS0(OOxxOOxx)TS7 MS_Class=28 Mass test: TS0(OOxxOOxx)TS7 MS_Class=29 +Mass test: TS0(OOxxOOxx)TS7 MS_Class=30 +Mass test: TS0(OOxxOOxx)TS7 MS_Class=31 Mass test: TS0(OOxxOOxO)TS7 MS_Class=0 Mass test: TS0(OOxxOOxO)TS7 MS_Class=1 Mass test: TS0(OOxxOOxO)TS7 MS_Class=2 @@ -7088,6 +7500,8 @@ Mass test: TS0(OOxxOOxO)TS7 MS_Class=27 Mass test: TS0(OOxxOOxO)TS7 MS_Class=28 Mass test: TS0(OOxxOOxO)TS7 MS_Class=29 +Mass test: TS0(OOxxOOxO)TS7 MS_Class=30 +Mass test: TS0(OOxxOOxO)TS7 MS_Class=31 Mass test: TS0(OOxxOOOx)TS7 MS_Class=0 Mass test: TS0(OOxxOOOx)TS7 MS_Class=1 Mass test: TS0(OOxxOOOx)TS7 MS_Class=2 @@ -7118,6 +7532,8 @@ Mass test: TS0(OOxxOOOx)TS7 MS_Class=27 Mass test: TS0(OOxxOOOx)TS7 MS_Class=28 Mass test: TS0(OOxxOOOx)TS7 MS_Class=29 +Mass test: TS0(OOxxOOOx)TS7 MS_Class=30 +Mass test: TS0(OOxxOOOx)TS7 MS_Class=31 Mass test: TS0(OOxxOOOO)TS7 MS_Class=0 Mass test: TS0(OOxxOOOO)TS7 MS_Class=1 Mass test: TS0(OOxxOOOO)TS7 MS_Class=2 @@ -7148,6 +7564,8 @@ Mass test: TS0(OOxxOOOO)TS7 MS_Class=27 Mass test: TS0(OOxxOOOO)TS7 MS_Class=28 Mass test: TS0(OOxxOOOO)TS7 MS_Class=29 +Mass test: TS0(OOxxOOOO)TS7 MS_Class=30 +Mass test: TS0(OOxxOOOO)TS7 MS_Class=31 Mass test: TS0(OOxOxxxx)TS7 MS_Class=0 Mass test: TS0(OOxOxxxx)TS7 MS_Class=1 Mass test: TS0(OOxOxxxx)TS7 MS_Class=2 @@ -7178,6 +7596,8 @@ Mass test: TS0(OOxOxxxx)TS7 MS_Class=27 Mass test: TS0(OOxOxxxx)TS7 MS_Class=28 Mass test: TS0(OOxOxxxx)TS7 MS_Class=29 +Mass test: TS0(OOxOxxxx)TS7 MS_Class=30 +Mass test: TS0(OOxOxxxx)TS7 MS_Class=31 Mass test: TS0(OOxOxxxO)TS7 MS_Class=0 Mass test: TS0(OOxOxxxO)TS7 MS_Class=1 Mass test: TS0(OOxOxxxO)TS7 MS_Class=2 @@ -7208,6 +7628,8 @@ Mass test: TS0(OOxOxxxO)TS7 MS_Class=27 Mass test: TS0(OOxOxxxO)TS7 MS_Class=28 Mass test: TS0(OOxOxxxO)TS7 MS_Class=29 +Mass test: TS0(OOxOxxxO)TS7 MS_Class=30 +Mass test: TS0(OOxOxxxO)TS7 MS_Class=31 Mass test: TS0(OOxOxxOx)TS7 MS_Class=0 Mass test: TS0(OOxOxxOx)TS7 MS_Class=1 Mass test: TS0(OOxOxxOx)TS7 MS_Class=2 @@ -7238,6 +7660,8 @@ Mass test: TS0(OOxOxxOx)TS7 MS_Class=27 Mass test: TS0(OOxOxxOx)TS7 MS_Class=28 Mass test: TS0(OOxOxxOx)TS7 MS_Class=29 +Mass test: TS0(OOxOxxOx)TS7 MS_Class=30 +Mass test: TS0(OOxOxxOx)TS7 MS_Class=31 Mass test: TS0(OOxOxxOO)TS7 MS_Class=0 Mass test: TS0(OOxOxxOO)TS7 MS_Class=1 Mass test: TS0(OOxOxxOO)TS7 MS_Class=2 @@ -7268,6 +7692,8 @@ Mass test: TS0(OOxOxxOO)TS7 MS_Class=27 Mass test: TS0(OOxOxxOO)TS7 MS_Class=28 Mass test: TS0(OOxOxxOO)TS7 MS_Class=29 +Mass test: TS0(OOxOxxOO)TS7 MS_Class=30 +Mass test: TS0(OOxOxxOO)TS7 MS_Class=31 Mass test: TS0(OOxOxOxx)TS7 MS_Class=0 Mass test: TS0(OOxOxOxx)TS7 MS_Class=1 Mass test: TS0(OOxOxOxx)TS7 MS_Class=2 @@ -7298,6 +7724,8 @@ Mass test: TS0(OOxOxOxx)TS7 MS_Class=27 Mass test: TS0(OOxOxOxx)TS7 MS_Class=28 Mass test: TS0(OOxOxOxx)TS7 MS_Class=29 +Mass test: TS0(OOxOxOxx)TS7 MS_Class=30 +Mass test: TS0(OOxOxOxx)TS7 MS_Class=31 Mass test: TS0(OOxOxOxO)TS7 MS_Class=0 Mass test: TS0(OOxOxOxO)TS7 MS_Class=1 Mass test: TS0(OOxOxOxO)TS7 MS_Class=2 @@ -7328,6 +7756,8 @@ Mass test: TS0(OOxOxOxO)TS7 MS_Class=27 Mass test: TS0(OOxOxOxO)TS7 MS_Class=28 Mass test: TS0(OOxOxOxO)TS7 MS_Class=29 +Mass test: TS0(OOxOxOxO)TS7 MS_Class=30 +Mass test: TS0(OOxOxOxO)TS7 MS_Class=31 Mass test: TS0(OOxOxOOx)TS7 MS_Class=0 Mass test: TS0(OOxOxOOx)TS7 MS_Class=1 Mass test: TS0(OOxOxOOx)TS7 MS_Class=2 @@ -7358,6 +7788,8 @@ Mass test: TS0(OOxOxOOx)TS7 MS_Class=27 Mass test: TS0(OOxOxOOx)TS7 MS_Class=28 Mass test: TS0(OOxOxOOx)TS7 MS_Class=29 +Mass test: TS0(OOxOxOOx)TS7 MS_Class=30 +Mass test: TS0(OOxOxOOx)TS7 MS_Class=31 Mass test: TS0(OOxOxOOO)TS7 MS_Class=0 Mass test: TS0(OOxOxOOO)TS7 MS_Class=1 Mass test: TS0(OOxOxOOO)TS7 MS_Class=2 @@ -7388,6 +7820,8 @@ Mass test: TS0(OOxOxOOO)TS7 MS_Class=27 Mass test: TS0(OOxOxOOO)TS7 MS_Class=28 Mass test: TS0(OOxOxOOO)TS7 MS_Class=29 +Mass test: TS0(OOxOxOOO)TS7 MS_Class=30 +Mass test: TS0(OOxOxOOO)TS7 MS_Class=31 Mass test: TS0(OOxOOxxx)TS7 MS_Class=0 Mass test: TS0(OOxOOxxx)TS7 MS_Class=1 Mass test: TS0(OOxOOxxx)TS7 MS_Class=2 @@ -7418,6 +7852,8 @@ Mass test: TS0(OOxOOxxx)TS7 MS_Class=27 Mass test: TS0(OOxOOxxx)TS7 MS_Class=28 Mass test: TS0(OOxOOxxx)TS7 MS_Class=29 +Mass test: TS0(OOxOOxxx)TS7 MS_Class=30 +Mass test: TS0(OOxOOxxx)TS7 MS_Class=31 Mass test: TS0(OOxOOxxO)TS7 MS_Class=0 Mass test: TS0(OOxOOxxO)TS7 MS_Class=1 Mass test: TS0(OOxOOxxO)TS7 MS_Class=2 @@ -7448,6 +7884,8 @@ Mass test: TS0(OOxOOxxO)TS7 MS_Class=27 Mass test: TS0(OOxOOxxO)TS7 MS_Class=28 Mass test: TS0(OOxOOxxO)TS7 MS_Class=29 +Mass test: TS0(OOxOOxxO)TS7 MS_Class=30 +Mass test: TS0(OOxOOxxO)TS7 MS_Class=31 Mass test: TS0(OOxOOxOx)TS7 MS_Class=0 Mass test: TS0(OOxOOxOx)TS7 MS_Class=1 Mass test: TS0(OOxOOxOx)TS7 MS_Class=2 @@ -7478,6 +7916,8 @@ Mass test: TS0(OOxOOxOx)TS7 MS_Class=27 Mass test: TS0(OOxOOxOx)TS7 MS_Class=28 Mass test: TS0(OOxOOxOx)TS7 MS_Class=29 +Mass test: TS0(OOxOOxOx)TS7 MS_Class=30 +Mass test: TS0(OOxOOxOx)TS7 MS_Class=31 Mass test: TS0(OOxOOxOO)TS7 MS_Class=0 Mass test: TS0(OOxOOxOO)TS7 MS_Class=1 Mass test: TS0(OOxOOxOO)TS7 MS_Class=2 @@ -7508,6 +7948,8 @@ Mass test: TS0(OOxOOxOO)TS7 MS_Class=27 Mass test: TS0(OOxOOxOO)TS7 MS_Class=28 Mass test: TS0(OOxOOxOO)TS7 MS_Class=29 +Mass test: TS0(OOxOOxOO)TS7 MS_Class=30 +Mass test: TS0(OOxOOxOO)TS7 MS_Class=31 Mass test: TS0(OOxOOOxx)TS7 MS_Class=0 Mass test: TS0(OOxOOOxx)TS7 MS_Class=1 Mass test: TS0(OOxOOOxx)TS7 MS_Class=2 @@ -7538,6 +7980,8 @@ Mass test: TS0(OOxOOOxx)TS7 MS_Class=27 Mass test: TS0(OOxOOOxx)TS7 MS_Class=28 Mass test: TS0(OOxOOOxx)TS7 MS_Class=29 +Mass test: TS0(OOxOOOxx)TS7 MS_Class=30 +Mass test: TS0(OOxOOOxx)TS7 MS_Class=31 Mass test: TS0(OOxOOOxO)TS7 MS_Class=0 Mass test: TS0(OOxOOOxO)TS7 MS_Class=1 Mass test: TS0(OOxOOOxO)TS7 MS_Class=2 @@ -7568,6 +8012,8 @@ Mass test: TS0(OOxOOOxO)TS7 MS_Class=27 Mass test: TS0(OOxOOOxO)TS7 MS_Class=28 Mass test: TS0(OOxOOOxO)TS7 MS_Class=29 +Mass test: TS0(OOxOOOxO)TS7 MS_Class=30 +Mass test: TS0(OOxOOOxO)TS7 MS_Class=31 Mass test: TS0(OOxOOOOx)TS7 MS_Class=0 Mass test: TS0(OOxOOOOx)TS7 MS_Class=1 Mass test: TS0(OOxOOOOx)TS7 MS_Class=2 @@ -7598,6 +8044,8 @@ Mass test: TS0(OOxOOOOx)TS7 MS_Class=27 Mass test: TS0(OOxOOOOx)TS7 MS_Class=28 Mass test: TS0(OOxOOOOx)TS7 MS_Class=29 +Mass test: TS0(OOxOOOOx)TS7 MS_Class=30 +Mass test: TS0(OOxOOOOx)TS7 MS_Class=31 Mass test: TS0(OOxOOOOO)TS7 MS_Class=0 Mass test: TS0(OOxOOOOO)TS7 MS_Class=1 Mass test: TS0(OOxOOOOO)TS7 MS_Class=2 @@ -7628,6 +8076,8 @@ Mass test: TS0(OOxOOOOO)TS7 MS_Class=27 Mass test: TS0(OOxOOOOO)TS7 MS_Class=28 Mass test: TS0(OOxOOOOO)TS7 MS_Class=29 +Mass test: TS0(OOxOOOOO)TS7 MS_Class=30 +Mass test: TS0(OOxOOOOO)TS7 MS_Class=31 Mass test: TS0(OOOxxxxx)TS7 MS_Class=0 Mass test: TS0(OOOxxxxx)TS7 MS_Class=1 Mass test: TS0(OOOxxxxx)TS7 MS_Class=2 @@ -7658,6 +8108,8 @@ Mass test: TS0(OOOxxxxx)TS7 MS_Class=27 Mass test: TS0(OOOxxxxx)TS7 MS_Class=28 Mass test: TS0(OOOxxxxx)TS7 MS_Class=29 +Mass test: TS0(OOOxxxxx)TS7 MS_Class=30 +Mass test: TS0(OOOxxxxx)TS7 MS_Class=31 Mass test: TS0(OOOxxxxO)TS7 MS_Class=0 Mass test: TS0(OOOxxxxO)TS7 MS_Class=1 Mass test: TS0(OOOxxxxO)TS7 MS_Class=2 @@ -7688,6 +8140,8 @@ Mass test: TS0(OOOxxxxO)TS7 MS_Class=27 Mass test: TS0(OOOxxxxO)TS7 MS_Class=28 Mass test: TS0(OOOxxxxO)TS7 MS_Class=29 +Mass test: TS0(OOOxxxxO)TS7 MS_Class=30 +Mass test: TS0(OOOxxxxO)TS7 MS_Class=31 Mass test: TS0(OOOxxxOx)TS7 MS_Class=0 Mass test: TS0(OOOxxxOx)TS7 MS_Class=1 Mass test: TS0(OOOxxxOx)TS7 MS_Class=2 @@ -7718,6 +8172,8 @@ Mass test: TS0(OOOxxxOx)TS7 MS_Class=27 Mass test: TS0(OOOxxxOx)TS7 MS_Class=28 Mass test: TS0(OOOxxxOx)TS7 MS_Class=29 +Mass test: TS0(OOOxxxOx)TS7 MS_Class=30 +Mass test: TS0(OOOxxxOx)TS7 MS_Class=31 Mass test: TS0(OOOxxxOO)TS7 MS_Class=0 Mass test: TS0(OOOxxxOO)TS7 MS_Class=1 Mass test: TS0(OOOxxxOO)TS7 MS_Class=2 @@ -7748,6 +8204,8 @@ Mass test: TS0(OOOxxxOO)TS7 MS_Class=27 Mass test: TS0(OOOxxxOO)TS7 MS_Class=28 Mass test: TS0(OOOxxxOO)TS7 MS_Class=29 +Mass test: TS0(OOOxxxOO)TS7 MS_Class=30 +Mass test: TS0(OOOxxxOO)TS7 MS_Class=31 Mass test: TS0(OOOxxOxx)TS7 MS_Class=0 Mass test: TS0(OOOxxOxx)TS7 MS_Class=1 Mass test: TS0(OOOxxOxx)TS7 MS_Class=2 @@ -7778,6 +8236,8 @@ Mass test: TS0(OOOxxOxx)TS7 MS_Class=27 Mass test: TS0(OOOxxOxx)TS7 MS_Class=28 Mass test: TS0(OOOxxOxx)TS7 MS_Class=29 +Mass test: TS0(OOOxxOxx)TS7 MS_Class=30 +Mass test: TS0(OOOxxOxx)TS7 MS_Class=31 Mass test: TS0(OOOxxOxO)TS7 MS_Class=0 Mass test: TS0(OOOxxOxO)TS7 MS_Class=1 Mass test: TS0(OOOxxOxO)TS7 MS_Class=2 @@ -7808,6 +8268,8 @@ Mass test: TS0(OOOxxOxO)TS7 MS_Class=27 Mass test: TS0(OOOxxOxO)TS7 MS_Class=28 Mass test: TS0(OOOxxOxO)TS7 MS_Class=29 +Mass test: TS0(OOOxxOxO)TS7 MS_Class=30 +Mass test: TS0(OOOxxOxO)TS7 MS_Class=31 Mass test: TS0(OOOxxOOx)TS7 MS_Class=0 Mass test: TS0(OOOxxOOx)TS7 MS_Class=1 Mass test: TS0(OOOxxOOx)TS7 MS_Class=2 @@ -7838,6 +8300,8 @@ Mass test: TS0(OOOxxOOx)TS7 MS_Class=27 Mass test: TS0(OOOxxOOx)TS7 MS_Class=28 Mass test: TS0(OOOxxOOx)TS7 MS_Class=29 +Mass test: TS0(OOOxxOOx)TS7 MS_Class=30 +Mass test: TS0(OOOxxOOx)TS7 MS_Class=31 Mass test: TS0(OOOxxOOO)TS7 MS_Class=0 Mass test: TS0(OOOxxOOO)TS7 MS_Class=1 Mass test: TS0(OOOxxOOO)TS7 MS_Class=2 @@ -7868,6 +8332,8 @@ Mass test: TS0(OOOxxOOO)TS7 MS_Class=27 Mass test: TS0(OOOxxOOO)TS7 MS_Class=28 Mass test: TS0(OOOxxOOO)TS7 MS_Class=29 +Mass test: TS0(OOOxxOOO)TS7 MS_Class=30 +Mass test: TS0(OOOxxOOO)TS7 MS_Class=31 Mass test: TS0(OOOxOxxx)TS7 MS_Class=0 Mass test: TS0(OOOxOxxx)TS7 MS_Class=1 Mass test: TS0(OOOxOxxx)TS7 MS_Class=2 @@ -7898,6 +8364,8 @@ Mass test: TS0(OOOxOxxx)TS7 MS_Class=27 Mass test: TS0(OOOxOxxx)TS7 MS_Class=28 Mass test: TS0(OOOxOxxx)TS7 MS_Class=29 +Mass test: TS0(OOOxOxxx)TS7 MS_Class=30 +Mass test: TS0(OOOxOxxx)TS7 MS_Class=31 Mass test: TS0(OOOxOxxO)TS7 MS_Class=0 Mass test: TS0(OOOxOxxO)TS7 MS_Class=1 Mass test: TS0(OOOxOxxO)TS7 MS_Class=2 @@ -7928,6 +8396,8 @@ Mass test: TS0(OOOxOxxO)TS7 MS_Class=27 Mass test: TS0(OOOxOxxO)TS7 MS_Class=28 Mass test: TS0(OOOxOxxO)TS7 MS_Class=29 +Mass test: TS0(OOOxOxxO)TS7 MS_Class=30 +Mass test: TS0(OOOxOxxO)TS7 MS_Class=31 Mass test: TS0(OOOxOxOx)TS7 MS_Class=0 Mass test: TS0(OOOxOxOx)TS7 MS_Class=1 Mass test: TS0(OOOxOxOx)TS7 MS_Class=2 @@ -7958,6 +8428,8 @@ Mass test: TS0(OOOxOxOx)TS7 MS_Class=27 Mass test: TS0(OOOxOxOx)TS7 MS_Class=28 Mass test: TS0(OOOxOxOx)TS7 MS_Class=29 +Mass test: TS0(OOOxOxOx)TS7 MS_Class=30 +Mass test: TS0(OOOxOxOx)TS7 MS_Class=31 Mass test: TS0(OOOxOxOO)TS7 MS_Class=0 Mass test: TS0(OOOxOxOO)TS7 MS_Class=1 Mass test: TS0(OOOxOxOO)TS7 MS_Class=2 @@ -7988,6 +8460,8 @@ Mass test: TS0(OOOxOxOO)TS7 MS_Class=27 Mass test: TS0(OOOxOxOO)TS7 MS_Class=28 Mass test: TS0(OOOxOxOO)TS7 MS_Class=29 +Mass test: TS0(OOOxOxOO)TS7 MS_Class=30 +Mass test: TS0(OOOxOxOO)TS7 MS_Class=31 Mass test: TS0(OOOxOOxx)TS7 MS_Class=0 Mass test: TS0(OOOxOOxx)TS7 MS_Class=1 Mass test: TS0(OOOxOOxx)TS7 MS_Class=2 @@ -8018,6 +8492,8 @@ Mass test: TS0(OOOxOOxx)TS7 MS_Class=27 Mass test: TS0(OOOxOOxx)TS7 MS_Class=28 Mass test: TS0(OOOxOOxx)TS7 MS_Class=29 +Mass test: TS0(OOOxOOxx)TS7 MS_Class=30 +Mass test: TS0(OOOxOOxx)TS7 MS_Class=31 Mass test: TS0(OOOxOOxO)TS7 MS_Class=0 Mass test: TS0(OOOxOOxO)TS7 MS_Class=1 Mass test: TS0(OOOxOOxO)TS7 MS_Class=2 @@ -8048,6 +8524,8 @@ Mass test: TS0(OOOxOOxO)TS7 MS_Class=27 Mass test: TS0(OOOxOOxO)TS7 MS_Class=28 Mass test: TS0(OOOxOOxO)TS7 MS_Class=29 +Mass test: TS0(OOOxOOxO)TS7 MS_Class=30 +Mass test: TS0(OOOxOOxO)TS7 MS_Class=31 Mass test: TS0(OOOxOOOx)TS7 MS_Class=0 Mass test: TS0(OOOxOOOx)TS7 MS_Class=1 Mass test: TS0(OOOxOOOx)TS7 MS_Class=2 @@ -8078,6 +8556,8 @@ Mass test: TS0(OOOxOOOx)TS7 MS_Class=27 Mass test: TS0(OOOxOOOx)TS7 MS_Class=28 Mass test: TS0(OOOxOOOx)TS7 MS_Class=29 +Mass test: TS0(OOOxOOOx)TS7 MS_Class=30 +Mass test: TS0(OOOxOOOx)TS7 MS_Class=31 Mass test: TS0(OOOxOOOO)TS7 MS_Class=0 Mass test: TS0(OOOxOOOO)TS7 MS_Class=1 Mass test: TS0(OOOxOOOO)TS7 MS_Class=2 @@ -8108,6 +8588,8 @@ Mass test: TS0(OOOxOOOO)TS7 MS_Class=27 Mass test: TS0(OOOxOOOO)TS7 MS_Class=28 Mass test: TS0(OOOxOOOO)TS7 MS_Class=29 +Mass test: TS0(OOOxOOOO)TS7 MS_Class=30 +Mass test: TS0(OOOxOOOO)TS7 MS_Class=31 Mass test: TS0(OOOOxxxx)TS7 MS_Class=0 Mass test: TS0(OOOOxxxx)TS7 MS_Class=1 Mass test: TS0(OOOOxxxx)TS7 MS_Class=2 @@ -8138,6 +8620,8 @@ Mass test: TS0(OOOOxxxx)TS7 MS_Class=27 Mass test: TS0(OOOOxxxx)TS7 MS_Class=28 Mass test: TS0(OOOOxxxx)TS7 MS_Class=29 +Mass test: TS0(OOOOxxxx)TS7 MS_Class=30 +Mass test: TS0(OOOOxxxx)TS7 MS_Class=31 Mass test: TS0(OOOOxxxO)TS7 MS_Class=0 Mass test: TS0(OOOOxxxO)TS7 MS_Class=1 Mass test: TS0(OOOOxxxO)TS7 MS_Class=2 @@ -8168,6 +8652,8 @@ Mass test: TS0(OOOOxxxO)TS7 MS_Class=27 Mass test: TS0(OOOOxxxO)TS7 MS_Class=28 Mass test: TS0(OOOOxxxO)TS7 MS_Class=29 +Mass test: TS0(OOOOxxxO)TS7 MS_Class=30 +Mass test: TS0(OOOOxxxO)TS7 MS_Class=31 Mass test: TS0(OOOOxxOx)TS7 MS_Class=0 Mass test: TS0(OOOOxxOx)TS7 MS_Class=1 Mass test: TS0(OOOOxxOx)TS7 MS_Class=2 @@ -8198,6 +8684,8 @@ Mass test: TS0(OOOOxxOx)TS7 MS_Class=27 Mass test: TS0(OOOOxxOx)TS7 MS_Class=28 Mass test: TS0(OOOOxxOx)TS7 MS_Class=29 +Mass test: TS0(OOOOxxOx)TS7 MS_Class=30 +Mass test: TS0(OOOOxxOx)TS7 MS_Class=31 Mass test: TS0(OOOOxxOO)TS7 MS_Class=0 Mass test: TS0(OOOOxxOO)TS7 MS_Class=1 Mass test: TS0(OOOOxxOO)TS7 MS_Class=2 @@ -8228,6 +8716,8 @@ Mass test: TS0(OOOOxxOO)TS7 MS_Class=27 Mass test: TS0(OOOOxxOO)TS7 MS_Class=28 Mass test: TS0(OOOOxxOO)TS7 MS_Class=29 +Mass test: TS0(OOOOxxOO)TS7 MS_Class=30 +Mass test: TS0(OOOOxxOO)TS7 MS_Class=31 Mass test: TS0(OOOOxOxx)TS7 MS_Class=0 Mass test: TS0(OOOOxOxx)TS7 MS_Class=1 Mass test: TS0(OOOOxOxx)TS7 MS_Class=2 @@ -8258,6 +8748,8 @@ Mass test: TS0(OOOOxOxx)TS7 MS_Class=27 Mass test: TS0(OOOOxOxx)TS7 MS_Class=28 Mass test: TS0(OOOOxOxx)TS7 MS_Class=29 +Mass test: TS0(OOOOxOxx)TS7 MS_Class=30 +Mass test: TS0(OOOOxOxx)TS7 MS_Class=31 Mass test: TS0(OOOOxOxO)TS7 MS_Class=0 Mass test: TS0(OOOOxOxO)TS7 MS_Class=1 Mass test: TS0(OOOOxOxO)TS7 MS_Class=2 @@ -8288,6 +8780,8 @@ Mass test: TS0(OOOOxOxO)TS7 MS_Class=27 Mass test: TS0(OOOOxOxO)TS7 MS_Class=28 Mass test: TS0(OOOOxOxO)TS7 MS_Class=29 +Mass test: TS0(OOOOxOxO)TS7 MS_Class=30 +Mass test: TS0(OOOOxOxO)TS7 MS_Class=31 Mass test: TS0(OOOOxOOx)TS7 MS_Class=0 Mass test: TS0(OOOOxOOx)TS7 MS_Class=1 Mass test: TS0(OOOOxOOx)TS7 MS_Class=2 @@ -8318,6 +8812,8 @@ Mass test: TS0(OOOOxOOx)TS7 MS_Class=27 Mass test: TS0(OOOOxOOx)TS7 MS_Class=28 Mass test: TS0(OOOOxOOx)TS7 MS_Class=29 +Mass test: TS0(OOOOxOOx)TS7 MS_Class=30 +Mass test: TS0(OOOOxOOx)TS7 MS_Class=31 Mass test: TS0(OOOOxOOO)TS7 MS_Class=0 Mass test: TS0(OOOOxOOO)TS7 MS_Class=1 Mass test: TS0(OOOOxOOO)TS7 MS_Class=2 @@ -8348,6 +8844,8 @@ Mass test: TS0(OOOOxOOO)TS7 MS_Class=27 Mass test: TS0(OOOOxOOO)TS7 MS_Class=28 Mass test: TS0(OOOOxOOO)TS7 MS_Class=29 +Mass test: TS0(OOOOxOOO)TS7 MS_Class=30 +Mass test: TS0(OOOOxOOO)TS7 MS_Class=31 Mass test: TS0(OOOOOxxx)TS7 MS_Class=0 Mass test: TS0(OOOOOxxx)TS7 MS_Class=1 Mass test: TS0(OOOOOxxx)TS7 MS_Class=2 @@ -8378,6 +8876,8 @@ Mass test: TS0(OOOOOxxx)TS7 MS_Class=27 Mass test: TS0(OOOOOxxx)TS7 MS_Class=28 Mass test: TS0(OOOOOxxx)TS7 MS_Class=29 +Mass test: TS0(OOOOOxxx)TS7 MS_Class=30 +Mass test: TS0(OOOOOxxx)TS7 MS_Class=31 Mass test: TS0(OOOOOxxO)TS7 MS_Class=0 Mass test: TS0(OOOOOxxO)TS7 MS_Class=1 Mass test: TS0(OOOOOxxO)TS7 MS_Class=2 @@ -8408,6 +8908,8 @@ Mass test: TS0(OOOOOxxO)TS7 MS_Class=27 Mass test: TS0(OOOOOxxO)TS7 MS_Class=28 Mass test: TS0(OOOOOxxO)TS7 MS_Class=29 +Mass test: TS0(OOOOOxxO)TS7 MS_Class=30 +Mass test: TS0(OOOOOxxO)TS7 MS_Class=31 Mass test: TS0(OOOOOxOx)TS7 MS_Class=0 Mass test: TS0(OOOOOxOx)TS7 MS_Class=1 Mass test: TS0(OOOOOxOx)TS7 MS_Class=2 @@ -8438,6 +8940,8 @@ Mass test: TS0(OOOOOxOx)TS7 MS_Class=27 Mass test: TS0(OOOOOxOx)TS7 MS_Class=28 Mass test: TS0(OOOOOxOx)TS7 MS_Class=29 +Mass test: TS0(OOOOOxOx)TS7 MS_Class=30 +Mass test: TS0(OOOOOxOx)TS7 MS_Class=31 Mass test: TS0(OOOOOxOO)TS7 MS_Class=0 Mass test: TS0(OOOOOxOO)TS7 MS_Class=1 Mass test: TS0(OOOOOxOO)TS7 MS_Class=2 @@ -8468,6 +8972,8 @@ Mass test: TS0(OOOOOxOO)TS7 MS_Class=27 Mass test: TS0(OOOOOxOO)TS7 MS_Class=28 Mass test: TS0(OOOOOxOO)TS7 MS_Class=29 +Mass test: TS0(OOOOOxOO)TS7 MS_Class=30 +Mass test: TS0(OOOOOxOO)TS7 MS_Class=31 Mass test: TS0(OOOOOOxx)TS7 MS_Class=0 Mass test: TS0(OOOOOOxx)TS7 MS_Class=1 Mass test: TS0(OOOOOOxx)TS7 MS_Class=2 @@ -8498,6 +9004,8 @@ Mass test: TS0(OOOOOOxx)TS7 MS_Class=27 Mass test: TS0(OOOOOOxx)TS7 MS_Class=28 Mass test: TS0(OOOOOOxx)TS7 MS_Class=29 +Mass test: TS0(OOOOOOxx)TS7 MS_Class=30 +Mass test: TS0(OOOOOOxx)TS7 MS_Class=31 Mass test: TS0(OOOOOOxO)TS7 MS_Class=0 Mass test: TS0(OOOOOOxO)TS7 MS_Class=1 Mass test: TS0(OOOOOOxO)TS7 MS_Class=2 @@ -8528,6 +9036,8 @@ Mass test: TS0(OOOOOOxO)TS7 MS_Class=27 Mass test: TS0(OOOOOOxO)TS7 MS_Class=28 Mass test: TS0(OOOOOOxO)TS7 MS_Class=29 +Mass test: TS0(OOOOOOxO)TS7 MS_Class=30 +Mass test: TS0(OOOOOOxO)TS7 MS_Class=31 Mass test: TS0(OOOOOOOx)TS7 MS_Class=0 Mass test: TS0(OOOOOOOx)TS7 MS_Class=1 Mass test: TS0(OOOOOOOx)TS7 MS_Class=2 @@ -8558,6 +9068,8 @@ Mass test: TS0(OOOOOOOx)TS7 MS_Class=27 Mass test: TS0(OOOOOOOx)TS7 MS_Class=28 Mass test: TS0(OOOOOOOx)TS7 MS_Class=29 +Mass test: TS0(OOOOOOOx)TS7 MS_Class=30 +Mass test: TS0(OOOOOOOx)TS7 MS_Class=31 Mass test: TS0(OOOOOOOO)TS7 MS_Class=0 Mass test: TS0(OOOOOOOO)TS7 MS_Class=1 Mass test: TS0(OOOOOOOO)TS7 MS_Class=2 @@ -8588,6 +9100,8 @@ Mass test: TS0(OOOOOOOO)TS7 MS_Class=27 Mass test: TS0(OOOOOOOO)TS7 MS_Class=28 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29 +Mass test: TS0(OOOOOOOO)TS7 MS_Class=30 +Mass test: TS0(OOOOOOOO)TS7 MS_Class=31 Going to test assignment with many TBF, algorithm A class 1..1 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -8727,7 +9241,7 @@ TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) -Going to test assignment with many TBF, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8757,11 +9271,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) -Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) + Successfully allocated 29 UL TBFs, algorithm B class 1..32 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8791,13 +9302,13 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - TBF[1] class 4 reserves ...C.... - TBF[2] class 5 reserves ...C.... - TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) + TBF[1] class 30 reserves ...C.... + TBF[2] class 31 reserves ...C.... + TBF[0] class 32 reserves .......C + TBF[3] class 1 reserves ...C.... + TBF[0] class 2 reserves ......C. + TBF[0] class 3 reserves .....C.. + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..32 (UL and DL) Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -9741,137 +10252,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9901,12 +10412,12 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9936,137 +10447,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -10096,137 +10607,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Going to test assignment with many connections, algorithm B TBF[0] class 1 reserves ...C.... @@ -10258,9 +10769,6 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -10314,11 +10822,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 1 reserves ...C.... - TBF[1] class 2 reserves ...DC... + TBF[0] class 1 reserves .......C + TBF[1] class 2 reserves ......DC TBF[2] class 3 reserves ......DC TBF[3] class 4 reserves ....DCD. TBF[4] class 5 reserves ...CD... @@ -10326,9 +10831,9 @@ TBF[6] class 7 reserves ......CD TBF[7] class 8 reserves ...DDCD. TBF[8] class 9 reserves ...DCD.. - TBF[9] class 10 reserves ....DCD. - TBF[10] class 11 reserves ...DCD.. - TBF[11] class 12 reserves .....DCD + TBF[9] class 10 reserves ...DCD.. + TBF[10] class 11 reserves .....DCD + TBF[11] class 12 reserves ...DCD.. TBF[12] class 13 reserves .....CDD TBF[13] class 14 reserves ...CDDD. TBF[14] class 15 reserves ...CDDDD @@ -10346,10 +10851,7 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - Successfully allocated 32 TBFs + Successfully allocated 29 TBFs Going to test assignment with many connections, algorithm dynamic TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. @@ -10380,74 +10882,76 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[12] class 8 reserves .......C - TBF[20] class 9 reserves ...C.... - TBF[20] class 10 reserves ....C... - TBF[29] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[22] class 14 reserves ...C.... - TBF[22] class 15 reserves ....C... - TBF[30] class 16 reserves .....C.. - TBF[19] class 17 reserves ......C. - TBF[21] class 18 reserves .......C - TBF[24] class 19 reserves ...C.... - TBF[24] class 20 reserves ....C... - TBF[31] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[23] class 23 reserves .......C - TBF[26] class 24 reserves ...C.... - TBF[26] class 25 reserves ....C... - TBF[23] class 26 reserves ......C. - TBF[25] class 27 reserves .......C - TBF[28] class 28 reserves ...C.... - TBF[28] class 29 reserves ....C... - TBF[25] class 1 reserves ......C. - TBF[27] class 2 reserves .......C - TBF[29] class 3 reserves ...C.... - TBF[29] class 4 reserves ....C... - TBF[27] class 5 reserves ......C. - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[29] class 8 reserves ......C. - TBF[31] class 9 reserves ...C.... - TBF[31] class 10 reserves ....C... + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[5] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[6] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[8] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[10] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[12] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[19] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[21] class 30 reserves .......C + TBF[18] class 31 reserves ...C.... + TBF[18] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[23] class 3 reserves .......C + TBF[20] class 4 reserves ...C.... + TBF[20] class 5 reserves ....C... + TBF[29] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[25] class 8 reserves .......C + TBF[22] class 9 reserves ...C.... + TBF[22] class 10 reserves ....C... + TBF[30] class 11 reserves .....C.. + TBF[21] class 12 reserves ......C. + TBF[27] class 13 reserves .......C + TBF[24] class 14 reserves ...C.... + TBF[24] class 15 reserves ....C... + TBF[31] class 16 reserves .....C.. + TBF[23] class 17 reserves ......C. + TBF[29] class 18 reserves .......C + TBF[26] class 19 reserves ...C.... + TBF[26] class 20 reserves ....C... + TBF[25] class 21 reserves ......C. + TBF[30] class 22 reserves .......C + TBF[28] class 23 reserves ...C.... + TBF[28] class 24 reserves ....C... + TBF[27] class 25 reserves ......C. + TBF[31] class 26 reserves .......C + TBF[29] class 27 reserves ...C.... + TBF[29] class 28 reserves ....C... + TBF[29] class 29 reserves ......C. + TBF[30] class 30 reserves ...C.... + TBF[30] class 31 reserves ....C... + TBF[30] class 32 reserves ......C. + TBF[31] class 1 reserves ...C.... + TBF[31] class 2 reserves ....C... + TBF[31] class 3 reserves ......C. TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....DC.. TBF[0] class 3 reserves ......DC @@ -10501,137 +11005,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves .....C.. TBF[2] class 3 reserves .......C @@ -10661,137 +11165,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) -- To view, visit https://gerrit.osmocom.org/4958 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:22:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 18:22:32 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: adjust test_alloc_b() Message-ID: Review at https://gerrit.osmocom.org/4960 AllocTest: adjust test_alloc_b() This function contains 3 independent test cases. Let's split them into separate functions to simplify further modifications: * split test cases into separate functions * use them for mass test as well * change function names to avoid confusion * make individual test cases return error instead of failing via assert on allocation failure The top-level test_alloc_b() is used as part of exhaustion tests in test_all_alloc_b() for example, so it's expected that allocation might fail (due to TFI or USF exhaustion for example) eventually. In this case it's better to indicate it to caller instead of failing entire program. The test output does not require any adjustements because we do not exhaust to the point of allocation failure yet. Change-Id: Id7e03a85ce96e7d617cecee963759bae589a3a1a Related: OS#2282 --- M tests/alloc/AllocTest.cpp 1 file changed, 175 insertions(+), 218 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/60/4960/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 9477295..617834b 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -166,8 +166,11 @@ test_alloc_a(GPRS_RLCMAC_UL_TBF, 0x1e, 28); } -static void dump_assignment(struct gprs_rlcmac_tbf *tbf, const char *dir) +static void dump_assignment(struct gprs_rlcmac_tbf *tbf, const char *dir, bool verbose) { + if (!verbose) + return; + for (size_t i = 0; i < ARRAY_SIZE(tbf->pdch); ++i) if (tbf->pdch[i]) printf("PDCH[%zu] is used for %s\n", i, dir); @@ -175,8 +178,162 @@ printf("PDCH[%d] is first common for %s\n", tbf->first_common_ts, dir); } -static void test_alloc_b(int ms_class) +#define ENABLE_PDCH(ts_no, enable_flag, trx) \ + if (enable_flag) \ + trx->pdch[ts_no].enable(); + +static inline void enable_ts_on_bts(struct gprs_rlcmac_bts *bts, + bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool ts5, bool ts6, bool ts7) { + struct gprs_rlcmac_trx *trx = &bts->trx[0]; + + ENABLE_PDCH(0, ts0, trx); + ENABLE_PDCH(1, ts1, trx); + ENABLE_PDCH(2, ts2, trx); + ENABLE_PDCH(3, ts3, trx); + ENABLE_PDCH(4, ts4, trx); + ENABLE_PDCH(5, ts5, trx); + ENABLE_PDCH(6, ts6, trx); + ENABLE_PDCH(7, ts7, trx); +} + +static inline bool test_alloc_b_ul_dl(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool ts5, bool ts6, bool ts7, + uint8_t ms_class, bool verbose) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts = the_bts.bts_data(); + gprs_rlcmac_ul_tbf *ul_tbf; + gprs_rlcmac_dl_tbf *dl_tbf; + + if (verbose) + printf("Testing UL then DL assignment.\n"); + + bts->alloc_algorithm = alloc_algorithm_b; + + enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7); + + ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, 1); + if (!ul_tbf) + return false; + + OSMO_ASSERT(ul_tbf->ms()); + OSMO_ASSERT(ul_tbf->ms()->current_trx()); + + dump_assignment(ul_tbf, "UL", verbose); + + /* assume final ack has not been sent */ + dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), ul_tbf->ms()->current_trx()->trx_no, ms_class, 0, 0); + if (!dl_tbf) + return false; + + dump_assignment(dl_tbf, "DL", verbose); + + OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); + + check_tfi_usage(&the_bts); + + tbf_free(dl_tbf); + tbf_free(ul_tbf); + + return true; +} + +static inline bool test_alloc_b_dl_ul(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool ts5, bool ts6, bool ts7, + uint8_t ms_class, bool verbose) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts = the_bts.bts_data(); + gprs_rlcmac_ul_tbf *ul_tbf; + gprs_rlcmac_dl_tbf *dl_tbf; + + if (verbose) + printf("Testing DL then UL assignment followed by update\n"); + + bts->alloc_algorithm = alloc_algorithm_b; + + enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7); + + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, 1); + if (!dl_tbf) + return false; + + dl_tbf->update_ms(0x23, GPRS_RLCMAC_DL_TBF); + + OSMO_ASSERT(dl_tbf->ms()); + OSMO_ASSERT(dl_tbf->ms()->current_trx()); + + dump_assignment(dl_tbf, "DL", verbose); + + ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), dl_tbf->ms()->current_trx()->trx_no, ms_class, 0, 0); + if (!ul_tbf) + return false; + + ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); + ul_tbf->m_contention_resolution_done = 1; + + dump_assignment(ul_tbf, "UL", verbose); + + OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); + + /* now update the dl_tbf */ + dl_tbf->update(); + dump_assignment(dl_tbf, "DL", verbose); + OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); + + check_tfi_usage(&the_bts); + + tbf_free(dl_tbf); + tbf_free(ul_tbf); + + return true; +} + +static inline bool test_alloc_b_jolly(uint8_t ms_class) +{ + BTS the_bts; + struct gprs_rlcmac_bts *bts = the_bts.bts_data(); + int tfi; + uint8_t trx_no; + gprs_rlcmac_tbf *ul_tbf, *dl_tbf; + + printf("Testing jolly example\n"); + + bts->alloc_algorithm = alloc_algorithm_b; + + enable_ts_on_bts(bts, false, true, true, true, true, false, false, false); + + tfi = the_bts.tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); + OSMO_ASSERT(tfi >= 0); + ul_tbf = tbf_alloc_ul_tbf(bts, NULL, .1, ms_class, 0, 0); + if (!ul_tbf) + return false; + + OSMO_ASSERT(ul_tbf->ms()); + OSMO_ASSERT(ul_tbf->ms()->current_trx()); + trx_no = ul_tbf->ms()->current_trx()->trx_no; + dump_assignment(ul_tbf, "UL", true); + + /* assume final ack has not been sent */ + dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); + if (!dl_tbf) + return false; + + dump_assignment(dl_tbf, "DL", true); + + OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); + + check_tfi_usage(&the_bts); + + tbf_free(dl_tbf); + tbf_free(ul_tbf); + + return true; +} + +static void test_alloc_b_for_ms(uint8_t ms_class) +{ + bool rc; + printf("Going to test multislot assignment MS_CLASS=%d\n", ms_class); /* * PDCH is on TS 6,7,8 and we start with a UL allocation and @@ -184,143 +341,26 @@ * * Uplink assigned and still available.. */ - { - BTS the_bts; - struct gprs_rlcmac_bts *bts; - struct gprs_rlcmac_trx *trx; - uint8_t trx_no; - gprs_rlcmac_tbf *ul_tbf, *dl_tbf; - - printf("Testing UL then DL assignment.\n"); - - bts = the_bts.bts_data(); - bts->alloc_algorithm = alloc_algorithm_b; - - trx = &bts->trx[0]; - trx->pdch[5].enable(); - trx->pdch[6].enable(); - trx->pdch[7].enable(); - - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, 1); - OSMO_ASSERT(ul_tbf); - OSMO_ASSERT(ul_tbf->ms()); - OSMO_ASSERT(ul_tbf->ms()->current_trx()); - trx_no = ul_tbf->ms()->current_trx()->trx_no; - dump_assignment(ul_tbf, "UL"); - - /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); - OSMO_ASSERT(dl_tbf); - dump_assignment(dl_tbf, "DL"); - - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - check_tfi_usage(&the_bts); - - tbf_free(dl_tbf); - tbf_free(ul_tbf); - } + rc = test_alloc_b_ul_dl(false, false, false, false, false, true, true, true, ms_class, true); + if (!rc) + return; /** * Test with the other order.. first DL and then UL */ - { - BTS the_bts; - struct gprs_rlcmac_bts *bts; - struct gprs_rlcmac_trx *trx; - uint8_t trx_no; - - gprs_rlcmac_ul_tbf *ul_tbf; - gprs_rlcmac_dl_tbf *dl_tbf; - - printf("Testing DL then UL assignment followed by update\n"); - - bts = the_bts.bts_data(); - bts->alloc_algorithm = alloc_algorithm_b; - - trx = &bts->trx[0]; - trx->pdch[5].enable(); - trx->pdch[6].enable(); - trx->pdch[7].enable(); - - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, 1); - dl_tbf->update_ms(0x23, GPRS_RLCMAC_DL_TBF); - OSMO_ASSERT(dl_tbf); - OSMO_ASSERT(dl_tbf->ms()); - OSMO_ASSERT(dl_tbf->ms()->current_trx()); - trx_no = dl_tbf->ms()->current_trx()->trx_no; - dump_assignment(dl_tbf, "DL"); - - ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, 0); - ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); - ul_tbf->m_contention_resolution_done = 1; - OSMO_ASSERT(ul_tbf); - dump_assignment(ul_tbf, "UL"); - - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - /* now update the dl_tbf */ - dl_tbf->update(); - dump_assignment(dl_tbf, "DL"); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - check_tfi_usage(&the_bts); - - tbf_free(dl_tbf); - tbf_free(ul_tbf); - } + rc = test_alloc_b_dl_ul(false, false, false, false, false, true, true, true, ms_class, true); + if (!rc) + return; /* Andreas osmocom-pcu example */ - { - BTS the_bts; - struct gprs_rlcmac_bts *bts; - struct gprs_rlcmac_trx *trx; - int tfi; - uint8_t trx_no; - - gprs_rlcmac_tbf *ul_tbf, *dl_tbf; - - printf("Testing jolly example\n"); - - bts = the_bts.bts_data(); - bts->alloc_algorithm = alloc_algorithm_b; - - trx = &bts->trx[0]; - trx->pdch[1].enable(); - trx->pdch[2].enable(); - trx->pdch[3].enable(); - trx->pdch[4].enable(); - - tfi = the_bts.tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); - OSMO_ASSERT(tfi >= 0); - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, .1, ms_class, 0, 0); - OSMO_ASSERT(ul_tbf); - OSMO_ASSERT(ul_tbf->ms()); - OSMO_ASSERT(ul_tbf->ms()->current_trx()); - trx_no = ul_tbf->ms()->current_trx()->trx_no; - dump_assignment(ul_tbf, "UL"); - - /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); - OSMO_ASSERT(dl_tbf); - dump_assignment(dl_tbf, "DL"); - - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - check_tfi_usage(&the_bts); - - tbf_free(dl_tbf); - tbf_free(ul_tbf); - } + test_alloc_b_jolly(ms_class); } -#define ENABLE_PDCH(ts_no, enable_flag, trx) \ - if (enable_flag) \ - trx->pdch[ts_no].enable(); - -static void test_alloc_b(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool ts5, bool ts6, bool ts7, int ms_class) +static void test_alloc_mass(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool ts5, bool ts6, bool ts7, int ms_class) { + bool rc; + /* we can test the allocation failures differently */ if (!ts0 && !ts1 && !ts2 && !ts3 && !ts4 && !ts5 && !ts6 && !ts7) return; @@ -336,97 +376,14 @@ ts7 ? 'O' : 'x', ms_class); fflush(stdout); - { - BTS the_bts; - struct gprs_rlcmac_bts *bts; - struct gprs_rlcmac_trx *trx; - uint8_t trx_no; - - gprs_rlcmac_tbf *ul_tbf, *dl_tbf; - - bts = the_bts.bts_data(); - bts->alloc_algorithm = alloc_algorithm_b; - - trx = &bts->trx[0]; - ENABLE_PDCH(0, ts0, trx); - ENABLE_PDCH(1, ts1, trx); - ENABLE_PDCH(2, ts2, trx); - ENABLE_PDCH(3, ts3, trx); - ENABLE_PDCH(4, ts4, trx); - ENABLE_PDCH(5, ts5, trx); - ENABLE_PDCH(6, ts6, trx); - ENABLE_PDCH(7, ts7, trx); - - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, 1); - OSMO_ASSERT(ul_tbf->ms()); - OSMO_ASSERT(ul_tbf->ms()->current_trx()); - trx_no = ul_tbf->ms()->current_trx()->trx_no; - OSMO_ASSERT(ul_tbf); - - /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); - OSMO_ASSERT(dl_tbf); - - /* verify that both are on the same ts */ - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - check_tfi_usage(&the_bts); - - tbf_free(dl_tbf); - tbf_free(ul_tbf); - } + rc = test_alloc_b_ul_dl(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class, false); + if (!rc) + return; /** * Test with the other order.. first DL and then UL */ - { - BTS the_bts; - struct gprs_rlcmac_bts *bts; - struct gprs_rlcmac_trx *trx; - uint8_t trx_no; - - gprs_rlcmac_ul_tbf *ul_tbf; - gprs_rlcmac_dl_tbf *dl_tbf; - - bts = the_bts.bts_data(); - bts->alloc_algorithm = alloc_algorithm_b; - - trx = &bts->trx[0]; - ENABLE_PDCH(0, ts0, trx); - ENABLE_PDCH(1, ts1, trx); - ENABLE_PDCH(2, ts2, trx); - ENABLE_PDCH(3, ts3, trx); - ENABLE_PDCH(4, ts4, trx); - ENABLE_PDCH(5, ts5, trx); - ENABLE_PDCH(6, ts6, trx); - ENABLE_PDCH(7, ts7, trx); - - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, 1); - OSMO_ASSERT(dl_tbf); - OSMO_ASSERT(dl_tbf->ms()); - OSMO_ASSERT(dl_tbf->ms()->current_trx()); - trx_no = dl_tbf->ms()->current_trx()->trx_no; - dl_tbf->update_ms(0x23, GPRS_RLCMAC_DL_TBF); - - ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, 0); - OSMO_ASSERT(ul_tbf); - ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); - ul_tbf->m_contention_resolution_done = 1; - - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - /* now update the dl_tbf */ - dl_tbf->update(); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - - OSMO_ASSERT(ul_tbf->ms_class() == ms_class); - OSMO_ASSERT(dl_tbf->ms_class() == ms_class); - - check_tfi_usage(&the_bts); - - tbf_free(dl_tbf); - tbf_free(ul_tbf); - } + test_alloc_b_dl_ul(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class, false); } static void test_all_alloc_b() @@ -441,13 +398,13 @@ for (uint8_t ts6 = 0; ts6 < 2; ++ts6) for (uint8_t ts7 = 0; ts7 < 2; ++ts7) for (int ms_class = 0; ms_class < 30; ++ms_class) - test_alloc_b(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class); + test_alloc_mass(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class); } static void test_alloc_b() { for (int i = 0; i < 30; ++i) - test_alloc_b(i); + test_alloc_b_for_ms(i); test_all_alloc_b(); } -- To view, visit https://gerrit.osmocom.org/4960 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7e03a85ce96e7d617cecee963759bae589a3a1a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:24:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 18:24:56 +0000 Subject: osmo-msc[master]: libmsc/vty: don't access old bsc rate counters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4959 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:33:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:33:25 +0000 Subject: osmo-iuh[master]: tests: sanitize: clean after tests In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:34:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:34:00 +0000 Subject: libosmo-abis[master]: unixsocket: fix a potential string overflow In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:34:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:34:01 +0000 Subject: [MERGED] libosmo-abis[master]: unixsocket: fix a potential string overflow In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: unixsocket: fix a potential string overflow ...................................................................... unixsocket: fix a potential string overflow Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Found-by: coverity --- M src/input/unixsocket.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 03e2909..c49928d 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -233,7 +233,7 @@ int i; if (line->sock_path) - strcpy(sock_path, line->sock_path); + osmo_strlcpy(sock_path, line->sock_path, PATH_MAX); else sprintf(sock_path, "%s%d", UNIXSOCKET_SOCK_PATH_DEFAULT, line->num); -- To view, visit https://gerrit.osmocom.org/4213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:34:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:34:27 +0000 Subject: osmo-msc[master]: libmsc/vty: don't access old bsc rate counters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4959 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:34:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:34:30 +0000 Subject: [MERGED] osmo-msc[master]: libmsc/vty: don't access old bsc rate counters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libmsc/vty: don't access old bsc rate counters ...................................................................... libmsc/vty: don't access old bsc rate counters The BSC rate counters are a leftover from the nitb split. Accessing them would result into a null-pointer exception, because the struct isn't initialized. Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b --- M src/libmsc/vty_interface_layer3.c 1 file changed, 0 insertions(+), 8 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index 6211d48..02a3600 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -659,14 +659,6 @@ net->msc_ctrs->ctr[MSC_CTR_LOC_UPDATE_COMPLETED].current, net->msc_ctrs->ctr[MSC_CTR_LOC_UPDATE_FAILED].current, VTY_NEWLINE); - vty_out(vty, "Handover : %lu attempted, %lu no_channel, %lu timeout, " - "%lu completed, %lu failed%s", - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_ATTEMPTED].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_NO_CHANNEL].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_TIMEOUT].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED].current, - net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_FAILED].current, - VTY_NEWLINE); vty_out(vty, "SMS MO : %lu submitted, %lu no receiver%s", net->msc_ctrs->ctr[MSC_CTR_SMS_SUBMITTED].current, net->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER].current, -- To view, visit https://gerrit.osmocom.org/4959 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c72ab8bf781d3f9a436eb1a27ac4d13df5e656b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:35:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:35:38 +0000 Subject: libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:36:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:36:01 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: set -e: exit on any failure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4951 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:36:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:36:31 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: introduce $TOP dir variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4952 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:36:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:36:48 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: fix shellcheck warnings In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4953 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:39:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:39:47 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: only publish source tar balls if a ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4954 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:39:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:39:59 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: set -e: exit on any failure In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4951 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:01 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: introduce $TOP dir variable In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4952 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:03 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: fix shellcheck warnings In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4953 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:05 +0000 Subject: osmo-ci[master]: osmocom-latest-packages: only publish source tar balls if a ... In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4954 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:07 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-latest-packages: only publish source tar balls if a ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-latest-packages: only publish source tar balls if a new tag was created ...................................................................... osmocom-latest-packages: only publish source tar balls if a new tag was created OBS should only be updated if there is a new tag. Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 --- M scripts/osmocom-latest-packages.sh 1 file changed, 27 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 23ee3dd..6933baa 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -16,21 +16,36 @@ fi build() { + project=$1 + output=$2 echo - echo "====> Building $1" + echo "====> Building $project" cd "$TOP" - rm -rf data [ -d "$1" ] || git clone "git://git.osmocom.org/$1" cd "$1" git fetch VER=$(git describe --abbrev=0 --tags --match "*.*.*" origin/master) git checkout -f -B "$VER" "refs/tags/$VER" - gbp buildpackage -d -S -uc -us "--git-export-dir=$TOP/data" "--git-debian-branch=$VER" - cd "$TOP/$PROJ/$1" - osc rm ./* || true - mv $TOP/data/*.dsc . - mv $TOP/data/*.tar* . - osc add ./* + gbp buildpackage -d -S -uc -us "--git-export-dir=$output" "--git-debian-branch=$VER" + + if [ ! -d "$TOP/$PROJ/$1" ] ; then + # creating a new package is different from using old ones + mkdir "$TOP/$PROJ/$1" + mv "$output/"*.dsc "$TOP/$PROJ/$1/" + cd "$TOP/$PROJ" + osc add "$1" + else + cd "$TOP/$PROJ/$1" + + # update OBS only if the filename doesn't match + file=$(cd "$output/" ; ls ./*.dsc) + if [ ! -e "$file" ] ; then + osc rm ./* || true + mv "$output/"*.dsc . + mv "$output/"*.tar* . + osc add ./* + fi + fi cd "$TOP" } @@ -56,8 +71,11 @@ osmo-bsc " +[ -d "$TOP/debsrc" ] && rm -rf "$TOP/debsrc" +mkdir "$TOP/debsrc" + for p in $PACKAGES; do - build "$p" + build "$p" "$TOP/debsrc/$p" done cd "$TOP/$PROJ" -- To view, visit https://gerrit.osmocom.org/4954 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:07 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-latest-packages: fix shellcheck warnings In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-latest-packages: fix shellcheck warnings ...................................................................... osmocom-latest-packages: fix shellcheck warnings Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f --- M scripts/osmocom-latest-packages.sh 1 file changed, 13 insertions(+), 13 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 9deae23..23ee3dd 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -5,7 +5,7 @@ # OBS project name PROJ=network:osmocom:latest -DT=`date +%Y%m%d` +DT=$(date +%Y%m%d) TOP=$(pwd) # start with a checkout of the project @@ -18,20 +18,20 @@ build() { echo echo "====> Building $1" - cd $TOP + cd "$TOP" rm -rf data - [ -d $1 ] || git clone git://git.osmocom.org/$1 - cd $1 + [ -d "$1" ] || git clone "git://git.osmocom.org/$1" + cd "$1" git fetch - VER=`git describe --abbrev=0 --tags --match "*.*.*" origin/master` - git checkout -f -B $VER refs/tags/$VER - gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER - cd $TOP/$PROJ/$1 - osc rm * || true + VER=$(git describe --abbrev=0 --tags --match "*.*.*" origin/master) + git checkout -f -B "$VER" "refs/tags/$VER" + gbp buildpackage -d -S -uc -us "--git-export-dir=$TOP/data" "--git-debian-branch=$VER" + cd "$TOP/$PROJ/$1" + osc rm ./* || true mv $TOP/data/*.dsc . mv $TOP/data/*.tar* . - osc add * - cd $TOP + osc add ./* + cd "$TOP" } PACKAGES=" @@ -57,8 +57,8 @@ " for p in $PACKAGES; do - build $p + build "$p" done -cd $TOP/$PROJ +cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" -- To view, visit https://gerrit.osmocom.org/4953 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:08 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-latest-packages: introduce $TOP dir variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-latest-packages: introduce $TOP dir variable ...................................................................... osmocom-latest-packages: introduce $TOP dir variable Using a $TOP variable makes directory paths more clear to understandable. Path now expressed starting from the TOP dir instead of using ../../../foo Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 --- M scripts/osmocom-latest-packages.sh 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index ff1bc34..9deae23 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -6,6 +6,7 @@ PROJ=network:osmocom:latest DT=`date +%Y%m%d` +TOP=$(pwd) # start with a checkout of the project if [ -d $PROJ ]; then @@ -17,19 +18,20 @@ build() { echo echo "====> Building $1" + cd $TOP rm -rf data [ -d $1 ] || git clone git://git.osmocom.org/$1 cd $1 git fetch VER=`git describe --abbrev=0 --tags --match "*.*.*" origin/master` git checkout -f -B $VER refs/tags/$VER - gbp buildpackage -d -S -uc -us --git-export-dir=$PWD/../data --git-debian-branch=$VER - cd ../$PROJ/$1 + gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER + cd $TOP/$PROJ/$1 osc rm * || true - mv ../../data/*.dsc . - mv ../../data/*.tar* . + mv $TOP/data/*.dsc . + mv $TOP/data/*.tar* . osc add * - cd ../../ + cd $TOP } PACKAGES=" @@ -58,5 +60,5 @@ build $p done -cd $PROJ +cd $TOP/$PROJ osc ci -m "Latest Tagged versions of $DT" -- To view, visit https://gerrit.osmocom.org/4952 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:08 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-latest-packages: set -e: exit on any failure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-latest-packages: set -e: exit on any failure ...................................................................... osmocom-latest-packages: set -e: exit on any failure Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d --- M scripts/osmocom-latest-packages.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 2f0152e..ff1bc34 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -1,6 +1,6 @@ #!/bin/sh -#set -e +set -e # OBS project name PROJ=network:osmocom:latest -- To view, visit https://gerrit.osmocom.org/4951 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:33 +0000 Subject: osmo-bsc[master]: bsc_init: fix Werror: define rc for 2quater with si2q_count ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4949 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:40:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:40:34 +0000 Subject: [MERGED] osmo-bsc[master]: bsc_init: fix Werror: define rc for 2quater with si2q_count ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc_init: fix Werror: define rc for 2quater with si2q_count == 0 ...................................................................... bsc_init: fix Werror: define rc for 2quater with si2q_count == 0 src/libbsc/bsc_init.c: In function ?rsl_si?: src/libbsc/bsc_init.c:153:2: error: ?rc? may be used uninitialized in this function [-Werror=maybe-uninitialized] return rc; ^ Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 --- M src/libbsc/bsc_init.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 674813c..fa8c477 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -142,6 +142,7 @@ rc = rsl_bcch_info(trx, i, NULL, 0); break; } + rc = 0; for (j = 0; j <= bts->si2q_count; j++) rc = rsl_bcch_info(trx, i, (const uint8_t *)GSM_BTS_SI2Q(bts, j), GSM_MACBLOCK_LEN); break; -- To view, visit https://gerrit.osmocom.org/4949 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:41:06 +0000 Subject: osmo-hlr[master]: db_test: don't verify SQLite issued error messages, they mig... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:42:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:42:30 +0000 Subject: [MERGED] osmo-hlr[master]: db_test: don't verify SQLite issued error messages, they mig... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: db_test: don't verify SQLite issued error messages, they might change ...................................................................... db_test: don't verify SQLite issued error messages, they might change A user on openbsc@ complained that with SQLite 3.8.2, the db_test fails with --- expected +++ stderr -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi +DDB (2067) abort at 35 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi i.e. a trivial difference in the error message issued by SQLite. For db_test, don't output any SQLite error messages: Add argument enable_sqlite_logging, pass as true, except in db_test.c. Remove the SQLite error messages from expected output. (Note that there is a src/db_test.c program that's not of interest here, this is about the tests/db/db_test.c) Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229 --- M src/db.c M src/db.h M src/db_test.c M src/hlr.c M src/hlr_db_tool.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 13 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/db.c b/src/db.c index d16f8ec..cc06ee6 100644 --- a/src/db.c +++ b/src/db.c @@ -211,7 +211,7 @@ return 0; } -struct db_context *db_open(void *ctx, const char *fname) +struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite_logging) { struct db_context *dbc = talloc_zero(ctx, struct db_context); unsigned int i; @@ -233,9 +233,11 @@ has_sqlite_config_sqllog = true; } - rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL); - if (rc != SQLITE_OK) - LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n"); + if (enable_sqlite_logging) { + rc = sqlite3_config(SQLITE_CONFIG_LOG, sql3_error_log_cb, NULL); + if (rc != SQLITE_OK) + LOGP(DDB, LOGL_NOTICE, "Unable to set SQLite3 error log callback\n"); + } if (has_sqlite_config_sqllog) { rc = sqlite3_config(SQLITE_CONFIG_SQLLOG, sql3_sql_log_cb, NULL); diff --git a/src/db.h b/src/db.h index fc8e511..92fdac4 100644 --- a/src/db.h +++ b/src/db.h @@ -38,7 +38,7 @@ bool db_bind_int(sqlite3_stmt *stmt, const char *param_name, int nr); bool db_bind_int64(sqlite3_stmt *stmt, const char *param_name, int64_t nr); void db_close(struct db_context *dbc); -struct db_context *db_open(void *ctx, const char *fname); +struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite3_logging); #include diff --git a/src/db_test.c b/src/db_test.c index 0e823f9..7891c90 100644 --- a/src/db_test.c +++ b/src/db_test.c @@ -62,7 +62,7 @@ exit(1); } - g_hlr->dbc = db_open(NULL, "hlr.db"); + g_hlr->dbc = db_open(NULL, "hlr.db", true); if (!g_hlr->dbc) { LOGP(DMAIN, LOGL_ERROR, "Error opening database\n"); exit(1); diff --git a/src/hlr.c b/src/hlr.c index 78a7055..861597a 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -460,7 +460,7 @@ exit(1); } - g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file); + g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file, true); if (!g_hlr->dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(1); diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index d8a3584..318308c 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -409,7 +409,7 @@ exit(EXIT_FAILURE); } - g_hlr_db_tool_ctx->dbc = db_open(g_hlr_db_tool_ctx, cmdline_opts.db_file); + g_hlr_db_tool_ctx->dbc = db_open(g_hlr_db_tool_ctx, cmdline_opts.db_file, true); if (!g_hlr_db_tool_ctx->dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(EXIT_FAILURE); diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 389ed00..23b84cc 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -820,7 +820,9 @@ /* omit the SQLite version and compilation flags from test output */ log_set_log_level(osmo_stderr_target, LOGL_ERROR); - dbc = db_open(ctx, "db_test.db"); + /* Disable SQLite logging so that we're not vulnerable on SQLite error messages changing across + * library versions. */ + dbc = db_open(ctx, "db_test.db", false); log_set_log_level(osmo_stderr_target, 0); OSMO_ASSERT(dbc); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 0b09583..f7acfec 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -28,7 +28,6 @@ } db_subscr_create(dbc, imsi0) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000000': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 @@ -38,11 +37,9 @@ } db_subscr_create(dbc, imsi1) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_create(dbc, imsi1) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 @@ -52,11 +49,9 @@ } db_subscr_create(dbc, imsi2) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_create(dbc, imsi2) --> -EIO -DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 -- To view, visit https://gerrit.osmocom.org/4948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2513d71cc0072aef8d08f47d0a1959f311176229 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:44:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:44:33 +0000 Subject: [MERGED] osmo-iuh[master]: Fix various compiler warnings in hnb-gw code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix various compiler warnings in hnb-gw code ...................................................................... Fix various compiler warnings in hnb-gw code Since we finally started to use -Wall, the related warnings became visible. Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 --- M src/context_map.c M src/hnbgw.c M src/hnbgw_cn.c M src/hnbgw_hnbap.c M src/hnbgw_ranap.c M src/hnbgw_rua.c M src/hnbgw_vty.c M src/iu_client.c M src/ranap_common_cn.c 9 files changed, 62 insertions(+), 77 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/context_map.c b/src/context_map.c index 0960cb9..b90f555 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -169,4 +169,6 @@ context_map_tmr.cb = context_map_tmr_cb; context_map_tmr.data = gw; osmo_timer_schedule(&context_map_tmr, EXPIRY_TIMER_SECS, 0); + + return 0; } diff --git a/src/hnbgw.c b/src/hnbgw.c index 97905b3..5c0570e 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -44,8 +44,11 @@ #include #include +#include #include + +#include #include #include @@ -68,8 +71,6 @@ void *talloc_asn1_ctx; static struct hnb_gw *g_hnb_gw; - -static int listen_fd_cb(struct osmo_fd *fd, unsigned int what); static struct hnb_gw *hnb_gw_create(void *ctx) { @@ -175,13 +176,13 @@ } static int hnb_close_cb(struct osmo_stream_srv *conn) { + return 0; } static int hnb_read_cb(struct osmo_stream_srv *conn) { struct hnb_context *hnb = osmo_stream_srv_get_data(conn); struct msgb *msg = msgb_alloc(IUH_MSGB_SIZE, "Iuh rx"); - int flags = 0; int rc; if (!msg) @@ -222,12 +223,12 @@ case IUH_PPI_SABP: case IUH_PPI_RNA: case IUH_PPI_PUA: - LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unimplemented SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; default: - LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%u received\n", + LOGP(DMAIN, LOGL_ERROR, "Unknown SCTP PPID=%lu received\n", msgb_sctp_ppid(msg)); rc = 0; break; @@ -421,8 +422,6 @@ int main(int argc, char **argv) { - struct osmo_sccp_user *sccp_user; - struct osmo_sccp_link *sua_link; struct osmo_stream_srv_link *srv; int rc; diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 3238f00..a48b651 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -38,13 +38,12 @@ * Outbound RANAP RESET to CN ***********************************************************************/ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state); static int transmit_rst(struct hnb_gw *gw, RANAP_CN_DomainIndicator_t domain, struct osmo_sccp_addr *remote_addr) { struct msgb *msg; - struct msgb *msgprim; RANAP_Cause_t cause = { .present = RANAP_Cause_PR_transmissionNetwork, .choice. transmissionNetwork = RANAP_CauseTransmissionNetwork_signalling_transport_resource_failure, @@ -71,7 +70,7 @@ } /* change the state of a CN Link */ -int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) +void hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_state state) { switch (state) { case CNLINK_S_NULL: @@ -127,9 +126,11 @@ struct hnb_gw *gw = cnlink->gw; struct hnb_context *hnb; RANAP_PagingIEs_t ies; - int rc = 0; + int rc; rc = ranap_decode_pagingies(&ies, &imsg->value); + if (rc < 0) + return rc; /* FIXME: determine which HNBs to send this Paging command, * rather than broadcasting to all HNBs */ @@ -145,8 +146,6 @@ RANAP_InitiatingMessage_t *imsg, const uint8_t *data, unsigned int len) { - int rc; - switch (imsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: return cn_ranap_rx_reset_cmd(cnlink, imsg); @@ -161,11 +160,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", imsg->procedureCode); + "Procedure %ld from CN, ignoring\n", imsg->procedureCode); break; } return 0; @@ -174,8 +173,6 @@ static int cn_ranap_rx_successful_msg(struct hnbgw_cnlink *cnlink, RANAP_SuccessfulOutcome_t *omsg) { - int rc; - switch (omsg->procedureCode) { case RANAP_ProcedureCode_id_Reset: /* Reset acknowledge */ return cn_ranap_rx_reset_ack(cnlink, omsg); @@ -184,11 +181,11 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from CN, ignoring\n", omsg->procedureCode); + "Procedure %ld from CN, ignoring\n", omsg->procedureCode); break; } return 0; @@ -210,7 +207,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from CN, ignoring\n", + "unsuccessful outcome procedure %ld from CN, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -218,6 +215,8 @@ "presence %u from CN, ignoring\n", pdu->present); break; } + + return rc; } static int handle_cn_ranap(struct hnbgw_cnlink *cnlink, const uint8_t *data, @@ -357,7 +356,7 @@ struct osmo_sccp_user *scu = ctx; struct hnbgw_cnlink *cnlink; struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph; - int rc; + int rc = 0; LOGP(DMAIN, LOGL_DEBUG, "sccp_sap_up(%s)\n", osmo_scu_prim_name(oph)); @@ -398,7 +397,7 @@ msgb_free(oph->msg); - return 0; + return rc; } static bool addr_has_pc_and_ssn(const struct osmo_sccp_addr *addr) @@ -453,7 +452,6 @@ struct hnbgw_cnlink *cnlink; struct osmo_ss7_instance *ss7; uint32_t local_pc; - int rc; OSMO_ASSERT(!gw->sccp.client); OSMO_ASSERT(!gw->sccp.cnlink); diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 0473482..7c1e239 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -355,8 +355,8 @@ if (rc < 0) return rc; - DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%ld\n", - ies.cause); + DEBUGP(DHNBAP, "HNB-DE-REGISTER cause=%s\n", + hnbap_cause_str(&ies.cause)); hnbap_free_hnbde_registeries(&ies); hnb_context_release(ctx); @@ -457,7 +457,7 @@ ctxid = asn1bitstr_to_u24(&ies.context_ID); - DEBUGP(DHNBAP, "UE-DE-REGISTER context=%ld cause=%s\n", + DEBUGP(DHNBAP, "UE-DE-REGISTER context=%u cause=%s\n", ctxid, hnbap_cause_str(&ies.cause)); ue = ue_context_by_id(ctx->gw, ctxid); @@ -486,7 +486,7 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t *imsg) { - int rc; + int rc = 0; switch (imsg->procedureCode) { case ProcedureCode_id_HNBRegister: /* 8.2 */ @@ -517,6 +517,8 @@ imsg->procedureCode); break; } + + return rc; } static int hnbgw_rx_successful_outcome_msg(struct hnb_context *hnb, SuccessfulOutcome_t *msg) @@ -581,5 +583,5 @@ int hnbgw_hnbap_init(void) { - + return 0; } diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c index 7fd6d0a..6822752 100644 --- a/src/hnbgw_ranap.c +++ b/src/hnbgw_ranap.c @@ -77,7 +77,7 @@ static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in) { RANAP_ErrorIndicationIEs_t ies; - int rc, is_ps = 0; + int rc; rc = ranap_decode_errorindicationies(&ies, in); if (rc < 0) @@ -92,35 +92,9 @@ return 0; } -static int ranap_rx_dt(struct hnb_context *hnb, ANY_t *in) -{ - RANAP_DirectTransferIEs_t ies; - int sapi = 0; - int rc; - - rc = ranap_decode_directtransferies(&ies, in); - if (rc < 0) - return rc; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_SAPI_PRESENT) - sapi = ies.sapi; - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_LAI_PRESENT) { - /* FIXME: Update LAI associated with UE */ - } - - if (ies.presenceMask & DIRECTTRANSFERIES_RANAP_RAC_PRESENT) { - /* FIXME: Update RAC associated with UE */ - } - - DEBUGP(DRANAP, "DirectTransfer: %s\n", - osmo_hexdump(ies.nas_pdu.buf, ies.nas_pdu.size)); - /* FIXME: hand NAS PDU into MSC */ -} - static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMessage_t *imsg) { - int rc; + int rc = 0; /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset @@ -144,19 +118,19 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return rc; } static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg) { - int rc; - /* according tot the spec, we can primarily receive Overload, * Reset, Reset ACK, Error Indication, reset Resource, Reset * Resurce Acknowledge as connecitonless RANAP. There are some @@ -172,20 +146,22 @@ case RANAP_ProcedureCode_id_DirectInformationTransfer: case RANAP_ProcedureCode_id_UplinkInformationExchange: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; default: LOGP(DRANAP, LOGL_NOTICE, "Received suspicious RANAP " - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); + "Procedure %lu from HNB, ignoring\n", imsg->procedureCode); break; } + + return 0; } static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu) { - int rc; + int rc = 0; switch (pdu->present) { case RANAP_RANAP_PDU_PR_initiatingMessage: @@ -196,7 +172,7 @@ break; case RANAP_RANAP_PDU_PR_unsuccessfulOutcome: LOGP(DRANAP, LOGL_NOTICE, "Received unsupported RANAP " - "unsuccessful outcome procedure %u from HNB, ignoring\n", + "unsuccessful outcome procedure %lu from HNB, ignoring\n", pdu->choice.unsuccessfulOutcome.procedureCode); break; default: @@ -204,6 +180,8 @@ "presence %u from HNB, ignoring\n", pdu->present); break; } + + return rc; } @@ -228,5 +206,5 @@ int hnbgw_ranap_init(void) { - + return 0; } diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 95979f5..305b8cc 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -418,7 +419,6 @@ static int rua_rx_init_udt(struct msgb *msg, ANY_t *in) { RUA_ConnectionlessTransferIEs_t ies; - RUA_CN_DomainIndicator_t domain; int rc; rc = rua_decode_connectionlesstransferies(&ies, in); @@ -483,7 +483,7 @@ rc = 0; break; default: - LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %u\n", + LOGP(DRUA, LOGL_NOTICE, "Unknown RUA Procedure %lu\n", imsg->procedureCode); rc = -1; } diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index f504dd5..3d16970 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -18,6 +18,8 @@ * */ +#include + #include #include @@ -233,9 +235,6 @@ static int config_write_hnbgw_iucs(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iucs_remote_addr_name) return CMD_SUCCESS; @@ -248,9 +247,6 @@ static int config_write_hnbgw_iups(struct vty *vty) { - const char *addr; - uint16_t port; - if (!g_hnb_gw->config.iups_remote_addr_name) return CMD_SUCCESS; diff --git a/src/iu_client.c b/src/iu_client.c index 17d955d..3ee900c 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -25,12 +25,16 @@ #include #include +#include + #include #include #include #include #include +#include +#include #include #include diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index d02eb37..d2c875e 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -319,7 +319,7 @@ static int cn_ranap_rx_initiating_msg_cl(void *ctx, RANAP_InitiatingMessage_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -360,6 +360,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_initiating_msg_cl(ranap_message *message) @@ -403,7 +405,7 @@ static int cn_ranap_rx_successful_msg_cl(void *ctx, RANAP_SuccessfulOutcome_t *imsg, ranap_message *message) { - int rc; + int rc = 0; message->procedureCode = imsg->procedureCode; message->criticality = imsg->criticality; @@ -433,6 +435,8 @@ get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); break; } + + return rc; } static void cn_ranap_free_successful_msg_cl(ranap_message *message) @@ -463,7 +467,7 @@ static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *message) { - int rc; + int rc = 0; /* Extend _cn_ranap_free_cl as well when extending this function */ @@ -488,6 +492,8 @@ get_value_string(ranap_presence_vals, pdu->present)); break; } + + return rc; } static void _cn_ranap_free_cl(ranap_message *message) @@ -505,7 +511,7 @@ break; default: LOGP(DRANAP, LOGL_NOTICE, "Suspicious RANAP " - "presence %s (CL) from RNC, ignoring\n", message->direction); + "presence %d (CL) from RNC, ignoring\n", message->direction); break; } } -- To view, visit https://gerrit.osmocom.org/4945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:44:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:44:33 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw.c: Remove dead code creating libsctp linker dependency In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw.c: Remove dead code creating libsctp linker dependency ...................................................................... hnbgw.c: Remove dead code creating libsctp linker dependency Since I8ac15fa2fd25bedb26297177e416976a5389b573 in July 2017 we are not using sctp_*() functions directly anymore but go via libosmo-sigtran. However, some dead code remained in hnbgw.c, which means that linkage will fail if compiled without any optimization, i.e. without -O present. Change-Id: Ifbcb21d43e17bf512bc7b219e590410e06c434ca --- M src/hnbgw.c 1 file changed, 0 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index c9fdd53..97905b3 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -238,21 +238,6 @@ return rc; } -static int hnb_write_cb(struct osmo_fd *fd, struct msgb *msg) -{ - struct hnb_context *ctx = fd->data; - struct sctp_sndrcvinfo sinfo = { - .sinfo_ppid = htonl(msgb_sctp_ppid(msg)), - .sinfo_stream = ctx->hnbap_stream, - }; - int rc; - - rc = sctp_send(fd->fd, msgb_data(msg), msgb_length(msg), - &sinfo, 0); - /* we don't need to msgb_free(), write_queue does this for us */ - return rc; -} - struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_link *link, int new_fd) { struct hnb_context *ctx; -- To view, visit https://gerrit.osmocom.org/4943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifbcb21d43e17bf512bc7b219e590410e06c434ca Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:44:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:44:34 +0000 Subject: [MERGED] osmo-iuh[master]: sccp_sap_up(): Fix never-hit "default" case in switch In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sccp_sap_up(): Fix never-hit "default" case in switch ...................................................................... sccp_sap_up(): Fix never-hit "default" case in switch As the default was called "defualt", it became a standard C label and was never actually performing any default catch-all behavior. As we didn't use -Wall, gcc never warned us about it so far :/ Change-Id: I9dbad21e75a55ad91b12d3d3ee8bd6dfb5326c3e --- M src/hnbgw_cn.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 81ef670..3238f00 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -389,7 +389,7 @@ case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): rc = handle_cn_disc_ind(cnlink, &prim->u.disconnect, oph); break; - defualt: + default: LOGP(DMAIN, LOGL_ERROR, "Received unknown prim %u from SCCP USER SAP\n", OSMO_PRIM_HDR(oph)); -- To view, visit https://gerrit.osmocom.org/4944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dbad21e75a55ad91b12d3d3ee8bd6dfb5326c3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 18:44:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 Nov 2017 18:44:34 +0000 Subject: [MERGED] osmo-iuh[master]: Add "-Wall" to the compile rules of the non-asn1c-generated ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add "-Wall" to the compile rules of the non-asn1c-generated source code ...................................................................... Add "-Wall" to the compile rules of the non-asn1c-generated source code This is actually default in all other osmocom projects, and it's a big surprise that it hadn't been enabled for osmo-iuh. Now we finally can see that there are e.g. unused static functions in the code. Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163 --- M src/Makefile.am M src/tests/Makefile.am 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index c9e1555..ab772a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp -AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ +AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 28ad56c..493bc18 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -g -I$(top_srcdir)/src/tests \ +AM_CFLAGS = -g -Wall -I$(top_srcdir)/src/tests \ -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -- To view, visit https://gerrit.osmocom.org/4942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 21 19:25:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 21 Nov 2017 19:25:58 +0000 Subject: [PATCH] osmo-pcu[master]: Replace '.' in counter names with ':' Message-ID: Review at https://gerrit.osmocom.org/4961 Replace '.' in counter names with ':' The '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e --- M src/bts.cpp 1 file changed, 85 insertions(+), 85 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/4961/1 diff --git a/src/bts.cpp b/src/bts.cpp index 6bdbb85..c323101 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -67,91 +67,91 @@ * the code below. */ static const struct rate_ctr_desc bts_ctr_description[] = { - { "tbf.dl.alloc", "TBF DL Allocated "}, - { "tbf.dl.freed", "TBF DL Freed "}, - { "tbf.dl.aborted", "TBF DL Aborted "}, - { "tbf.ul.alloc", "TBF UL Allocated "}, - { "tbf.ul.freed", "TBF UL Freed "}, - { "tbf.ul.aborted", "TBF UL Aborted "}, - { "tbf.reused", "TBF Reused "}, - { "tbf.alloc.algo-a", "TBF Alloc Algo A "}, - { "tbf.alloc.algo-b", "TBF Alloc Algo B "}, - { "tbf.failed.egprs-only", "TBF Failed EGPRS-only"}, - { "rlc.sent", "RLC Sent "}, - { "rlc.resent", "RLC Resent "}, - { "rlc.restarted", "RLC Restarted "}, - { "rlc.stalled", "RLC Stalled "}, - { "rlc.nacked", "RLC Nacked "}, - { "rlc.final_block_resent", "RLC Final Blk resent "}, - { "rlc.ass.timedout", "RLC Assign Timeout "}, - { "rlc.ass.failed", "RLC Assign Failed "}, - { "rlc.ack.timedout", "RLC Ack Timeout "}, - { "rlc.ack.failed", "RLC Ack Failed "}, - { "rlc.rel.timedout", "RLC Release Timeout "}, - { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent-dummy", "RLC Sent Dummy "}, - { "rlc.sent-control", "RLC Sent Control "}, - { "rlc.dl_bytes", "RLC DL Bytes "}, - { "rlc.dl_payload_bytes", "RLC DL Payload Bytes "}, - { "rlc.ul_bytes", "RLC UL Bytes "}, - { "rlc.ul_payload_bytes", "RLC UL Payload Bytes "}, - { "decode.errors", "Decode Errors "}, - { "sba.allocated", "SBA Allocated "}, - { "sba.freed", "SBA Freed "}, - { "sba.timedout", "SBA Timeout "}, - { "llc.timeout", "Timedout Frames "}, - { "llc.dropped", "Dropped Frames "}, - { "llc.scheduled", "Scheduled Frames "}, - { "llc.dl_bytes", "RLC encapsulated PDUs"}, - { "llc.ul_bytes", "full PDUs received "}, - { "rach.requests", "RACH requests "}, - { "11bit_rach.requests", "11BIT_RACH requests "}, - { "spb.uplink_first_segment", "First seg of UL SPB "}, - { "spb.uplink_second_segment", "Second seg of UL SPB "}, - { "spb.downlink_first_segment", "First seg of DL SPB "}, - { "spb.downlink_second_segment","Second seg of DL SPB "}, - { "immediate.assignment_UL", "Immediate Assign UL "}, - { "immediate.assignment_rej", "Immediate Assign Rej "}, - { "immediate.assignment_DL", "Immediate Assign DL "}, - { "channel.request_description","Channel Request Desc "}, - { "pkt.ul_assignment", "Packet UL Assignment "}, - { "pkt.access_reject", "Packet Access Reject "}, - { "pkt.dl_assignment", "Packet DL Assignment "}, - { "ul.control", "UL control Block "}, - { "ul.assignment_poll_timeout", "UL Assign Timeout "}, - { "ul.assignment_failed", "UL Assign Failed "}, - { "dl.assignment_timeout", "DL Assign Timeout "}, - { "dl.assignment_failed", "DL Assign Failed "}, - { "pkt.ul_ack_nack_timeout", "PUAN Poll Timeout "}, - { "pkt.ul_ack_nack_failed", "PUAN poll Failed "}, - { "pkt.dl_ack_nack_timeout", "PDAN poll Timeout "}, - { "pkt.dl_ack_nack_failed", "PDAN poll Failed "}, - { "gprs.downlink_cs1", "CS1 downlink "}, - { "gprs.downlink_cs2", "CS2 downlink "}, - { "gprs.downlink_cs3", "CS3 downlink "}, - { "gprs.downlink_cs4", "CS4 downlink "}, - { "egprs.downlink_mcs1", "MCS1 downlink "}, - { "egprs.downlink_mcs2", "MCS2 downlink "}, - { "egprs.downlink_mcs3", "MCS3 downlink "}, - { "egprs.downlink_mcs4", "MCS4 downlink "}, - { "egprs.downlink_mcs5", "MCS5 downlink "}, - { "egprs.downlink_mcs6", "MCS6 downlink "}, - { "egprs.downlink_mcs7", "MCS7 downlink "}, - { "egprs.downlink_mcs8", "MCS8 downlink "}, - { "egprs.downlink_mcs9", "MCS9 downlink "}, - { "gprs.uplink_cs1", "CS1 Uplink "}, - { "gprs.uplink_cs2", "CS2 Uplink "}, - { "gprs.uplink_cs3", "CS3 Uplink "}, - { "gprs.uplink_cs4", "CS4 Uplink "}, - { "egprs.uplink_mcs1", "MCS1 Uplink "}, - { "egprs.uplink_mcs2", "MCS2 Uplink "}, - { "egprs.uplink_mcs3", "MCS3 Uplink "}, - { "egprs.uplink_mcs4", "MCS4 Uplink "}, - { "egprs.uplink_mcs5", "MCS5 Uplink "}, - { "egprs.uplink_mcs6", "MCS6 Uplink "}, - { "egprs.uplink_mcs7", "MCS7 Uplink "}, - { "egprs.uplink_mcs8", "MCS8 Uplink "}, - { "egprs.uplink_mcs9", "MCS9 Uplink "}, + { "tbf:dl:alloc", "TBF DL Allocated "}, + { "tbf:dl:freed", "TBF DL Freed "}, + { "tbf:dl:aborted", "TBF DL Aborted "}, + { "tbf:ul:alloc", "TBF UL Allocated "}, + { "tbf:ul:freed", "TBF UL Freed "}, + { "tbf:ul:aborted", "TBF UL Aborted "}, + { "tbf:reused", "TBF Reused "}, + { "tbf:alloc:algo-a", "TBF Alloc Algo A "}, + { "tbf:alloc:algo-b", "TBF Alloc Algo B "}, + { "tbf:failed:egprs-only", "TBF Failed EGPRS-only"}, + { "rlc:sent", "RLC Sent "}, + { "rlc:resent", "RLC Resent "}, + { "rlc:restarted", "RLC Restarted "}, + { "rlc:stalled", "RLC Stalled "}, + { "rlc:nacked", "RLC Nacked "}, + { "rlc:final_block_resent", "RLC Final Blk resent "}, + { "rlc:ass:timedout", "RLC Assign Timeout "}, + { "rlc:ass:failed", "RLC Assign Failed "}, + { "rlc:ack:timedout", "RLC Ack Timeout "}, + { "rlc:ack:failed", "RLC Ack Failed "}, + { "rlc:rel:timedout", "RLC Release Timeout "}, + { "rlc:late-block", "RLC Late Block "}, + { "rlc:sent-dummy", "RLC Sent Dummy "}, + { "rlc:sent-control", "RLC Sent Control "}, + { "rlc:dl_bytes", "RLC DL Bytes "}, + { "rlc:dl_payload_bytes", "RLC DL Payload Bytes "}, + { "rlc:ul_bytes", "RLC UL Bytes "}, + { "rlc:ul_payload_bytes", "RLC UL Payload Bytes "}, + { "decode:errors", "Decode Errors "}, + { "sba:allocated", "SBA Allocated "}, + { "sba:freed", "SBA Freed "}, + { "sba:timedout", "SBA Timeout "}, + { "llc:timeout", "Timedout Frames "}, + { "llc:dropped", "Dropped Frames "}, + { "llc:scheduled", "Scheduled Frames "}, + { "llc:dl_bytes", "RLC encapsulated PDUs"}, + { "llc:ul_bytes", "full PDUs received "}, + { "rach:requests", "RACH requests "}, + { "11bit_rach:requests", "11BIT_RACH requests "}, + { "spb:uplink_first_segment", "First seg of UL SPB "}, + { "spb:uplink_second_segment", "Second seg of UL SPB "}, + { "spb:downlink_first_segment", "First seg of DL SPB "}, + { "spb:downlink_second_segment","Second seg of DL SPB "}, + { "immediate:assignment_UL", "Immediate Assign UL "}, + { "immediate:assignment_rej", "Immediate Assign Rej "}, + { "immediate:assignment_DL", "Immediate Assign DL "}, + { "channel:request_description","Channel Request Desc "}, + { "pkt:ul_assignment", "Packet UL Assignment "}, + { "pkt:access_reject", "Packet Access Reject "}, + { "pkt:dl_assignment", "Packet DL Assignment "}, + { "ul:control", "UL control Block "}, + { "ul:assignment_poll_timeout", "UL Assign Timeout "}, + { "ul:assignment_failed", "UL Assign Failed "}, + { "dl:assignment_timeout", "DL Assign Timeout "}, + { "dl:assignment_failed", "DL Assign Failed "}, + { "pkt:ul_ack_nack_timeout", "PUAN Poll Timeout "}, + { "pkt:ul_ack_nack_failed", "PUAN poll Failed "}, + { "pkt:dl_ack_nack_timeout", "PDAN poll Timeout "}, + { "pkt:dl_ack_nack_failed", "PDAN poll Failed "}, + { "gprs:downlink_cs1", "CS1 downlink "}, + { "gprs:downlink_cs2", "CS2 downlink "}, + { "gprs:downlink_cs3", "CS3 downlink "}, + { "gprs:downlink_cs4", "CS4 downlink "}, + { "egprs:downlink_mcs1", "MCS1 downlink "}, + { "egprs:downlink_mcs2", "MCS2 downlink "}, + { "egprs:downlink_mcs3", "MCS3 downlink "}, + { "egprs:downlink_mcs4", "MCS4 downlink "}, + { "egprs:downlink_mcs5", "MCS5 downlink "}, + { "egprs:downlink_mcs6", "MCS6 downlink "}, + { "egprs:downlink_mcs7", "MCS7 downlink "}, + { "egprs:downlink_mcs8", "MCS8 downlink "}, + { "egprs:downlink_mcs9", "MCS9 downlink "}, + { "gprs:uplink_cs1", "CS1 Uplink "}, + { "gprs:uplink_cs2", "CS2 Uplink "}, + { "gprs:uplink_cs3", "CS3 Uplink "}, + { "gprs:uplink_cs4", "CS4 Uplink "}, + { "egprs:uplink_mcs1", "MCS1 Uplink "}, + { "egprs:uplink_mcs2", "MCS2 Uplink "}, + { "egprs:uplink_mcs3", "MCS3 Uplink "}, + { "egprs:uplink_mcs4", "MCS4 Uplink "}, + { "egprs:uplink_mcs5", "MCS5 Uplink "}, + { "egprs:uplink_mcs6", "MCS6 Uplink "}, + { "egprs:uplink_mcs7", "MCS7 Uplink "}, + { "egprs:uplink_mcs8", "MCS8 Uplink "}, + { "egprs:uplink_mcs9", "MCS9 Uplink "}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { -- To view, visit https://gerrit.osmocom.org/4961 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 21 21:34:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 21 Nov 2017 21:34:54 +0000 Subject: [MERGED] libosmocore[master]: osmo_strlcpy: sanitize: don't memcpy from NULL src even if l... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_strlcpy: sanitize: don't memcpy from NULL src even if len is 0 ...................................................................... osmo_strlcpy: sanitize: don't memcpy from NULL src even if len is 0 Some callers pass NULL and len == 0. The semantics are that we then nul-terminate an emtpy string. Avoid a sanitizer warning by not calling memcpy() for the NULL case. Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 --- M src/utils.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index f63ff89..bc5329d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -385,7 +385,8 @@ if (siz) { size_t len = (ret >= siz) ? siz - 1 : ret; - memcpy(dst, src, len); + if (src) + memcpy(dst, src, len); dst[len] = '\0'; } return ret; -- To view, visit https://gerrit.osmocom.org/4940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I883048cf2807e606c6481634dbd569fc12aed889 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 01:59:46 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 01:59:46 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: free endp In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4919 to look at the new patch set (#2). mgcp_test: test_no_cycle: sanitize: free endp Release endpoint to avoid sanitizer errors. Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 --- M tests/mgcp/mgcp_test.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/19/4919/2 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 3dee509..da71b46 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1262,6 +1262,7 @@ OSMO_ASSERT(conn->state.stats_cycles == UINT16_MAX + 1); OSMO_ASSERT(conn->state.stats_max_seq == 0); + mgcp_release_endp(endp); talloc_free(cfg); } -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:04:00 +0000 Subject: osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:09:43 +0000 Subject: osmo-mgw[master]: osmo-mgw: Use libosmocore socket abstraction In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4900/3/src/osmo-mgw/mgw_main.c File src/osmo-mgw/mgw_main.c: Line 301: perror("Gateway failed to bind"); (this error reporting is different from the others... even though the patch is adopting the previous style, shouldn't this be LOGP with addr+port, possibly strerror()? After all we LOGP on success a few lines further down) -- To view, visit https://gerrit.osmocom.org/4900 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39d47b8a27f683060a2facf2dbecff8d00c19ce9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:15:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:15:28 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 2: > Why not use osmo_load32be()? it's the other way round, writing *to* a buffer. ah there's osmo_store32be() ... but ntohl() highlights the network byte order in a way store32be doesn't..? -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:17:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:17:38 +0000 Subject: [PATCH] osmo-iuh[master]: tests: sanitize: fix mem leaks, clean after tests In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4916 to look at the new patch set (#4). tests: sanitize: fix mem leaks, clean after tests Fix various mem leaks in the testing code. Add test_common_cleanup() in test_common.c, to free talloc contexts; call in test-{helpers,hnbap,ranap}.c. Upon talloc ctx cleanup, ensure that they are actually empty, in order to catch newly introduced mem leaks. If non-empty, print talloc context reports. Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c --- M src/tests/test-helpers.c M src/tests/test-hnbap.c M src/tests/test-ranap.c M src/tests/test_common.c M src/tests/test_common.h 5 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/16/4916/4 diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 44fd735..f218a79 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -105,6 +105,8 @@ ASSERT(enc.size == 24/8); ASSERT(enc.bits_unused == 0); + talloc_free(buffer); + rc = aper_encode_to_new_buffer(&asn_DEF_BIT_STRING, 0, &enc, (void **) &buffer); printf("Encoded: %s\n", osmo_hexdump_nospc(buffer, rc)); @@ -118,6 +120,7 @@ printf("Decoding large string from asn1: %s\n", text); ASSERT(rc == 31); + talloc_free(buffer); } void test_ranap_common(void) @@ -211,5 +214,6 @@ test_asn1_helpers(); test_ranap_common(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index ef46070..dfd5ae9 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -142,6 +142,8 @@ printf("HNBAP UE Register request from IMSI %s\n", imsi); hnbap_free_ueregisterrequesties(&ue_req_ies); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_PDU, pdu); + memset(pdu, 0, sizeof(*pdu)); dec_ret = aper_decode(NULL, &asn_DEF_HNBAP_PDU, (void **) &pdu, hnbap_ue_reg_acc, sizeof(hnbap_ue_reg_acc), 0, 0); @@ -163,6 +165,7 @@ printf("HNBAP UE Register accept to IMSI %s\n", imsi); hnbap_free_ueregisteraccepties(&ue_acc_ies); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_PDU, pdu); } int main(int argc, char **argv) @@ -175,6 +178,7 @@ test_asn1_decoding(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c1c7003..05be874 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -197,6 +197,8 @@ talloc_report(talloc_asn1_ctx, stdout); talloc_report(tall_msgb_ctx, stdout); //talloc_report(NULL, stdout); + + test_common_cleanup(); printf("exit\n"); exit(0); } diff --git a/src/tests/test_common.c b/src/tests/test_common.c index c8aafdd..0af8ceb 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -69,11 +69,13 @@ .num_cat = ARRAY_SIZE(log_cat), }; +static void *msgb_ctx; + int test_common_init(void) { int rc; - msgb_talloc_ctx_init(NULL, 0); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); @@ -85,3 +87,22 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); } + +void test_common_cleanup(void) +{ + if (talloc_total_blocks(msgb_ctx) != 1 + || talloc_total_size(msgb_ctx) != 0) + talloc_report_full(msgb_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + talloc_free(msgb_ctx); + + if (talloc_total_blocks(talloc_asn1_ctx) != 1 + || talloc_total_size(talloc_asn1_ctx) != 0) + talloc_report_full(talloc_asn1_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(talloc_asn1_ctx) == 1); + OSMO_ASSERT(talloc_total_size(talloc_asn1_ctx) == 0); + talloc_free(talloc_asn1_ctx); +} diff --git a/src/tests/test_common.h b/src/tests/test_common.h index 1af1abd..836d999 100644 --- a/src/tests/test_common.h +++ b/src/tests/test_common.h @@ -1,3 +1,4 @@ #pragma once int test_common_init(void); +void test_common_cleanup(void); -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:17:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:17:38 +0000 Subject: [PATCH] osmo-iuh[master]: test_common: fix compiler warning: include ranap_common.h Message-ID: Review at https://gerrit.osmocom.org/4962 test_common: fix compiler warning: include ranap_common.h test_common.c:85:2: warning: implicit declaration of function ?ranap_set_log_area? Change-Id: Ice192e1f7f1bdafe0941160f43e573349aaceb75 --- M src/tests/test_common.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/62/4962/1 diff --git a/src/tests/test_common.c b/src/tests/test_common.c index 0af8ceb..eeb0bec 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -37,6 +37,8 @@ #include #include +#include + #include void *talloc_asn1_ctx; -- To view, visit https://gerrit.osmocom.org/4962 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice192e1f7f1bdafe0941160f43e573349aaceb75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:18:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:18:03 +0000 Subject: [ABANDON] osmo-iuh[master]: NOT FOR MERGE -- test build on deb9 build slave In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE -- test build on deb9 build slave ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4921 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I01102c15be5565f3e29f9f1e1391b4afe7aa5eed Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:18:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:18:12 +0000 Subject: [ABANDON] osmo-bsc[master]: NOT FOR MERGE: testing gerrit build with V=1 In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: testing gerrit build with V=1 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4950 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I48f65170cfd2319ffe19b12cfa01a70e7b8e779a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 02:18:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 02:18:26 +0000 Subject: [ABANDON] libosmocore[master]: NOT FOR MERGE: test gerrit sanitizer build In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: test gerrit sanitizer build ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4858 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I67ae5d253e227002f2c252bd4c5818617bef5fbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 07:56:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 07:56:02 +0000 Subject: osmo-iuh[master]: tests: sanitize: fix mem leaks, clean after tests In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 07:57:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 07:57:38 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 3: > > Why not use osmo_load32be()? > > it's the other way round, writing *to* a buffer. ah there's > osmo_store32be() ... but ntohl() highlights the network byte order > in a way store32be doesn't..? Yes the otherway around. But what was the conclusion on the ntohl here? -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 07:58:11 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 07:58:11 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 07:59:12 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 07:59:12 +0000 Subject: osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: free endp In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 08:05:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 08:05:34 +0000 Subject: osmo-pcu[master]: AllocTest: expand test output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 hmm okay -- To view, visit https://gerrit.osmocom.org/4957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 08:06:17 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 08:06:17 +0000 Subject: osmo-pcu[master]: AllocTest: expand test output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4957/1/tests/alloc/AllocTest.cpp File tests/alloc/AllocTest.cpp: Line 482: case TEST_MODE_DL_ONLY: return (char*)"DL only"; no need to introduce this first and then change from ONLY to only -- To view, visit https://gerrit.osmocom.org/4957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 22 08:11:36 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 08:11:36 +0000 Subject: osmo-pcu[master]: Clarify alloc tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (4 comments) I don't get this churn.. It is different to what Jacob wrote but in which way is it better or needed? You remove one test (function) and inline it. Change some parameters. Say you remove one wrapper, add another? Why? https://gerrit.osmocom.org/#/c/4956/1//COMMIT_MSG Commit Message: Line 10: * rename top-level function to avoid confusion Which confusion? How is it better? Is there a bonus scheme for touching as many lines as possible? Line 11: * reformat to improve readability and destroying git blame.. Line 12: * drop confusing wrapper By which metric is it confusing? https://gerrit.osmocom.org/#/c/4956/1/tests/alloc/AllocTest.cpp File tests/alloc/AllocTest.cpp: Line 700: static inline void test_successive_allocation_single(algo_t algo, unsigned ms_class, enum test_mode mode, Single what? single ms? single class? single timeslot? single direction? -- To view, visit https://gerrit.osmocom.org/4956 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3feeb92237ffb9557ac6998540b740f1f67186b3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 22 08:20:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 22 Nov 2017 08:20:44 +0000 Subject: osmo-pcu[master]: Clarify alloc tests In-Reply-To: References: Message-ID: Patch Set 1: To elaborate further. Before this change I had to know what test_successive_allocation is doing. If I understand it correctly you are confused that for min_class and max_class sometimes the same class and sometimes different classes are passed. You try to solve this by introducing another method for the min_class == max_class case and put _single as suffix to the method name. With bike shedding maybe _single_class _one_class might be better but the point is.. after the change one needs to know the original method with all its parameters and now the overload as well. >From my point of view this is not an improvement. The human brain can only keep a few things in its memory/registers. So by knowing the new overload, something else must be spilled. I don't think a _single function in a test adds so much value to spill something else... leave alone to spend time changing it right now. -- To view, visit https://gerrit.osmocom.org/4956 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3feeb92237ffb9557ac6998540b740f1f67186b3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 10:03:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 22 Nov 2017 10:03:45 +0000 Subject: libosmo-abis[master]: unixsocket: fix a potential string overflow In-Reply-To: References: Message-ID: Patch Set 2: I created this task a follow-up to improve related stuff: https://osmocom.org/issues/2673 -- To view, visit https://gerrit.osmocom.org/4213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 12:07:14 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 22 Nov 2017 12:07:14 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#2). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 8 files changed, 953 insertions(+), 162 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/2 diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..3517842 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,59 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + strncpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + r->head.conn_id[sizeof(r->head.conn_id) - 1] = '\0'; + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +341,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +709,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +779,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index f77e7e8..f5d2668 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,38 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unuque + * for the current this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + strncpy(id, id_hex, MGCP_CONN_ID_MAXLEN); + return 0; + } + } + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,22 +110,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -106,7 +133,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - strncpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a326f00..17c24b1 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -466,9 +466,6 @@ break; case 'C': callid = (const char *)line + 3; - break; - case 'I': - conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -506,13 +503,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +550,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index e11ee48..db119fe 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,12 +555,84 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + memset(conn_id, 0, conn_id_len); + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\n') + conn_id[i] = '\0'; + } + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -568,6 +641,8 @@ cfg->policy_cb = mgcp_test_policy_cb; + memset(last_conn_id, 0, sizeof(last_conn_id)); + mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); for (i = 0; i < ARRAY_SIZE(tests); i++) { @@ -575,6 +650,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -583,7 +659,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -592,11 +668,16 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); if (dummy_packets) @@ -657,7 +738,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -682,6 +763,8 @@ { struct mgcp_config *cfg; int i; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -695,24 +778,31 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -733,6 +823,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -742,12 +833,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -762,7 +857,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -865,7 +960,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -875,7 +970,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1014,6 +1109,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1033,9 +1129,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1093,6 +1190,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1104,85 +1202,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,19 +1307,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1224,6 +1334,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1233,9 +1344,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1281,9 +1393,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 22 12:07:14 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 22 Nov 2017 12:07:14 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#2). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 15 files changed, 99 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/2 diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..5df7ab0 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_MAXLEN 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..cb2e796 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_MAXLEN]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..919da68 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_MAXLEN]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..f77e7e8 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,11 +78,13 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); @@ -102,9 +104,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + strncpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +128,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +149,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +172,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +244,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +254,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..656733c 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing) %s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty) %s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_MAXLEN) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) %s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x No connection found under ConnectionIdentifier %s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..a326f00 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..09739c1 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 3dee509..e11ee48 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -605,7 +605,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1033,9 +1033,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1111,7 +1111,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1125,7 +1125,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1139,7 +1139,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1153,7 +1153,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1170,7 +1170,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1182,7 +1182,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,7 +1199,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1211,7 +1211,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1233,9 +1233,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 22 12:28:49 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 22 Nov 2017 12:28:49 +0000 Subject: [PATCH] osmo-bsc[master]: bssap: remove libosmo-legacy-mgcp dependancy Message-ID: Review at https://gerrit.osmocom.org/4963 bssap: remove libosmo-legacy-mgcp dependancy the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() which are used to calculate the port in the sccp-lite / non AoIP case are part of libosmo-legacy-mgcp. Unfortunately libosmo-mgcp and libosmo-legacy-mgcp cause problems when used at the same time. Replace the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() with a local helper function. Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/63/4963/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 59c2979..73776ad 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -454,6 +453,19 @@ return -1; } +/* Helper function to calculate the port number for a given + * timeslot/multiplex. This functionality is needed to support + * the sccp-lite scenario where the MGW is handled externally */ +static inline int mgcp_timeslot_to_port(int multiplex, int timeslot, int base) +{ + if (timeslot == 0) { + LOGP(DLMGCP, LOGL_ERROR, "Timeslot should not be 0\n"); + timeslot = 255; + } + + return base + (timeslot + (32 * multiplex)) * 2; +} + /* * Handle the assignment request message. * @@ -468,7 +480,7 @@ uint8_t timeslot = 0; uint8_t multiplex = 0; enum gsm48_chan_mode chan_mode = GSM48_CMODE_SIGN; - int port, full_rate = -1; + int full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; struct gsm0808_channel_type ct; @@ -603,8 +615,7 @@ * (the MSC does that for us). We set conn->rtp_ip to 0 and check * on this later. By this we know that we have to behave accordingly * to sccp-lite. */ - port = mgcp_timeslot_to_endpoint(multiplex, timeslot); - conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); + conn->rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); conn->rtp_ip = 0; return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } -- To view, visit https://gerrit.osmocom.org/4963 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 22 12:28:50 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 22 Nov 2017 12:28:50 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use mgw assigned connection identifiers Message-ID: Review at https://gerrit.osmocom.org/4964 mgcp: use mgw assigned connection identifiers osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends osmo-mgw: Iab6a6038e7610c62f34e642cd49c93d11151252c Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/4964/1 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index dd26d40..e3b77bf 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -20,6 +20,8 @@ #pragma once +#include + /* MGCP state handler context (fsm etc..) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ @@ -28,6 +30,10 @@ /* RTP endpoint number */ uint16_t rtp_endpoint; + /* RTP connection identifiers */ + char conn_id_bts[MGCP_CONN_ID_MAXLEN]; + char conn_id_net[MGCP_CONN_ID_MAXLEN]; + /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f0c31df..9025f34 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,9 +31,6 @@ #include #include -#define CONN_ID_BTS 1 -#define CONN_ID_NET 2 - #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -201,10 +198,8 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, .conn_mode = MGCP_CONN_LOOPBACK }; if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= @@ -249,6 +244,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_bts, r->head.conn_id, sizeof(mgcp_ctx->conn_id_bts)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with CI: %s\n", mgcp_ctx->conn_id_bts); rc = mgcp_response_parse_params(r); if (rc) { @@ -364,7 +363,7 @@ .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = lchan->abis_ip.bound_port @@ -484,10 +483,9 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_NET, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = addr, .audio_port = port @@ -538,6 +536,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_net, r->head.conn_id, sizeof(mgcp_ctx->conn_id_net)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with CI: %s\n", mgcp_ctx->conn_id_net); rc = mgcp_response_parse_params(r); if (rc) { @@ -683,7 +685,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = ho_lchan->abis_ip.bound_port}; -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:25 +0000 Subject: [PATCH] osmo-msc[master]: sms_queue_test: sanitize: clean up talloc contexts when done Message-ID: Review at https://gerrit.osmocom.org/4965 sms_queue_test: sanitize: clean up talloc contexts when done To avoid sanitizer build failures, ensure that the talloc contexts are empty when done and free them. Separate the msgb context from the overall talloc context for clarity: if nested, the outer one would contain two blocks. Change the "sms_queue_test" context from 1 byte to 0 in order to get a size of zero in the end. Change-Id: If08ba48ab9c28bf3c2db4014837c1304cec04aaf --- M tests/sms_queue/sms_queue_test.c 1 file changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/4965/1 diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 0d073db..0ff636e 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -197,8 +197,10 @@ int main(int argc, char **argv) { - talloc_ctx = talloc_named_const(NULL, 1, "sms_queue_test"); - msgb_talloc_ctx_init(talloc_ctx, 0); + void *msgb_ctx; + + talloc_ctx = talloc_named_const(NULL, 0, "sms_queue_test"); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&info); OSMO_ASSERT(osmo_stderr_target); @@ -211,5 +213,23 @@ test_next_sms(); printf("Done\n"); + if (talloc_total_blocks(msgb_ctx) != 1 + || talloc_total_size(msgb_ctx) != 0) { + talloc_report_full(msgb_ctx, stderr); + fflush(stderr); + } + + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + talloc_free(msgb_ctx); + + if (talloc_total_blocks(talloc_ctx) != 1 + || talloc_total_size(talloc_ctx) != 0) + talloc_report_full(talloc_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(talloc_ctx) == 1); + OSMO_ASSERT(talloc_total_size(talloc_ctx) == 0); + talloc_free(talloc_ctx); + return 0; } -- To view, visit https://gerrit.osmocom.org/4965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If08ba48ab9c28bf3c2db4014837c1304cec04aaf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:26 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: log: CC state transition: log trans id and subscr Message-ID: Review at https://gerrit.osmocom.org/4966 cosmetic: log: CC state transition: log trans id and subscr Change-Id: I11c5213b90de27dc2606f73c686f263008b6522f --- M src/libmsc/gsm_04_08.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/66/4966/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 438f681..988bb7d 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1213,9 +1213,11 @@ if (state > 31 || state < 0) return; - DEBUGP(DCC, "new state %s -> %s\n", - gsm48_cc_state_name(trans->cc.state), - gsm48_cc_state_name(state)); + DEBUGP(DCC, "(ti %02x sub %s) new state %s -> %s\n", + trans->transaction_id, + vlr_subscr_name(trans->vsub), + gsm48_cc_state_name(trans->cc.state), + gsm48_cc_state_name(state)); count_statistics(trans, state); trans->cc.state = state; -- To view, visit https://gerrit.osmocom.org/4966 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11c5213b90de27dc2606f73c686f263008b6522f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:26 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: log: CC trans_alloc: log trans_id and subscr, not ... Message-ID: Review at https://gerrit.osmocom.org/4967 cosmetic: log: CC trans_alloc: log trans_id and subscr, not memory addrs Change-Id: I5f8b45d6580d42b00de847c8100023b414771939 --- M src/libmsc/transaction.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/67/4967/1 diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index bac31a1..01d69c2 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -86,8 +86,6 @@ { struct gsm_trans *trans; - DEBUGP(DCC, "subscr=%p, net=%p\n", vsub, net); - /* a valid subscriber is indispensable */ if (vsub == NULL) { LOGP(DCC, LOGL_NOTICE, @@ -95,6 +93,9 @@ return NULL; } + DEBUGP(DCC, "(ti %02x sub %s callref %x) New transaction\n", + trans_id, vlr_subscr_name(vsub), callref); + trans = talloc_zero(tall_trans_ctx, struct gsm_trans); if (!trans) return NULL; -- To view, visit https://gerrit.osmocom.org/4967 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f8b45d6580d42b00de847c8100023b414771939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:26 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: debug log: mncc: detached subscr: show subscriber Message-ID: Review at https://gerrit.osmocom.org/4968 cosmetic: debug log: mncc: detached subscr: show subscriber Change-Id: I477984d5e3bee8aea32419482d6bc48b1e74e6c2 --- M src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/68/4968/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 988bb7d..1aa5954 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2921,7 +2921,7 @@ DEBUGP(DCC, "(bts - trx - ts - ti -- sub %s) " "Received '%s' from MNCC with " "detached subscriber %s\n", data->called.number, - get_mncc_name(msg_type), data->called.number); + get_mncc_name(msg_type), vlr_subscr_name(vsub)); vlr_subscr_put(vsub); /* Temporarily out of order */ return mncc_release_ind(net, NULL, data->callref, -- To view, visit https://gerrit.osmocom.org/4968 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I477984d5e3bee8aea32419482d6bc48b1e74e6c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:27 +0000 Subject: [PATCH] osmo-msc[master]: msc_vlr_tests: fix test nr arg: clear errno before strtol() Message-ID: Review at https://gerrit.osmocom.org/4969 msc_vlr_tests: fix test nr arg: clear errno before strtol() Change-Id: I8e9376f20a44f6348bcb85f0ff27a429dc90e1b8 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/69/4969/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7cd869b..0608e84 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -800,6 +800,7 @@ int arg; long int nr; for (arg = optind; arg < argc; arg++) { + errno = 0; nr = strtol(argv[arg], NULL, 10); if (errno) { fprintf(stderr, "Invalid argument: %s\n", -- To view, visit https://gerrit.osmocom.org/4969 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e9376f20a44f6348bcb85f0ff27a429dc90e1b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:27 +0000 Subject: [PATCH] osmo-msc[master]: msc_vlr_tests: set a valid lac for fake conns Message-ID: Review at https://gerrit.osmocom.org/4970 msc_vlr_tests: set a valid lac for fake conns Change-Id: Ie647d93a54aefad5bde8a9411d983cd60714b83d --- M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c 11 files changed, 73 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/70/4970/1 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 3ceecf3..2677b8d 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -436,7 +436,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -886,7 +886,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -1406,7 +1406,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -1956,7 +1956,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -2276,7 +2276,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index c12eba1..d1bc786 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -280,7 +280,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -456,7 +456,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -763,7 +763,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -917,7 +917,7 @@ DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=50462976 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: is child of Subscr_Conn(50462976) DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1106,7 +1106,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1325,7 +1325,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1575,7 +1575,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1827,7 +1827,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index b26f0d2..45c80bd 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -297,7 +297,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -490,7 +490,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -815,7 +815,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1008,7 +1008,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -1227,7 +1227,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -1435,7 +1435,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index c946c1e..d508842 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -85,7 +85,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -163,7 +163,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -314,7 +314,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -464,7 +464,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -615,7 +615,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -691,7 +691,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -843,7 +843,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -917,7 +917,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -992,7 +992,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1070,7 +1070,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 8ca2991..d49ac75 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -10,7 +10,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -94,7 +94,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index df34b86..41f132c 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -10,7 +10,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -114,7 +114,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 931a72f..376faf7 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -195,7 +195,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -332,7 +332,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -553,7 +553,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -668,7 +668,7 @@ DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=50462976 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: is child of Subscr_Conn(50462976) DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -841,7 +841,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1013,7 +1013,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1210,7 +1210,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1367,7 +1367,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1556,7 +1556,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1720,7 +1720,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1910,7 +1910,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index 00945cb..39a04f2 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -44,7 +44,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -164,7 +164,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -288,7 +288,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -418,7 +418,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -545,7 +545,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -737,7 +737,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -931,7 +931,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1131,7 +1131,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1232,7 +1232,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1357,7 +1357,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1458,7 +1458,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1600,7 +1600,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1701,7 +1701,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index 1b5f340..493c35b 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -96,7 +96,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -214,7 +214,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -351,7 +351,7 @@ DMM Subscr_Conn(591536962){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(591536962){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=591536962 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: is child of Subscr_Conn(591536962) DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 57f5e8e..b138d44 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -293,7 +293,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -470,7 +470,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -770,7 +770,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 0 + RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -954,7 +954,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -1166,7 +1166,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 0608e84..550c5d8 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -156,6 +156,7 @@ conn = msc_subscr_con_allocate(net); conn->bts = the_bts; conn->via_ran = rx_from_ran; + conn->lac = 23; if (conn->via_ran == RAN_UTRAN_IU) { struct ranap_ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ranap_ue_conn_ctx); *ue_ctx = (struct ranap_ue_conn_ctx){ -- To view, visit https://gerrit.osmocom.org/4970 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie647d93a54aefad5bde8a9411d983cd60714b83d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:27 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: log error when using a conn that's in release Message-ID: Review at https://gerrit.osmocom.org/4971 cosmetic: log error when using a conn that's in release If a conn is attempted to be used when in release, log an error, but don't skip tracking. No current code path apparently hits this, according to msc_vlr_tests. Just making sure that we will prominently see such errors when we introduce any. Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 --- M src/libmsc/osmo_msc.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/71/4971/1 diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index f807f2a..42acf79 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -348,7 +348,10 @@ OSMO_ASSERT(conn); if (conn->in_release) - return NULL; + LOGPSRC(DREF, LOGL_ERROR, file, line, + "%s: MSC conn use error: using conn that is already in release (%s)\n", + vlr_subscr_name(conn->vsub), + msc_subscr_conn_use_name(balance_token)); conn->use_count++; LOGPSRC(DREF, LOGL_DEBUG, file, line, -- To view, visit https://gerrit.osmocom.org/4971 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:27 +0000 Subject: [PATCH] osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking Message-ID: Review at https://gerrit.osmocom.org/4972 subscr_conn: introduce usage tokens for ref error tracking When hunting a conn use count bug, it was very hard to figure out who's (not) using the conn. To ease tracking down this bug and future bugs, explicitly name what a conn is being reserved for, and track in a bit mask. Show in the DREF logs what uses and un-uses a conn. See the test expectation updates, which nicely show how that clarifies the state of the conn in the logs. On errors, log them, but don't fail hard: if one conn use/un-use fails, we don't want to crash the entire MSC before we have to. Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/osmo_msc.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_11.c M src/libmsc/osmo_msc.c M src/libmsc/silent_call.c M src/libmsc/subscr_conn.c M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 18 files changed, 853 insertions(+), 790 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/4972/1 -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:27 +0000 Subject: [PATCH] osmo-msc[master]: add msc_vlr_test_call to reproduce a sanitizer error Message-ID: Review at https://gerrit.osmocom.org/4973 add msc_vlr_test_call to reproduce a sanitizer error On MT call, there is a bug in CC conn use which leads to an early free and use-after-free. Add msc_vlr_test_call to show both MO and MT call legs separately and reproduce the failure. It is visible in a sanitizer build (on debian 9). A subsequent patch will fix the bug: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Related: OS#2672 Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 --- M src/libmsc/gsm_04_08.c M tests/msc_vlr/Makefile.am A tests/msc_vlr/msc_vlr_test_call.c A tests/msc_vlr/msc_vlr_test_call.err A tests/msc_vlr/msc_vlr_test_call.ok M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/testsuite.at 8 files changed, 1,132 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/73/4973/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 061d3ad..d32de5d 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1359,7 +1359,7 @@ vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); + transt->conn = conn; /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); break; diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 7fc9212..8bbe6cb 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,6 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=msc_call_assignment \ + -Wl,--wrap=msc_call_release \ $(NULL) LDADD = \ @@ -75,6 +77,8 @@ msc_vlr_test_ms_timeout.err \ msc_vlr_test_reject_concurrency.ok \ msc_vlr_test_reject_concurrency.err \ + msc_vlr_test_call.ok \ + msc_vlr_test_call.err \ msc_vlr_test_rest.ok \ msc_vlr_test_rest.err \ $(NULL) @@ -89,6 +93,7 @@ msc_vlr_test_hlr_timeout \ msc_vlr_test_ms_timeout \ msc_vlr_test_reject_concurrency \ + msc_vlr_test_call \ msc_vlr_test_rest \ $(NULL) @@ -137,6 +142,11 @@ msc_vlr_tests.c \ $(NULL) +msc_vlr_test_call_SOURCES = \ + msc_vlr_test_call.c \ + msc_vlr_tests.c \ + $(NULL) + msc_vlr_test_rest_SOURCES = \ msc_vlr_test_rest.c \ msc_vlr_tests.c \ @@ -153,4 +163,5 @@ $(builddir)/msc_vlr_test_hlr_timeout >$(srcdir)/msc_vlr_test_hlr_timeout.ok 2>$(srcdir)/msc_vlr_test_hlr_timeout.err $(builddir)/msc_vlr_test_ms_timeout >$(srcdir)/msc_vlr_test_ms_timeout.ok 2>$(srcdir)/msc_vlr_test_ms_timeout.err $(builddir)/msc_vlr_test_reject_concurrency >$(srcdir)/msc_vlr_test_reject_concurrency.ok 2>$(srcdir)/msc_vlr_test_reject_concurrency.err + $(builddir)/msc_vlr_test_call >$(srcdir)/msc_vlr_test_call.ok 2>$(srcdir)/msc_vlr_test_call.err $(builddir)/msc_vlr_test_rest >$(srcdir)/msc_vlr_test_rest.ok 2>$(srcdir)/msc_vlr_test_rest.err diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c new file mode 100644 index 0000000..cc120c8 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -0,0 +1,341 @@ +/* Osmocom MSC+VLR end-to-end tests */ + +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include "msc_vlr_tests.h" + +#include + +void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) +{ + mncc->msg_type = msg_type; + mncc_tx_to_cc(net, msg_type, mncc); +} + +#define IMSI "901700000010650" + +static void standard_lu() +{ + struct vlr_subscr *vsub; + + net->authentication_required = true; + net->vlr->cfg.assign_tmsi = true; + rx_from_ran = RAN_UTRAN_IU; + + btw("Location Update request causes a GSUP Send Auth Info request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("080108" "09710000000156f0"); + ms_sends_msg("0508" /* MM LU */ + "7" /* ciph key seq: no key available */ + "0" /* LU type: normal */ + "09f107" "0017" /* LAI, LAC */ + "57" /* classmark 1: R99, early classmark, no power lvl */ + "089910070000106005" /* IMSI */ + "3303575886" /* classmark 2 */ + ); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS"); + /* based on auc_3g: + * K = 'EB215756028D60E3275E613320AEC880', + * OPC = 'FB2A3D1B360F599ABAB99DB8669F8308' + * SQN = 0 + */ + auth_request_sent = false; + auth_request_expect_rand = "39fa2f4e3d523d8619a73b4f65c3e14d"; + auth_request_expect_autn = "8704f5ba55f30000d2ee44b22c8ea919"; + gsup_rx("0a" + /* imsi */ + "0108" "09710000000156f0" + /* 5 auth vectors... */ + /* TL TL rand */ + "0362" "2010" "39fa2f4e3d523d8619a73b4f65c3e14d" + /* TL sres TL kc */ + "2104" "9b36efdf" "2208" "059a4f668f6fbe39" + /* TL 3G IK */ + "2310" "27497388b6cb044648f396aa155b95ef" + /* TL 3G CK */ + "2410" "f64735036e5871319c679f4742a75ea1" + /* TL AUTN */ + "2510" "8704f5ba55f30000d2ee44b22c8ea919" + /* TL RES */ + "2708" "e229c19e791f2e41" + /* TL TL rand */ + "0362" "2010" "c187a53a5e6b9d573cac7c74451fd46d" + "2104" "85aa3130" "2208" "d3d50a000bf04f6e" + "2310" "1159ec926a50e98c034a6b7d7c9f418d" + "2410" "df3a03d9ca5335641efc8e36d76cd20b" + "2510" "1843a645b98d00005b2d666af46c45d9" + "2708" "7db47cf7f81e4dc7" + "0362" "2010" "efa9c29a9742148d5c9070348716e1bb" + "2104" "69d5f9fb" "2208" "3df176f0c29f1a3d" + "2310" "eb50e770ddcc3060101d2f43b6c2b884" + "2410" "76542abce5ff9345b0e8947f4c6e019c" + "2510" "f9375e6d41e1000096e7fe4ff1c27e39" + "2708" "706f996719ba609c" + "0362" "2010" "f023d5a3b24726e0631b64b3840f8253" + "2104" "d570c03f" "2208" "ec011be8919883d6" + "2310" "c4e58af4ba43f3bcd904e16984f086d7" + "2410" "0593f65e752e5cb7f473862bda05aa0a" + "2510" "541ff1f077270000c5ea00d658bc7e9a" + "2708" "3fd26072eaa2a04d" + "0362" "2010" "2f8f90c780d6a9c0c53da7ac57b6707e" + "2104" "b072446f220823f39f9f425ad6e6" + "2310" "65af0527fda95b0dc5ae4aa515cdf32f" + "2410" "537c3b35a3b13b08d08eeb28098f45cc" + "2510" "4bf4e564f75300009bc796706bc65744" + "2708" "0edb0eadbea94ac2", + NULL); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "e229c19e" "2104" "791f2e41"); + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR"); + gsup_expect_tx("04010809710000000156f0"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(gsup_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000000156f00804032443f2", + "12010809710000000156f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + gsup_rx("06010809710000000156f0", NULL); + + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + + btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); + EXPECT_CONN_COUNT(1); + EXPECT_ACCEPTED(false); + + btw("MS sends TMSI Realloc Complete"); + iu_release_expected = true; + iu_release_sent = false; + ms_sends_msg("055b"); + VERBOSE_ASSERT(iu_release_sent, == true, "%d"); \ + + btw("LU was successful, and the conn has already been closed"); + EXPECT_CONN_COUNT(0); + + vsub = vlr_subscr_find_by_imsi(net->vlr, IMSI); + VERBOSE_ASSERT(vsub != NULL, == true, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imsi, IMSI), == 0, "%d"); + VERBOSE_ASSERT(vsub->lac, == 23, "%u"); + vlr_subscr_put(vsub); +} + +void test_call_mo() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + cm_service_result_sent = RES_NONE; + ms_sends_msg("052478" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + OSMO_ASSERT(g_conn); + OSMO_ASSERT(g_conn->conn_fsm); + OSMO_ASSERT(g_conn->vsub); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("needs auth, not yet accepted"); + EXPECT_ACCEPTED(false); + + /* On UTRAN */ + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + BTW("a call is initiated"); + + btw("SETUP gets forwarded to MNCC"); + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND); + ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */ + "0406600402000581" /* Bearer Capability */ + "5e038121f3" /* Called Number BCD */ + "15020100" /* CC Capabilities */ + "4008" /* Supported Codec List */ + "04026000" /* UMTS: AMR 2 | AMR */ + "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */ + ); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + mncc.callref = cc_to_mncc_tx_got_callref; + + btw("MNCC says that's fine"); + dtap_expect_tx("8302" /* CC: Call Proceeding */); + mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + btw("The other call leg got established (not shown here), MNCC tells us so"); + dtap_expect_tx("8301" /* CC: Call Alerting */); + mncc_sends_to_cc(MNCC_ALERT_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + dtap_expect_tx("8307" /* CC: Connect */); + mncc_sends_to_cc(MNCC_SETUP_RSP, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_SETUP_COMPL_IND); + ms_sends_msg("03cf" /* CC: Connect Acknowledge */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("032502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("832d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("036a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +void test_call_mt() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + .callref = 0x423, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, MNCC asks us to setup a call, causing Paging"); + + paging_expect_imsi(IMSI); + paging_sent = false; + mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc); + + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("MS replies with Paging Response, and VLR sends Auth Request"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + ms_sends_msg("062707" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup"); + dtap_expect_tx("0305" /* CC: Setup */); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + cc_to_mncc_expect_tx(IMSI, MNCC_CALL_CONF_IND); + ms_sends_msg("8348" /* CC: Call Confirmed */ + "0406600402000581" /* Bearer Capability */ + "15020100" /* Call Control Capabilities */ + "40080402600400021f00" /* Supported Codec List */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_ALERT_IND); + ms_sends_msg("8381" /* CC: Alerting */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_CNF); + ms_sends_msg("83c7" /* CC: Connect */); + + dtap_expect_tx("030f" /* CC: Connect Acknowledge */); + mncc_sends_to_cc(MNCC_SETUP_COMPL_REQ, &mncc); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("832502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("032d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("836a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +msc_vlr_test_func_t msc_vlr_tests[] = { + test_call_mo, + test_call_mt, + NULL +}; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err new file mode 100644 index 0000000..6fd9288 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -0,0 +1,700 @@ +===== test_call_mo +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_CM_SERV_REQ + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24) +DMM <- CM SERVICE REQUEST serv_type=0x08 MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + cm_service_result_sent == 0 + auth_request_sent == 1 +- needs auth, not yet accepted +msc_subscr_conn_is_accepted() == false +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + cm_service_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_CM_SERVICE_REQ +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: received_cm_service_request = true +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: still awaiting first request after a CM Service Request + cm_service_result_sent == 0 +--- +- a call is initiated +- SETUP gets forwarded to MNCC + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_SETUP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DREF MSISDN:42342: MSC conn use + trans_cc == 3 (0xe) +DMM MSISDN:42342: rx msg GSM48_MT_CC_SETUP: received_cm_service_request changes to false +DCC Subscriber MSISDN:42342 (42342) sends SETUP to 123 +DMNCC transmit message MNCC_SETUP_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +- MNCC says that's fine +DMNCC receive message MNCC_CALL_PROC_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CALL_PROC: 8302 +- DTAP matches expected message + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x80000001 +- Total time passed: 1.000023 s +- The other call leg got established (not shown here), MNCC tells us so +DMNCC receive message MNCC_ALERT_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_ALERTING: 8301 +- DTAP matches expected message +DMNCC receive message MNCC_SETUP_RSP +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT: 8307 +- DTAP matches expected message +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT_ACK +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT_ACK (0x3:0xf) +DMNCC transmit message MNCC_SETUP_COMPL_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_COMPL_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x80000001: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 832d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x80000001: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mo: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +===== test_call_mt +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, MNCC asks us to setup a call, causing Paging +DMNCC receive message MNCC_SETUP_REQ +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DMM Subscriber MSISDN:42342 not paged yet, start paging. + RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- MS replies with Paging Response, and VLR sends Auth Request + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_RR_PAG_RESP + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_RR_PAG_RESP (0x6:0x27) +DRR PAGING RESPONSE: MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage increases to: 5 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 4 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + auth_request_sent == 1 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 +- MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_PAGING_RESP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DPAG Paging success for MSISDN:42342 (event=0) +DPAG Calling paging cbfn. +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 +- DTAP matches expected message +DREF VLR subscr MSISDN:42342 usage decreases to: 3 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC + paging_stopped == 1 + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 +DMNCC transmit message MNCC_CALL_CONF_IND + MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 1.000023 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) +DMNCC transmit message MNCC_ALERT_IND + MSC --> MNCC: callref 0x423: MNCC_ALERT_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) +DMNCC transmit message MNCC_SETUP_CNF + MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_SETUP_COMPL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f +- DTAP matches expected message +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x423: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x423: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc +DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF unknown: MSC conn use - dtap failed: is already 0 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mt: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + diff --git a/tests/msc_vlr/msc_vlr_test_call.ok b/tests/msc_vlr/msc_vlr_test_call.ok new file mode 100644 index 0000000..a965a70 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.ok @@ -0,0 +1 @@ +Done diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 550c5d8..dd7196c 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -34,6 +34,7 @@ #include #include #include +#include #if BUILD_IU #include @@ -68,6 +69,11 @@ bool iu_release_sent = false; bool bssap_clear_expected = false; bool bssap_clear_sent = false; + +uint32_t cc_to_mncc_tx_expected_msg_type = 0; +const char *cc_to_mncc_tx_expected_imsi = NULL; +bool cc_to_mncc_tx_confirmed = false; +uint32_t cc_to_mncc_tx_got_callref = 0; struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) { @@ -377,7 +383,7 @@ [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .enabled = 1, .loglevel = LOGL_NOTICE, + .enabled = 1, .loglevel = LOGL_INFO, }, [DMM] = { .name = "DMM", @@ -404,6 +410,11 @@ .description = "Iu-CS Protocol", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DMNCC] = { + .name = "DMNCC", + .description = "MNCC API for Call Control application", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; static struct log_info info = { @@ -413,9 +424,31 @@ extern void *tall_bsc_ctx; -int fake_mncc_recv(struct gsm_network *net, struct msgb *msg) +int mncc_recv(struct gsm_network *net, struct msgb *msg) { - fprintf(stderr, "rx MNCC\n"); + struct gsm_mncc *mncc = (void*)msg->data; + log("MSC --> MNCC: callref 0x%x: %s", mncc->callref, + get_mncc_name(mncc->msg_type)); + + OSMO_ASSERT(cc_to_mncc_tx_expected_msg_type); + if (cc_to_mncc_tx_expected_msg_type != mncc->msg_type) { + log("Mismatch! Expected MNCC msg type: %s", + get_mncc_name(cc_to_mncc_tx_expected_msg_type)); + abort(); + } + + if (strcmp(cc_to_mncc_tx_expected_imsi, mncc->imsi)) { + log("Mismatch! Expected MNCC msg IMSI: '%s', got '%s'", + cc_to_mncc_tx_expected_imsi, + mncc->imsi); + abort(); + } + + cc_to_mncc_tx_confirmed = true; + cc_to_mncc_tx_got_callref = mncc->callref; + cc_to_mncc_tx_expected_imsi = NULL; + cc_to_mncc_tx_expected_msg_type = 0; + talloc_free(msg); return 0; } @@ -521,6 +554,23 @@ bssap_clear_expected = false; bssap_clear_sent = true; return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_assignment' */ +int __real_msc_call_assignment(struct gsm_trans *trans); +int __wrap_msc_call_assignment(struct gsm_trans *trans) +{ + log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); + return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_release' */ +void __real_msc_call_release(struct gsm_trans *trans); +void __wrap_msc_call_release(struct gsm_trans *trans) +{ + log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); } static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi) @@ -774,7 +824,7 @@ log_set_print_filename(osmo_stderr_target, _log_lines? 1 : 0); log_set_print_category(osmo_stderr_target, 1); - net = gsm_network_init(tall_bsc_ctx, 1, 1, fake_mncc_recv); + net = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server"); net->gsup_server_port = 0; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 1cd3914..ee26ac4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -29,6 +29,7 @@ #include #include #include +#include extern bool _log_lines; #define _log(fmt, args...) do { \ @@ -83,6 +84,11 @@ extern bool iu_release_sent; extern bool bssap_clear_expected; extern bool bssap_clear_sent; + +extern uint32_t cc_to_mncc_tx_expected_msg_type; +extern const char *cc_to_mncc_tx_expected_imsi; +extern bool cc_to_mncc_tx_confirmed; +extern uint32_t cc_to_mncc_tx_got_callref; static inline void expect_iu_release() { @@ -169,6 +175,17 @@ gsup_tx_confirmed = false; \ } while (0) +#define cc_to_mncc_expect_tx(imsi, msg_type) do \ +{ \ + if (cc_to_mncc_tx_expected_msg_type) { \ + log("Previous expected MNCC tx was not confirmed!"); \ + OSMO_ASSERT(!cc_to_mncc_tx_expected_msg_type); \ + } \ + cc_to_mncc_tx_expected_imsi = imsi; \ + cc_to_mncc_tx_expected_msg_type = msg_type; \ + cc_to_mncc_tx_confirmed = false; \ +} while (0) + void fake_time_start(); /* as macro to get the test file's source line number */ diff --git a/tests/testsuite.at b/tests/testsuite.at index f0147e7..5307899 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -79,6 +79,13 @@ AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_reject_concurrency], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([msc_vlr_test_call]) +AT_KEYWORDS([msc_vlr_test_call]) +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.ok > expout +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.err > experr +AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_call], [], [expout], [experr]) +AT_CLEANUP + AT_SETUP([msc_vlr_test_rest]) AT_KEYWORDS([msc_vlr_test_rest]) cat $abs_srcdir/msc_vlr/msc_vlr_test_rest.ok > expout -- To view, visit https://gerrit.osmocom.org/4973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:03:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:03:28 +0000 Subject: [PATCH] osmo-msc[master]: fix use after free: missing conn_get on CC paging response Message-ID: Review at https://gerrit.osmocom.org/4974 fix use after free: missing conn_get on CC paging response Adjust test expectations accordingly. The error was: ==16084==ERROR: AddressSanitizer: heap-use-after-free on address 0x61500000f5f4 at pc 0x561be639ac2b bp 0x7ffc0aabbe40 sp 0x7ffc0aabbe38 READ of size 4 at 0x61500000f5f4 thread T0 #0 0x561be639ac2a in _msc_subscr_conn_put ../../../../src/osmo-msc/src/libmsc/osmo_msc.c:384 #1 0x561be636070b in rx_from_ms ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:204 #2 0x561be6360b21 in ms_sends_msg ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:217 #3 0x561be635b40a in test_call_mt ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_test_call.c:328 #4 0x561be6363bb7 in run_tests ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:802 #5 0x561be63524ea in main ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:849 #6 0x7f6eebb3e2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #7 0x561be6352fb9 in _start (/n/s/osmo/make-3G/osmo-msc/tests/msc_vlr/msc_vlr_test_call+0xdafb9) Related: OS#2672 Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 --- M src/libmsc/gsm_04_08.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/4974/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d32de5d..061d3ad 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1359,7 +1359,7 @@ vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = conn; + transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); break; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 6fd9288..5ffab4a 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -602,6 +602,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED DPAG Paging success for MSISDN:42342 (event=0) DPAG Calling paging cbfn. +DREF MSISDN:42342: MSC conn use + trans_cc == 2 (0xc) DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 - DTAP matches expected message @@ -610,7 +611,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC paging_stopped == 1 MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 DMNCC transmit message MNCC_CALL_CONF_IND @@ -619,27 +620,27 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 1.000023 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) DMNCC transmit message MNCC_ALERT_IND MSC --> MNCC: callref 0x423: MNCC_ALERT_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 2.000046 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) DMNCC transmit message MNCC_SETUP_CNF MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_SETUP_COMPL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f @@ -650,27 +651,26 @@ --- - Call ends MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) DMNCC transmit message MNCC_DISC_IND MSC --> MNCC: callref 0x423: MNCC_DISC_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_REL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d - DTAP matches expected message MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) DMNCC transmit message MNCC_REL_CNF MSC --> MNCC: callref 0x423: MNCC_REL_CNF MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 DREF VLR subscr MSISDN:42342 usage decreases to: 2 -DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc -DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn @@ -682,12 +682,12 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. - Iu Release --RAN_UTRAN_IU--> MS -DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) -DRLL subscr MSISDN:42342: Freeing subscriber connection -DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated -DREF unknown: MSC conn use - dtap failed: is already 0 +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 llist_count(&net->subscr_conns) == 0 DREF freeing VLR subscr MSISDN:42342 ===== test_call_mt: SUCCESS -- To view, visit https://gerrit.osmocom.org/4974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:09:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:09:16 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Patch Set 3: > Yes the otherway around. But what was the conclusion on the ntohl > here? my conclusion is that I prefer ntohl to clarify network byte order instead of just big endian "for no specific reason" -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:09:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:09:36 +0000 Subject: [MERGED] osmo-iuh[master]: ranap_msg_factory: sanitize: memcpy instead of unaligned int... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: ranap_msg_factory: sanitize: memcpy instead of unaligned int copy ...................................................................... ranap_msg_factory: sanitize: memcpy instead of unaligned int copy The sanitize build complains about writing to a uint32_t that is not 4-byte aligned. Instead, write the uint32_t by memcpy. For that, move the common ntohl() to the top and store in a local uint32_t, memcpy() from that in both code paths. Change-Id: Iacdd15421f824dd009448a96355b533dff28258b --- M src/ranap_msg_factory.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index ef3e9ef..fe7e325 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -638,6 +638,7 @@ { uint8_t *buf; unsigned int len; + uint32_t ip_h = ntohl(ip); if (use_x213_nsap) { len = 160/8; @@ -645,11 +646,11 @@ buf[0] = 0x35; /* AFI For IANA ICP */ buf[1] = 0x00; /* See A.5.2.1.2.7 of X.213 */ buf[2] = 0x01; - *(uint32_t *)&buf[3] = ntohl(ip); + memcpy(&buf[3], &ip_h, sizeof(ip_h)); } else { - len = 4; + len = sizeof(ip_h); buf = CALLOC(len, sizeof(uint8_t)); - *(uint32_t *)buf = ntohl(ip); + memcpy(buf, &ip_h, sizeof(ip_h)); } out->buf = buf; out->size = len; -- To view, visit https://gerrit.osmocom.org/4928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacdd15421f824dd009448a96355b533dff28258b Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:09:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:09:36 +0000 Subject: [MERGED] osmo-iuh[master]: tests: sanitize: fix mem leaks, clean after tests In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: tests: sanitize: fix mem leaks, clean after tests ...................................................................... tests: sanitize: fix mem leaks, clean after tests Fix various mem leaks in the testing code. Add test_common_cleanup() in test_common.c, to free talloc contexts; call in test-{helpers,hnbap,ranap}.c. Upon talloc ctx cleanup, ensure that they are actually empty, in order to catch newly introduced mem leaks. If non-empty, print talloc context reports. Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c --- M src/tests/test-helpers.c M src/tests/test-hnbap.c M src/tests/test-ranap.c M src/tests/test_common.c M src/tests/test_common.h 5 files changed, 33 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 44fd735..f218a79 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -105,6 +105,8 @@ ASSERT(enc.size == 24/8); ASSERT(enc.bits_unused == 0); + talloc_free(buffer); + rc = aper_encode_to_new_buffer(&asn_DEF_BIT_STRING, 0, &enc, (void **) &buffer); printf("Encoded: %s\n", osmo_hexdump_nospc(buffer, rc)); @@ -118,6 +120,7 @@ printf("Decoding large string from asn1: %s\n", text); ASSERT(rc == 31); + talloc_free(buffer); } void test_ranap_common(void) @@ -211,5 +214,6 @@ test_asn1_helpers(); test_ranap_common(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index ef46070..dfd5ae9 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -142,6 +142,8 @@ printf("HNBAP UE Register request from IMSI %s\n", imsi); hnbap_free_ueregisterrequesties(&ue_req_ies); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_PDU, pdu); + memset(pdu, 0, sizeof(*pdu)); dec_ret = aper_decode(NULL, &asn_DEF_HNBAP_PDU, (void **) &pdu, hnbap_ue_reg_acc, sizeof(hnbap_ue_reg_acc), 0, 0); @@ -163,6 +165,7 @@ printf("HNBAP UE Register accept to IMSI %s\n", imsi); hnbap_free_ueregisteraccepties(&ue_acc_ies); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_PDU, pdu); } int main(int argc, char **argv) @@ -175,6 +178,7 @@ test_asn1_decoding(); + test_common_cleanup(); return 0; } diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c1c7003..05be874 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -197,6 +197,8 @@ talloc_report(talloc_asn1_ctx, stdout); talloc_report(tall_msgb_ctx, stdout); //talloc_report(NULL, stdout); + + test_common_cleanup(); printf("exit\n"); exit(0); } diff --git a/src/tests/test_common.c b/src/tests/test_common.c index c8aafdd..0af8ceb 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -69,11 +69,13 @@ .num_cat = ARRAY_SIZE(log_cat), }; +static void *msgb_ctx; + int test_common_init(void) { int rc; - msgb_talloc_ctx_init(NULL, 0); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); @@ -85,3 +87,22 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); } + +void test_common_cleanup(void) +{ + if (talloc_total_blocks(msgb_ctx) != 1 + || talloc_total_size(msgb_ctx) != 0) + talloc_report_full(msgb_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + talloc_free(msgb_ctx); + + if (talloc_total_blocks(talloc_asn1_ctx) != 1 + || talloc_total_size(talloc_asn1_ctx) != 0) + talloc_report_full(talloc_asn1_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(talloc_asn1_ctx) == 1); + OSMO_ASSERT(talloc_total_size(talloc_asn1_ctx) == 0); + talloc_free(talloc_asn1_ctx); +} diff --git a/src/tests/test_common.h b/src/tests/test_common.h index 1af1abd..836d999 100644 --- a/src/tests/test_common.h +++ b/src/tests/test_common.h @@ -1,3 +1,4 @@ #pragma once int test_common_init(void); +void test_common_cleanup(void); -- To view, visit https://gerrit.osmocom.org/4916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic66c005f2a264774e18bb54e58b87bef5944511c Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:09:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:09:51 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: test_no_cycle: sanitize: free endp In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_test: test_no_cycle: sanitize: free endp ...................................................................... mgcp_test: test_no_cycle: sanitize: free endp Release endpoint to avoid sanitizer errors. Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 --- M tests/mgcp/mgcp_test.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 3dee509..da71b46 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1262,6 +1262,7 @@ OSMO_ASSERT(conn->state.stats_cycles == UINT16_MAX + 1); OSMO_ASSERT(conn->state.stats_max_seq == 0); + mgcp_release_endp(endp); talloc_free(cfg); } -- To view, visit https://gerrit.osmocom.org/4919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78d16ffc435c0f967fe99c6e38dde829b6fa0dc9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 16:09:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 16:09:52 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: sanitize: free msgb_ctx In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_test: sanitize: free msgb_ctx ...................................................................... mgcp_test: sanitize: free msgb_ctx Ensure that all msgb were cleaned up, then free the overall msgb_ctx, in order to not leave any memory leaks the sanitizer build complains about. Change-Id: I53373023a6c3f490d6d6cb1c283db5dfb915882c --- M tests/mgcp/mgcp_test.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index da71b46..99491e6 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -1331,7 +1331,7 @@ int main(int argc, char **argv) { - msgb_talloc_ctx_init(NULL, 0); + void *msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); @@ -1350,6 +1350,9 @@ test_no_name(); test_osmux_cid(); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + talloc_free(msgb_ctx); printf("Done\n"); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53373023a6c3f490d6d6cb1c283db5dfb915882c Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 17:50:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 17:50:58 +0000 Subject: [PATCH] osmo-msc[master]: add msc_vlr_test_call to reproduce a sanitizer error In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4973 to look at the new patch set (#2). add msc_vlr_test_call to reproduce a sanitizer error On MT call, there is a bug in CC conn use which leads to an early free and use-after-free. Add msc_vlr_test_call to show both MO and MT call legs separately and reproduce the failure. It is visible in a sanitizer build (on debian 9). A subsequent patch will fix the bug: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Related: OS#2672 Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 --- M src/libmsc/gsm_04_08.c M tests/msc_vlr/Makefile.am A tests/msc_vlr/msc_vlr_test_call.c A tests/msc_vlr/msc_vlr_test_call.err A tests/msc_vlr/msc_vlr_test_call.ok M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/testsuite.at 8 files changed, 1,132 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/73/4973/2 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 061d3ad..d32de5d 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1359,7 +1359,7 @@ vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); + transt->conn = conn; /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); break; diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 7fc9212..8bbe6cb 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,6 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=msc_call_assignment \ + -Wl,--wrap=msc_call_release \ $(NULL) LDADD = \ @@ -75,6 +77,8 @@ msc_vlr_test_ms_timeout.err \ msc_vlr_test_reject_concurrency.ok \ msc_vlr_test_reject_concurrency.err \ + msc_vlr_test_call.ok \ + msc_vlr_test_call.err \ msc_vlr_test_rest.ok \ msc_vlr_test_rest.err \ $(NULL) @@ -89,6 +93,7 @@ msc_vlr_test_hlr_timeout \ msc_vlr_test_ms_timeout \ msc_vlr_test_reject_concurrency \ + msc_vlr_test_call \ msc_vlr_test_rest \ $(NULL) @@ -137,6 +142,11 @@ msc_vlr_tests.c \ $(NULL) +msc_vlr_test_call_SOURCES = \ + msc_vlr_test_call.c \ + msc_vlr_tests.c \ + $(NULL) + msc_vlr_test_rest_SOURCES = \ msc_vlr_test_rest.c \ msc_vlr_tests.c \ @@ -153,4 +163,5 @@ $(builddir)/msc_vlr_test_hlr_timeout >$(srcdir)/msc_vlr_test_hlr_timeout.ok 2>$(srcdir)/msc_vlr_test_hlr_timeout.err $(builddir)/msc_vlr_test_ms_timeout >$(srcdir)/msc_vlr_test_ms_timeout.ok 2>$(srcdir)/msc_vlr_test_ms_timeout.err $(builddir)/msc_vlr_test_reject_concurrency >$(srcdir)/msc_vlr_test_reject_concurrency.ok 2>$(srcdir)/msc_vlr_test_reject_concurrency.err + $(builddir)/msc_vlr_test_call >$(srcdir)/msc_vlr_test_call.ok 2>$(srcdir)/msc_vlr_test_call.err $(builddir)/msc_vlr_test_rest >$(srcdir)/msc_vlr_test_rest.ok 2>$(srcdir)/msc_vlr_test_rest.err diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c new file mode 100644 index 0000000..cc120c8 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -0,0 +1,341 @@ +/* Osmocom MSC+VLR end-to-end tests */ + +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include "msc_vlr_tests.h" + +#include + +void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) +{ + mncc->msg_type = msg_type; + mncc_tx_to_cc(net, msg_type, mncc); +} + +#define IMSI "901700000010650" + +static void standard_lu() +{ + struct vlr_subscr *vsub; + + net->authentication_required = true; + net->vlr->cfg.assign_tmsi = true; + rx_from_ran = RAN_UTRAN_IU; + + btw("Location Update request causes a GSUP Send Auth Info request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("080108" "09710000000156f0"); + ms_sends_msg("0508" /* MM LU */ + "7" /* ciph key seq: no key available */ + "0" /* LU type: normal */ + "09f107" "0017" /* LAI, LAC */ + "57" /* classmark 1: R99, early classmark, no power lvl */ + "089910070000106005" /* IMSI */ + "3303575886" /* classmark 2 */ + ); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS"); + /* based on auc_3g: + * K = 'EB215756028D60E3275E613320AEC880', + * OPC = 'FB2A3D1B360F599ABAB99DB8669F8308' + * SQN = 0 + */ + auth_request_sent = false; + auth_request_expect_rand = "39fa2f4e3d523d8619a73b4f65c3e14d"; + auth_request_expect_autn = "8704f5ba55f30000d2ee44b22c8ea919"; + gsup_rx("0a" + /* imsi */ + "0108" "09710000000156f0" + /* 5 auth vectors... */ + /* TL TL rand */ + "0362" "2010" "39fa2f4e3d523d8619a73b4f65c3e14d" + /* TL sres TL kc */ + "2104" "9b36efdf" "2208" "059a4f668f6fbe39" + /* TL 3G IK */ + "2310" "27497388b6cb044648f396aa155b95ef" + /* TL 3G CK */ + "2410" "f64735036e5871319c679f4742a75ea1" + /* TL AUTN */ + "2510" "8704f5ba55f30000d2ee44b22c8ea919" + /* TL RES */ + "2708" "e229c19e791f2e41" + /* TL TL rand */ + "0362" "2010" "c187a53a5e6b9d573cac7c74451fd46d" + "2104" "85aa3130" "2208" "d3d50a000bf04f6e" + "2310" "1159ec926a50e98c034a6b7d7c9f418d" + "2410" "df3a03d9ca5335641efc8e36d76cd20b" + "2510" "1843a645b98d00005b2d666af46c45d9" + "2708" "7db47cf7f81e4dc7" + "0362" "2010" "efa9c29a9742148d5c9070348716e1bb" + "2104" "69d5f9fb" "2208" "3df176f0c29f1a3d" + "2310" "eb50e770ddcc3060101d2f43b6c2b884" + "2410" "76542abce5ff9345b0e8947f4c6e019c" + "2510" "f9375e6d41e1000096e7fe4ff1c27e39" + "2708" "706f996719ba609c" + "0362" "2010" "f023d5a3b24726e0631b64b3840f8253" + "2104" "d570c03f" "2208" "ec011be8919883d6" + "2310" "c4e58af4ba43f3bcd904e16984f086d7" + "2410" "0593f65e752e5cb7f473862bda05aa0a" + "2510" "541ff1f077270000c5ea00d658bc7e9a" + "2708" "3fd26072eaa2a04d" + "0362" "2010" "2f8f90c780d6a9c0c53da7ac57b6707e" + "2104" "b072446f220823f39f9f425ad6e6" + "2310" "65af0527fda95b0dc5ae4aa515cdf32f" + "2410" "537c3b35a3b13b08d08eeb28098f45cc" + "2510" "4bf4e564f75300009bc796706bc65744" + "2708" "0edb0eadbea94ac2", + NULL); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "e229c19e" "2104" "791f2e41"); + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR"); + gsup_expect_tx("04010809710000000156f0"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(gsup_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000000156f00804032443f2", + "12010809710000000156f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + gsup_rx("06010809710000000156f0", NULL); + + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + + btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); + EXPECT_CONN_COUNT(1); + EXPECT_ACCEPTED(false); + + btw("MS sends TMSI Realloc Complete"); + iu_release_expected = true; + iu_release_sent = false; + ms_sends_msg("055b"); + VERBOSE_ASSERT(iu_release_sent, == true, "%d"); \ + + btw("LU was successful, and the conn has already been closed"); + EXPECT_CONN_COUNT(0); + + vsub = vlr_subscr_find_by_imsi(net->vlr, IMSI); + VERBOSE_ASSERT(vsub != NULL, == true, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imsi, IMSI), == 0, "%d"); + VERBOSE_ASSERT(vsub->lac, == 23, "%u"); + vlr_subscr_put(vsub); +} + +void test_call_mo() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + cm_service_result_sent = RES_NONE; + ms_sends_msg("052478" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + OSMO_ASSERT(g_conn); + OSMO_ASSERT(g_conn->conn_fsm); + OSMO_ASSERT(g_conn->vsub); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("needs auth, not yet accepted"); + EXPECT_ACCEPTED(false); + + /* On UTRAN */ + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + BTW("a call is initiated"); + + btw("SETUP gets forwarded to MNCC"); + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND); + ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */ + "0406600402000581" /* Bearer Capability */ + "5e038121f3" /* Called Number BCD */ + "15020100" /* CC Capabilities */ + "4008" /* Supported Codec List */ + "04026000" /* UMTS: AMR 2 | AMR */ + "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */ + ); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + mncc.callref = cc_to_mncc_tx_got_callref; + + btw("MNCC says that's fine"); + dtap_expect_tx("8302" /* CC: Call Proceeding */); + mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + btw("The other call leg got established (not shown here), MNCC tells us so"); + dtap_expect_tx("8301" /* CC: Call Alerting */); + mncc_sends_to_cc(MNCC_ALERT_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + dtap_expect_tx("8307" /* CC: Connect */); + mncc_sends_to_cc(MNCC_SETUP_RSP, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_SETUP_COMPL_IND); + ms_sends_msg("03cf" /* CC: Connect Acknowledge */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("032502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("832d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("036a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +void test_call_mt() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + .callref = 0x423, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, MNCC asks us to setup a call, causing Paging"); + + paging_expect_imsi(IMSI); + paging_sent = false; + mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc); + + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("MS replies with Paging Response, and VLR sends Auth Request"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + ms_sends_msg("062707" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup"); + dtap_expect_tx("0305" /* CC: Setup */); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + cc_to_mncc_expect_tx(IMSI, MNCC_CALL_CONF_IND); + ms_sends_msg("8348" /* CC: Call Confirmed */ + "0406600402000581" /* Bearer Capability */ + "15020100" /* Call Control Capabilities */ + "40080402600400021f00" /* Supported Codec List */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_ALERT_IND); + ms_sends_msg("8381" /* CC: Alerting */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_CNF); + ms_sends_msg("83c7" /* CC: Connect */); + + dtap_expect_tx("030f" /* CC: Connect Acknowledge */); + mncc_sends_to_cc(MNCC_SETUP_COMPL_REQ, &mncc); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("832502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("032d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("836a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +msc_vlr_test_func_t msc_vlr_tests[] = { + test_call_mo, + test_call_mt, + NULL +}; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err new file mode 100644 index 0000000..6fd9288 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -0,0 +1,700 @@ +===== test_call_mo +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_CM_SERV_REQ + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24) +DMM <- CM SERVICE REQUEST serv_type=0x08 MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + cm_service_result_sent == 0 + auth_request_sent == 1 +- needs auth, not yet accepted +msc_subscr_conn_is_accepted() == false +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + cm_service_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_CM_SERVICE_REQ +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: received_cm_service_request = true +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: still awaiting first request after a CM Service Request + cm_service_result_sent == 0 +--- +- a call is initiated +- SETUP gets forwarded to MNCC + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_SETUP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DREF MSISDN:42342: MSC conn use + trans_cc == 3 (0xe) +DMM MSISDN:42342: rx msg GSM48_MT_CC_SETUP: received_cm_service_request changes to false +DCC Subscriber MSISDN:42342 (42342) sends SETUP to 123 +DMNCC transmit message MNCC_SETUP_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +- MNCC says that's fine +DMNCC receive message MNCC_CALL_PROC_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CALL_PROC: 8302 +- DTAP matches expected message + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x80000001 +- Total time passed: 1.000023 s +- The other call leg got established (not shown here), MNCC tells us so +DMNCC receive message MNCC_ALERT_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_ALERTING: 8301 +- DTAP matches expected message +DMNCC receive message MNCC_SETUP_RSP +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT: 8307 +- DTAP matches expected message +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT_ACK +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT_ACK (0x3:0xf) +DMNCC transmit message MNCC_SETUP_COMPL_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_COMPL_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x80000001: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 832d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x80000001: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mo: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +===== test_call_mt +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, MNCC asks us to setup a call, causing Paging +DMNCC receive message MNCC_SETUP_REQ +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DMM Subscriber MSISDN:42342 not paged yet, start paging. + RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- MS replies with Paging Response, and VLR sends Auth Request + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_RR_PAG_RESP + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_RR_PAG_RESP (0x6:0x27) +DRR PAGING RESPONSE: MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage increases to: 5 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 4 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + auth_request_sent == 1 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 +- MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_PAGING_RESP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DPAG Paging success for MSISDN:42342 (event=0) +DPAG Calling paging cbfn. +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 +- DTAP matches expected message +DREF VLR subscr MSISDN:42342 usage decreases to: 3 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC + paging_stopped == 1 + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 +DMNCC transmit message MNCC_CALL_CONF_IND + MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 1.000023 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) +DMNCC transmit message MNCC_ALERT_IND + MSC --> MNCC: callref 0x423: MNCC_ALERT_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) +DMNCC transmit message MNCC_SETUP_CNF + MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_SETUP_COMPL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f +- DTAP matches expected message +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x423: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x423: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc +DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF unknown: MSC conn use - dtap failed: is already 0 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mt: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + diff --git a/tests/msc_vlr/msc_vlr_test_call.ok b/tests/msc_vlr/msc_vlr_test_call.ok new file mode 100644 index 0000000..a965a70 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.ok @@ -0,0 +1 @@ +Done diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 550c5d8..dd7196c 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -34,6 +34,7 @@ #include #include #include +#include #if BUILD_IU #include @@ -68,6 +69,11 @@ bool iu_release_sent = false; bool bssap_clear_expected = false; bool bssap_clear_sent = false; + +uint32_t cc_to_mncc_tx_expected_msg_type = 0; +const char *cc_to_mncc_tx_expected_imsi = NULL; +bool cc_to_mncc_tx_confirmed = false; +uint32_t cc_to_mncc_tx_got_callref = 0; struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) { @@ -377,7 +383,7 @@ [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .enabled = 1, .loglevel = LOGL_NOTICE, + .enabled = 1, .loglevel = LOGL_INFO, }, [DMM] = { .name = "DMM", @@ -404,6 +410,11 @@ .description = "Iu-CS Protocol", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DMNCC] = { + .name = "DMNCC", + .description = "MNCC API for Call Control application", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; static struct log_info info = { @@ -413,9 +424,31 @@ extern void *tall_bsc_ctx; -int fake_mncc_recv(struct gsm_network *net, struct msgb *msg) +int mncc_recv(struct gsm_network *net, struct msgb *msg) { - fprintf(stderr, "rx MNCC\n"); + struct gsm_mncc *mncc = (void*)msg->data; + log("MSC --> MNCC: callref 0x%x: %s", mncc->callref, + get_mncc_name(mncc->msg_type)); + + OSMO_ASSERT(cc_to_mncc_tx_expected_msg_type); + if (cc_to_mncc_tx_expected_msg_type != mncc->msg_type) { + log("Mismatch! Expected MNCC msg type: %s", + get_mncc_name(cc_to_mncc_tx_expected_msg_type)); + abort(); + } + + if (strcmp(cc_to_mncc_tx_expected_imsi, mncc->imsi)) { + log("Mismatch! Expected MNCC msg IMSI: '%s', got '%s'", + cc_to_mncc_tx_expected_imsi, + mncc->imsi); + abort(); + } + + cc_to_mncc_tx_confirmed = true; + cc_to_mncc_tx_got_callref = mncc->callref; + cc_to_mncc_tx_expected_imsi = NULL; + cc_to_mncc_tx_expected_msg_type = 0; + talloc_free(msg); return 0; } @@ -521,6 +554,23 @@ bssap_clear_expected = false; bssap_clear_sent = true; return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_assignment' */ +int __real_msc_call_assignment(struct gsm_trans *trans); +int __wrap_msc_call_assignment(struct gsm_trans *trans) +{ + log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); + return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_release' */ +void __real_msc_call_release(struct gsm_trans *trans); +void __wrap_msc_call_release(struct gsm_trans *trans) +{ + log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); } static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi) @@ -774,7 +824,7 @@ log_set_print_filename(osmo_stderr_target, _log_lines? 1 : 0); log_set_print_category(osmo_stderr_target, 1); - net = gsm_network_init(tall_bsc_ctx, 1, 1, fake_mncc_recv); + net = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server"); net->gsup_server_port = 0; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 1cd3914..ee26ac4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -29,6 +29,7 @@ #include #include #include +#include extern bool _log_lines; #define _log(fmt, args...) do { \ @@ -83,6 +84,11 @@ extern bool iu_release_sent; extern bool bssap_clear_expected; extern bool bssap_clear_sent; + +extern uint32_t cc_to_mncc_tx_expected_msg_type; +extern const char *cc_to_mncc_tx_expected_imsi; +extern bool cc_to_mncc_tx_confirmed; +extern uint32_t cc_to_mncc_tx_got_callref; static inline void expect_iu_release() { @@ -169,6 +175,17 @@ gsup_tx_confirmed = false; \ } while (0) +#define cc_to_mncc_expect_tx(imsi, msg_type) do \ +{ \ + if (cc_to_mncc_tx_expected_msg_type) { \ + log("Previous expected MNCC tx was not confirmed!"); \ + OSMO_ASSERT(!cc_to_mncc_tx_expected_msg_type); \ + } \ + cc_to_mncc_tx_expected_imsi = imsi; \ + cc_to_mncc_tx_expected_msg_type = msg_type; \ + cc_to_mncc_tx_confirmed = false; \ +} while (0) + void fake_time_start(); /* as macro to get the test file's source line number */ diff --git a/tests/testsuite.at b/tests/testsuite.at index f0147e7..5307899 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -79,6 +79,13 @@ AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_reject_concurrency], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([msc_vlr_test_call]) +AT_KEYWORDS([msc_vlr_test_call]) +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.ok > expout +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.err > experr +AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_call], [], [expout], [experr]) +AT_CLEANUP + AT_SETUP([msc_vlr_test_rest]) AT_KEYWORDS([msc_vlr_test_rest]) cat $abs_srcdir/msc_vlr/msc_vlr_test_rest.ok > expout -- To view, visit https://gerrit.osmocom.org/4973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 17:50:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 17:50:58 +0000 Subject: [PATCH] osmo-msc[master]: fix use after free: missing conn_get on CC paging response In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4974 to look at the new patch set (#2). fix use after free: missing conn_get on CC paging response Adjust test expectations accordingly. The error was: ==16084==ERROR: AddressSanitizer: heap-use-after-free on address 0x61500000f5f4 at pc 0x561be639ac2b bp 0x7ffc0aabbe40 sp 0x7ffc0aabbe38 READ of size 4 at 0x61500000f5f4 thread T0 #0 0x561be639ac2a in _msc_subscr_conn_put ../../../../src/osmo-msc/src/libmsc/osmo_msc.c:384 #1 0x561be636070b in rx_from_ms ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:204 #2 0x561be6360b21 in ms_sends_msg ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:217 #3 0x561be635b40a in test_call_mt ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_test_call.c:328 #4 0x561be6363bb7 in run_tests ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:802 #5 0x561be63524ea in main ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:849 #6 0x7f6eebb3e2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #7 0x561be6352fb9 in _start (/n/s/osmo/make-3G/osmo-msc/tests/msc_vlr/msc_vlr_test_call+0xdafb9) Related: OS#2672 Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 --- M src/libmsc/gsm_04_08.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/4974/2 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d32de5d..061d3ad 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1359,7 +1359,7 @@ vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = conn; + transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); break; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 6fd9288..5ffab4a 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -602,6 +602,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED DPAG Paging success for MSISDN:42342 (event=0) DPAG Calling paging cbfn. +DREF MSISDN:42342: MSC conn use + trans_cc == 2 (0xc) DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 - DTAP matches expected message @@ -610,7 +611,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC paging_stopped == 1 MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 DMNCC transmit message MNCC_CALL_CONF_IND @@ -619,27 +620,27 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 1.000023 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) DMNCC transmit message MNCC_ALERT_IND MSC --> MNCC: callref 0x423: MNCC_ALERT_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 2.000046 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) DMNCC transmit message MNCC_SETUP_CNF MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_SETUP_COMPL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f @@ -650,27 +651,26 @@ --- - Call ends MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) DMNCC transmit message MNCC_DISC_IND MSC --> MNCC: callref 0x423: MNCC_DISC_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_REL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d - DTAP matches expected message MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) DMNCC transmit message MNCC_REL_CNF MSC --> MNCC: callref 0x423: MNCC_REL_CNF MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 DREF VLR subscr MSISDN:42342 usage decreases to: 2 -DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc -DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn @@ -682,12 +682,12 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. - Iu Release --RAN_UTRAN_IU--> MS -DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) -DRLL subscr MSISDN:42342: Freeing subscriber connection -DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated -DREF unknown: MSC conn use - dtap failed: is already 0 +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 llist_count(&net->subscr_conns) == 0 DREF freeing VLR subscr MSISDN:42342 ===== test_call_mt: SUCCESS -- To view, visit https://gerrit.osmocom.org/4974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 22 19:52:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 19:52:09 +0000 Subject: [PATCH] osmo-hlr[master]: cosmetic: rx_send_auth_info(): decide error cause with switch() Message-ID: Review at https://gerrit.osmocom.org/4975 cosmetic: rx_send_auth_info(): decide error cause with switch() Prepare for tweaking error handling in a subsequent patch: use switch() instead of if(). Prepares-for: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Change-Id: I1f628aa9d62b778951726bebec8cf338444fc897 --- M src/hlr.c 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/75/4975/1 diff --git a/src/hlr.c b/src/hlr.c index 861597a..ef008f0 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -67,12 +67,16 @@ gsup_out.auth_vectors, ARRAY_SIZE(gsup_out.auth_vectors), gsup->rand, gsup->auts); - if (rc < 0) { + if (rc <= 0) { gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; - gsup_out.cause = GMM_CAUSE_NET_FAIL; - } else if (rc == 0) { - gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; - gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + switch (rc) { + case 0: + gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + break; + default: + gsup_out.cause = GMM_CAUSE_NET_FAIL; + break; + } } else { gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT; gsup_out.num_auth_vectors = rc; -- To view, visit https://gerrit.osmocom.org/4975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f628aa9d62b778951726bebec8cf338444fc897 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 19:52:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 19:52:09 +0000 Subject: [PATCH] osmo-hlr[master]: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data Message-ID: Review at https://gerrit.osmocom.org/4976 return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data If we have a subscriber entry that lacks auth data, we currently return GMM_CAUSE_NET_FAIL, which in the MSC log looks like the HLR is not connected or something grave. Instead, return GMM_CAUSE_IMSI_UNKNOWN. This changes the OsmoMSC log in this way: Before: DVLR <001e> VLR_Authenticate(901700000014701)[0x5555558dabb0]{VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: GSUP: rx Auth Info Error cause: 17: Network failure After: DVLR <001e> VLR_Authenticate(901700000014701)[0x5555558dabb0]{VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: GSUP: rx Auth Info Error cause: 2: IMSI unknown in HLR A better cause value would be something that says "IMSI known, but we have no auth data", but since such cause value is not defined, the plain "IMSI unknown" seems to be the best match. Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 --- M src/hlr.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/76/4976/1 diff --git a/src/hlr.c b/src/hlr.c index ef008f0..bcae3b5 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -71,6 +71,7 @@ gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; switch (rc) { case 0: + case -ENOENT: gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; default: -- To view, visit https://gerrit.osmocom.org/4976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 23:47:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 23:47:04 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: auto-config remote PCs if omitted Message-ID: Review at https://gerrit.osmocom.org/4977 osmo-hnbgw: auto-config remote PCs if omitted The current default point-code for OsmoMSC is 0.23.1 and for OsmoSGSN 0.0.2. Not sure how we ended up with those, but that is secondary and can be changed. Before this patch, osmo-hnbgw requires a cs7 config and explicit point-codes for MSC and SGSN as well as a local one. Provide default config if none is provided: Use above default point-codes if no MSC and/or SGSN address are provided. Also create a default cs7 instance with local PC 0.0.3. This allows completely omitting cs7 instance and SCCP addresses from osmo-hnbgw.cfg in a single-box setup. Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 --- M src/hnbgw_cn.c 1 file changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/77/4977/1 diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index a48b651..b84a08d 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -410,13 +410,16 @@ } static int resolve_addr_name(struct osmo_sccp_addr *dest, struct osmo_ss7_instance **ss7, - const char *addr_name, const char *label) + const char *addr_name, const char *label, + uint32_t default_pc) { struct osmo_ss7_instance *ss7_tmp; if (!addr_name) { - LOGP(DMAIN, LOGL_ERROR, "Missing config: %s remote-addr\n", label); - return -1; + osmo_sccp_make_addr_pc_ssn(dest, default_pc, OSMO_SCCP_SSN_RANAP); + LOGP(DMAIN, LOGL_INFO, "%s remote addr not configured, using default: %s\n", label, + osmo_sccp_addr_name(*ss7, dest)); + return 0; } ss7_tmp = osmo_sccp_addr_by_name(dest, addr_name); @@ -458,12 +461,19 @@ ss7 = NULL; if (resolve_addr_name(&gw->sccp.iucs_remote_addr, &ss7, - gw->config.iucs_remote_addr_name, "IuCS")) + gw->config.iucs_remote_addr_name, "IuCS", 185)) return -1; if (resolve_addr_name(&gw->sccp.iups_remote_addr, &ss7, - gw->config.iups_remote_addr_name, "IuPS")) + gw->config.iups_remote_addr_name, "IuPS", 2)) return -1; + if (!ss7) { + LOGP(DRANAP, LOGL_NOTICE, "No cs7 instance configured for IuCS nor IuPS," + " creating default instance\n"); + ss7 = osmo_ss7_instance_find_or_create(gw, 0); + ss7->cfg.primary_pc = 24; + } + if (!osmo_ss7_pc_is_valid(ss7->cfg.primary_pc)) { LOGP(DMAIN, LOGL_ERROR, "IuCS/IuPS uplink cannot be setup: CS7 instance %d has no point-code set\n", ss7->cfg.id); -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 22 23:47:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 22 Nov 2017 23:47:04 +0000 Subject: [PATCH] osmo-iuh[master]: cosmetic: osmo-hnbgw: log remote SCCP addresses on startup Message-ID: Review at https://gerrit.osmocom.org/4978 cosmetic: osmo-hnbgw: log remote SCCP addresses on startup Change-Id: I6395dcde35359617cae52ff59d4eb53930097c7d --- M src/hnbgw_cn.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/78/4978/1 diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index b84a08d..b94a239 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -506,6 +506,11 @@ return -1; } + LOGP(DRANAP, LOGL_NOTICE, "Remote SCCP addr: IuCS: %s\n", + osmo_sccp_addr_name(ss7, &gw->sccp.iucs_remote_addr)); + LOGP(DRANAP, LOGL_NOTICE, "Remote SCCP addr: IuPS: %s\n", + osmo_sccp_addr_name(ss7, &gw->sccp.iups_remote_addr)); + /* In sccp_sap_up() we expect the cnlink in the user's priv. */ osmo_sccp_user_set_priv(cnlink->sccp_user, cnlink); -- To view, visit https://gerrit.osmocom.org/4978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6395dcde35359617cae52ff59d4eb53930097c7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:52:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:52:09 +0000 Subject: osmo-iuh[master]: test_common: fix compiler warning: include ranap_common.h In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4962 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice192e1f7f1bdafe0941160f43e573349aaceb75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:53:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:53:25 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: auto-config remote PCs if omitted In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4977/1/src/hnbgw_cn.c File src/hnbgw_cn.c: PS1, Line 474: 24 Does this follow http://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes ? -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:53:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:53:40 +0000 Subject: osmo-iuh[master]: cosmetic: osmo-hnbgw: log remote SCCP addresses on startup In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6395dcde35359617cae52ff59d4eb53930097c7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:53:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:53:45 +0000 Subject: [MERGED] osmo-iuh[master]: test_common: fix compiler warning: include ranap_common.h In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: test_common: fix compiler warning: include ranap_common.h ...................................................................... test_common: fix compiler warning: include ranap_common.h test_common.c:85:2: warning: implicit declaration of function ?ranap_set_log_area? Change-Id: Ice192e1f7f1bdafe0941160f43e573349aaceb75 --- M src/tests/test_common.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tests/test_common.c b/src/tests/test_common.c index 0af8ceb..eeb0bec 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -37,6 +37,8 @@ #include #include +#include + #include void *talloc_asn1_ctx; -- To view, visit https://gerrit.osmocom.org/4962 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice192e1f7f1bdafe0941160f43e573349aaceb75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:55:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:55:06 +0000 Subject: osmo-hlr[master]: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I think this behavior is still a bit odd and can be misleading to the user. We should at least clearly log such situations in the HLR, irrespective of what cause value we return on GSUP -- To view, visit https://gerrit.osmocom.org/4976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:55:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:55:23 +0000 Subject: osmo-hlr[master]: cosmetic: rx_send_auth_info(): decide error cause with switch() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f628aa9d62b778951726bebec8cf338444fc897 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:55:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:55:39 +0000 Subject: osmo-msc[master]: sms_queue_test: sanitize: clean up talloc contexts when done In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If08ba48ab9c28bf3c2db4014837c1304cec04aaf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:56:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:56:03 +0000 Subject: osmo-msc[master]: cosmetic: log: CC state transition: log trans id and subscr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4966 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11c5213b90de27dc2606f73c686f263008b6522f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:56:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:56:19 +0000 Subject: osmo-msc[master]: cosmetic: log: CC trans_alloc: log trans_id and subscr, not ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4967 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5f8b45d6580d42b00de847c8100023b414771939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:56:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:56:28 +0000 Subject: osmo-msc[master]: cosmetic: debug log: mncc: detached subscr: show subscriber In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4968 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I477984d5e3bee8aea32419482d6bc48b1e74e6c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:56:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:56:52 +0000 Subject: osmo-msc[master]: msc_vlr_tests: set a valid lac for fake conns In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4970 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie647d93a54aefad5bde8a9411d983cd60714b83d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:58:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:58:31 +0000 Subject: osmo-msc[master]: add msc_vlr_test_call to reproduce a sanitizer error In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:58:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:58:51 +0000 Subject: osmo-msc[master]: fix use after free: missing conn_get on CC paging response In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 07:59:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 07:59:28 +0000 Subject: osmo-bsc[master]: bssap: remove libosmo-legacy-mgcp dependancy In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4963 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:00:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:00:10 +0000 Subject: osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:00:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:00:46 +0000 Subject: osmo-gsm-manuals[master]: Revert "common: add VTY port number for osmo-mgw" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4834 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8629db5e975cc218c80c747a39c0fdca5f5d6e10 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:01:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:01:25 +0000 Subject: osmo-gsm-manuals[master]: common: add VTY port number of osmo-mgw In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4835/1/common/chapters/port_numbers.adoc File common/chapters/port_numbers.adoc: PS1, Line 20: TCP|4242|telnet (VTY)|osmo-nitb, osmo-bsc, cellmgr-ng : |TCP|4243|telnet (VTY)|osmo-bsc_mgcp : |TCP|4243|telnet (VTY)|osmo-mgw please look at other examples where two programs use one port number: They don't add two lines, but have one line (like 4242 above). -- To view, visit https://gerrit.osmocom.org/4835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:01:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:01:50 +0000 Subject: osmo-gsm-manuals[master]: common: add osmo-mgw to mgcp In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfd0340297ddb15494b4b20d776e89e6288107e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:06:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:06:19 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4906/2/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 109: strncpy(conn->id, id, sizeof(conn->id)); osmo_strlcpy to avoid unterminated buffers, in case the input string exceeds the output size (which is a violation of protocol, but we should rather be safe -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:06:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:06:56 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 actually, TODO-RELEASE entry is missing, important to make sure we don't forget about that, as we break ABI/API -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 08:15:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 08:15:12 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 2: (3 comments) https://gerrit.osmocom.org/#/c/4905/2/src/libosmo-mgcp-client/mgcp_client.c File src/libosmo-mgcp-client/mgcp_client.c: Line 270: strncpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); osmo_strlcpy will simplify those two lines Line 292: *data_end = '\0'; it's not really that nice to modify input data, even though you restore it below. Not critical to change, but in general definitely something we'd want to avoid. Better probably to have a for_each_non_empty_line_until_empty_line() or the like, and then even mark the input argument to the function as "const" https://gerrit.osmocom.org/#/c/4905/2/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 33: static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) it *can* be up to 32 characters, but we could actually use much shorter ones. I would have gone simply for an uint32_t. Not critical. Even though we don't have doxygen comments here, it would be good to state that "char *id" has to be caller-allocated and it is only the identifier that is allocated, not the memory in which the identifier is stored. -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:21:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:21:08 +0000 Subject: osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Patch Set 1: onw has replied, all is well -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:21:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:21:12 +0000 Subject: [MERGED] osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bsc filter: don't ignore imsi-allow on "global" filter level ...................................................................... bsc filter: don't ignore imsi-allow on "global" filter level First off, there are "global" and "local" IMSI black/whitelist levels: "global" "local" VTY 'bsc' 'msc' for osmo-bsc VTY 'nat' 'bsc' for osmo-bsc_nat Both in osmo-bsc and osmo-bsc-nat, the "global" IMSI filter so far completely ignores all 'imsi-allow' rules it may contain. A comment in imsi_allow() proclaims actions that are missing in the code. Notably, in our example config osmo-bsc_nat.cfg, there is an imsi-allow on the 'nat' level, which with the code before this patch cannot have been effective in any way. Furthermore, on the "local" level the order is to check imsi-allow first, and imsi-deny after that. The comment says to do that in reverse order on the "global" level. There is no apparent reason for reversing. Add evaluation of imsi-allow directives on the "global" level, i.e. 'bsc' in osmo-bsc and 'nat' in osmo-bsc-nat, in the same order as on "local" level, to avoid confusion. Swap the comment to be consistent. Before this patch, to have effective imsi-allow, this config would be necessary for osmo-bsc: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* msc 0 access-list-name acl ... msc 1 access-list-name acl ... With this patch, imsi-allow also works on the "global" level: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* access-list-name acl msc 0 ... msc 1 ... Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f --- M src/libfilter/bsc_msg_filter.c 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/libfilter/bsc_msg_filter.c b/src/libfilter/bsc_msg_filter.c index fc87e88..816ed94 100644 --- a/src/libfilter/bsc_msg_filter.c +++ b/src/libfilter/bsc_msg_filter.c @@ -150,8 +150,8 @@ * 1.) Check the global IMSI barr list * 2.) Allow directly if the IMSI is allowed at the BSC * 3.) Reject if the IMSI is not allowed at the BSC - * 4.) Reject if the IMSI not allowed at the global level. - * 5.) Allow directly if the IMSI is allowed at the global level + * 4.) Allow directly if the IMSI is allowed at the global level + * 5.) Reject if the IMSI not allowed at the global level. */ int cm, lu; struct bsc_msg_acc_lst *nat_lst = NULL; @@ -189,8 +189,12 @@ } - /* 4. NAT deny */ if (nat_lst) { + /* 4. global allow */ + if (bsc_msg_acc_lst_check_allow(nat_lst, imsi) == 0) + return 1; + + /* 5. global deny */ if (lst_check_deny(nat_lst, imsi, &cm, &lu) == 0) { LOGP(DFILTER, LOGL_ERROR, "Filtering %s global imsi_deny on bsc nr: %d.\n", imsi, req->bsc_nr); -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:22:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:22:43 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4915 to look at the new patch set (#4). sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/4 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..e3bc2e0 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "../../lib/syserr.h" #include "../../gtp/gtpie.h" @@ -27,7 +28,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +74,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +88,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +102,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..bca1015 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -159,6 +159,7 @@ .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; struct ul66_t eua; + uint32_t v4_addr; printf("testing in46a_to_eua()\n"); @@ -171,7 +172,9 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ + memcpy(&v4_addr, &eua.v[2], sizeof(v4_addr)); + OSMO_ASSERT(v4_addr == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 4 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:40 +0000 Subject: osmo-msc[master]: msc_vlr_tests: fix test nr arg: clear errno before strtol() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 trivial enough that I can +2 myself... -- To view, visit https://gerrit.osmocom.org/4969 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e9376f20a44f6348bcb85f0ff27a429dc90e1b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:55 +0000 Subject: [MERGED] osmo-msc[master]: msc_vlr_tests: fix test nr arg: clear errno before strtol() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msc_vlr_tests: fix test nr arg: clear errno before strtol() ...................................................................... msc_vlr_tests: fix test nr arg: clear errno before strtol() Change-Id: I8e9376f20a44f6348bcb85f0ff27a429dc90e1b8 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7cd869b..0608e84 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -800,6 +800,7 @@ int arg; long int nr; for (arg = optind; arg < argc; arg++) { + errno = 0; nr = strtol(argv[arg], NULL, 10); if (errno) { fprintf(stderr, "Invalid argument: %s\n", -- To view, visit https://gerrit.osmocom.org/4969 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e9376f20a44f6348bcb85f0ff27a429dc90e1b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:56 +0000 Subject: [MERGED] osmo-msc[master]: msc_vlr_tests: set a valid lac for fake conns In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msc_vlr_tests: set a valid lac for fake conns ...................................................................... msc_vlr_tests: set a valid lac for fake conns Change-Id: Ie647d93a54aefad5bde8a9411d983cd60714b83d --- M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c 11 files changed, 73 insertions(+), 72 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 3ceecf3..2677b8d 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -436,7 +436,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -886,7 +886,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -1406,7 +1406,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -1956,7 +1956,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -2276,7 +2276,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index c12eba1..d1bc786 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -280,7 +280,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -456,7 +456,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -763,7 +763,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -917,7 +917,7 @@ DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=50462976 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: is child of Subscr_Conn(50462976) DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1106,7 +1106,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1325,7 +1325,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1575,7 +1575,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -1827,7 +1827,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index b26f0d2..45c80bd 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -297,7 +297,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -490,7 +490,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -815,7 +815,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1008,7 +1008,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -1227,7 +1227,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph @@ -1435,7 +1435,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index c946c1e..d508842 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -85,7 +85,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -163,7 +163,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -314,7 +314,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -464,7 +464,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -615,7 +615,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -691,7 +691,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -843,7 +843,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -917,7 +917,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -992,7 +992,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1070,7 +1070,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 8ca2991..d49ac75 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -10,7 +10,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -94,7 +94,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index df34b86..41f132c 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -10,7 +10,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) @@ -114,7 +114,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth (no Ciph) diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 931a72f..376faf7 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -195,7 +195,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -332,7 +332,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -553,7 +553,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0x03020100, LAC 23 paging_expecting_tmsi == 0x03020100 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -668,7 +668,7 @@ DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(50462976){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=50462976 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: is child of Subscr_Conn(50462976) DVLR vlr_lu_fsm(50462976){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -841,7 +841,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1013,7 +1013,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1210,7 +1210,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1367,7 +1367,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1556,7 +1556,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1720,7 +1720,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1910,7 +1910,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index 00945cb..39a04f2 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -44,7 +44,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -164,7 +164,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -288,7 +288,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -418,7 +418,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -545,7 +545,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -737,7 +737,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -931,7 +931,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1131,7 +1131,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1232,7 +1232,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1357,7 +1357,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1458,7 +1458,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -1600,7 +1600,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -1701,7 +1701,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 3 DMM Subscriber MSISDN:46071 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:46071 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index 1b5f340..493c35b 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -96,7 +96,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -214,7 +214,7 @@ DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) @@ -351,7 +351,7 @@ DMM Subscr_Conn(591536962){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(591536962){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(TMSI)=591536962 type=IMSI ATTACH -DMM LU/new-LAC: 1/0 +DMM LU/new-LAC: 1/23 DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: is child of Subscr_Conn(591536962) DVLR vlr_lu_fsm(591536962){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 57f5e8e..b138d44 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -9,7 +9,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -293,7 +293,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 0 + RAN_GERAN_A sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -470,7 +470,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph @@ -770,7 +770,7 @@ llist_count(&vsub->cs.requests) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 3 DMM Subscriber MSISDN:42342 not paged yet, start paging. - RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 0 + RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 strcmp(paging_expecting_imsi, imsi) == 0 DREF VLR subscr MSISDN:42342 usage increases to: 4 llist_count(&vsub->cs.requests) == 1 @@ -954,7 +954,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=GERAN Auth (no Ciph) @@ -1166,7 +1166,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL -DMM LU/new-LAC: 0/0 +DMM LU/new-LAC: 0/23 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 0608e84..550c5d8 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -156,6 +156,7 @@ conn = msc_subscr_con_allocate(net); conn->bts = the_bts; conn->via_ran = rx_from_ran; + conn->lac = 23; if (conn->via_ran == RAN_UTRAN_IU) { struct ranap_ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ranap_ue_conn_ctx); *ue_ctx = (struct ranap_ue_conn_ctx){ -- To view, visit https://gerrit.osmocom.org/4970 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie647d93a54aefad5bde8a9411d983cd60714b83d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:58 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: debug log: mncc: detached subscr: show subscriber In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: debug log: mncc: detached subscr: show subscriber ...................................................................... cosmetic: debug log: mncc: detached subscr: show subscriber Change-Id: I477984d5e3bee8aea32419482d6bc48b1e74e6c2 --- M src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 988bb7d..1aa5954 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2921,7 +2921,7 @@ DEBUGP(DCC, "(bts - trx - ts - ti -- sub %s) " "Received '%s' from MNCC with " "detached subscriber %s\n", data->called.number, - get_mncc_name(msg_type), data->called.number); + get_mncc_name(msg_type), vlr_subscr_name(vsub)); vlr_subscr_put(vsub); /* Temporarily out of order */ return mncc_release_ind(net, NULL, data->callref, -- To view, visit https://gerrit.osmocom.org/4968 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I477984d5e3bee8aea32419482d6bc48b1e74e6c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:58 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: log: CC trans_alloc: log trans_id and subscr, not ... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: log: CC trans_alloc: log trans_id and subscr, not memory addrs ...................................................................... cosmetic: log: CC trans_alloc: log trans_id and subscr, not memory addrs Change-Id: I5f8b45d6580d42b00de847c8100023b414771939 --- M src/libmsc/transaction.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index bac31a1..01d69c2 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -86,8 +86,6 @@ { struct gsm_trans *trans; - DEBUGP(DCC, "subscr=%p, net=%p\n", vsub, net); - /* a valid subscriber is indispensable */ if (vsub == NULL) { LOGP(DCC, LOGL_NOTICE, @@ -95,6 +93,9 @@ return NULL; } + DEBUGP(DCC, "(ti %02x sub %s callref %x) New transaction\n", + trans_id, vlr_subscr_name(vsub), callref); + trans = talloc_zero(tall_trans_ctx, struct gsm_trans); if (!trans) return NULL; -- To view, visit https://gerrit.osmocom.org/4967 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f8b45d6580d42b00de847c8100023b414771939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:58 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: log: CC state transition: log trans id and subscr In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: log: CC state transition: log trans id and subscr ...................................................................... cosmetic: log: CC state transition: log trans id and subscr Change-Id: I11c5213b90de27dc2606f73c686f263008b6522f --- M src/libmsc/gsm_04_08.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 438f681..988bb7d 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1213,9 +1213,11 @@ if (state > 31 || state < 0) return; - DEBUGP(DCC, "new state %s -> %s\n", - gsm48_cc_state_name(trans->cc.state), - gsm48_cc_state_name(state)); + DEBUGP(DCC, "(ti %02x sub %s) new state %s -> %s\n", + trans->transaction_id, + vlr_subscr_name(trans->vsub), + gsm48_cc_state_name(trans->cc.state), + gsm48_cc_state_name(state)); count_statistics(trans, state); trans->cc.state = state; -- To view, visit https://gerrit.osmocom.org/4966 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11c5213b90de27dc2606f73c686f263008b6522f Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:23:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:23:58 +0000 Subject: [MERGED] osmo-msc[master]: sms_queue_test: sanitize: clean up talloc contexts when done In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: sms_queue_test: sanitize: clean up talloc contexts when done ...................................................................... sms_queue_test: sanitize: clean up talloc contexts when done To avoid sanitizer build failures, ensure that the talloc contexts are empty when done and free them. Separate the msgb context from the overall talloc context for clarity: if nested, the outer one would contain two blocks. Change the "sms_queue_test" context from 1 byte to 0 in order to get a size of zero in the end. Change-Id: If08ba48ab9c28bf3c2db4014837c1304cec04aaf --- M tests/sms_queue/sms_queue_test.c 1 file changed, 22 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 0d073db..0ff636e 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -197,8 +197,10 @@ int main(int argc, char **argv) { - talloc_ctx = talloc_named_const(NULL, 1, "sms_queue_test"); - msgb_talloc_ctx_init(talloc_ctx, 0); + void *msgb_ctx; + + talloc_ctx = talloc_named_const(NULL, 0, "sms_queue_test"); + msgb_ctx = msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&info); OSMO_ASSERT(osmo_stderr_target); @@ -211,5 +213,23 @@ test_next_sms(); printf("Done\n"); + if (talloc_total_blocks(msgb_ctx) != 1 + || talloc_total_size(msgb_ctx) != 0) { + talloc_report_full(msgb_ctx, stderr); + fflush(stderr); + } + + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0); + talloc_free(msgb_ctx); + + if (talloc_total_blocks(talloc_ctx) != 1 + || talloc_total_size(talloc_ctx) != 0) + talloc_report_full(talloc_ctx, stderr); + + OSMO_ASSERT(talloc_total_blocks(talloc_ctx) == 1); + OSMO_ASSERT(talloc_total_size(talloc_ctx) == 0); + talloc_free(talloc_ctx); + return 0; } -- To view, visit https://gerrit.osmocom.org/4965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If08ba48ab9c28bf3c2db4014837c1304cec04aaf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:28:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:28:49 +0000 Subject: [PATCH] osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4972 to look at the new patch set (#3). subscr_conn: introduce usage tokens for ref error tracking When hunting a conn use count bug, it was very hard to figure out who's (not) using the conn. To ease tracking down this bug and future bugs, explicitly name what a conn is being reserved for, and track in a bit mask. Show in the DREF logs what uses and un-uses a conn. See the test expectation updates, which nicely show how that clarifies the state of the conn in the logs. On errors, log them, but don't fail hard: if one conn use/un-use fails, we don't want to crash the entire MSC before we have to. Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/osmo_msc.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_11.c M src/libmsc/osmo_msc.c M src/libmsc/silent_call.c M src/libmsc/subscr_conn.c M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 18 files changed, 851 insertions(+), 790 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/4972/3 -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:30:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 13:30:37 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4915/4/tests/lib/in46a_test.c File tests/lib/in46a_test.c: Line 175: /* uint32_t must be 4-byte aligned to not trigger sanitize build failure */ Using osmo_load32le(&eua.v[2]) will eliminate both sanitize issue and the need to introduce extra variable. -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 4 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:33:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 13:33:25 +0000 Subject: osmo-hlr[master]: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data In-Reply-To: References: Message-ID: Patch Set 1: > I think this behavior is still a bit odd and can be misleading to > the user. We should at least clearly log such situations in the > HLR, irrespective of what cause value we return on GSUP We do log "No [23]G Auth Data" from db_get_auth_data(), but only on log level DEBUG, maybe this specific case deserves a NOTICE log. -- To view, visit https://gerrit.osmocom.org/4976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:09 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:09 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: add missing spaces Message-ID: Review at https://gerrit.osmocom.org/4979 cosmetic: add missing spaces call to msc_call_connect() lacks spaces in parameter list Change-Id: I4c11abaeff62749cbc365dfef671c4e15a85fc95 --- M src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/79/4979/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 8a5265b..3f685d5 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2766,7 +2766,7 @@ return 0; } - msc_call_connect(trans,rtp->port,rtp->ip); + msc_call_connect(trans, rtp->port, rtp->ip); return 0; } -- To view, visit https://gerrit.osmocom.org/4979 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c11abaeff62749cbc365dfef671c4e15a85fc95 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:09 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:09 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams Message-ID: Review at https://gerrit.osmocom.org/4980 mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends osmo-mgw: Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c 10 files changed, 1,122 insertions(+), 219 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/1 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 4d493cb..5eecc15 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -195,9 +195,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..5e560b3 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -41,3 +41,4 @@ int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); void msc_call_release(struct gsm_trans *trans); int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); +int msc_iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..7fb5411 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,43 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_MAXLEN]; + char conn_id_cn[MGCP_CONN_ID_MAXLEN]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 4892fb8..927efda 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..564f1b9 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + strncpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 3f685d5..8f317d6 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2667,8 +2667,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..bde7510 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include "../../bscconfig.h" @@ -142,13 +144,24 @@ return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); } -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) +int msc_iu_rab_act_cs(struct gsm_trans *trans) { #ifdef BUILD_IU + struct gsm_subscriber_connection *conn struct msgb *msg; bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); @@ -171,172 +184,21 @@ #endif } -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - int msc_call_assignment(struct gsm_trans *trans) { - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - if (!trans) return -EINVAL; if (!trans->conn) return -EINVAL; - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } + return msc_mgcp_call_assignment(trans); } int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) { - /* With this function we inform the MGCP-GW where (ip/port) it + struct in_addr addr; + + /* With this function we inform the MGCP-GW where (ip/port) it * has to send its outgoing voic traffic. The receiving end will * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will * not only be used to direct the traffic, it will also be used @@ -348,61 +210,35 @@ * applicable. This is usually the case when an external MNCC * is in use */ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - if (!trans) return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; + addr.s_addr = ip; + return msc_mgcp_call_complete(trans, port, inet_ntoa(addr)); } int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) { + int rc; + if (!trans1) return -EINVAL; if (!trans2) return -EINVAL; - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; return 0; } void msc_call_release(struct gsm_trans *trans) { - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - if (!trans) return; if (!trans->conn) @@ -410,17 +246,5 @@ if (!trans->conn->network) return; - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); + msc_mgcp_call_release(trans); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..8dce578 --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1027 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 + +#define MGCP_ENDPOINT_FORMAT "%i at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum int_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string int_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +static const struct value_string fsm_bsc_mgcp_state_names[] = { + {ST_CRCX_RAN, "ST_CRCX_RAN (send CRCX for RAN)"}, + {ST_CRCX_CN, "ST_CRCX_CN (send CRCX for CN)"}, + {ST_CRCX_COMPL, "ST_CRCX_COMPL (assigning connection to RAN)"}, + {ST_MDCX_CN, "ST_MDCX_CN (complete connection on CN side)"}, + {ST_MDCX_RAN, "ST_MDCX_RAN (complete connection on RAN side)"}, + {ST_MDCX_COMPL, "ST_MDCX_COMPL (complete connection)"}, + {ST_CALL, "ST_CALL (call in progress)"}, + {ST_HALT, "ST_HALT (destroy state machine)"}, + {0, NULL} +}; + +enum fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +static const struct value_string fsm_evt_names[] = { + {EV_INIT, "EV_INIT (start state machine, send CRCX for RAN)"}, + {EV_CONNECT, "EV_CONNECT (start state machine, send CRCX for RAN)"}, + {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, + {EV_CRCX_RAN_RESP, "EV_CRCX_RAN_RESP (got CRCX reponse for RAN)"}, + {EV_CRCX_CN_RESP, "EV_CRCX_CN_RESP (got CRCX reponse for CN)"}, + {EV_MDCX_RAN_RESP, "EV_MDCX_RAN_RESP (got MDCX reponse for RAN)"}, + {EV_MDCX_CN_RESP, "EV_MDCX_CN_RESP (got MDCX reponse for CN)"}, + {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for RAN/CN)"}, + {0, NULL} +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(int_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_ERROR, + "timeout (T%i) in state %s, tearing down...\n", + fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(fi, LOGL_DEBUG, "CRCX/RAN: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + return; +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "CRCX/RAN: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + strncpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); + + return; +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(fi, LOGL_DEBUG, "CRCX/CN: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + return; +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "CRCX/CN: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + strncpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); + + return; +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { + /* Assign a voice channel via RANAP on 3G */ + if (msc_iu_rab_act_cs(trans)) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + } else { + /* Someone forgot to set via_ran properly. + * This would point to some serious bug */ + OSMO_ASSERT(false); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) { + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); + return; + } + } + + /* Note: When we reach this point than the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, 0, 0); + return; +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: remote leg expects RTP input on address %s:%u\n", conn->rtp.remote_addr_cn, + conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(fi, LOGL_DEBUG, "MDCX/CN: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + return; +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/CN: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); + return; +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: RAN expects RTP input on address %s:%u\n", conn->rtp.remote_addr_ran, + conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(fi, LOGL_DEBUG, "MDCX/RAN: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + return; +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "MDCX/RAN: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); + return; +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_ERROR, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + return; +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + LOGPFSML(fi, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + return; +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + + if (mgcp_ctx->fsm == NULL) { + LOGP(DMGCP, LOGL_ERROR, "DLCX: late MGW response, FSM already terminated -- ignoring...\n"); + return; + } + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); + return; +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, + "fsm-state: %s, fsm-event: %s\n", + get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + mgcp_ctx->fsm = NULL; + + return; +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = (1 << EV_INIT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_CN), + .name = "ST_CRCX_RAN", + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_RAN_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_COMPL), + .name = "ST_CRCX_CN", + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_CN_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_CN), + .name = "ST_CRCX_COMPL", + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CONNECT), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_RAN), + .name = "ST_MDCX_CN", + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_CN_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_COMPL), + .name = "ST_MDCX_RAN", + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_RAN_RESP), + .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), + .name = "ST_MDCX_COMPL", + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = (1 << EV_TEARDOWN), + .out_state_mask = (1 << ST_HALT), + .name = "ST_CALL", + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = "ST_HALT", + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that the a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + if (!trans) { + LOGP(DMGCP, LOGL_ERROR, "invalid transaction, call assignment failed\n"); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "invalid conn, call assignment failed\n"); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + conn->rtp.mgcp_ctx = NULL; + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + /* FIXME: use apporpiate talloc context */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + /* FIXME: use apporpiate talloc context (third parameter) */ + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + if (!addr) { + LOGP(DMGCP, LOGL_ERROR, "invalid remote call leg address, call completion failed\n"); + return -EINVAL; + } + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "invalid remote call leg port, call completion failed\n"); + return -EINVAL; + } + if (!trans) { + LOGP(DMGCP, LOGL_ERROR, "invalid transaction, call completion failed\n"); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "invalid conn, call completion failed\n"); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "invalid mgcp context, call completion failed\n"); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "no FSM, call completion failed\n"); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "invalid call state, call completion failed\n"); + return -EINVAL; + } + + conn = trans->conn; + strncpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans) { + LOGP(DMGCP, LOGL_ERROR, "invalid transaction, call release failed\n"); + return -EINVAL; + } + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "invalid conn, call completion failed\n"); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "invalid mgcp context, call completion failed\n"); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "no FSM, call completion failed\n"); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:37 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4964 to look at the new patch set (#2). mgcp: use mgw assigned connection identifiers osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends osmo-mgw: Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2648 Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/4964/2 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index dd26d40..e3b77bf 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -20,6 +20,8 @@ #pragma once +#include + /* MGCP state handler context (fsm etc..) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ @@ -28,6 +30,10 @@ /* RTP endpoint number */ uint16_t rtp_endpoint; + /* RTP connection identifiers */ + char conn_id_bts[MGCP_CONN_ID_MAXLEN]; + char conn_id_net[MGCP_CONN_ID_MAXLEN]; + /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f0c31df..9025f34 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,9 +31,6 @@ #include #include -#define CONN_ID_BTS 1 -#define CONN_ID_NET 2 - #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -201,10 +198,8 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, .conn_mode = MGCP_CONN_LOOPBACK }; if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= @@ -249,6 +244,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_bts, r->head.conn_id, sizeof(mgcp_ctx->conn_id_bts)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with CI: %s\n", mgcp_ctx->conn_id_bts); rc = mgcp_response_parse_params(r); if (rc) { @@ -364,7 +363,7 @@ .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = lchan->abis_ip.bound_port @@ -484,10 +483,9 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_NET, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = addr, .audio_port = port @@ -538,6 +536,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + strncpy(mgcp_ctx->conn_id_net, r->head.conn_id, sizeof(mgcp_ctx->conn_id_net)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with CI: %s\n", mgcp_ctx->conn_id_net); rc = mgcp_response_parse_params(r); if (rc) { @@ -683,7 +685,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = ho_lchan->abis_ip.bound_port}; -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:37 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: add missing log prefix Message-ID: Review at https://gerrit.osmocom.org/4981 cosmetic: add missing log prefix the log messages have prefixes that mark important phases (CRCX/BTS, etc...). Some lines lack the prefix. Add missing prefixes. Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/4981/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 9025f34..43ec7ef 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -193,7 +193,7 @@ mgcp_ctx->rtp_endpoint = rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -351,11 +351,11 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -459,7 +459,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE @@ -469,7 +469,7 @@ * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, - "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); return; @@ -478,7 +478,7 @@ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { -- To view, visit https://gerrit.osmocom.org/4981 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:38 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: correct sourcecode formatting Message-ID: Review at https://gerrit.osmocom.org/4982 cosmetic: correct sourcecode formatting add missing line break Change-Id: Ia117e4099046fefcf35ccb94400554062e667869 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/82/4982/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 43ec7ef..1223ccc 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -685,7 +685,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), -- To view, visit https://gerrit.osmocom.org/4982 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia117e4099046fefcf35ccb94400554062e667869 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:38 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: add missing switch case Message-ID: Review at https://gerrit.osmocom.org/4983 mgcp: add missing switch case In the beginning of the CRCX phase for the network does not distinguish between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error could be misinterpreted as a successful MGW response. Add missing case statement to distinguish CV_MDCX_BTS_RES from EV_TEARDOWN. Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/4983/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 1223ccc..8d55d18 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -456,6 +456,14 @@ "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + switch (event) { + case EV_MDCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, -- To view, visit https://gerrit.osmocom.org/4983 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:38 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: do not cast void pointer Message-ID: Review at https://gerrit.osmocom.org/4984 cosmetic: do not cast void pointer remove the casting of void *data, just assign directly Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/4984/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 8d55d18..1bc4c42 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -171,7 +171,7 @@ /* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct msgb *msg; struct mgcp_msg mgcp_msg; @@ -272,7 +272,7 @@ * with the assignment request */ static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; enum gsm48_chan_mode chan_mode; bool full_rate; @@ -315,7 +315,7 @@ * proceed with updating the connection for the BTS side */ static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct gsm_lchan *lchan; struct msgb *msg; @@ -435,7 +435,7 @@ /* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct msgb *msg; struct mgcp_msg mgcp_msg; @@ -571,7 +571,7 @@ /* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct gsm_lchan *lchan; OSMO_ASSERT(mgcp_ctx); -- To view, visit https://gerrit.osmocom.org/4984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 23 Nov 2017 13:44:38 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: use fsm pointer from parameter list Message-ID: Review at https://gerrit.osmocom.org/4985 cosmetic: use fsm pointer from parameter list the parameter list of osmo-fsm callbacks contains a pointer to the fsm instance. Use this pointer instead of reaching out for mgcp_ctx->fsm. Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 31 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/4985/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 1bc4c42..f450c11 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -185,14 +185,13 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); rtp_endpoint = mgcp_client_next_endpoint(mgcp); mgcp_ctx->rtp_endpoint = rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Generate MGCP message string */ @@ -211,14 +210,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for BTS associated CRCX */ @@ -282,8 +281,7 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -298,7 +296,7 @@ chan_mode = mgcp_ctx->chan_mode; full_rate = mgcp_ctx->full_rate; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + LOGPFSML(fi, LOGL_DEBUG, "MGW proceeding assignment request...\n"); rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); if (rc < 0) { @@ -329,8 +327,7 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -346,15 +343,15 @@ lchan = mgcp_ctx->lchan; OSMO_ASSERT(lchan); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + LOGPFSML(fi, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ @@ -377,14 +374,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for BTS associated MDCX */ @@ -452,8 +449,7 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -466,7 +462,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the @@ -476,7 +472,7 @@ * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + LOGPFSML(fi, LOGL_ERROR, "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); @@ -486,7 +482,7 @@ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -507,14 +503,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for NET associated CRCX */ @@ -576,7 +572,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); @@ -596,9 +592,9 @@ * where the MGW expects the RTP input from the MSC side */ bssmap_send_aoip_ass_compl(lchan); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + LOGPFSML(fi, LOGL_DEBUG, "call in progress, waiting for call end...\n"); - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); } static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); @@ -724,8 +720,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -770,8 +765,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -780,8 +774,8 @@ * towards the BTS is now updated, so we now change back to * ST_CALL, where we will wait for the call-end (or another * handover) */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); break; case EV_HANDOVER: /* This handles the rare, but possible situation where another @@ -843,18 +837,17 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); /* Send pending sigtran message */ if (mgcp_ctx->resp) { - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + LOGPFSML(fi, LOGL_DEBUG, "sending pending sigtran response message...\n"); osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); mgcp_ctx->resp = NULL; } - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); /* Destroy the state machine and all context information */ osmo_fsm_inst_free(mgcp_ctx->fsm); @@ -871,8 +864,7 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, - "timeout (T%i) in state %s, attempting graceful teardown...\n", + LOGPFSML(fi, LOGL_ERROR, "timeout (T%i) in state %s, attempting graceful teardown...\n", fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); /* Ensure that no sigtran response, is present. Otherwiese we might try @@ -883,14 +875,14 @@ /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + LOGPFSML(fi, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); /* Initiate self destruction of the FSM */ osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); - osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) /* Note: If the logic that controls the BSS is unable to * negotiate a connection, we presumably still have a -- To view, visit https://gerrit.osmocom.org/4985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 23 13:46:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 13:46:35 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add git-review config Message-ID: Review at https://gerrit.osmocom.org/4986 Add git-review config Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/86/4986/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..c817762 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=python/osmo-python-tests -- To view, visit https://gerrit.osmocom.org/4986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:38:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:38:44 +0000 Subject: osmo-hlr[master]: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data In-Reply-To: References: Message-ID: Patch Set 1: > We do log "No [23]G Auth Data" from db_get_auth_data(), but only on > log level DEBUG, maybe this specific case deserves a NOTICE log. let me follow up with a few more quick patches... -- To view, visit https://gerrit.osmocom.org/4976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:38:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:38:47 +0000 Subject: [MERGED] osmo-hlr[master]: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data ...................................................................... return GMM_CAUSE_IMSI_UNKNOWN if there is no auth data If we have a subscriber entry that lacks auth data, we currently return GMM_CAUSE_NET_FAIL, which in the MSC log looks like the HLR is not connected or something grave. Instead, return GMM_CAUSE_IMSI_UNKNOWN. This changes the OsmoMSC log in this way: Before: DVLR <001e> VLR_Authenticate(901700000014701)[0x5555558dabb0]{VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: GSUP: rx Auth Info Error cause: 17: Network failure After: DVLR <001e> VLR_Authenticate(901700000014701)[0x5555558dabb0]{VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: GSUP: rx Auth Info Error cause: 2: IMSI unknown in HLR A better cause value would be something that says "IMSI known, but we have no auth data", but since such cause value is not defined, the plain "IMSI unknown" seems to be the best match. Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 --- M src/hlr.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index ef008f0..bcae3b5 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -71,6 +71,7 @@ gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; switch (rc) { case 0: + case -ENOENT: gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; default: -- To view, visit https://gerrit.osmocom.org/4976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:38:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:38:47 +0000 Subject: [MERGED] osmo-hlr[master]: cosmetic: rx_send_auth_info(): decide error cause with switch() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: rx_send_auth_info(): decide error cause with switch() ...................................................................... cosmetic: rx_send_auth_info(): decide error cause with switch() Prepare for tweaking error handling in a subsequent patch: use switch() instead of if(). Prepares-for: I90df7b255317df1e5d968e7ce3b9d2c404b98db8 Change-Id: I1f628aa9d62b778951726bebec8cf338444fc897 --- M src/hlr.c 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index 861597a..ef008f0 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -67,12 +67,16 @@ gsup_out.auth_vectors, ARRAY_SIZE(gsup_out.auth_vectors), gsup->rand, gsup->auts); - if (rc < 0) { + if (rc <= 0) { gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; - gsup_out.cause = GMM_CAUSE_NET_FAIL; - } else if (rc == 0) { - gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; - gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + switch (rc) { + case 0: + gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + break; + default: + gsup_out.cause = GMM_CAUSE_NET_FAIL; + break; + } } else { gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT; gsup_out.num_auth_vectors = rc; -- To view, visit https://gerrit.osmocom.org/4975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f628aa9d62b778951726bebec8cf338444fc897 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:39:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:39:24 +0000 Subject: [PATCH] osmo-hlr[master]: db_get_auth_data / db_get_auc: clarify return values Message-ID: Review at https://gerrit.osmocom.org/4987 db_get_auth_data / db_get_auc: clarify return values Differentiate between "IMSI unknown" and "IMSI has no auth data": in case of known IMSI lacking auth data, return -ENOKEY instead of -ENOENT. Fix API doc comments to reflect what the functions actually return, on top of adding the -ENOKEY detail. Adjust db_test expectations from -ENOENT to -ENOKEY where appropriate. A subsequent patch will use these return values to log details on each of these situations. Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 --- M src/db_auc.c M src/hlr.c M tests/db/db_test.c M tests/db/db_test.err 4 files changed, 28 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/87/4987/1 diff --git a/src/db_auc.c b/src/db_auc.c index 7bbc93f..5fb5e3a 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -74,7 +74,9 @@ } /* obtain the authentication data for a given imsi - * returns -1 in case of error, 0 for unknown IMSI, 1 for success */ + * returns 0 for success, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auth_data(struct db_context *dbc, const char *imsi, struct osmo_sub_auth_data *aud2g, struct osmo_sub_auth_data *aud3g, @@ -163,15 +165,16 @@ LOGAUC(imsi, LOGL_DEBUG, "No 3G Auth Data\n"); if (aud2g->type == 0 && aud3g->type == 0) - ret = -ENOENT; + ret = -ENOKEY; out: db_remove_reset(stmt); return ret; } -/* return -1 in case of error, 0 for unknown imsi, positive for number - * of vectors generated */ +/* return number of vectors generated, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auc(struct db_context *dbc, const char *imsi, unsigned int auc_3g_ind, struct osmo_auth_vector *vec, unsigned int num_vec, const uint8_t *rand_auts, diff --git a/src/hlr.c b/src/hlr.c index bcae3b5..58f94f3 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -71,6 +71,9 @@ gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; switch (rc) { case 0: + /* 0 means "0 tuples generated", which shouldn't happen. + * Treat the same as "no auth data". */ + case -ENOKEY: case -ENOENT: gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 23b84cc..1a5d7e0 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -464,7 +464,7 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G only"); @@ -500,7 +500,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -515,7 +515,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 3G only"); @@ -562,7 +562,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -581,7 +581,7 @@ "asdfasdfasd", false, "asdfasdfasdf", 99999)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G and 3G"); @@ -669,7 +669,7 @@ /* For this test to work, we want to get the same subscriber ID back, * and make sure there are no auth data leftovers for this ID. */ OSMO_ASSERT(id == g_subscr.id); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_subscr_delete_by_id(dbc, id), 0); ASSERT_SEL(imsi, imsi0, -ENOENT); @@ -697,15 +697,15 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set SQN, but no 3G auth data present"); ASSERT_RC(db_update_sqn(dbc, id, 123), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_update_sqn(dbc, id, 543), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth 3G data"); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index f7acfec..c5e5bac 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -726,7 +726,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -799,7 +799,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -820,7 +820,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -912,7 +912,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -937,7 +937,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, "asdfasdfasd", false, "asdfasdfasdf", 99999)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1174,7 +1174,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1214,7 +1214,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1225,7 +1225,7 @@ db_update_sqn(dbc, id, 123) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1233,7 +1233,7 @@ db_update_sqn(dbc, id, 543) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data -- To view, visit https://gerrit.osmocom.org/4987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:39:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:39:25 +0000 Subject: [PATCH] osmo-hlr[master]: osmo-hlr: log details for unknown IMSI / no auth data / db e... Message-ID: Review at https://gerrit.osmocom.org/4988 osmo-hlr: log details for unknown IMSI / no auth data / db error For unknown IMSI and no auth data for a known IMSI, log respective messages on NOTICE level. For database error, log on ERROR level. Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a --- M src/hlr.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/88/4988/1 diff --git a/src/hlr.c b/src/hlr.c index 58f94f3..168e203 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -74,10 +74,17 @@ /* 0 means "0 tuples generated", which shouldn't happen. * Treat the same as "no auth data". */ case -ENOKEY: + LOGP(DAUC, LOGL_NOTICE, "%s: IMSI known, but has no auth data;" + " Returning slightly inaccurate cause 'IMSI Unknown' via GSUP\n", + gsup->imsi); + gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + break; case -ENOENT: + LOGP(DAUC, LOGL_NOTICE, "%s: IMSI not known\n", gsup->imsi); gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; default: + LOGP(DAUC, LOGL_ERROR, "%s: failure to look up IMSI in db\n", gsup->imsi); gsup_out.cause = GMM_CAUSE_NET_FAIL; break; } -- To view, visit https://gerrit.osmocom.org/4988 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 14:39:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 23 Nov 2017 14:39:25 +0000 Subject: [PATCH] osmo-hlr[master]: db_test: also test db_get_auc() return values Message-ID: Review at https://gerrit.osmocom.org/4989 db_test: also test db_get_auc() return values Verify that it returns -ENOENT on non-existing IMSI and -ENOKEY for no auth data. Move the auc_compute_vectors() stub to the top near the db_get_auc() call, and just return num_vec to get a successful return value when auth data is present. Change-Id: Ic0158228afbd78b8ca21f62dffa9f868674682b9 --- M tests/db/db_test.c M tests/db/db_test.err 2 files changed, 80 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/89/4989/1 diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 1a5d7e0..6bf7a86 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -100,6 +100,22 @@ fprintf(stderr, "\n"); \ } while (0) +#define N_VECTORS 3 + +#define ASSERT_DB_GET_AUC(imsi, expect_rc) \ + do { \ + struct osmo_auth_vector vec[N_VECTORS]; \ + ASSERT_RC(db_get_auc(dbc, imsi, 3, vec, N_VECTORS, NULL, NULL), expect_rc); \ + } while (0) + +/* Not linking the real auc_compute_vectors(), just returning num_vec. + * This gets called by db_get_auc(), but we're only interested in its rc. */ +int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, + struct osmo_sub_auth_data *aud2g, + struct osmo_sub_auth_data *aud3g, + const uint8_t *rand_auts, const uint8_t *auts) +{ return num_vec; } + static struct db_context *dbc = NULL; static void *ctx = NULL; static struct hlr_subscriber g_subscr; @@ -457,6 +473,7 @@ comment("Get auth data for non-existent subscriber"); ASSERT_SEL_AUD(unknown_imsi, -ENOENT, 0); + ASSERT_DB_GET_AUC(imsi0, -ENOENT); comment("Create subscriber"); @@ -465,6 +482,7 @@ id = g_subscr.id; ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 2G only"); @@ -473,6 +491,7 @@ mk_aud_2g(OSMO_AUTH_ALG_COMP128v1, "0123456789abcdef0123456789abcdef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); /* same again */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -501,6 +520,7 @@ mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -516,6 +536,7 @@ mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 3G only"); @@ -526,6 +547,7 @@ "C01ffedC1cadaeAc1d1f1edAcac1aB0a", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); /* same again */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -563,6 +585,7 @@ mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -575,6 +598,7 @@ "BeefedCafeFaceAcedAddedDecadeFee", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, @@ -582,6 +606,7 @@ "asdfasdfasdf", 99999)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 2G and 3G"); @@ -595,6 +620,7 @@ "DeafBeddedBabeAcceededFadedDecaf", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); comment("Set invalid auth data"); @@ -670,9 +696,11 @@ * and make sure there are no auth data leftovers for this ID. */ OSMO_ASSERT(id == g_subscr.id); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); ASSERT_RC(db_subscr_delete_by_id(dbc, id), 0); ASSERT_SEL(imsi, imsi0, -ENOENT); + ASSERT_DB_GET_AUC(imsi0, -ENOENT); comment_end(); } @@ -835,11 +863,6 @@ } /* stubs */ -int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, - struct osmo_sub_auth_data *aud2g, - struct osmo_sub_auth_data *aud3g, - const uint8_t *rand_auts, const uint8_t *auts) -{ OSMO_ASSERT(false); return -1; } void *lu_op_alloc_conn(void *conn) { OSMO_ASSERT(false); return NULL; } void lu_op_tx_del_subscr_data(void *luop) diff --git a/tests/db/db_test.err b/tests/db/db_test.err index c5e5bac..1d34045 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -715,6 +715,9 @@ DAUC IMSI='999999999': No such subscriber +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -2 +DAUC IMSI='123456789000000': No such subscriber + --- Create subscriber @@ -731,6 +734,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + --- Set auth data, 2G only @@ -745,6 +752,11 @@ .u.gsm.ki = '0123456789abcdef0123456789abcdef', } 3G: none + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 3G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_COMP128v1, "0123456789abcdef0123456789abcdef")) --> 0 @@ -804,6 +816,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> -ENOENT db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")) --> 0 @@ -825,6 +841,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + --- Set auth data, 3G only @@ -843,6 +863,12 @@ .u.umts.amf = '0000', .u.umts.ind_bitlen = 5, } + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_MILENAGE, "BeefedCafeFaceAcedAddedDecadeFee", true, "C01ffedC1cadaeAc1d1f1edAcac1aB0a", 5)) --> 0 @@ -917,6 +943,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)) --> -ENOENT db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_MILENAGE, "CededEffacedAceFacedBadFadedBeef", false, "BeefedCafeFaceAcedAddedDecadeFee", 5)) --> 0 @@ -935,12 +965,22 @@ .u.umts.ind_bitlen = 5, } +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB + db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, "asdfasdfasd", false, "asdfasdfasdf", 99999)) --> 0 db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data --- Set auth data, 2G and 3G @@ -965,6 +1005,11 @@ .u.umts.amf = '0000', .u.umts.ind_bitlen = 5, } + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB --- Set invalid auth data @@ -1179,11 +1224,18 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_delete_by_id(dbc, id) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123456789000000': No such subscriber +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -2 +DAUC IMSI='123456789000000': No such subscriber + ===== test_subscr_aud: SUCCESS -- To view, visit https://gerrit.osmocom.org/4989 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0158228afbd78b8ca21f62dffa9f868674682b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:15:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:15:40 +0000 Subject: [PATCH] osmo-msc[master]: Remove obsolete ./configure option Message-ID: Review at https://gerrit.osmocom.org/4990 Remove obsolete ./configure option The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 --- M README.vty-tests M configure.ac M contrib/jenkins.sh 3 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/90/4990/1 diff --git a/README.vty-tests b/README.vty-tests index ba1b87c..0669ea8 100644 --- a/README.vty-tests +++ b/README.vty-tests @@ -4,7 +4,7 @@ and pass the following configure options here: - ./configure --enable-vty-tests --enable-external-tests + ./configure --enable-external-tests The VTY tests are then included in the standard check target: diff --git a/configure.ac b/configure.ac index f965240..5766fd0 100644 --- a/configure.ac +++ b/configure.ac @@ -160,11 +160,6 @@ CHECK_TM_INCLUDES_TM_GMTOFF -AC_ARG_ENABLE([vty_tests], - AC_HELP_STRING([--enable-vty-tests], - [Include the VTY/CTRL tests in make check (deprecated) - [default=no]]), - [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e39123c..f3f38a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -48,12 +48,12 @@ cd "$base" autoreconf --install --force -./configure --enable-smpp $IU --enable-vty-tests --enable-external-tests +./configure --enable-smpp $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-external-tests" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/4990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:35:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:35:34 +0000 Subject: [PATCH] osmo-msc[master]: Remove unneeded .py scripts Message-ID: Review at https://gerrit.osmocom.org/4991 Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not MSC-specific: leftover from repository split. Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 8 files changed, 2 insertions(+), 863 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/91/4991/1 diff --git a/Makefile.am b/Makefile.am index 690deae..2f0a786 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) BUILT_SOURCES = $(top_srcdir)/.version diff --git a/configure.ac b/configure.ac index 5766fd0..6434869 100644 --- a/configure.ac +++ b/configure.ac @@ -196,5 +196,4 @@ tests/msc_vlr/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..8e09459 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 8989f24..de1997c 100644 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/4991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:44:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:44:51 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add soap.py and twisted_ipa.py from OpenBSC Message-ID: Review at https://gerrit.osmocom.org/4992 Add soap.py and twisted_ipa.py from OpenBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M osmopy/__init__.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 4 files changed, 577 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/4992/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..2ff6338 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,11 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'soap.py' + 'twisted_ipa.py' 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..da2943b --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "v0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..3bb5379 --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..1d91b8b 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,8 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:48:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:48:56 +0000 Subject: [PATCH] osmo-msc[master]: Use osmo-ggsn instead of openggsn in jenkins tests Message-ID: Review at https://gerrit.osmocom.org/4993 Use osmo-ggsn instead of openggsn in jenkins tests Change-Id: Ib70360feb82fb9f871461f94982634c11d58f772 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/4993/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e39123c..d8853d1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -29,7 +29,7 @@ osmo-build-dep.sh libosmo-netif osmo-build-dep.sh libosmo-sccp PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 -osmo-build-dep.sh openggsn +osmo-build-dep.sh osmo-ggsn osmo-build-dep.sh osmo-mgw if [ "x$IU" = "x--enable-iu" ]; then -- To view, visit https://gerrit.osmocom.org/4993 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib70360feb82fb9f871461f94982634c11d58f772 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:55:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:55:48 +0000 Subject: [PATCH] osmo-hlr[master]: Remove unused ipa.py Message-ID: Review at https://gerrit.osmocom.org/4994 Remove unused ipa.py Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 --- D contrib/ipa.py 1 file changed, 0 insertions(+), 278 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/94/4994/1 diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) -- To view, visit https://gerrit.osmocom.org/4994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 15:56:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 15:56:57 +0000 Subject: [PATCH] osmo-hlr[master]: Remove unused check Message-ID: Review at https://gerrit.osmocom.org/4995 Remove unused check We do not test on FreeBSD in jenkins anymore. Change-Id: I1578306244f6ee218e464a6c378ff60605cf1d5c --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/95/4995/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d159db9..825d9ea 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,9 +38,7 @@ autoreconf --install --force ./configure --enable-external-tests $MAKE $PARALLEL_MAKE -if [ "x$label" != "xFreeBSD_amd64" ]; then - $MAKE check || cat-testlogs.sh - $MAKE distcheck || cat-testlogs.sh -fi +$MAKE check || cat-testlogs.sh +$MAKE distcheck || cat-testlogs.sh osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/4995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1578306244f6ee218e464a6c378ff60605cf1d5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:00:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 16:00:09 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add *.py from OpenBSC In-Reply-To: References: Message-ID: Add *.py from OpenBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M osmopy/__init__.py A osmopy/osmo_ctrl.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 5 files changed, 697 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/4992/2 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..2ff6338 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,11 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'soap.py' + 'twisted_ipa.py' 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py new file mode 100755 index 0000000..003f100 --- /dev/null +++ b/osmopy/osmo_ctrl.py @@ -0,0 +1,120 @@ +#!/usr/bin/python +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from optparse import OptionParser +from osmopy.osmo_ipa import Ctrl +import socket + +verbose = False + +def connect(host, port): + if verbose: + print "Connecting to host %s:%i" % (host, port) + + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def do_set_get(sck, var, value = None): + (r, c) = Ctrl().cmd(var, value) + sck.send(c) + answer = Ctrl().rem_header(sck.recv(4096)) + return (answer,) + Ctrl().verify(answer, r, var, value) + +def set_var(sck, var, val): + (a, _, _) = do_set_get(sck, var, val) + return a + +def get_var(sck, var): + (_, _, v) = do_set_get(sck, var) + return v + +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False + if len(data) != 0: + tail = data + while True: + (head, tail) = Ctrl().split_combined(tail) + print "Got message:", Ctrl().rem_header(head) + if len(tail) == 0: + break + return True + return False + +if __name__ == '__main__': + parser = OptionParser("Usage: %prog [options] var [value]") + parser.add_option("-d", "--host", dest="host", + help="connect to HOST", metavar="HOST") + parser.add_option("-p", "--port", dest="port", type="int", + help="use PORT", metavar="PORT", default=4249) + parser.add_option("-g", "--get", action="store_true", + dest="cmd_get", help="perform GET operation") + parser.add_option("-s", "--set", action="store_true", + dest="cmd_set", help="perform SET operation") + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", help="be verbose", default=False) + parser.add_option("-m", "--monitor", action="store_true", + dest="monitor", help="monitor the connection for traps", default=False) + + (options, args) = parser.parse_args() + + verbose = options.verbose + + if options.cmd_set and options.cmd_get: + parser.error("Get and set options are mutually exclusive!") + + if not (options.cmd_get or options.cmd_set or options.monitor): + parser.error("One of -m, -g, or -s must be set") + + if not (options.host): + parser.error("Destination host and port required!") + + sock = connect(options.host, options.port) + + if options.cmd_set: + if len(args) < 2: + parser.error("Set requires var and value arguments") + _leftovers(sock, socket.MSG_DONTWAIT) + print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + + if options.cmd_get: + if len(args) != 1: + parser.error("Get requires the var argument") + _leftovers(sock, socket.MSG_DONTWAIT) + (a, _, _) = do_set_get(sock, args[0]) + print "Got message:", a + + if options.monitor: + while True: + if not _leftovers(sock, 0): + print "Connection is gone." + break + sock.close() diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..da2943b --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "v0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..3bb5379 --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..1d91b8b 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,8 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:09:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 16:09:27 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Add *.py from OsmoBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M README M osmopy/__init__.py A osmopy/osmo_ctrl.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 6 files changed, 705 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/4992/3 diff --git a/README b/README index b85f7c9..25be782 100644 --- a/README +++ b/README @@ -2,13 +2,15 @@ sudo python setup.py install If you prefer to have it cleanly removable, install checkinstall and run sudo checkinstall python setup.py install -Alternatively, just run 'pip install --user -e ./' +Alternatively, just run 'pip install --user -e ./' or 'pip3 install --user -e ./' +depending on your python version. Use -There are currently 3 scripts in this package: +There are currently following scripts in this package: osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) +soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,5 +26,7 @@ Libraries: osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts +osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework obscvty.py may be of general use. osmoutil.py probably isn't. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..b16e64a 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,12 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'osmo_ctrl', + 'soap' + 'twisted_ipa' 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py new file mode 100755 index 0000000..003f100 --- /dev/null +++ b/osmopy/osmo_ctrl.py @@ -0,0 +1,120 @@ +#!/usr/bin/python +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from optparse import OptionParser +from osmopy.osmo_ipa import Ctrl +import socket + +verbose = False + +def connect(host, port): + if verbose: + print "Connecting to host %s:%i" % (host, port) + + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def do_set_get(sck, var, value = None): + (r, c) = Ctrl().cmd(var, value) + sck.send(c) + answer = Ctrl().rem_header(sck.recv(4096)) + return (answer,) + Ctrl().verify(answer, r, var, value) + +def set_var(sck, var, val): + (a, _, _) = do_set_get(sck, var, val) + return a + +def get_var(sck, var): + (_, _, v) = do_set_get(sck, var) + return v + +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False + if len(data) != 0: + tail = data + while True: + (head, tail) = Ctrl().split_combined(tail) + print "Got message:", Ctrl().rem_header(head) + if len(tail) == 0: + break + return True + return False + +if __name__ == '__main__': + parser = OptionParser("Usage: %prog [options] var [value]") + parser.add_option("-d", "--host", dest="host", + help="connect to HOST", metavar="HOST") + parser.add_option("-p", "--port", dest="port", type="int", + help="use PORT", metavar="PORT", default=4249) + parser.add_option("-g", "--get", action="store_true", + dest="cmd_get", help="perform GET operation") + parser.add_option("-s", "--set", action="store_true", + dest="cmd_set", help="perform SET operation") + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", help="be verbose", default=False) + parser.add_option("-m", "--monitor", action="store_true", + dest="monitor", help="monitor the connection for traps", default=False) + + (options, args) = parser.parse_args() + + verbose = options.verbose + + if options.cmd_set and options.cmd_get: + parser.error("Get and set options are mutually exclusive!") + + if not (options.cmd_get or options.cmd_set or options.monitor): + parser.error("One of -m, -g, or -s must be set") + + if not (options.host): + parser.error("Destination host and port required!") + + sock = connect(options.host, options.port) + + if options.cmd_set: + if len(args) < 2: + parser.error("Set requires var and value arguments") + _leftovers(sock, socket.MSG_DONTWAIT) + print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + + if options.cmd_get: + if len(args) != 1: + parser.error("Get requires the var argument") + _leftovers(sock, socket.MSG_DONTWAIT) + (a, _, _) = do_set_get(sock, args[0]) + print "Got message:", a + + if options.monitor: + while True: + if not _leftovers(sock, 0): + print "Connection is gone." + break + sock.close() diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..da2943b --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "v0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..3bb5379 --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..daff5ea 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,9 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/osmo_ctrl.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:41 +0000 Subject: [PATCH] osmo-gsm-tester[master]: hlr: Rename conf_for API Message-ID: Review at https://gerrit.osmocom.org/4996 hlr: Rename conf_for API The HLR has more clients than the MSC, for instance the SGSN. Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa --- M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/osmo_msc.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/96/4996/1 diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index b6ebf8a..f7dd80a 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -151,7 +151,7 @@ finally: conn.close() - def conf_for_msc(self): + def conf_for_client(self): return dict(hlr=dict(ip_address=self.ip_address)) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index ccf15fe..3ff2d6a 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -77,7 +77,7 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(msc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgcpgw.conf_for_msc()) - config.overlay(values, self.hlr.conf_for_msc()) + config.overlay(values, self.hlr.conf_for_client()) config.overlay(values, self.stp.conf_for_client()) config.overlay(values, self.smsc.get_config()) -- To view, visit https://gerrit.osmocom.org/4996 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:42 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Abstract the list of required ofono interfaces Message-ID: Review at https://gerrit.osmocom.org/4997 modem: Abstract the list of required ofono interfaces * We want to add more interfaces to this list when we add more features (such as waiting for ConnectionManager if we want to use GPRS). * We want to require some ifaces only if we are planning to use those features in osmo-gsm-tester (driven by config features attribute set to the modem in resources.conf). * Previous usage during shutdown was wrong, as it was waiting for any of them to be down to continue instead of waiting for all of them to be down. Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b --- M src/osmo_gsm_tester/modem.py 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/97/4997/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index ca8387b..e73ae4e 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -421,6 +421,15 @@ def auth_algo(self): return self.conf.get('auth_algo', None) + def features(self): + return self.conf.get('features', []) + + def _required_ifaces(self): + req_ifaces = (I_NETREG,) + req_ifaces += (I_SMS,) if 'sms' in self.features() else () + req_ifaces += (I_SS,) if 'ussd' in self.features() else () + return req_ifaces + def _on_netreg_property_changed(self, name, value): self.dbg('%r.PropertyChanged() -> %s=%s' % (I_NETREG, name, value)) @@ -521,16 +530,18 @@ def power_cycle(self): 'Power the modem and put it online, power cycle it if it was already on' + req_ifaces = self._required_ifaces() if self.is_powered(): self.dbg('Power cycling') self.set_online(False) self.set_powered(False) - event_loop.wait(self, lambda: not self.dbus.has_interface(I_NETREG, I_SMS), timeout=10) + for iface in req_ifaces: + event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) else: self.dbg('Powering on') self.set_powered() self.set_online() - event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) + event_loop.wait(self, self.dbus.has_interface, *req_ifaces, timeout=10) def connect(self, mcc_mnc=None): 'Connect to MCC+MNC' -- To view, visit https://gerrit.osmocom.org/4997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:42 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Move power off sequence to separate method Message-ID: Review at https://gerrit.osmocom.org/4998 modem: Move power off sequence to separate method Also make sure we power off the modem during cleanup, to make sure we set it offline (and in the future, we also detach GPRS). Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd --- M src/osmo_gsm_tester/modem.py 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/98/4998/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index e73ae4e..0796fa6 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -358,6 +358,8 @@ if self.cancellable: self.cancel_pending_dbus_methods() self.cancellable = None + if self.is_powered(): + self.power_off() self.dbus.cleanup() self.dbus = None @@ -528,15 +530,19 @@ # once it has been triggered, create a new one for next operation: self.cancellable = Gio.Cancellable.new() + def power_off(self): + self.set_online(False) + self.set_powered(False) + req_ifaces = self._required_ifaces() + for iface in req_ifaces: + event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) + def power_cycle(self): 'Power the modem and put it online, power cycle it if it was already on' req_ifaces = self._required_ifaces() if self.is_powered(): self.dbg('Power cycling') - self.set_online(False) - self.set_powered(False) - for iface in req_ifaces: - event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) + self.power_off() else: self.dbg('Powering on') self.set_powered() -- To view, visit https://gerrit.osmocom.org/4998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:42 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resources.conf: Add gprs feature for EC20 modem Message-ID: Review at https://gerrit.osmocom.org/4999 resources.conf: Add gprs feature for EC20 modem Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/99/4999/1 diff --git a/example/resources.conf b/example/resources.conf index 697b5c8..e8b1695 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -86,7 +86,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'ussd'] + features: ['sms', 'ussd', 'gprs'] - label: gobi_3 path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/4999 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:42 +0000 Subject: [PATCH] osmo-gsm-tester[master]: defaults.conf: Add PDCH channels to test GPRS Message-ID: Review at https://gerrit.osmocom.org/5000 defaults.conf: Add PDCH channels to test GPRS Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657 --- M example/defaults.conf 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/00/5000/1 diff --git a/example/defaults.conf b/example/defaults.conf index d555ab0..86223d1 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -42,5 +42,5 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F + - phys_chan_config: PDCH + - phys_chan_config: PDCH -- To view, visit https://gerrit.osmocom.org/5000 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:43 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoGgsn class Message-ID: Review at https://gerrit.osmocom.org/5001 Add OsmoGgsn class Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 --- A src/osmo_gsm_tester/osmo_ggsn.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl 3 files changed, 164 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/5001/1 diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py new file mode 100644 index 0000000..f91c69a --- /dev/null +++ b/src/osmo_gsm_tester/osmo_ggsn.py @@ -0,0 +1,86 @@ +# osmo_gsm_tester: specifics for running an openggsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoGgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + + def __init__(self, suite_run, ip_address): + super().__init__(log.C_RUN, 'osmo-ggsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-ggsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-ggsn'))) + + binary = inst.child('bin', 'osmo-ggsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-ggsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(ggsn=config.get_defaults('ggsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(ggsn=dict(ip_address=self.ip_address))) + config.overlay(values, dict(ggsn=dict(statedir=self.run_dir.new_dir('statedir')))) + + self.dbg('GGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-ggsn.cfg', values) + self.dbg(r) + f.write(r) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 2d04937..8c1d38d 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme class Timeout(Exception): pass @@ -230,6 +230,11 @@ ip_address = self.ip_address() return osmo_hlr.OsmoHlr(self, ip_address) + def ggsn(self, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_ggsn.OsmoGgsn(self, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl new file mode 100644 index 0000000..077c2e3 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl @@ -0,0 +1,72 @@ +! +! OpenGGSN (0.94.1-adac) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level ip info + logging level tun info + logging level ggsn info + logging level sgsn notice + logging level icmp6 notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib notice + logging level lsms notice + logging level lctrl notice + logging level lgtp info + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice + logging level lmgcp notice + logging level all debug +! +stats interval 5 +! +line vty + no login +! +ggsn ggsn0 + gtp state-dir ${ggsn.statedir} + gtp bind-ip ${ggsn.ip_address.addr} + apn internet + gtpu-mode tun + tun-device tun4 + type-support v4 + ip prefix dynamic 176.16.222.0/24 + ip dns 0 8.8.8.8 + ip dns 1 8.8.8.4 + ip ifconfig 176.16.222.1/24 + no shutdown + apn inet6 + gtpu-mode tun + tun-device tun6 + type-support v6 + ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56 + no shutdown + apn inet46 + gtpu-mode tun + tun-device tun46 + type-support v4v6 + ip prefix dynamic 176.16.46.0/24 + ip dns 0 192.168.100.1 + ip dns 1 8.8.8.8 + ip ifconfig 176.16.46.0/24 + ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56 + no shutdown + default-apn internet + no shutdown ggsn -- To view, visit https://gerrit.osmocom.org/5001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:43 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoSgsn class Message-ID: Review at https://gerrit.osmocom.org/5002 Add OsmoSgsn class Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb --- A src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl 3 files changed, 112 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/5002/1 diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py new file mode 100644 index 0000000..9865edb --- /dev/null +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -0,0 +1,94 @@ +# osmo_gsm_tester: specifics for running an osmo-sgsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoSgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + hlr = None + ggsn = None + + def __init__(self, suite_run, hlr, ggsn, ip_address): + super().__init__(log.C_RUN, 'osmo-sgsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.hlr = hlr + self.ggsn = ggsn + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-sgsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-sgsn'))) + + binary = inst.child('bin', 'osmo-sgsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-sgsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(sgsn=config.get_defaults('sgsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(sgsn=dict(ip_address=self.ip_address))) + config.overlay(values, self.hlr.conf_for_client()) + config.overlay(values, dict(sgsn=dict(ggsn_tun_ip_address=self.ggsn.addr()))) + + self.dbg('SGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-sgsn.cfg', values) + self.dbg(r) + f.write(r) + + def conf_for_client(self): + return dict(sgsn=dict(ip_address=self.ip_address)) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 8c1d38d..0d5f97a 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, modem, esme class Timeout(Exception): pass @@ -235,6 +235,11 @@ ip_address = self.ip_address() return osmo_ggsn.OsmoGgsn(self, ip_address) + def sgsn(self, hlr, ggsn, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_sgsn.OsmoSgsn(self, hlr, ggsn, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl index 4955983..c4d45f6 100644 --- a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl @@ -2,13 +2,21 @@ ! Osmocom SGSN configuration ! ! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level all debug line vty no login -! sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.1 + gtp local-ip ${sgsn.ip_address.addr} + ggsn 0 remote-ip ${sgsn.ggsn_tun_ip_address} ggsn 0 gtp-version 1 + auth-policy remote + gsup remote-ip ${hlr.ip_address.addr} + gsup remote-port 4222 ! ns timer tns-block 3 @@ -18,7 +26,7 @@ timer tns-test 30 timer tns-alive 3 timer tns-alive-retries 10 - encapsulation udp local-ip 127.0.0.1 + encapsulation udp local-ip ${sgsn.ip_address.addr} encapsulation udp local-port 23000 encapsulation framerelay-gre enabled 0 ! -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:43 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add class OsmoPcuSysmo Message-ID: Review at https://gerrit.osmocom.org/5003 Add class OsmoPcuSysmo Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 --- A src/osmo_gsm_tester/pcu_sysmo.py A src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl 2 files changed, 141 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/5003/1 diff --git a/src/osmo_gsm_tester/pcu_sysmo.py b/src/osmo_gsm_tester/pcu_sysmo.py new file mode 100644 index 0000000..13af226 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_sysmo.py @@ -0,0 +1,129 @@ +# osmo_gsm_tester: specifics for running a osmo-pcu for sysmoBTS +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +from . import log, config, util, template, process + +class OsmoPcuSysmo(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + remote_inst = None + remote_env = None + remote_dir = None + sysmobts = None + + REMOTE_DIR = '/osmo-gsm-tester-pcu' + PCU_SYSMO_BIN = 'osmo-pcu' + PCU_SYSMO_CFG = 'osmo-pcu-sysmo.cfg' + + def __init__(self, suite_run, sysmobts, conf): + super().__init__(log.C_RUN, self.PCU_SYSMO_BIN) + self.suite_run = suite_run + self.sysmobts = sysmobts + self.conf = conf + self.remote_env = {} + self.remote_user = 'root' + + def start(self): + # TODO: self.log('Waiting for osmo-bts to start up...') + # event_loop.wait(self, self.trx.trx_ready) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu-sysmo'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', OsmoPcuSysmo.PCU_SYSMO_BIN): + raise log.Error('No osmo-pcu-sysmo binary in', self.inst) + + self.remote_dir = util.Dir(OsmoPcuSysmo.REMOTE_DIR) + self.remote_inst = util.Dir(self.remote_dir.child(os.path.basename(str(self.inst)))) + + self.run_remote('rm-remote-dir', ('test', '!', '-d', OsmoPcuSysmo.REMOTE_DIR, '||', 'rm', '-rf', OsmoPcuSysmo.REMOTE_DIR)) + self.run_remote('mk-remote-dir', ('mkdir', '-p', OsmoPcuSysmo.REMOTE_DIR)) + self.run_local('scp-inst-to-sysmobts', + ('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), str(self.remote_inst)))) + + remote_run_dir = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_BIN) + self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) + + remote_config_file = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.run_local('scp-cfg-to-sysmobts', + ('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), remote_config_file))) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', OsmoPcuSysmo.PCU_SYSMO_BIN) + self.launch_remote(OsmoPcuSysmo.PCU_SYSMO_BIN, + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.sysmobts.bsc.addr()), + remote_cwd=remote_run_dir) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.sysmobts.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_pcu_sysmo': config.get_defaults('osmo_pcu_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu_sysmo': { + 'pcu_socket_path': self.sysmobts.pcu_socket_path() + } + }) + config.overlay(values, { 'osmo_pcu_sysmo': self.conf }) + + self.dbg('OSMO-PCU-SYSMO CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcuSysmo.PCU_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl new file mode 100644 index 0000000..632bc27 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl @@ -0,0 +1,12 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug +pcu + pcu-socket ${osmo_pcu_sysmo.pcu_socket_path} + flow-control-interval 10 + cs 2 + alloc-algorithm dynamic + alpha 0 + gamma 0 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:43 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoPcu class Message-ID: Review at https://gerrit.osmocom.org/5004 Add OsmoPcu class Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 --- A src/osmo_gsm_tester/pcu_osmo.py M src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl 2 files changed, 96 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/5004/1 diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py new file mode 100644 index 0000000..62bb7f0 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_osmo.py @@ -0,0 +1,90 @@ +# osmo_gsm_tester: specifics for running an osmo-pcu +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoPcu(log.Origin): + suite_run = None + run_dir = None + inst = None + env = None + + BIN_PCU = 'osmo-pcu' + PCU_OSMO_CFG = 'osmo-pcu.cfg' + + def __init__(self, suite_run, bts, conf): + super().__init__(log.C_RUN, OsmoPcu.BIN_PCU) + self.suite_run = suite_run + self.bts = bts + self.conf = conf + self.env = {} + + def start(self): + # TODO: self.log('Waiting for osmo-bts to start up...') + # event_loop.wait(self, self.trx.trx_ready) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.launch_process(OsmoPcu.BIN_PCU, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bts.bsc.addr()) + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcu.PCU_OSMO_CFG) + self.dbg(config_file=self.config_file) + + values = dict(osmo_pcu=config.get_defaults('osmo_pcu')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu': { + 'pcu_socket_path': self.bts.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_pcu': self.conf }) + + self.dbg('OSMO-PCU CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcu.PCU_OSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl index b88e6e7..02382c2 100644 --- a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl @@ -1,4 +1,10 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug pcu + pcu-socket ${osmo_pcu.pcu_socket_path} flow-control-interval 10 cs 2 alloc-algorithm dynamic -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:43 +0000 Subject: [PATCH] osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready Message-ID: Review at https://gerrit.osmocom.org/5005 pcu_osmo: workaround osmo-pcu failing if bts not ready Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 --- M src/osmo_gsm_tester/pcu_osmo.py 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/05/5005/1 diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py index 62bb7f0..81f9b5f 100644 --- a/src/osmo_gsm_tester/pcu_osmo.py +++ b/src/osmo_gsm_tester/pcu_osmo.py @@ -39,8 +39,11 @@ self.env = {} def start(self): - # TODO: self.log('Waiting for osmo-bts to start up...') - # event_loop.wait(self, self.trx.trx_ready) + self.log('waiting for bts to be ready...') + # TODO: othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" + # event_loop.wait(self, self.bts.is_ready) + event_loop.sleep(self, seconds=20) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:44 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Message-ID: Review at https://gerrit.osmocom.org/5006 OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 11 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/1 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..70aa2b9 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index fc546ae..1beea46 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -31,8 +32,9 @@ remote_dir = None lac = None cellid = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -42,6 +44,7 @@ self.conf = conf self.remote_env = {} self.remote_user = 'root' + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) def start(self): if self.bsc is None: @@ -76,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -115,8 +125,14 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -150,12 +166,19 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 9865edb..d5ee050 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 746aae0..930fe8d 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 1b21e63..43afa40 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,7 +61,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl index 69f7ac1..6cc2a86 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl @@ -9,6 +9,7 @@ logging level rll debug logging level rr debug logging level rsl debug + logging level pcu info ! phy 0 instance 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..f3b1830 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si + % else: gprs mode none + % endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:44 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn Message-ID: Review at https://gerrit.osmocom.org/5007 OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn Change-Id: I777835345355538a945599fb088630af63dc9140 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/07/5007/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index a964169..61de3c2 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsTrx(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -32,6 +33,7 @@ pcu_sk_tmp_dir = None lac = None cellid = None + _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -46,6 +48,7 @@ self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') if len(self.pcu_socket_path().encode()) > 107: raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) def cleanup(self): if self.pcu_sk_tmp_dir: @@ -54,6 +57,9 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -143,12 +149,19 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:44 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn Message-ID: Review at https://gerrit.osmocom.org/5008 OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/08/5008/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index bc93a3a..d92927f 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsOctphy(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -32,6 +33,7 @@ values = None lac = None cellid = None + _pcu = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -46,6 +48,7 @@ self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') if len(self.pcu_socket_path().encode()) > 107: raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) def cleanup(self): if self.pcu_sk_tmp_dir: @@ -54,6 +57,9 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -165,12 +171,19 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:44 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Add minimal GPRS support Message-ID: Review at https://gerrit.osmocom.org/5009 modem: Add minimal GPRS support Up to this point we can test signalling plane: attaching to GPRS network and activating a context. Data plane (sending IP packets through the network) is still not implemented as it requires setting up the network interface provided by ofono as well as routing, and most probably move osmo-ggsn to its own network namespace. Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f --- M src/osmo_gsm_tester/modem.py 1 file changed, 59 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/09/5009/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index 0796fa6..206a081 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -37,6 +37,7 @@ I_MODEM = 'org.ofono.Modem' I_NETREG = 'org.ofono.NetworkRegistration' I_SMS = 'org.ofono.MessageManager' +I_CONNMGR = 'org.ofono.ConnectionManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' I_SS = 'org.ofono.SupplementaryServices' @@ -334,6 +335,10 @@ sms_received_list = None _ki = None + CTX_PROT_IPv4 = 'ip' + CTX_PROT_IPv6 = 'ipv6' + CTX_PROT_IPv46 = 'dual' + def __init__(self, conf): self.conf = conf self.path = conf.get('path') @@ -347,6 +352,7 @@ self.dbus.required_signals = { I_SMS: ( ('IncomingMessage', self._on_incoming_message), ), I_NETREG: ( ('PropertyChanged', self._on_netreg_property_changed), ), + I_CONNMGR: ( ('PropertyChanged', self._on_connmgr_property_changed), ), I_CALLMGR: ( ('PropertyChanged', self._on_callmgr_property_changed), ('CallAdded', self._on_callmgr_call_added), ('CallRemoved', self._on_callmgr_call_removed), ), @@ -430,6 +436,7 @@ req_ifaces = (I_NETREG,) req_ifaces += (I_SMS,) if 'sms' in self.features() else () req_ifaces += (I_SS,) if 'ussd' in self.features() else () + req_ifaces += (I_CONNMGR,) if 'gprs' in self.features() else () return req_ifaces def _on_netreg_property_changed(self, name, value): @@ -531,6 +538,8 @@ self.cancellable = Gio.Cancellable.new() def power_off(self): + if self.dbus.has_interface(I_CONNMGR) and self.is_attached(): + self.detach() self.set_online(False) self.set_powered(False) req_ifaces = self._required_ifaces() @@ -562,6 +571,53 @@ else: self.log('Connect to', mcc_mnc if mcc_mnc else 'default network') self.schedule_scan_register(mcc_mnc) + + def is_attached(self): + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.GetProperties() + attached = prop.get('Attached') + self.dbg('attached:', attached) + return attached + + def attach(self, allow_roaming=False): + self.dbg('attach') + if self.is_attached(): + self.detach() + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', allow_roaming)) + prop = connmgr.SetProperty('Powered', Variant('b', True)) + + def detach(self): + self.dbg('detach') + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', False)) + prop = connmgr.SetProperty('Powered', Variant('b', False)) + connmgr.DeactivateAll() + connmgr.ResetContexts() # Requires Powered=false + + def activate_context(self, apn='internet', user='ogt', pwd='', protocol='ip'): + self.dbg('activate_context', apn=apn, user=user) + + connmgr = self.dbus.interface(I_CONNMGR) + ctx_path = connmgr.AddContext('internet') + + ctx = systembus_get(ctx_path) + ctx.SetProperty('AccessPointName', Variant('s', apn)) + ctx.SetProperty('Username', Variant('s', user)) + ctx.SetProperty('Password', Variant('s', pwd)) + ctx.SetProperty('Protocol', Variant('s', protocol)) + + # Activate can only be called after we are attached + ctx.SetProperty('Active', Variant('b', True)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == True) + self.log('context activated', path=ctx_path, apn=apn, user=user, properties=ctx.GetProperties()) + return ctx_path + + def deactivate_context(self, ctx_id): + self.dbg('activate_context', path=ctx_id) + ctx = systembus_get(ctx_id) + ctx.SetProperty('Active', Variant('b', False)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == False) def sms_send(self, to_msisdn_or_modem, *tokens): if isinstance(to_msisdn_or_modem, Modem): @@ -663,6 +719,9 @@ def _on_callmgr_property_changed(self, name, value): self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CALLMGR, name, value)) + def _on_connmgr_property_changed(self, name, value): + self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CONNMGR, name, value)) + def info(self, keys=('Manufacturer', 'Model', 'Revision', 'Serial')): props = self.properties() return ', '.join(['%s: %r'%(k,props.get(k)) for k in keys]) -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services Message-ID: Review at https://gerrit.osmocom.org/5010 suites: aoip_debug: Start GPRS services Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 --- M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf 2 files changed, 41 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/10/5010/1 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cad68b7..c0db167 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -2,30 +2,38 @@ from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() +pcu = bts.pcu() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) msc = suite.msc(hlr, mgcpgw, stp) bsc = suite.bsc(msc, mgw_bsc, stp) + modems = suite.modems(int(prompt('How many modems?'))) + +bsc.bts_add(bts) +sgsn.bts_add(bts) hlr.start() stp.start() +ggsn.start() +sgsn.start() msc.start() mgcpgw.start() mgw_bsc.start() - -bsc.bts_add(bts) bsc.start() bts.start() +pcu.start() for m in modems: hlr.subscriber_add(m) m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -115,5 +123,34 @@ response = ms.ussd_send(ussd_cmd) print('modem %s: response=%r' % (ms.name(), response)) + elif cmd.startswith('data-attach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: attach' % ms.name()) + ms.attach() + wait(ms.is_attached) + print('modem %s: attached' % ms.name()) + + elif cmd.startswith('data-detach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: detach' % ms.name()) + ms.attach() + wait(lambda: not ms.is_attached()) + print('modem %s: detached' % ms.name()) + + elif cmd.startswith('data-activate'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: activate' % ms.name()) + response = ms.activate_context() + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index d75cacb..2f36e1d 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 6 + - times: 8 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test Message-ID: Review at https://gerrit.osmocom.org/5011 suites: gprs: Introduce suite with ping test Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b --- M example/resources.conf A suites/gprs/ping.py A suites/gprs/suite.conf 3 files changed, 63 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/5011/1 diff --git a/example/resources.conf b/example/resources.conf index d503a48..26e1d80 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -7,6 +7,8 @@ - addr: 10.42.42.5 - addr: 10.42.42.6 - addr: 10.42.42.7 +- addr: 10.42.42.8 +- addr: 10.42.42.9 bts: - label: sysmoBTS 1002 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py new file mode 100755 index 0000000..3a0eb3a --- /dev/null +++ b/suites/gprs/ping.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +hlr = suite.hlr() +bts = suite.bts() +pcu = bts.pcu() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() +stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) +ms = suite.modem() + +bsc.bts_add(bts) +sgsn.bts_add(bts) + +print('start network...') +hlr.start() +stp.start() +ggsn.start() +sgsn.start() +msc.start() +mgcpgw.start() +mgw_bsc.start() +bsc.start() + +bts.start() +pcu.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) +ms.attach() + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('waiting for modems to attach to data services...') +wait(ms.is_attached) +ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) +# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) +# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) +# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v4) diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf new file mode 100644 index 0000000..1590b7d --- /dev/null +++ b/suites/gprs/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn + bts: + - times: 1 + modem: + - times: 1 + features: + - gprs -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: default-suites.conf: Use same order for sysmocell5000 as for... Message-ID: Review at https://gerrit.osmocom.org/5012 default-suites.conf: Use same order for sysmocell5000 as for other bts Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/12/5012/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index 039ead8..cc65a53 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -10,9 +10,9 @@ - voice:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 -- voice:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 +- voice:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy -- To view, visit https://gerrit.osmocom.org/5012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 16:39:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 Nov 2017 16:39:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: default-suites.conf: Add gprs suite Message-ID: Review at https://gerrit.osmocom.org/5013 default-suites.conf: Add gprs suite Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 --- M example/default-suites.conf 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/5013/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index cc65a53..83dd079 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -3,21 +3,25 @@ - ussd:sysmo - aoip_ussd:sysmo - voice:sysmo +- gprs:sysmo - sms:trx-b200 - aoip_sms:trx-b200 - ussd:trx-b200 - aoip_ussd:trx-b200 - voice:trx-b200 +- gprs:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 - voice:trx-sysmocell5000 +- gprs:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy - aoip_ussd:octphy - voice:octphy +- gprs:octphy - smpp - aoip_smpp - aoip_encryption -- To view, visit https://gerrit.osmocom.org/5013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 23 17:56:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 17:56:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Update rate_ctr description Message-ID: Review at https://gerrit.osmocom.org/5014 Update rate_ctr description * use example relevant to new counter names with ':' separator * mention that 'counter' is obsolete * mention group name and index * use bold and monospace fonts to improve visibility Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/5014/1 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index e8379d9..e4558e8 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -150,14 +150,24 @@ |rate_ctr.*|RO||Get rate counter value. |=== -Those read-only variables allow to get value of arbitrary counter or rate -counter using its name e. g. "counter.net.sms.submitted" or -"rate_ctr.per_hour.nat.bsc.sccp.conn". Of course for that to work the program -in question have to register corresponding counter names using libosmocore -functions. Note the difference between counter and rate_ctr access format: in -case of rate_ctr the counter name have to be prefixed with interval -specification which can be any of "per_sec", "per_min", "per_hour", "per_day" -or "abs" for absolute value. +Those read-only variables allow to get value of arbitrary +counter using its name. + +For example "+rate_ctr.per_hour.bsc.0.handover:timeout+" is the number of handover timeouts per hour. + +Of course for that to work the program +in question have to register corresponding counter names and groups using +libosmocore functions. + +In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to +obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. + +The rate counter group name have to be prefixed with interval +specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" +or "*abs*" for absolute value. + +The "+counter.*+" variables are for backwards compatibility only +because it's functionality is superceeded by "+rate_ctr.abs+". === Control Interface python example: `bsc_control.py` -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 18:15:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 18:15:51 +0000 Subject: [PATCH] libosmocore[master]: Deprecate old counter functions Message-ID: Review at https://gerrit.osmocom.org/5015 Deprecate old counter functions Their functionality is superceeded by rate_ctr.abs facility. Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 --- M include/osmocom/core/counter.h 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/5015/1 diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index e692f7e..1350ed8 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -1,5 +1,7 @@ #pragma once +#include + /*! \file counter.h * Common routines regarding counter handling */ @@ -38,12 +40,12 @@ ctr->value = 0; } -struct osmo_counter *osmo_counter_alloc(const char *name); +struct osmo_counter *osmo_counter_alloc(const char *name) OSMO_DEPRECATED("Use rate_ctr.h instead"); -void osmo_counter_free(struct osmo_counter *ctr); +void osmo_counter_free(struct osmo_counter *ctr) OSMO_DEPRECATED("Use rate_ctr.h instead"); -int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); +int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data) OSMO_DEPRECATED("Use rate_ctr.h instead"); -struct osmo_counter *osmo_counter_get_by_name(const char *name); +struct osmo_counter *osmo_counter_get_by_name(const char *name) OSMO_DEPRECATED("Use rate_ctr.h instead"); -int osmo_counter_difference(struct osmo_counter *ctr); +int osmo_counter_difference(struct osmo_counter *ctr) OSMO_DEPRECATED("Use rate_ctr.h instead"); -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 18:31:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 18:31:29 +0000 Subject: [PATCH] libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5015 to look at the new patch set (#2). Deprecate old counter functions Their functionality is superceeded by rate_ctr.abs facility. Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 --- M include/osmocom/core/counter.h 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/5015/2 diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index e692f7e..12fa0ce 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -1,5 +1,7 @@ #pragma once +#include + /*! \file counter.h * Common routines regarding counter handling */ @@ -38,12 +40,12 @@ ctr->value = 0; } -struct osmo_counter *osmo_counter_alloc(const char *name); +struct osmo_counter *osmo_counter_alloc(const char *name) OSMO_DEPRECATED("Use rate_ctr.h instead"); -void osmo_counter_free(struct osmo_counter *ctr); +void osmo_counter_free(struct osmo_counter *ctr) OSMO_DEPRECATED("Use rate_ctr.h instead"); -int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); +int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE; -struct osmo_counter *osmo_counter_get_by_name(const char *name); +struct osmo_counter *osmo_counter_get_by_name(const char *name) OSMO_DEPRECATED("Use rate_ctr.h instead"); -int osmo_counter_difference(struct osmo_counter *ctr); +int osmo_counter_difference(struct osmo_counter *ctr) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE; -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 23 18:33:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 18:33:36 +0000 Subject: [PATCH] libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5015 to look at the new patch set (#3). Deprecate old counter functions Their functionality is superceeded by rate_ctr.abs facility. Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 --- M include/osmocom/core/counter.h 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/5015/3 diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index e692f7e..081d380 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -1,5 +1,7 @@ #pragma once +#include + /*! \file counter.h * Common routines regarding counter handling */ @@ -38,12 +40,12 @@ ctr->value = 0; } -struct osmo_counter *osmo_counter_alloc(const char *name); +struct osmo_counter *osmo_counter_alloc(const char *name) OSMO_DEPRECATED("Use rate_ctr.h instead"); -void osmo_counter_free(struct osmo_counter *ctr); +void osmo_counter_free(struct osmo_counter *ctr) OSMO_DEPRECATED("Use rate_ctr.h instead"); -int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); +int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE; -struct osmo_counter *osmo_counter_get_by_name(const char *name); +struct osmo_counter *osmo_counter_get_by_name(const char *name) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE; -int osmo_counter_difference(struct osmo_counter *ctr); +int osmo_counter_difference(struct osmo_counter *ctr) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE; -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 23 18:52:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 18:52:22 +0000 Subject: [PATCH] libosmocore[master]: Improve get_rate_ctr() error handling Message-ID: Review at https://gerrit.osmocom.org/5016 Improve get_rate_ctr() error handling * use explicit return instead of goto for better readability * report back expected interval values Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/5016/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 07b17c9..0c71532 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -545,15 +545,17 @@ const struct rate_ctr *ctr; dup = talloc_strdup(cmd, cmd->variable); - if (!dup) - goto oom; + if (!dup) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } /* Skip over possible prefixes (net.) */ tmp = strstr(dup, "rate_ctr"); if (!tmp) { talloc_free(dup); cmd->reply = "rate_ctr not a token in rate_ctr command!"; - goto err; + return CTRL_CMD_ERROR; } strtok_r(tmp, ".", &saveptr); @@ -561,7 +563,7 @@ if (!interval) { talloc_free(dup); cmd->reply = "Missing interval."; - goto err; + return CTRL_CMD_ERROR; } if (!strcmp(interval, "abs")) { @@ -576,8 +578,8 @@ intv = RATE_CTR_INTV_DAY; } else { talloc_free(dup); - cmd->reply = "Wrong interval."; - goto err; + cmd->reply = "Wrong interval. Expecting 'per_sec', 'per_min', 'per_hour', 'per_day' or 'abs' value."; + return CTRL_CMD_ERROR; } ctr_group = strtok_r(NULL, ".", &saveptr); @@ -586,7 +588,7 @@ talloc_free(dup); cmd->reply = "Counter group must be of name.index form e. g. " "e1inp.0"; - goto err; + return CTRL_CMD_ERROR; } idx = atoi(ctr_idx); @@ -595,7 +597,7 @@ if (!ctrg) { talloc_free(dup); cmd->reply = "Counter group with given name and index not found"; - goto err; + return CTRL_CMD_ERROR; } if (!strlen(saveptr)) { @@ -607,20 +609,18 @@ if (!ctr) { cmd->reply = "Counter name not found."; talloc_free(dup); - goto err; + return CTRL_CMD_ERROR; } talloc_free(dup); cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv)); - if (!cmd->reply) - goto oom; + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } return CTRL_CMD_REPLY; -oom: - cmd->reply = "OOM"; -err: - return CTRL_CMD_ERROR; } static int set_rate_ctr(struct ctrl_cmd *cmd, void *data) -- To view, visit https://gerrit.osmocom.org/5016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 19:37:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 23 Nov 2017 19:37:06 +0000 Subject: [PATCH] libosmocore[master]: Ctrl: add rate counter group introspection Message-ID: Review at https://gerrit.osmocom.org/5017 Ctrl: add rate counter group introspection Before user have to know group name and index in advance to request rate counter value. Introduce introspection function which allows user to obtain all the groups and their indexes by requesting 'rate_ctr.*' variable. This simplifies KPI dumping over ctrl interface. Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/5017/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 0c71532..9a65e62 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -534,6 +534,19 @@ return CTRL_CMD_ERROR; } +static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) +{ + struct ctrl_cmd *cmd = data; + + cmd->reply = talloc_asprintf_append(cmd->reply, "%s.%u;", ctrg->desc->group_name_prefix, ctrg->idx); + if (!cmd->reply) { + cmd->reply = "OOM"; + return -1; + } + + return 0; +} + /* rate_ctr */ CTRL_CMD_DEFINE(rate_ctr, "rate_ctr *"); static int get_rate_ctr(struct ctrl_cmd *cmd, void *data) @@ -576,6 +589,11 @@ intv = RATE_CTR_INTV_HOUR; } else if (!strcmp(interval, "per_day")) { intv = RATE_CTR_INTV_DAY; + } else if (!strcmp(interval, "*")) { + intv = rate_ctr_for_each_group(ctrl_rate_ctr_group_handler, cmd); + if (intv < 0) + return CTRL_CMD_ERROR; + return CTRL_CMD_REPLY; } else { talloc_free(dup); cmd->reply = "Wrong interval. Expecting 'per_sec', 'per_min', 'per_hour', 'per_day' or 'abs' value."; -- To view, visit https://gerrit.osmocom.org/5017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:12:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:12:51 +0000 Subject: libosmocore[master]: Ctrl: add rate counter group introspection In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:15:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:15:43 +0000 Subject: libosmocore[master]: Improve get_rate_ctr() error handling In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5016/1//COMMIT_MSG Commit Message: Line 9: * use explicit return instead of goto for better readability two topics in one patch. Whether or not the two repetitions of the return command are more readable than the goto is questionable. The original author had his reasons. The second part make sense, and I'd be happy to merge it. -- To view, visit https://gerrit.osmocom.org/5016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:16:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:16:57 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5011/1/suites/gprs/ping.py File suites/gprs/ping.py: PS1, Line 46: no supported in EC20 would be good to find out if this means "not supported in the modem firmware" or "not supported in the ofono driver" -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:18:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:18:09 +0000 Subject: libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Patch Set 3: I'm not entirely sure they're deprecated. Sometimes the event rate might not be the right information that people are interested and you just want one value? -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:19:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:19:21 +0000 Subject: osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:20:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:20:43 +0000 Subject: osmo-hlr[master]: Remove unused check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1578306244f6ee218e464a6c378ff60605cf1d5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:21:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:21:53 +0000 Subject: osmo-hlr[master]: Remove unused ipa.py In-Reply-To: References: Message-ID: Patch Set 1: the question is: why is it in this repository in the first place? osmo-hlr doesn't inherit the openbsc.git legacy, so there must be a reason? If it is to be removed, then the rationale should be in the commit log? -- To view, visit https://gerrit.osmocom.org/4994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:22:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:22:11 +0000 Subject: osmo-msc[master]: Use osmo-ggsn instead of openggsn in jenkins tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4993 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib70360feb82fb9f871461f94982634c11d58f772 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:22:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:22:43 +0000 Subject: osmo-msc[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:22:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:22:50 +0000 Subject: python/osmo-python-tests[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:24:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:24:33 +0000 Subject: libosmocore[master]: fsm_tmr_cb: don't set T=0, the fi may no longer exist In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:25:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:25:00 +0000 Subject: osmo-msc[master]: cosmetic: log error when using a conn that's in release In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4971 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:25:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:25:37 +0000 Subject: python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:31:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:31:24 +0000 Subject: [PATCH] libosmocore[master]: gsmtap.h: Introduce new GSMTAP type for LTE NAS messages Message-ID: Review at https://gerrit.osmocom.org/5018 gsmtap.h: Introduce new GSMTAP type for LTE NAS messages Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3 --- M include/osmocom/core/gsmtap.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/5018/1 diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index c226185..7a14ba9 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -47,6 +47,7 @@ #define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */ #define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */ #define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */ +#define GSMTAP_TYPE_LTE_NAS 0x12 /* LTE Non-Access Stratum */ /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */ -- To view, visit https://gerrit.osmocom.org/5018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:58:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:58:13 +0000 Subject: libosmocore[master]: gsmtap.h: Introduce new GSMTAP type for LTE NAS messages In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 23 21:58:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 Nov 2017 21:58:20 +0000 Subject: [MERGED] libosmocore[master]: gsmtap.h: Introduce new GSMTAP type for LTE NAS messages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsmtap.h: Introduce new GSMTAP type for LTE NAS messages ...................................................................... gsmtap.h: Introduce new GSMTAP type for LTE NAS messages Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3 --- M include/osmocom/core/gsmtap.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index c226185..7a14ba9 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -47,6 +47,7 @@ #define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */ #define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */ #define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */ +#define GSMTAP_TYPE_LTE_NAS 0x12 /* LTE Non-Access Stratum */ /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */ -- To view, visit https://gerrit.osmocom.org/5018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 02:55:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 02:55:37 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (31 comments) https://gerrit.osmocom.org/#/c/4980/2//COMMIT_MSG Commit Message: Line 15: Depends osmo-mgw: Iab6a6038e7610c62f34e642cd49c93d11151252c please use the tag as "Depends: foo" to match general tag syntax like below ... I usually use Depends: Iab6a6038e7610c62f34e642cd49c93d11151252c (osmo-mgw) and don't separate from the other tags, i.e. drop the blank line https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_ifaces.h File include/osmocom/msc/msc_ifaces.h: Line 44: int msc_iu_rab_act_cs(struct gsm_trans *trans); -1: msc_ifaces.h/c didn't really turn out as clearly as I had intended... But looking at this change I find that this function should be in iucs.h/c. Let's not add msc_ to the name and just add iu_rab_act_cs to iucs.h so that you can call it from the FSM code. Another patch can move the implementation from msc_ifaces.c to iucs.c (or this patch if you like) https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_mgcp.h File include/osmocom/msc/msc_mgcp.h: Line 33: char conn_id_cn[MGCP_CONN_ID_MAXLEN]; ?: I wonder whether rtp_endpoint and the conn_ids should rather be part of struct mgcp_client? How does osmo-bsc solve it, does it have the same structure that can be unified between osmo-bsc and osmo-msc, i.e. in the mgcp_client API? https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_ifaces.c File src/libmsc/msc_ifaces.c: Line 194: return msc_mgcp_call_assignment(trans); looks like callers should just call msc_mgcp_call_assignment() directly. Line 249: msc_mgcp_call_release(trans); looks like callers should just call msc_mgcp_call_release() directly. https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 47: enum int_cause_code { -1: prefer msc_mgcp_ instead of int_ because if you follow this scheme, we will have int_ prefixes everywhere and it is harder to grep the code Line 59: static const struct value_string int_cause_codes_str[] = { -1: typical naming would be foo_names like you use below, so msc_mgcp_cause_code_names[] Line 93: enum fsm_evt { -1: again you are using the same general struct name, just 'fsm_', like in osmo-bsc. I know it's a static context, but please give each FSM its own unique naming, like my patches that we merged into your osmo-bsc FSM patches. Line 126: static const struct value_string fsm_evt_names[] = { fsm_ Line 217: get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); -1: again, you do not need to log FSM states or events, the FSM code does that. I've mailed you so before, let's not repeat this. Line 222: "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); -1: best use "0x%x" so we always know it is logged in hex. Are you sure it should be in hex though? In the VTY rtp endpoint ranges it isn't. same multiple times below. Line 240: LOGPFSML(fi, LOGL_DEBUG, "CRCX/RAN: transmitting MGCP message to MGW...\n"); (wondering whether this log line adds any info to the log, since the FSM already logged ST_CRCX_RAN. same multiple times below) Line 248: return; lol, return at the end of a void function? (some more below) Line 319: get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); nope Line 422: get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); nope Line 442: handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); (code dup: could have one handle_error(...) below and goto assignment_fail from each failure) Line 460: /* Note: When we reach this point than the situation is basically that (then) Line 465: osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, 0, 0); ?: no timeout? Line 492: get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); ... Line 503: "MDCX/CN: completing connection for the CN side on " "MGW endpoint:%x...\n", mgcp_ctx->rtp_endpoint); (line break or drop the " " in the middle) Line 507: conn->rtp.remote_port_cn); (rather combine with preceding LOGPFSML for less log lines and a bit less logging overhead) Line 552: OSMO_ASSERT(conn); you're copying these lines and local variables around everywhere, even in functions where you don't use them at all, like this one, which is only using mgcp_ctx? Line 609: conn->rtp.remote_port_ran); (combine logs) Line 691: LOGPFSML(fi, LOGL_ERROR, "call active, waiting for teardown...\n"); really an error? Line 803: .in_event_mask = (1 << EV_INIT), (we often use an S() macro, e.g. see top of vlr_lu_fsm.c and struct sub_pres_vlr_states definition) Line 805: .name = "ST_CRCX_RAN", (I like to use OSMO_STRINGIFY(ST_CRCX_RAN) because then there won't be typos ... up to you) Line 877: /* Notify that the a new call begins. This will create a connection for the "the a" Line 895: LOGP(DMGCP, LOGL_ERROR, "invalid conn, call assignment failed\n"); can't we log some context? Remember Holger's scenario ... it is 37c3, you have a couple thousand subscribers... Line 927: mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); I think it should be a child of the conn->conn_fsm. Line 954: LOGP(DMGCP, LOGL_ERROR, "invalid remote call leg address, call completion failed\n"); context please in all of these logs. Line 961: if (!trans) { In general, you could have a look whether any code path leading to these checks possibly *can* have a NULL transaction, and so forth. Same in some other instances above. In most code, we assume that the structs passed in are valid and avoid a lot of bloat that way. -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:04:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:04:48 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4915 to look at the new patch set (#5). sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/5 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..513b4ff 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "../../lib/syserr.h" #include "../../gtp/gtpie.h" @@ -27,7 +29,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +75,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +89,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +103,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..d4a5dbc 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "../../lib/in46_addr.h" #include "../../lib/syserr.h" @@ -171,7 +172,7 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 5 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:13:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:13:48 +0000 Subject: [PATCH] osmo-hlr[master]: db_get_auth_data / db_get_auc: clarify return values In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4987 to look at the new patch set (#2). db_get_auth_data / db_get_auc: clarify return values Differentiate between "IMSI unknown" and "IMSI has no auth data": in case of known IMSI lacking auth data, return -ENOKEY instead of -ENOENT. Fix API doc comments to reflect what the functions actually return, on top of adding the -ENOKEY detail. Adjust db_test expectations from -ENOENT to -ENOKEY where appropriate. Adjust VTY and CTRL command rc evaluation. A subsequent patch will use these return values to log details on each of these situations. Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 --- M src/ctrl.c M src/db_auc.c M src/hlr.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 6 files changed, 53 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/87/4987/2 diff --git a/src/ctrl.c b/src/ctrl.c index 3e81661..8ae9d7c 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -228,11 +228,16 @@ rc = db_get_auth_data(hlr->dbc, imsi, &aud2g, &aud3g, NULL); - if (rc == -ENOENT) { + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: /* No auth data found, tell the print*() functions about it. */ aud2g.algo = OSMO_AUTH_ALG_NONE; aud3g.algo = OSMO_AUTH_ALG_NONE; - } else if (rc) { + break; + default: cmd->reply = "Error retrieving authentication data."; return CTRL_CMD_ERROR; } @@ -258,11 +263,16 @@ rc = db_get_auth_data(hlr->dbc, subscr.imsi, &aud2g, &aud3g, NULL); - if (rc == -ENOENT) { + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: /* No auth data found, tell the print*() functions about it. */ aud2g.algo = OSMO_AUTH_ALG_NONE; aud3g.algo = OSMO_AUTH_ALG_NONE; - } else if (rc) { + break; + default: cmd->reply = "Error retrieving authentication data."; return CTRL_CMD_ERROR; } diff --git a/src/db_auc.c b/src/db_auc.c index 7bbc93f..5fb5e3a 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -74,7 +74,9 @@ } /* obtain the authentication data for a given imsi - * returns -1 in case of error, 0 for unknown IMSI, 1 for success */ + * returns 0 for success, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auth_data(struct db_context *dbc, const char *imsi, struct osmo_sub_auth_data *aud2g, struct osmo_sub_auth_data *aud3g, @@ -163,15 +165,16 @@ LOGAUC(imsi, LOGL_DEBUG, "No 3G Auth Data\n"); if (aud2g->type == 0 && aud3g->type == 0) - ret = -ENOENT; + ret = -ENOKEY; out: db_remove_reset(stmt); return ret; } -/* return -1 in case of error, 0 for unknown imsi, positive for number - * of vectors generated */ +/* return number of vectors generated, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auc(struct db_context *dbc, const char *imsi, unsigned int auc_3g_ind, struct osmo_auth_vector *vec, unsigned int num_vec, const uint8_t *rand_auts, diff --git a/src/hlr.c b/src/hlr.c index bcae3b5..58f94f3 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -71,6 +71,9 @@ gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; switch (rc) { case 0: + /* 0 means "0 tuples generated", which shouldn't happen. + * Treat the same as "no auth data". */ + case -ENOKEY: case -ENOENT: gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 0a9ba76..5a300a7 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -72,14 +72,17 @@ OSMO_ASSERT(g_hlr); rc = db_get_auth_data(g_hlr->dbc, subscr->imsi, &aud2g, &aud3g, NULL); - if (rc) { - if (rc == -ENOENT) { - aud2g.algo = OSMO_AUTH_ALG_NONE; - aud3g.algo = OSMO_AUTH_ALG_NONE; - } else { - vty_out(vty, "%% Error retrieving data from database (%d)%s", rc, VTY_NEWLINE); - return; - } + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: + aud2g.algo = OSMO_AUTH_ALG_NONE; + aud3g.algo = OSMO_AUTH_ALG_NONE; + break; + default: + vty_out(vty, "%% Error retrieving data from database (%d)%s", rc, VTY_NEWLINE); + return; } if (aud2g.type != OSMO_AUTH_TYPE_NONE && aud2g.type != OSMO_AUTH_TYPE_GSM) { diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 23b84cc..1a5d7e0 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -464,7 +464,7 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G only"); @@ -500,7 +500,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -515,7 +515,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 3G only"); @@ -562,7 +562,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -581,7 +581,7 @@ "asdfasdfasd", false, "asdfasdfasdf", 99999)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G and 3G"); @@ -669,7 +669,7 @@ /* For this test to work, we want to get the same subscriber ID back, * and make sure there are no auth data leftovers for this ID. */ OSMO_ASSERT(id == g_subscr.id); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_subscr_delete_by_id(dbc, id), 0); ASSERT_SEL(imsi, imsi0, -ENOENT); @@ -697,15 +697,15 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set SQN, but no 3G auth data present"); ASSERT_RC(db_update_sqn(dbc, id, 123), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_update_sqn(dbc, id, 543), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth 3G data"); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index f7acfec..c5e5bac 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -726,7 +726,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -799,7 +799,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -820,7 +820,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -912,7 +912,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -937,7 +937,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, "asdfasdfasd", false, "asdfasdfasdf", 99999)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1174,7 +1174,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1214,7 +1214,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1225,7 +1225,7 @@ db_update_sqn(dbc, id, 123) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1233,7 +1233,7 @@ db_update_sqn(dbc, id, 543) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data -- To view, visit https://gerrit.osmocom.org/4987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:15:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:15:50 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: auto-config remote PCs if omitted In-Reply-To: References: Message-ID: Patch Set 1: > (1 comment) no, wasn't aware of that page. So then OsmoSGSN also needs a patch to use 0.23.4 by default. -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:34:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:34:21 +0000 Subject: [PATCH] osmo-sgsn[master]: use default point-code as listed on Point_Codes wiki page Message-ID: Review at https://gerrit.osmocom.org/5019 use default point-code as listed on Point_Codes wiki page see https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 --- M src/gprs/sgsn_main.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/19/5019/1 diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index 8cd68ff..fe4192b 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -502,8 +502,9 @@ } #if BUILD_IU + /* Note that these are mostly defaults and can be overriden from the VTY */ sccp = osmo_sccp_simple_client(tall_bsc_ctx, "OsmoSGSN", - 2 /* FIXME: configurable */, + (23 << 3) + 4, OSMO_SS7_ASP_PROT_M3UA, 0, NULL, 0, "127.0.0.1"); -- To view, visit https://gerrit.osmocom.org/5019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:36:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:36:06 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: auto-config local and remote PCs if omitted In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4977 to look at the new patch set (#2). osmo-hnbgw: auto-config local and remote PCs if omitted The current default point-code for OsmoMSC is 0.23.1 and for OsmoSGSN 0.23.4. See https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes. Before this patch, osmo-hnbgw requires a cs7 config and explicit point-codes for MSC and SGSN as well as a local one. Provide default config if none is provided: Use above default point-codes if no MSC and/or SGSN address are provided. Also create a default cs7 instance with local PC 0.23.5. This allows completely omitting cs7 instance and SCCP addresses from osmo-hnbgw.cfg in a single-box setup. Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 --- M src/hnbgw_cn.c 1 file changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/77/4977/2 diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index a48b651..eba05a4 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -410,13 +410,16 @@ } static int resolve_addr_name(struct osmo_sccp_addr *dest, struct osmo_ss7_instance **ss7, - const char *addr_name, const char *label) + const char *addr_name, const char *label, + uint32_t default_pc) { struct osmo_ss7_instance *ss7_tmp; if (!addr_name) { - LOGP(DMAIN, LOGL_ERROR, "Missing config: %s remote-addr\n", label); - return -1; + osmo_sccp_make_addr_pc_ssn(dest, default_pc, OSMO_SCCP_SSN_RANAP); + LOGP(DMAIN, LOGL_INFO, "%s remote addr not configured, using default: %s\n", label, + osmo_sccp_addr_name(*ss7, dest)); + return 0; } ss7_tmp = osmo_sccp_addr_by_name(dest, addr_name); @@ -458,12 +461,19 @@ ss7 = NULL; if (resolve_addr_name(&gw->sccp.iucs_remote_addr, &ss7, - gw->config.iucs_remote_addr_name, "IuCS")) + gw->config.iucs_remote_addr_name, "IuCS", (23 << 3) + 1)) return -1; if (resolve_addr_name(&gw->sccp.iups_remote_addr, &ss7, - gw->config.iups_remote_addr_name, "IuPS")) + gw->config.iups_remote_addr_name, "IuPS", (23 << 3) + 4)) return -1; + if (!ss7) { + LOGP(DRANAP, LOGL_NOTICE, "No cs7 instance configured for IuCS nor IuPS," + " creating default instance\n"); + ss7 = osmo_ss7_instance_find_or_create(gw, 0); + ss7->cfg.primary_pc = (23 << 3) + 5; + } + if (!osmo_ss7_pc_is_valid(ss7->cfg.primary_pc)) { LOGP(DMAIN, LOGL_ERROR, "IuCS/IuPS uplink cannot be setup: CS7 instance %d has no point-code set\n", ss7->cfg.id); -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 03:40:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 03:40:31 +0000 Subject: [PATCH] osmo-msc[master]: use only 0.23.1 as point code for both A and Iu Message-ID: Review at https://gerrit.osmocom.org/5020 use only 0.23.1 as point code for both A and Iu We usually have both A and IuCS on 0.23.1, using differing SSNs. 0.23.2 was used only if there was a separate cs7 instance for Iu, which is not practical, and even if used does not conflict with 0.23.1 (since it would be on a different STP). Just use 0.23.1 for all SCCP clients. This needs adjustment of https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes Change-Id: I3d5466eff5680cb5aa95a76a9e179fdf88ce8aa0 --- M src/osmo-msc/msc_main.c 1 file changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/5020/1 diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 5c192e8..b4bafd5 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -312,9 +312,7 @@ #endif #define DEFAULT_M3UA_REMOTE_IP "127.0.0.1" -#define DEFAULT_PC_A "0.23.1" -#define DEFAULT_PC_IU "0.23.2" -#define DEFAULT_PC_A_IU DEFAULT_PC_A +#define DEFAULT_PC "0.23.1" static struct osmo_sccp_instance *sccp_setup(void *ctx, uint32_t cs7_instance, const char *label, const char *default_pc_str) @@ -344,7 +342,7 @@ * Iu and A at the same time, under the same point-code */ LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = Iu = %u\n", cs7_instance_a); - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A-Iu", DEFAULT_PC_A_IU); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A-Iu", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; @@ -355,17 +353,17 @@ LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = %u, Iu = %u\n", cs7_instance_a, cs7_instance_iu); - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC_A); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; - msc_network->iu.sccp = sccp_setup(ctx, cs7_instance_iu, "OsmoMSC-Iu", DEFAULT_PC_IU); + msc_network->iu.sccp = sccp_setup(ctx, cs7_instance_iu, "OsmoMSC-Iu", DEFAULT_PC); if (!msc_network->iu.sccp) return -EINVAL; } #else /* No Iu support, just open up an A instance */ - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC_A); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; #endif -- To view, visit https://gerrit.osmocom.org/5020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d5466eff5680cb5aa95a76a9e179fdf88ce8aa0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:00:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 09:00:31 +0000 Subject: [PATCH] osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending Message-ID: Review at https://gerrit.osmocom.org/5021 vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M include/osmocom/bsc/gsm_data_shared.h M include/osmocom/bsc/rest_octets.h M src/libbsc/bsc_vty.c M src/libbsc/rest_octets.c M src/libbsc/system_information.c M src/libcommon/gsm_data.c 6 files changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/5021/1 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 240be1c..04669e2 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -885,6 +885,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index e6e5303..53c70dd 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -49,6 +49,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + uint8_t early_cm_restrict_3g; uint8_t si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3ddd5de..368fe6b 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -281,6 +281,9 @@ vty_out(vty, "Early Classmark Sending: %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, "3G Early Classmark Sending: %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); if (is_ipaccess_bts(bts)) @@ -653,6 +656,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g: %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2789,6 +2794,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4310,6 +4331,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index abd621c..3780be2 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -499,9 +499,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, H); + else + bitvec_set_bit(&bv, L); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 91e993d..43ea53f 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -825,6 +825,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = 1, .si2quater_indicator = 0, .lsa_params = { .present = 0, @@ -871,6 +872,7 @@ si_info.si2quater_indicator = 0; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index e085aa6..ef72881 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -269,6 +269,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:06:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:06:05 +0000 Subject: python/osmo-python-tests[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:06:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:06:34 +0000 Subject: python/osmo-python-tests[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Set verified because I've already used "git review" with this file to send this and other patches. -- To view, visit https://gerrit.osmocom.org/4986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:06:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:06:38 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Add git-review config In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add git-review config ...................................................................... Add git-review config Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Max: Verified Harald Welte: Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..c817762 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=python/osmo-python-tests -- To view, visit https://gerrit.osmocom.org/4986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2359e960eda1f9c941fab22b50ebe56242149c78 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:06:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:06:52 +0000 Subject: [MERGED] osmo-msc[master]: Use osmo-ggsn instead of openggsn in jenkins tests In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Use osmo-ggsn instead of openggsn in jenkins tests ...................................................................... Use osmo-ggsn instead of openggsn in jenkins tests Change-Id: Ib70360feb82fb9f871461f94982634c11d58f772 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e39123c..d8853d1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -29,7 +29,7 @@ osmo-build-dep.sh libosmo-netif osmo-build-dep.sh libosmo-sccp PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 -osmo-build-dep.sh openggsn +osmo-build-dep.sh osmo-ggsn osmo-build-dep.sh osmo-mgw if [ "x$IU" = "x--enable-iu" ]; then -- To view, visit https://gerrit.osmocom.org/4993 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib70360feb82fb9f871461f94982634c11d58f772 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:08:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:08:08 +0000 Subject: osmo-hlr[master]: Remove unused ipa.py In-Reply-To: References: Message-ID: Patch Set 1: My guess that it was initially added for ctrl tests but was later superseded by Neel's new scripts. Neels? -- To view, visit https://gerrit.osmocom.org/4994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:08:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:08:56 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5014 to look at the new patch set (#2). Update rate_ctr description * use example new counter names with ':' separator * mention that 'counter' is obsolete * mention group name and index * use bold and monospace fonts to improve visibility Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/5014/2 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index e8379d9..e4558e8 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -150,14 +150,24 @@ |rate_ctr.*|RO||Get rate counter value. |=== -Those read-only variables allow to get value of arbitrary counter or rate -counter using its name e. g. "counter.net.sms.submitted" or -"rate_ctr.per_hour.nat.bsc.sccp.conn". Of course for that to work the program -in question have to register corresponding counter names using libosmocore -functions. Note the difference between counter and rate_ctr access format: in -case of rate_ctr the counter name have to be prefixed with interval -specification which can be any of "per_sec", "per_min", "per_hour", "per_day" -or "abs" for absolute value. +Those read-only variables allow to get value of arbitrary +counter using its name. + +For example "+rate_ctr.per_hour.bsc.0.handover:timeout+" is the number of handover timeouts per hour. + +Of course for that to work the program +in question have to register corresponding counter names and groups using +libosmocore functions. + +In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to +obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. + +The rate counter group name have to be prefixed with interval +specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" +or "*abs*" for absolute value. + +The "+counter.*+" variables are for backwards compatibility only +because it's functionality is superceeded by "+rate_ctr.abs+". === Control Interface python example: `bsc_control.py` -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:11:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 09:11:57 +0000 Subject: libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Patch Set 3: If we want some raw value (e. g. BER) than we have stat_item. If we're interested in absolute value of some counter (e. g. number of SMS sent) than we have rate_ctr.abs. I thought the whole idea of rate_ctr was to completely replace counters? -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:17:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:17:03 +0000 Subject: libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-2 > I thought the whole idea of > rate_ctr was to completely replace counters? To be honest, I don't remmeber. Too long ago. But given the many users still exist, I don't think it makes sense to mark it as seprecated. that should only happen once most known users are converted. And we honestly have much more urgent things to do than to work on completely superfluous patches like this. -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:17:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:17:58 +0000 Subject: osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5014/2/common/chapters/control_if.adoc File common/chapters/control_if.adoc: PS2, Line 169: The "+counter.*+" variables are for backwards compatibility only : because it's functionality is superceeded by "+rate_ctr.abs+". rephrase that in light of my comments to your patch about obsoleting osmo_counter_ -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:27:28 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 09:27:28 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: add VTY port number of osmo-mgw In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4835 to look at the new patch set (#2). common: add VTY port number of osmo-mgw osmo-mgw currently uses the VTY port constant of osmo-bsc_mgcp. We decided to re use the same port number for osmo-mgw, this is not mentioned in the manuals yet. Add the port number of osmo-mgw to the manuals (common) Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/4835/2 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 08d9b3c..f9bf311 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -18,7 +18,7 @@ |TCP|4240|telnet (VTY)|osmo-pcu |TCP|4241|telnet (VTY)|osmo-bts |TCP|4242|telnet (VTY)|osmo-nitb, osmo-bsc, cellmgr-ng -|TCP|4243|telnet (VTY)|osmo-bsc_mgcp +|TCP|4243|telnet (VTY)|osmo-bsc_mgcp, osmo-mgw |TCP|4244|telnet (VTY)|osmo-bsc_nat |TCP|4245|telnet (VTY)|osmo-sgsn |TCP|4246|telnet (VTY)|osmo-gbproxy -- To view, visit https://gerrit.osmocom.org/4835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:28:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:28:10 +0000 Subject: osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) I am not sure if a cleaner solution would be to fold all of this into one value. Like "early-classmark-allowed (2g-only|2g-3g|forbiden)" and a parser that accepts "allowed" as "2g-and-3g" to be compatible to old config files. What do you think? Am I missing something? https://gerrit.osmocom.org/#/c/5021/1/src/libbsc/bsc_vty.c File src/libbsc/bsc_vty.c: PS1, Line 281: vty_out(vty, "Early Classmark Sending: %s%s", : bts->early_classmark_allowed ? "allowed" : "forbidden", : VTY_NEWLINE); : vty_out(vty, "3G Early Classmark Sending: %s%s", : bts->early_classmark_allowed_3g ? "allowed" : "forbidden", : VTY_NEWLINE); might be nicer to have this in a single line with "Early Classmark Sending Allowed for: 2G, 3G" https://gerrit.osmocom.org/#/c/5021/1/src/libbsc/system_information.c File src/libbsc/system_information.c: PS1, Line 875: s are you sure about the logic? "restrict 3G" sounds like "restrict the use of Early CM Sending for 3G, i.e. *not* have Early CM for 3G. The "early_classmark_allowed" is exactly the opposite. Also, I don't like assigning a boolean value to an uint8_t, it looks a bit unclean. What's the problem with sticking either to bool or to the other? -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:28:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:28:32 +0000 Subject: osmo-msc[master]: use only 0.23.1 as point code for both A and Iu In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d5466eff5680cb5aa95a76a9e179fdf88ce8aa0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:29:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:29:28 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: auto-config local and remote PCs if omitted In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4977/2/src/hnbgw_cn.c File src/hnbgw_cn.c: Line 474: ss7->cfg.primary_pc = (23 << 3) + 5; maybe a comment pointing to the wiki page? Or add #defines like we have for tcp/udp port numbers? -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:30:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:30:59 +0000 Subject: osmo-sgsn[master]: use default point-code as listed on Point_Codes wiki page In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5019/1/src/gprs/sgsn_main.c File src/gprs/sgsn_main.c: Line 507: (23 << 3) + 4, see my related comment on the MSC change. We should have at least a #define POINTCODE_ITU_383(0,23,4), and then probably also #defines for the individual default point coes, like we have for TCP/UDP ports? That could be a follow-up patch, hence +2 for fixing a bug. -- To view, visit https://gerrit.osmocom.org/5019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:31:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 09:31:31 +0000 Subject: osmo-gsm-manuals[master]: common: add VTY port number of osmo-mgw In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 09:53:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 09:53:01 +0000 Subject: osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) Ok, I'll modify the patch to have "early-classmark-sending (2g|2g3g|forbidden)" and still accept "allowed" to be "2g3g". I'll create a previous patch changing early_cm_ctrl (and later early_cm_ctrl_3g) to be a bool. https://gerrit.osmocom.org/#/c/5021/1/src/libbsc/system_information.c File src/libbsc/system_information.c: PS1, Line 875: s > are you sure about the logic? "restrict 3G" sounds like "restrict the use o According to specs in 44.018: > Early Classmark Sending Control (1 bit field) > L Early Classmark Sending is forbidden > H Early Classmark Sending is allowed And: > 3G Early Classmark Sending Restriction (1 bit field) > L Neither UTRAN, CDMA2000 nor GERAN IU MODE CLASSMARK CHANGE message shall be sent with the Early classmark sending > H The sending of UTRAN,CDMA2000 and GERAN IU MODE CLASSMARK CHANGE messages are controlled by the Early Classmark Sending Control parameter So for me at least the name "Restriction" is really misleading here. 0->forbidden, 1->allowed iif "Early classmark" is also allowed, forbidden otherwise. About the uint8_t vs boolean, I stuck to the types already being used for early_cm_ctrl. I can send a new patch changing early_cm_ctrl to be a boolean though. -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:10:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:10:53 +0000 Subject: libosmocore[master]: Deprecate old counter functions In-Reply-To: References: Message-ID: Patch Set 3: Created https://osmocom.org/issues/2682 to track this. -- To view, visit https://gerrit.osmocom.org/5015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I604ee50b175751f5cc9416cdca1f29c355273312 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:25:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:25:48 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5014 to look at the new patch set (#3). Update rate_ctr description * use example new counter names with ':' separator * mention that 'counter' is obsolete * mention group name and index * use bold and monospace fonts to improve visibility Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 19 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/5014/3 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index e8379d9..5e72fe4 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -150,14 +150,25 @@ |rate_ctr.*|RO||Get rate counter value. |=== -Those read-only variables allow to get value of arbitrary counter or rate -counter using its name e. g. "counter.net.sms.submitted" or -"rate_ctr.per_hour.nat.bsc.sccp.conn". Of course for that to work the program -in question have to register corresponding counter names using libosmocore -functions. Note the difference between counter and rate_ctr access format: in -case of rate_ctr the counter name have to be prefixed with interval -specification which can be any of "per_sec", "per_min", "per_hour", "per_day" -or "abs" for absolute value. +Those read-only variables allow to get value of arbitrary +counter using its name. + +For example "+rate_ctr.per_hour.bsc.0.handover:timeout+" is the number of handover timeouts per hour. + +Of course for that to work the program +in question have to register corresponding counter names and groups using +libosmocore functions. + +In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to +obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. + +The rate counter group name have to be prefixed with interval +specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" +or "*abs*" for absolute value. + +The old-style counters available via "+counter.*+" variables are superceeded by "+rate_ctr.abs+" +so its use is discouraged. +There might still be some applications not yet converted to rate_ctr. === Control Interface python example: `bsc_control.py` -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:29:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:29:44 +0000 Subject: [PATCH] libosmocore[master]: Improve get_rate_ctr() error handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5016 to look at the new patch set (#2). Improve get_rate_ctr() error handling Report back expected interval values. Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/5016/2 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 665239a..838a45a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -594,7 +594,7 @@ return CTRL_CMD_REPLY; } else { talloc_free(dup); - cmd->reply = "Wrong interval."; + cmd->reply = "Wrong interval. Expecting 'per_sec', 'per_min', 'per_hour', 'per_day' or 'abs' value."; goto err; } -- To view, visit https://gerrit.osmocom.org/5016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:38:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:38:33 +0000 Subject: osmo-hlr[master]: db_get_auth_data / db_get_auc: clarify return values In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:40:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:40:16 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) Please use bits.h in both files. https://gerrit.osmocom.org/#/c/4915/5/tests/gtp/gtpie_test.c File tests/gtp/gtpie_test.c: Line 11: #include Weird. I'm sure I've seen bits.h used in here before. -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 5 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:43:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:43:41 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4992 to look at the new patch set (#4). Add *.py from OsmoBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M README M osmopy/__init__.py A osmopy/osmo_ctrl.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 6 files changed, 705 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/4992/4 diff --git a/README b/README index b85f7c9..25be782 100644 --- a/README +++ b/README @@ -2,13 +2,15 @@ sudo python setup.py install If you prefer to have it cleanly removable, install checkinstall and run sudo checkinstall python setup.py install -Alternatively, just run 'pip install --user -e ./' +Alternatively, just run 'pip install --user -e ./' or 'pip3 install --user -e ./' +depending on your python version. Use -There are currently 3 scripts in this package: +There are currently following scripts in this package: osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) +soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,5 +26,7 @@ Libraries: osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts +osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework obscvty.py may be of general use. osmoutil.py probably isn't. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..b16e64a 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,12 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'osmo_ctrl', + 'soap' + 'twisted_ipa' 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py new file mode 100755 index 0000000..003f100 --- /dev/null +++ b/osmopy/osmo_ctrl.py @@ -0,0 +1,120 @@ +#!/usr/bin/python +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from optparse import OptionParser +from osmopy.osmo_ipa import Ctrl +import socket + +verbose = False + +def connect(host, port): + if verbose: + print "Connecting to host %s:%i" % (host, port) + + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def do_set_get(sck, var, value = None): + (r, c) = Ctrl().cmd(var, value) + sck.send(c) + answer = Ctrl().rem_header(sck.recv(4096)) + return (answer,) + Ctrl().verify(answer, r, var, value) + +def set_var(sck, var, val): + (a, _, _) = do_set_get(sck, var, val) + return a + +def get_var(sck, var): + (_, _, v) = do_set_get(sck, var) + return v + +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False + if len(data) != 0: + tail = data + while True: + (head, tail) = Ctrl().split_combined(tail) + print "Got message:", Ctrl().rem_header(head) + if len(tail) == 0: + break + return True + return False + +if __name__ == '__main__': + parser = OptionParser("Usage: %prog [options] var [value]") + parser.add_option("-d", "--host", dest="host", + help="connect to HOST", metavar="HOST") + parser.add_option("-p", "--port", dest="port", type="int", + help="use PORT", metavar="PORT", default=4249) + parser.add_option("-g", "--get", action="store_true", + dest="cmd_get", help="perform GET operation") + parser.add_option("-s", "--set", action="store_true", + dest="cmd_set", help="perform SET operation") + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", help="be verbose", default=False) + parser.add_option("-m", "--monitor", action="store_true", + dest="monitor", help="monitor the connection for traps", default=False) + + (options, args) = parser.parse_args() + + verbose = options.verbose + + if options.cmd_set and options.cmd_get: + parser.error("Get and set options are mutually exclusive!") + + if not (options.cmd_get or options.cmd_set or options.monitor): + parser.error("One of -m, -g, or -s must be set") + + if not (options.host): + parser.error("Destination host and port required!") + + sock = connect(options.host, options.port) + + if options.cmd_set: + if len(args) < 2: + parser.error("Set requires var and value arguments") + _leftovers(sock, socket.MSG_DONTWAIT) + print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + + if options.cmd_get: + if len(args) != 1: + parser.error("Get requires the var argument") + _leftovers(sock, socket.MSG_DONTWAIT) + (a, _, _) = do_set_get(sock, args[0]) + print "Got message:", a + + if options.monitor: + while True: + if not _leftovers(sock, 0): + print "Connection is gone." + break + sock.close() diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..da2943b --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "v0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..bb8323d --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging, sys + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..daff5ea 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,9 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/osmo_ctrl.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:44:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:44:16 +0000 Subject: [MERGED] osmo-hlr[master]: Remove unused check In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove unused check ...................................................................... Remove unused check We do not test on FreeBSD in jenkins anymore. Change-Id: I1578306244f6ee218e464a6c378ff60605cf1d5c --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d159db9..825d9ea 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,9 +38,7 @@ autoreconf --install --force ./configure --enable-external-tests $MAKE $PARALLEL_MAKE -if [ "x$label" != "xFreeBSD_amd64" ]; then - $MAKE check || cat-testlogs.sh - $MAKE distcheck || cat-testlogs.sh -fi +$MAKE check || cat-testlogs.sh +$MAKE distcheck || cat-testlogs.sh osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/4995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1578306244f6ee218e464a6c378ff60605cf1d5c Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 10:44:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 10:44:28 +0000 Subject: [MERGED] libosmocore[master]: Ctrl: add rate counter group introspection In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Ctrl: add rate counter group introspection ...................................................................... Ctrl: add rate counter group introspection Before user have to know group name and index in advance to request rate counter value. Introduce introspection function which allows user to obtain all the groups and their indexes by requesting 'rate_ctr.*' variable. This simplifies KPI dumping over ctrl interface. Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 07b17c9..665239a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -534,6 +534,19 @@ return CTRL_CMD_ERROR; } +static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) +{ + struct ctrl_cmd *cmd = data; + + cmd->reply = talloc_asprintf_append(cmd->reply, "%s.%u;", ctrg->desc->group_name_prefix, ctrg->idx); + if (!cmd->reply) { + cmd->reply = "OOM"; + return -1; + } + + return 0; +} + /* rate_ctr */ CTRL_CMD_DEFINE(rate_ctr, "rate_ctr *"); static int get_rate_ctr(struct ctrl_cmd *cmd, void *data) @@ -574,6 +587,11 @@ intv = RATE_CTR_INTV_HOUR; } else if (!strcmp(interval, "per_day")) { intv = RATE_CTR_INTV_DAY; + } else if (!strcmp(interval, "*")) { + intv = rate_ctr_for_each_group(ctrl_rate_ctr_group_handler, cmd); + if (intv < 0) + return CTRL_CMD_ERROR; + return CTRL_CMD_REPLY; } else { talloc_free(dup); cmd->reply = "Wrong interval."; -- To view, visit https://gerrit.osmocom.org/5017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:05:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 11:05:01 +0000 Subject: [PATCH] osmo-bsc[master]: tests: Fix selection of python version Message-ID: Review at https://gerrit.osmocom.org/5022 tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb --- M configure.ac M tests/Makefile.am M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/5022/1 diff --git a/configure.ac b/configure.ac index a66ed26..b7dd016 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then -AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 474f821..7b4656b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -47,8 +47,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..ccc6758 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py old mode 100644 new mode 100755 index 3ecfd39..8aa3dda --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/5022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:30:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 11:30:13 +0000 Subject: [PATCH] libosmocore[master]: ctrl: make response easier to parse Message-ID: Review at https://gerrit.osmocom.org/5023 ctrl: make response easier to parse Previously ctrl request for all counters in group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable description which is not regular enough and is hard to both parse and generate. The ctrl interface is intended for m2m, not for human interaction. Let's simplify things by making response similar to counter group request ('rate_ctr.*'). While at it, also log incorrect interval values - this should never happen with the current code, but if it ever does, we should log the error instead of silently returning 0. Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 17 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/5023/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 665239a..6459ce1 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -483,10 +483,13 @@ return ret; } -static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv) +static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv, const char *grp) { - if (intv >= RATE_CTR_INTV_NUM) + if (intv >= RATE_CTR_INTV_NUM) { + LOGP(DLCTRL, LOGL_ERROR, "Unexpected interval value %d while trying to get rate counter value in %s\n", + intv, grp); return 0; + } /* Absolute value */ if (intv == -1) { @@ -496,42 +499,21 @@ } } -static char *get_all_rate_ctr_in_group(void *ctx, const struct rate_ctr_group *ctrg, int intv) -{ - int i; - char *counters = talloc_strdup(ctx, ""); - if (!counters) - return NULL; - - for (i=0;idesc->num_ctr;i++) { - counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, - ctrg->desc->group_name_prefix, ctrg->idx, - ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv)); - if (!counters) - return NULL; - } - return counters; -} - static int get_rate_ctr_group_idx(const struct rate_ctr_group *ctrg, int intv, struct ctrl_cmd *cmd) { - char *counters; - - counters = get_all_rate_ctr_in_group(cmd, ctrg, intv); - if (!counters) - goto oom; - - cmd->reply = talloc_asprintf(cmd, "All counters in %s.%u%s", - ctrg->desc->group_name_prefix, ctrg->idx, counters); - talloc_free(counters); - if (!cmd->reply) - goto oom; + unsigned int i; + for (i = 0; i < ctrg->desc->num_ctr; i++) { + cmd->reply = talloc_asprintf_append(cmd->reply, "%s %"PRIu64";", + ctrg->desc->ctr_desc[i].name, + get_rate_ctr_value(&ctrg->ctr[i], intv, + ctrg->desc->group_name_prefix)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + } return CTRL_CMD_REPLY; -oom: - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; } static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) @@ -630,7 +612,7 @@ talloc_free(dup); - cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv)); + cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv, ctrg->desc->group_name_prefix)); if (!cmd->reply) goto oom; -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:36:26 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:36:26 +0000 Subject: [PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4779 to look at the new patch set (#2). vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_vty.c 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/79/4779/2 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..c7634fb 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int vty_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 9420d96..26ce300 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.vty_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -524,7 +524,7 @@ "Number options\n" "Endpoints available\n" "Number endpoints\n") { /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.vty_number_endpoints = atoi(argv[0]) + 1; return CMD_SUCCESS; } @@ -1280,6 +1280,7 @@ cfg->osmux_batch_size = OSMUX_BATCH_DEFAULT_MAX; g_cfg = cfg; + rc = vty_read_config_file(config_file, NULL); if (rc < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", @@ -1292,6 +1293,7 @@ return -1; } + g_cfg->trunk.number_endpoints = g_cfg->trunk.vty_number_endpoints; if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize the virtual trunk (%d endpoints)\n", @@ -1300,6 +1302,7 @@ } llist_for_each_entry(trunk, &g_cfg->trunks, entry) { + trunk->number_endpoints = trunk->vty_number_endpoints; if (mgcp_endpoints_allocate(trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize trunk %d (%d endpoints)\n", -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:37:41 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:37:41 +0000 Subject: [PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4779 to look at the new patch set (#3). vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Closes: OS#2632 Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_vty.c 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/79/4779/3 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..c7634fb 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int vty_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 9420d96..26ce300 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.vty_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -524,7 +524,7 @@ "Number options\n" "Endpoints available\n" "Number endpoints\n") { /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.vty_number_endpoints = atoi(argv[0]) + 1; return CMD_SUCCESS; } @@ -1280,6 +1280,7 @@ cfg->osmux_batch_size = OSMUX_BATCH_DEFAULT_MAX; g_cfg = cfg; + rc = vty_read_config_file(config_file, NULL); if (rc < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", @@ -1292,6 +1293,7 @@ return -1; } + g_cfg->trunk.number_endpoints = g_cfg->trunk.vty_number_endpoints; if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize the virtual trunk (%d endpoints)\n", @@ -1300,6 +1302,7 @@ } llist_for_each_entry(trunk, &g_cfg->trunks, entry) { + trunk->number_endpoints = trunk->vty_number_endpoints; if (mgcp_endpoints_allocate(trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, "Failed to initialize trunk %d (%d endpoints)\n", -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:41:52 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:41:52 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: use correct VTY port number constant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4836 to look at the new patch set (#3). cosmetic: use correct VTY port number constant osmo-mgw currently uses VTY port number constant of osmo-bsc_mgwp, however, libosmore now offers a constant specifically for osmo_mgw, which has the same value, but is intended to be used by osmo-mgw use the new port number constant for osmo-mgw Closes: OS#2628 Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Depends: libosmocore I1770787e697906322ce5815fcaadba06c01ddee9 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/36/4836/3 diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 20df923..227fc78 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -280,7 +280,7 @@ /* start telnet after reading config for vty_get_bind_addr() */ rc = telnet_init_dynif(tall_bsc_ctx, NULL, - vty_get_bind_addr(), OSMO_VTY_PORT_BSC_MGCP); + vty_get_bind_addr(), OSMO_VTY_PORT_MGW); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:44:12 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:44:12 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#3). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 956 insertions(+), 164 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/3 diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..ac86f52 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +340,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +708,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +778,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 7534d4a..f65395b 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,38 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unuque + * for the current this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_MAXLEN); + return 0; + } + } + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,22 +110,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -106,7 +133,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a326f00..17c24b1 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -466,9 +466,6 @@ break; case 'C': callid = (const char *)line + 3; - break; - case 'I': - conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -506,13 +503,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +550,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 451174d..9a55bc5 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,12 +555,84 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + memset(conn_id, 0, conn_id_len); + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\n') + conn_id[i] = '\0'; + } + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -568,6 +641,8 @@ cfg->policy_cb = mgcp_test_policy_cb; + memset(last_conn_id, 0, sizeof(last_conn_id)); + mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); for (i = 0; i < ARRAY_SIZE(tests); i++) { @@ -575,6 +650,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -583,7 +659,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -592,11 +668,16 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); if (dummy_packets) @@ -657,7 +738,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -682,6 +763,8 @@ { struct mgcp_config *cfg; int i; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -695,24 +778,31 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -733,6 +823,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -742,12 +833,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -762,7 +857,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -865,7 +960,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -875,7 +970,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1014,6 +1109,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1033,9 +1129,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1093,6 +1190,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1104,85 +1202,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,19 +1307,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1224,6 +1334,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1233,9 +1344,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1282,9 +1394,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:44:12 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:44:12 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#3). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 100 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/3 diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..5df7ab0 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_MAXLEN 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..cb2e796 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_MAXLEN]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..919da68 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_MAXLEN]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..7534d4a 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,11 +78,13 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); @@ -102,9 +104,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +128,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +149,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +172,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +244,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +254,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..656733c 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing) %s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty) %s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_MAXLEN) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) %s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x No connection found under ConnectionIdentifier %s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..a326f00 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..09739c1 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..451174d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -605,7 +605,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1033,9 +1033,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1111,7 +1111,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1125,7 +1125,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1139,7 +1139,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1153,7 +1153,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1170,7 +1170,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1182,7 +1182,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,7 +1199,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1211,7 +1211,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1233,9 +1233,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 24 11:44:12 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 11:44:12 +0000 Subject: [PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy Message-ID: Review at https://gerrit.osmocom.org/5024 client: use osmo_strlcpy instead of strncpy simplify null termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/1 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ac86f52..4b2ee91 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -201,8 +201,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index f65395b..b90a2b5 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:06:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:06:05 +0000 Subject: osmo-bsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) what was the cause for you needing this change? Apparently the tests work fine on our build slaves though they have both py2 and py3? I didn't face any such problems on my box either, AFAICT? (BTW, in general, an alternative could be to move to the osmo_verify_transcript_{vty,ctrl}.py way, as is used e.g. in osmo-hlr. Not sure about the more complex tests here though.) https://gerrit.osmocom.org/#/c/5022/1/tests/ctrl_test_runner.py File tests/ctrl_test_runner.py: Line 1: #!/usr/bin/env python2 I think I had a patch like this somewhere a longish time ago, and it failed on FreeBSD. IIUC we're not going to spend more effort on supporting FreeBSD ... and it would be easy to provide a symlink on such a system. So I'd be fine with this, just wanted to mention the history. -- To view, visit https://gerrit.osmocom.org/5022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:09:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:09:29 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 would be excellent to see in the commit log an example of what is returned before and after this patch. Tweaking the logging should rather be a separate patch. -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:18:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:18:03 +0000 Subject: osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) I see a number of other strcpy and strncpy instances around osmo-mgw.git. I think at some point I replaced all with osmo_strlcpy(), I wonder where all these are coming from now. Would you mind to replace all of the occurences in one fell swoop? src/libosmo-mgcp/mgcp_conn.c:107: strcpy(conn->name, name); src/libosmo-mgcp/mgcp_network.c:91: strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); src/libosmo-mgcp/mgcp_network.c:99: strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); src/libosmo-mgcp-client/mgcp_client.c:204: strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); src/libosmo-mgcp-client/mgcp_client.c:343: strncpy(strbuf, (const char*)msg->data, l); tests/mgcp_client/mgcp_client_test.c:49: strncpy(data, head, l); tests/mgcp_client/mgcp_client_test.c:56: strncpy(data, params, l); tests/mgcp_client/mgcp_client_test.c:69: strncpy(data, str, l); https://gerrit.osmocom.org/#/c/5024/1//COMMIT_MSG Commit Message: Line 9: simplify null termination of the ip_addr string (technically it's "nul termination", "null" refers to a NULL pointer. '\nul' is the string terminator. of course practically it's all just 0 anyway.) -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:38:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:38:53 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (3 comments) sorry to have to annoy once more, but it needs to be safe plz https://gerrit.osmocom.org/#/c/4779/3/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 1283: unrelated ws Line 1296: g_cfg->trunk.number_endpoints = g_cfg->trunk.vty_number_endpoints; -1: rather assign the number of allocated endpoints only after allocation, otherwise we will have a similar problem of for-loops iterating over an array that has not been allocated. Line 1305: trunk->number_endpoints = trunk->vty_number_endpoints; same -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:42:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:42:26 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4779/3/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 1296: g_cfg->trunk.number_endpoints = g_cfg->trunk.vty_number_endpoints; > -1: rather assign the number of allocated endpoints only after allocation, hmm ok, I see the mgcp_endpoints_allocate() kind of uses the number_endpoints as argument. Technically the cleanest approach would be to change the API to pass the number that should be allocated as argument to the function, but in terms of least code change you could also set number_endpoints = 0 in case of error. -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:45:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 12:45:13 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4779/3/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 1296: g_cfg->trunk.number_endpoints = g_cfg->trunk.vty_number_endpoints; > hmm ok, I see the mgcp_endpoints_allocate() kind of uses the number_endpoin or duh, use vty_number_endpoints in mgcp_endpoints_allocate() of course -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:54:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 12:54:29 +0000 Subject: [PATCH] libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5023 to look at the new patch set (#2). ctrl: make response easier to parse Previously ctrl request for all counters in group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable description which is not regular enough and is hard to both parse and generate. The ctrl interface is intended for m2m, not for human interaction. Let's simplify things by making response similar to counter group request ('rate_ctr.*'). Reply now looks as follows: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 loc_update_type:attach 0;loc_update_type:normal 0; Previously it was: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 All counters in msc.0 loc_update_type:attach 0 loc_update_type:normal 0 Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 11 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/5023/2 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 590f74d..6459ce1 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -499,42 +499,21 @@ } } -static char *get_all_rate_ctr_in_group(void *ctx, const struct rate_ctr_group *ctrg, int intv) -{ - int i; - char *counters = talloc_strdup(ctx, ""); - if (!counters) - return NULL; - - for (i=0;idesc->num_ctr;i++) { - counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, - ctrg->desc->group_name_prefix, ctrg->idx, - ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); - if (!counters) - return NULL; - } - return counters; -} - static int get_rate_ctr_group_idx(const struct rate_ctr_group *ctrg, int intv, struct ctrl_cmd *cmd) { - char *counters; - - counters = get_all_rate_ctr_in_group(cmd, ctrg, intv); - if (!counters) - goto oom; - - cmd->reply = talloc_asprintf(cmd, "All counters in %s.%u%s", - ctrg->desc->group_name_prefix, ctrg->idx, counters); - talloc_free(counters); - if (!cmd->reply) - goto oom; + unsigned int i; + for (i = 0; i < ctrg->desc->num_ctr; i++) { + cmd->reply = talloc_asprintf_append(cmd->reply, "%s %"PRIu64";", + ctrg->desc->ctr_desc[i].name, + get_rate_ctr_value(&ctrg->ctr[i], intv, + ctrg->desc->group_name_prefix)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + } return CTRL_CMD_REPLY; -oom: - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; } static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:54:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 12:54:31 +0000 Subject: [PATCH] libosmocore[master]: ctrl: log incorrect interval values Message-ID: Review at https://gerrit.osmocom.org/5025 ctrl: log incorrect interval values This should never happen with the current code, but if it ever does, we should log the error instead of silently returning 0. Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/5025/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 665239a..590f74d 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -483,10 +483,13 @@ return ret; } -static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv) +static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv, const char *grp) { - if (intv >= RATE_CTR_INTV_NUM) + if (intv >= RATE_CTR_INTV_NUM) { + LOGP(DLCTRL, LOGL_ERROR, "Unexpected interval value %d while trying to get rate counter value in %s\n", + intv, grp); return 0; + } /* Absolute value */ if (intv == -1) { @@ -507,7 +510,7 @@ counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, ctrg->desc->group_name_prefix, ctrg->idx, ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv)); + get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); if (!counters) return NULL; } @@ -630,7 +633,7 @@ talloc_free(dup); - cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv)); + cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv, ctrg->desc->group_name_prefix)); if (!cmd->reply) goto oom; -- To view, visit https://gerrit.osmocom.org/5025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:58:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 12:58:19 +0000 Subject: [PATCH] osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5021 to look at the new patch set (#2). vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M include/osmocom/bsc/gsm_data_shared.h M include/osmocom/bsc/rest_octets.h M src/libbsc/bsc_vty.c M src/libbsc/rest_octets.c M src/libbsc/system_information.c M src/libcommon/gsm_data.c 6 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/5021/2 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 240be1c..04669e2 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -885,6 +885,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 568505a..876e0ab 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -49,6 +49,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + bool early_cm_restrict_3g; bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3ddd5de..71c2cef 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -278,8 +278,11 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); - vty_out(vty, "Early Classmark Sending: %s%s", + vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? + " (forbidden by 2G bit)" : "", VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -653,6 +656,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2789,6 +2794,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4310,6 +4331,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index abd621c..3780be2 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -499,9 +499,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, H); + else + bitvec_set_bit(&bv, L); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index d54dad8..610bf61 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -825,6 +825,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = true, .si2quater_indicator = false, .lsa_params = { .present = 0, @@ -871,6 +872,7 @@ si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index e085aa6..ef72881 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -269,6 +269,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:58:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 12:58:19 +0000 Subject: [PATCH] osmo-bsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5022 to look at the new patch set (#2). tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb --- M configure.ac M tests/Makefile.am M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/5022/2 diff --git a/configure.ac b/configure.ac index a66ed26..b7dd016 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then -AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 474f821..7b4656b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -47,8 +47,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index 2e59e13..ccc6758 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py old mode 100644 new mode 100755 index 3ecfd39..8aa3dda --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/5022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 12:58:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 12:58:20 +0000 Subject: [PATCH] osmo-bsc[master]: Use type bool for boolean fields in gsm48_si_ro_info Message-ID: Review at https://gerrit.osmocom.org/5026 Use type bool for boolean fields in gsm48_si_ro_info Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c --- M include/osmocom/bsc/rest_octets.h M src/libbsc/system_information.c 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/5026/1 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index e6e5303..568505a 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -41,15 +41,15 @@ struct gsm48_si_ro_info { struct gsm48_si_selection_params selection_params; struct gsm48_si_power_offset power_offset; - uint8_t si2ter_indicator; - uint8_t early_cm_ctrl; + bool si2ter_indicator; + bool early_cm_ctrl; struct { uint8_t where:3, present:1; } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ - uint8_t si2quater_indicator; + bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; uint16_t cell_id; diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 91e993d..d54dad8 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -815,8 +815,8 @@ .power_offset = { .present = 0, }, - .si2ter_indicator = 0, - .early_cm_ctrl = 1, + .si2ter_indicator = false, + .early_cm_ctrl = true, .scheduling = { .present = 0, }, @@ -825,7 +825,7 @@ .ra_colour = 0, .present = 1, }, - .si2quater_indicator = 0, + .si2quater_indicator = false, .lsa_params = { .present = 0, }, @@ -859,16 +859,16 @@ if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); - si_info.si2ter_indicator = 1; + si_info.si2ter_indicator = true; } else { - si_info.si2ter_indicator = 0; + si_info.si2ter_indicator = false; } if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) { LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n", si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length); - si_info.si2quater_indicator = 1; + si_info.si2quater_indicator = true; } else { - si_info.si2quater_indicator = 0; + si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; -- To view, visit https://gerrit.osmocom.org/5026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:01:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 13:01:53 +0000 Subject: osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 2: I leave here for the record the rationale for implementing 2 cmds instead of 1: "Regarding the early-classmark-3g option, I'm not entirely sure I like the idea of using only 1 cmd line, because then we have different behaviour depending on whether the cmd is set or not, and otherwise we break old behaviour. I explain: currently default behaviour is early_cm=0 and early_cm_3g=1 (hardcoded, ie. control depends on early_cm). If we use (allowed|2g-only|forbidden), then we get combinations: (1,1)|(1,0)|(0,0), but we get combination (0,1) (the current old behavior) if no option is set. And then in that case if running-config is saved, it would be saved as "forbidden", which next time the bsc is started it would be handled as (0,0), which would change the behaviour on the bits sent to the MS. Unless I use "forbidden" always as "(0,1)", which would always work, but still we miss the case to specifically send through te wire the (0,0) scenario." -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:08:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:08:36 +0000 Subject: osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5021/1/src/libbsc/system_information.c File src/libbsc/system_information.c: PS1, Line 875: s > According to specs in 44.018: Don't ever treat L as 0 and H as 1. 0/1/L/H are completely different symbols next to each other! In your code, the "si_info.early_cm_restrict_3g" variable means "restrict the phone from ever sending a 3G classmark in early classmark sending" And if that variable is true, then you shall encode that as "L" symbol. If the variable is false, you encode that as "H", meaning "don't restrict 3G early classmark sending when early_classmark is enabled". -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:10:21 +0000 Subject: osmo-bsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:11:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:11:25 +0000 Subject: osmo-bsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:12:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:12:03 +0000 Subject: libosmocore[master]: ctrl: log incorrect interval values In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:13:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:13:15 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 looks fine to me. I just hope we don't break any existing uses of the interface. Holger? Neels? -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:15:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:15:56 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:17:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:17:26 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:18:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:18:00 +0000 Subject: osmo-bsc[master]: cosmetic: correct sourcecode formatting In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4982 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia117e4099046fefcf35ccb94400554062e667869 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:18:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:18:46 +0000 Subject: osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:19:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:19:38 +0000 Subject: osmo-bsc[master]: cosmetic: add missing log prefix In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4981 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:19:59 +0000 Subject: osmo-bsc[master]: cosmetic: use fsm pointer from parameter list In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:20:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:20:21 +0000 Subject: osmo-bsc[master]: cosmetic: do not cast void pointer In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 should we really spend our time on this? -- To view, visit https://gerrit.osmocom.org/4984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:20:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:20:46 +0000 Subject: osmo-bsc[master]: mgcp: add missing switch case In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4983 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:20:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:20:56 +0000 Subject: osmo-msc[master]: cosmetic: add missing spaces In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4979 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c11abaeff62749cbc365dfef671c4e15a85fc95 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 13:21:18 +0000 Subject: [MERGED] libosmocore[master]: ctrl: log incorrect interval values In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: ctrl: log incorrect interval values ...................................................................... ctrl: log incorrect interval values This should never happen with the current code, but if it ever does, we should log the error instead of silently returning 0. Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 665239a..590f74d 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -483,10 +483,13 @@ return ret; } -static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv) +static uint64_t get_rate_ctr_value(const struct rate_ctr *ctr, int intv, const char *grp) { - if (intv >= RATE_CTR_INTV_NUM) + if (intv >= RATE_CTR_INTV_NUM) { + LOGP(DLCTRL, LOGL_ERROR, "Unexpected interval value %d while trying to get rate counter value in %s\n", + intv, grp); return 0; + } /* Absolute value */ if (intv == -1) { @@ -507,7 +510,7 @@ counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, ctrg->desc->group_name_prefix, ctrg->idx, ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv)); + get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); if (!counters) return NULL; } @@ -630,7 +633,7 @@ talloc_free(dup); - cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv)); + cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv, ctrg->desc->group_name_prefix)); if (!cmd->reply) goto oom; -- To view, visit https://gerrit.osmocom.org/5025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:22:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:22:06 +0000 Subject: osmo-gsm-tester[master]: hlr: Rename conf_for API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4996 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:22:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:22:14 +0000 Subject: osmo-gsm-tester[master]: resources.conf: Add gprs feature for EC20 modem In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4999 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:22:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:22:33 +0000 Subject: osmo-gsm-tester[master]: modem: Abstract the list of required ofono interfaces In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:22:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:22:44 +0000 Subject: osmo-gsm-tester[master]: modem: Move power off sequence to separate method In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:22:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:22:55 +0000 Subject: osmo-gsm-tester[master]: defaults.conf: Add PDCH channels to test GPRS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5000 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:24:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:24:46 +0000 Subject: osmo-gsm-tester[master]: Add OsmoGgsn class In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5001/1/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl: PS1, Line 55: 2001:780:44:2000:0:0:0:0/56 it would be good to use IPv6 prefixes that are not public IPv6 addresses that are routed/allocated to me personally. We could use ULA allocations for this purpose: https://en.wikipedia.org/wiki/Unique_local_address -- To view, visit https://gerrit.osmocom.org/5001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:25:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:25:05 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:25:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:25:19 +0000 Subject: osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:25:26 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 Nov 2017 13:25:26 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/vty_interface.c: fix Kc / Ki confusion Message-ID: Review at https://gerrit.osmocom.org/5027 mobile/vty_interface.c: fix Kc / Ki confusion Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/27/5027/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index cbf8162..3703ac5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2523,7 +2523,7 @@ #define HEX_STR "\nByte as two digits hexadecimal" DEFUN(cfg_test_ki_xor, cfg_test_ki_xor_cmd, "ki xor HEX HEX HEX HEX HEX HEX " "HEX HEX HEX HEX HEX HEX", - "Set Key (Kc) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR + "Set Key (Ki) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR) { struct osmocom_ms *ms = vty->index; @@ -2551,7 +2551,7 @@ DEFUN(cfg_test_ki_comp128, cfg_test_ki_comp128_cmd, "ki comp128 HEX HEX HEX " "HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX", - "Set Key (Kc) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR + "Set Key (Ki) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR) { -- To view, visit https://gerrit.osmocom.org/5027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:26:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:26:39 +0000 Subject: osmo-gsm-tester[master]: Add OsmoSgsn class In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5002/1/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl: PS1, Line 15: ggsn_tun_ip_address why is this called ggsn_tun_ip_address? This is not the address of a tun device. It is merely the GTP address? -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:26:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:26:55 +0000 Subject: osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:28:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 13:28:04 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 I am not aware of any programs querying rate counters, but the vague impression that some might exist still lingers... maybe ask lynxis and CCM guys? -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:30:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:30:49 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (6 comments) https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl: PS1, Line 65: gprs probably one would want to have a template here to decide if GPRS or EGPRS shall be used / tested ? PS1, Line 66: 0 I'm not sure if RAC=0 is valid. LAC=0 has special meaning (MS detached), so RAC=0 could also have special meaning? Probably easiest to use a different value just in case (quicker than extensive spec review). Also, it might be useful to have it as template variable, like LAC? PS1, Line 68: 1800 the BVCI must be different for each BTS/PCU that connects to the SGSN. My "poor man solution" is to always set it to the same as the unit_id, they both are 16bit, IIRC. PS1, Line 80: 1800 see BVCI above. must also be unique for each PCU connecting to the SGSN. For ease-of-use, set to BVCI value. PS1, Line 88: 1800 see BVCI and NSEI discussion https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl: PS1, Line 56: 180 see comments for BSC -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:31:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:31:04 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:31:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:31:17 +0000 Subject: osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:31:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:31:34 +0000 Subject: osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:31:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:31:46 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:31:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:31:55 +0000 Subject: osmo-gsm-tester[master]: default-suites.conf: Use same order for sysmocell5000 as for... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:32:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:32:02 +0000 Subject: osmo-gsm-tester[master]: default-suites.conf: Add gprs suite In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:32:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:32:48 +0000 Subject: libosmocore[master]: Improve get_rate_ctr() error handling In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:33:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:33:05 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: fix Kc / Ki confusion In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:33:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:33:06 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/vty_interface.c: fix Kc / Ki confusion In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/vty_interface.c: fix Kc / Ki confusion ...................................................................... mobile/vty_interface.c: fix Kc / Ki confusion Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index cbf8162..3703ac5 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2523,7 +2523,7 @@ #define HEX_STR "\nByte as two digits hexadecimal" DEFUN(cfg_test_ki_xor, cfg_test_ki_xor_cmd, "ki xor HEX HEX HEX HEX HEX HEX " "HEX HEX HEX HEX HEX HEX", - "Set Key (Kc) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR + "Set Key (Ki) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR) { struct osmocom_ms *ms = vty->index; @@ -2551,7 +2551,7 @@ DEFUN(cfg_test_ki_comp128, cfg_test_ki_comp128_cmd, "ki comp128 HEX HEX HEX " "HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX HEX", - "Set Key (Kc) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR + "Set Key (Ki) on test card\nUse XOR algorithm" HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR HEX_STR) { -- To view, visit https://gerrit.osmocom.org/5027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibbd1d080896b5cadc3d4281fe8f839a103a35088 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:34:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 13:34:38 +0000 Subject: osmo-mgw[master]: cosmetic: use correct VTY port number constant In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:34:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 13:34:48 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 2: Note: only bulk-request is affected, requesting individual counter by name works exactly as before. -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 13:41:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 13:41:02 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) I agree that human readable prose are not really fit for the CTRL response, but about parsing ease: it is easy to split by '\n' and ignore the first line. With this patch (we separate the value part and then) split the value by ';' to get the same result AFAICT; so there is no really profound improvement that justifies breaking compat, is there? -1: found a talloc problem... https://gerrit.osmocom.org/#/c/5023/2/src/ctrl/control_if.c File src/ctrl/control_if.c: Line 506: cmd->reply = talloc_asprintf_append(cmd->reply, "%s %"PRIu64";", -1: before, this code did a talloc_asprintf() to bootstrap the cmd->reply from the cmd talloc context, now you start with appending to a NULL pointer. Instead, best use the ctrl_cmd_reply_printf() that you made me add to libosmocore ;) -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:04:00 +0000 Subject: osmo-sgsn[master]: use default point-code as listed on Point_Codes wiki page In-Reply-To: References: Message-ID: Patch Set 1: agreed on need for proper point codes infrastructure -- To view, visit https://gerrit.osmocom.org/5019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:04:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:04:07 +0000 Subject: [MERGED] osmo-sgsn[master]: use default point-code as listed on Point_Codes wiki page In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: use default point-code as listed on Point_Codes wiki page ...................................................................... use default point-code as listed on Point_Codes wiki page see https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 --- M src/gprs/sgsn_main.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index 8cd68ff..fe4192b 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -502,8 +502,9 @@ } #if BUILD_IU + /* Note that these are mostly defaults and can be overriden from the VTY */ sccp = osmo_sccp_simple_client(tall_bsc_ctx, "OsmoSGSN", - 2 /* FIXME: configurable */, + (23 << 3) + 4, OSMO_SS7_ASP_PROT_M3UA, 0, NULL, 0, "127.0.0.1"); -- To view, visit https://gerrit.osmocom.org/5019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:05:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:05:16 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: auto-config local and remote PCs if omitted In-Reply-To: References: Message-ID: Patch Set 2: leaving proper point-code defaults infrastructure to another patch, first fixing the wrong defaults... -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:05:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:05:18 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: auto-config local and remote PCs if omitted In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-hnbgw: auto-config local and remote PCs if omitted ...................................................................... osmo-hnbgw: auto-config local and remote PCs if omitted The current default point-code for OsmoMSC is 0.23.1 and for OsmoSGSN 0.23.4. See https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes. Before this patch, osmo-hnbgw requires a cs7 config and explicit point-codes for MSC and SGSN as well as a local one. Provide default config if none is provided: Use above default point-codes if no MSC and/or SGSN address are provided. Also create a default cs7 instance with local PC 0.23.5. This allows completely omitting cs7 instance and SCCP addresses from osmo-hnbgw.cfg in a single-box setup. Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 --- M src/hnbgw_cn.c 1 file changed, 15 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index a48b651..eba05a4 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -410,13 +410,16 @@ } static int resolve_addr_name(struct osmo_sccp_addr *dest, struct osmo_ss7_instance **ss7, - const char *addr_name, const char *label) + const char *addr_name, const char *label, + uint32_t default_pc) { struct osmo_ss7_instance *ss7_tmp; if (!addr_name) { - LOGP(DMAIN, LOGL_ERROR, "Missing config: %s remote-addr\n", label); - return -1; + osmo_sccp_make_addr_pc_ssn(dest, default_pc, OSMO_SCCP_SSN_RANAP); + LOGP(DMAIN, LOGL_INFO, "%s remote addr not configured, using default: %s\n", label, + osmo_sccp_addr_name(*ss7, dest)); + return 0; } ss7_tmp = osmo_sccp_addr_by_name(dest, addr_name); @@ -458,12 +461,19 @@ ss7 = NULL; if (resolve_addr_name(&gw->sccp.iucs_remote_addr, &ss7, - gw->config.iucs_remote_addr_name, "IuCS")) + gw->config.iucs_remote_addr_name, "IuCS", (23 << 3) + 1)) return -1; if (resolve_addr_name(&gw->sccp.iups_remote_addr, &ss7, - gw->config.iups_remote_addr_name, "IuPS")) + gw->config.iups_remote_addr_name, "IuPS", (23 << 3) + 4)) return -1; + if (!ss7) { + LOGP(DRANAP, LOGL_NOTICE, "No cs7 instance configured for IuCS nor IuPS," + " creating default instance\n"); + ss7 = osmo_ss7_instance_find_or_create(gw, 0); + ss7->cfg.primary_pc = (23 << 3) + 5; + } + if (!osmo_ss7_pc_is_valid(ss7->cfg.primary_pc)) { LOGP(DMAIN, LOGL_ERROR, "IuCS/IuPS uplink cannot be setup: CS7 instance %d has no point-code set\n", ss7->cfg.id); -- To view, visit https://gerrit.osmocom.org/4977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I056547f26858d3ad52e66a15f7a4273dcc300e97 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:05:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:05:31 +0000 Subject: [MERGED] osmo-msc[master]: use only 0.23.1 as point code for both A and Iu In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: use only 0.23.1 as point code for both A and Iu ...................................................................... use only 0.23.1 as point code for both A and Iu We usually have both A and IuCS on 0.23.1, using differing SSNs. 0.23.2 was used only if there was a separate cs7 instance for Iu, which is not practical, and even if used does not conflict with 0.23.1 (since it would be on a different STP). Just use 0.23.1 for all SCCP clients. This needs adjustment of https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes Change-Id: I3d5466eff5680cb5aa95a76a9e179fdf88ce8aa0 --- M src/osmo-msc/msc_main.c 1 file changed, 5 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 5c192e8..b4bafd5 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -312,9 +312,7 @@ #endif #define DEFAULT_M3UA_REMOTE_IP "127.0.0.1" -#define DEFAULT_PC_A "0.23.1" -#define DEFAULT_PC_IU "0.23.2" -#define DEFAULT_PC_A_IU DEFAULT_PC_A +#define DEFAULT_PC "0.23.1" static struct osmo_sccp_instance *sccp_setup(void *ctx, uint32_t cs7_instance, const char *label, const char *default_pc_str) @@ -344,7 +342,7 @@ * Iu and A at the same time, under the same point-code */ LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = Iu = %u\n", cs7_instance_a); - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A-Iu", DEFAULT_PC_A_IU); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A-Iu", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; @@ -355,17 +353,17 @@ LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = %u, Iu = %u\n", cs7_instance_a, cs7_instance_iu); - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC_A); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; - msc_network->iu.sccp = sccp_setup(ctx, cs7_instance_iu, "OsmoMSC-Iu", DEFAULT_PC_IU); + msc_network->iu.sccp = sccp_setup(ctx, cs7_instance_iu, "OsmoMSC-Iu", DEFAULT_PC); if (!msc_network->iu.sccp) return -EINVAL; } #else /* No Iu support, just open up an A instance */ - msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC_A); + msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC); if (!msc_network->a.sccp) return -EINVAL; #endif -- To view, visit https://gerrit.osmocom.org/5020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d5466eff5680cb5aa95a76a9e179fdf88ce8aa0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:05:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 14:05:42 +0000 Subject: [MERGED] osmo-iuh[master]: cosmetic: osmo-hnbgw: log remote SCCP addresses on startup In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: osmo-hnbgw: log remote SCCP addresses on startup ...................................................................... cosmetic: osmo-hnbgw: log remote SCCP addresses on startup Change-Id: I6395dcde35359617cae52ff59d4eb53930097c7d --- M src/hnbgw_cn.c 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index eba05a4..c48f4b7 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -506,6 +506,11 @@ return -1; } + LOGP(DRANAP, LOGL_NOTICE, "Remote SCCP addr: IuCS: %s\n", + osmo_sccp_addr_name(ss7, &gw->sccp.iucs_remote_addr)); + LOGP(DRANAP, LOGL_NOTICE, "Remote SCCP addr: IuPS: %s\n", + osmo_sccp_addr_name(ss7, &gw->sccp.iups_remote_addr)); + /* In sccp_sap_up() we expect the cnlink in the user's priv. */ osmo_sccp_user_set_priv(cnlink->sccp_user, cnlink); -- To view, visit https://gerrit.osmocom.org/4978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6395dcde35359617cae52ff59d4eb53930097c7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:08:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 Nov 2017 14:08:44 +0000 Subject: [PATCH] osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5021 to look at the new patch set (#3). vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M include/osmocom/bsc/gsm_data_shared.h M include/osmocom/bsc/rest_octets.h M src/libbsc/bsc_vty.c M src/libbsc/rest_octets.c M src/libbsc/system_information.c M src/libcommon/gsm_data.c 6 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/5021/3 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 240be1c..04669e2 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -885,6 +885,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 568505a..876e0ab 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -49,6 +49,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + bool early_cm_restrict_3g; bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3ddd5de..71c2cef 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -278,8 +278,11 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); - vty_out(vty, "Early Classmark Sending: %s%s", + vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? + " (forbidden by 2G bit)" : "", VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -653,6 +656,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2789,6 +2794,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4310,6 +4331,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index abd621c..7c6d7cd 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -499,9 +499,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index d54dad8..c1b0d49 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -825,6 +825,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = false, .si2quater_indicator = false, .lsa_params = { .present = 0, @@ -871,6 +872,7 @@ si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = !bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index e085aa6..ef72881 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -269,6 +269,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:13:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:13:31 +0000 Subject: [PATCH] libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5023 to look at the new patch set (#3). ctrl: make response easier to parse Previously ctrl request for all counters in group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable description which is not regular enough and is hard to both parse and generate. The ctrl interface is intended for m2m, not for human interaction. Let's simplify things by making response similar to counter group request ('rate_ctr.*'). Reply now looks as follows: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 loc_update_type:attach 0;loc_update_type:normal 0; Previously it was: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 All counters in msc.0 loc_update_type:attach 0 loc_update_type:normal 0 Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 9 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/5023/3 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 590f74d..89dcf7c 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -499,42 +499,19 @@ } } -static char *get_all_rate_ctr_in_group(void *ctx, const struct rate_ctr_group *ctrg, int intv) -{ - int i; - char *counters = talloc_strdup(ctx, ""); - if (!counters) - return NULL; - - for (i=0;idesc->num_ctr;i++) { - counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, - ctrg->desc->group_name_prefix, ctrg->idx, - ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); - if (!counters) - return NULL; - } - return counters; -} - static int get_rate_ctr_group_idx(const struct rate_ctr_group *ctrg, int intv, struct ctrl_cmd *cmd) { - char *counters; - - counters = get_all_rate_ctr_in_group(cmd, ctrg, intv); - if (!counters) - goto oom; - - cmd->reply = talloc_asprintf(cmd, "All counters in %s.%u%s", - ctrg->desc->group_name_prefix, ctrg->idx, counters); - talloc_free(counters); - if (!cmd->reply) - goto oom; + unsigned int i; + for (i = 0; i < ctrg->desc->num_ctr; i++) { + ctrl_cmd_reply_printf(cmd, "%s %"PRIu64";", ctrg->desc->ctr_desc[i].name, + get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + } return CTRL_CMD_REPLY; -oom: - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; } static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:19:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:19:26 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 3: > ctrl_cmd_reply_printf() Doh! Completely forgot about it. Good point. > it is easy to split by '\n' and ignore the first line And it's even easier if we don't have to put workarounds for weird format. I don't really think we're breaking compat in here: until ae510dc4a743e981b40fc5e1fdb4c109f2425e27 (2 months ago) it was broken anyway. -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:28:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:28:22 +0000 Subject: [MERGED] libosmocore[master]: Improve get_rate_ctr() error handling In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Improve get_rate_ctr() error handling ...................................................................... Improve get_rate_ctr() error handling Report back expected interval values. Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 590f74d..38e7aef 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -597,7 +597,7 @@ return CTRL_CMD_REPLY; } else { talloc_free(dup); - cmd->reply = "Wrong interval."; + cmd->reply = "Wrong interval. Expecting 'per_sec', 'per_min', 'per_hour', 'per_day' or 'abs' value."; goto err; } -- To view, visit https://gerrit.osmocom.org/5016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:40:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:40:42 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4992 to look at the new patch set (#5). Add *.py from OsmoBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M README M osmopy/__init__.py A osmopy/osmo_ctrl.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 6 files changed, 705 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/4992/5 diff --git a/README b/README index b85f7c9..25be782 100644 --- a/README +++ b/README @@ -2,13 +2,15 @@ sudo python setup.py install If you prefer to have it cleanly removable, install checkinstall and run sudo checkinstall python setup.py install -Alternatively, just run 'pip install --user -e ./' +Alternatively, just run 'pip install --user -e ./' or 'pip3 install --user -e ./' +depending on your python version. Use -There are currently 3 scripts in this package: +There are currently following scripts in this package: osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) +soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,5 +26,7 @@ Libraries: osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts +osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework obscvty.py may be of general use. osmoutil.py probably isn't. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..b760111 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,12 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'osmo_ctrl', + 'soap', + 'twisted_ipa', 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py new file mode 100755 index 0000000..003f100 --- /dev/null +++ b/osmopy/osmo_ctrl.py @@ -0,0 +1,120 @@ +#!/usr/bin/python +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from optparse import OptionParser +from osmopy.osmo_ipa import Ctrl +import socket + +verbose = False + +def connect(host, port): + if verbose: + print "Connecting to host %s:%i" % (host, port) + + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def do_set_get(sck, var, value = None): + (r, c) = Ctrl().cmd(var, value) + sck.send(c) + answer = Ctrl().rem_header(sck.recv(4096)) + return (answer,) + Ctrl().verify(answer, r, var, value) + +def set_var(sck, var, val): + (a, _, _) = do_set_get(sck, var, val) + return a + +def get_var(sck, var): + (_, _, v) = do_set_get(sck, var) + return v + +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False + if len(data) != 0: + tail = data + while True: + (head, tail) = Ctrl().split_combined(tail) + print "Got message:", Ctrl().rem_header(head) + if len(tail) == 0: + break + return True + return False + +if __name__ == '__main__': + parser = OptionParser("Usage: %prog [options] var [value]") + parser.add_option("-d", "--host", dest="host", + help="connect to HOST", metavar="HOST") + parser.add_option("-p", "--port", dest="port", type="int", + help="use PORT", metavar="PORT", default=4249) + parser.add_option("-g", "--get", action="store_true", + dest="cmd_get", help="perform GET operation") + parser.add_option("-s", "--set", action="store_true", + dest="cmd_set", help="perform SET operation") + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", help="be verbose", default=False) + parser.add_option("-m", "--monitor", action="store_true", + dest="monitor", help="monitor the connection for traps", default=False) + + (options, args) = parser.parse_args() + + verbose = options.verbose + + if options.cmd_set and options.cmd_get: + parser.error("Get and set options are mutually exclusive!") + + if not (options.cmd_get or options.cmd_set or options.monitor): + parser.error("One of -m, -g, or -s must be set") + + if not (options.host): + parser.error("Destination host and port required!") + + sock = connect(options.host, options.port) + + if options.cmd_set: + if len(args) < 2: + parser.error("Set requires var and value arguments") + _leftovers(sock, socket.MSG_DONTWAIT) + print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + + if options.cmd_get: + if len(args) != 1: + parser.error("Get requires the var argument") + _leftovers(sock, socket.MSG_DONTWAIT) + (a, _, _) = do_set_get(sock, args[0]) + print "Got message:", a + + if options.monitor: + while True: + if not _leftovers(sock, 0): + print "Connection is gone." + break + sock.close() diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..f1da8f2 --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..bb8323d --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging, sys + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..daff5ea 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,9 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/osmo_ctrl.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:40:43 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:40:43 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix parsing for python3 Message-ID: Review at https://gerrit.osmocom.org/5028 Fix parsing for python3 In python3 we got bytes, not string from the socket so we have to use bytes argument for split(). Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M osmopy/osmo_ipa.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/1 diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..e3db561 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -237,12 +237,12 @@ var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) + (s, i, v) = data.split(b' ', 2) if s == self.CTRL_ERR: return None, v if s == self.CTRL_GET: return v, None - (s, i, var, val) = data.split(' ', 3) + (s, i, var, val) = data.split(b' ', 3) if s == self.CTRL_TRAP and i != '0': return None, '%s with non-zero id %s' % (s, i) if op is not None and i != op: -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 14:40:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 14:40:44 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper Message-ID: Review at https://gerrit.osmocom.org/5029 Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M osmopy/__init__.py A osmopy/rate_ctr2csv.py M setup.py 4 files changed, 86 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/1 diff --git a/README b/README index 25be782..64142f9 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +rate_ctr2csv.py - rate counter dumper on top of osmo_ipa Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..bb8cea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -6,6 +6,7 @@ 'osmo_ipa', 'osmo_ctrl', 'soap', + 'rate_ctr2csv', 'twisted_ipa', 'osmo_interact_common', 'osmo_interact_vty', diff --git a/osmopy/rate_ctr2csv.py b/osmopy/rate_ctr2csv.py new file mode 100755 index 0000000..1fe13bb --- /dev/null +++ b/osmopy/rate_ctr2csv.py @@ -0,0 +1,83 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse(sck.recv(4096)) + + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(b';'): + if len(ctr): + (k, v) = ctr.decode().split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + if args.header: + args.output.write('group,counter,absolute,second,minute,hour,day\n') + + total = 0 + for group in g.split(b';'): + if len(group): + g_counters = {} + total += 1 + list(map(lambda x: get_interval(group.decode(), g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day'))) + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + args.output.write('%s,%s,%s,%s,%s,%s,%s\n' % (gr, k, absolute, per_sec, per_min, per_hour, per_day)) + + log.info('Completed: %d groups processed.' % total) + sock.close() diff --git a/setup.py b/setup.py index daff5ea..864992d 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", "osmopy/soap.py", + "osmopy/rate_ctr2csv.py", "osmopy/osmo_ctrl.py", "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 15:09:30 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 24 Nov 2017 15:09:30 +0000 Subject: [PATCH] osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... Message-ID: Review at https://gerrit.osmocom.org/5030 DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/5030/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c388c82..5a7775a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1359,7 +1359,7 @@ tall_bts_ctx, lchan, LOGL_DEBUG, - lchan->name); + "DTX-DL-FSM"); return 0; } -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:27:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:27:24 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (8 comments) https://gerrit.osmocom.org/#/c/4906/3/include/osmocom/mgcp/mgcp_common.h File include/osmocom/mgcp/mgcp_common.h: Line 73: #define MGCP_CONN_ID_MAXLEN 32+1 (technically this is the SIZE, and MAXLEN would be 32 ... but whatever. In other places we use e.g. GSM_IMSI_LENGTH which contains the +1) https://gerrit.osmocom.org/#/c/4906/3/include/osmocom/mgcp_client/mgcp_client.h File include/osmocom/mgcp_client/mgcp_client.h: Line 30: int response_code; (wow, I messed up indenting when I merged this... not for this patch) https://gerrit.osmocom.org/#/c/4906/3/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 87: OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); -1: We don't want to assert on that: send an MGCP package with a long conn id and the program crashes. Line 135: OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); same Line 157: OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); same (and so forth) https://gerrit.osmocom.org/#/c/4906/3/src/libosmo-mgcp/mgcp_msg.c File src/libosmo-mgcp/mgcp_msg.c: Line 338: "endpoint:%x invalid ConnectionIdentifier (missing) %s\n", let's log with 0x prefix to clarify that it is hex: "endpoint 0x%x: invalid..." same below Line 339: ENDPOINT_NUMBER(endp), conn_id); conn_id is NULL and you're logging it? Line 347: ENDPOINT_NUMBER(endp), conn_id); conn_id is empty and you're logging it? -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:31:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:31:36 +0000 Subject: osmo-bsc[master]: cosmetic: use fsm pointer from parameter list In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4985/2/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 188: LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", I'm getting annoyed by these LOGPFSM of FSM state and event, which are *clearly* logged by the FSM code already, and I've said so at least thrice now. Same below. Drop these. Ok, maybe in a separate patch. -- To view, visit https://gerrit.osmocom.org/4985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:32:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:32:41 +0000 Subject: osmo-gsm-tester[master]: modem: Move power off sequence to separate method In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:34:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:34:01 +0000 Subject: osmo-gsm-tester[master]: modem: Abstract the list of required ofono interfaces In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:36:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:36:18 +0000 Subject: osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:39:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:39:47 +0000 Subject: osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5005/1/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 45: event_loop.sleep(self, seconds=20) ugh, that's ugly ... can't you parse the log outputlike in trx_ready()? seems trivial enough. -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:48:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:48:58 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 58: 'bts[].direct_pcu': schema.BOOL_STR, "direct PCU"? do we have an indirect PCU as well? AFAIK osmo-pcu always needs to be on the same box as osmo-bts for the PCU socket to work? Do you mean to switch PCU presence off and on instead? -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:52:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:52:13 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5007/1/src/osmo_gsm_tester/bts_osmotrx.py File src/osmo_gsm_tester/bts_osmotrx.py: Line 51: self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) I'd prefer to pass in the OsmoPcu class instance as argument, like we do for bsc and so on, to avoid cascades of unintended things happening just from instantiating a class. -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:52:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:52:56 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5008/1/src/osmo_gsm_tester/bts_octphy.py File src/osmo_gsm_tester/bts_octphy.py: Line 51: self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) prefer to pass OsmoPcu instance in as argument -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:52:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 16:52:59 +0000 Subject: osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5005/1/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 43: # TODO: othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" Why is that a problem? AFAIK it will keep trying until BTS come up. -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:54:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 24 Nov 2017 16:54:54 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Could you perhaps add the crash output to commit log for reference? -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 16:55:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 16:55:06 +0000 Subject: osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5009/1/src/osmo_gsm_tester/modem.py File src/osmo_gsm_tester/modem.py: Line 340: CTX_PROT_IPv46 = 'dual' (is this used internally only? I'd suggest using the same strings as you've chosen for the names of the constants) wait a minute, where *is* this used anyway? -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 17:08:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 Nov 2017 17:08:23 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: direct "obviously" refers to the "direct DSP access' where the PH-primitives are directly exchanged between the DSP and the PCU, and only the MPH-primitives are exchanged via the PCU socket. -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 18:13:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 18:13:39 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#3). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c 12 files changed, 1,031 insertions(+), 308 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/3 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index e0fbcec..bdbb448 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -195,9 +195,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..9c6c858 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -5,3 +5,5 @@ struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); + +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..7fb5411 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,43 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_MAXLEN]; + char conn_id_cn[MGCP_CONN_ID_MAXLEN]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..438b7cf 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + osmo_strlcpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 5fab409..39cfd44 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -78,6 +78,7 @@ #include #include +#include #include @@ -1329,7 +1330,7 @@ gsm48_stop_cc_timer(trans); /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1386,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1418,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1761,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1803,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2687,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2728,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2744,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2771,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2787,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = rtp->ip; + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..60e2b1b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -187,3 +187,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..250b4ec 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include "../../bscconfig.h" @@ -140,287 +142,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..6ddaea0 --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,900 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_str[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_str, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:%0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Someone forgot to set via_ran properly. + * This would point to some serious bug */ + OSMO_ASSERT(false); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: remote leg expects RTP input on address %s:%u\n", conn->rtp.remote_addr_cn, + conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: RAN expects RTP input on address %s:%u\n", conn->rtp.remote_addr_ran, + conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + conn->rtp.mgcp_ctx = NULL; + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + /* FIXME: use apporpiate talloc context */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + /* FIXME: use apporpiate talloc context (third parameter) */ + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "invalid call state, call completion failed\n"); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Nov 24 18:13:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 24 Nov 2017 18:13:39 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: remove duplicate logging Message-ID: Review at https://gerrit.osmocom.org/5031 cosmetic: remove duplicate logging The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02 --- M src/libcommon-cs/a_reset.c 1 file changed, 2 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/5031/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 32c00ae..3ee0058 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -38,23 +38,10 @@ ST_CONN, /* We have a confirmed connection */ }; -static const struct value_string fsm_state_names[] = { - {ST_DISC, "ST_DISC (disconnected)"}, - {ST_CONN, "ST_CONN (connected)"}, - {0, NULL}, -}; - enum fsm_evt { EV_RESET_ACK, /* got reset acknowlegement from remote end */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ -}; - -static const struct value_string fsm_evt_names[] = { - {EV_RESET_ACK, "EV_RESET_ACK"}, - {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, - {EV_N_CONNECT, "EV_N_CONNECT"}, - {0, NULL}, }; /* Disconnected state */ @@ -63,9 +50,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); OSMO_ASSERT(reset->fsm); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n"); reset->conn_loss_counter = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); @@ -76,9 +61,6 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: @@ -100,8 +82,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; OSMO_ASSERT(reset->fsm); - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET message...\n"); reset->cb(reset->priv); @@ -153,7 +134,6 @@ reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,8 +152,6 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/5031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Nov 24 19:46:08 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 24 Nov 2017 19:46:08 +0000 Subject: [PATCH] osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5030 to look at the new patch set (#2). DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash Problem: lchan->tch.dtx.dl_amr_fsm struct failed to allocate in l1sap_chan_act routine in l1sap.c due to illegal characters contained in lchan->name which are passed to osmo_fsm_inst_alloc routine. As a result, lchan->tch.dtx.dl_amr_fsm is NULL causing BTS crashed (SEG FAULT) when trying to access this struct. Below is snapshot of crash log obtained by with GDB: ... Fri Nov 24 18:13:55 2017 <0000> rsl.c:1653 payload type: 98 Fri Nov 24 18:13:55 2017 <0000> rsl.c:1463 (bts=0,trx=0,ts=2,ss=0) RSL Tx IPAC_MDCX_ACK (local 127.0.0.1:11538, remote 127.0.0.1:30012) Program received signal SIGSEGV, Segmentation fault. 0x00031930 in dtx_dl_amr_fsm_step (lchan=lchan at entry=0xb69592a8, rtp_pl=rtp_pl at entry=0x87ae8 " \024\351Y\363_\337\345\351f\177\373\300\210\201\200\210", rtp_pl_len=17, fn=1728481, l1_payload=0x10dd25 "", marker=marker at entry=true, len=len at entry=0x10ddc4 "\024", ft_out=0xbefff7d7 "\002", ft_out at entry=0xbefff7cf "\276\341_\032") at msg_utils.c:233 233 msg_utils.c: No such file or directory. ... Fix: Simply replaces 'lchan->name' passed to osmo_fsm_inst_alloc routine by a string without any illegal characters will resolve the problem Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/5030/2 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c388c82..5a7775a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1359,7 +1359,7 @@ tall_bts_ctx, lchan, LOGL_DEBUG, - lchan->name); + "DTX-DL-FSM"); return 0; } -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Nov 24 19:46:56 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 24 Nov 2017 19:46:56 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 2: > Could you perhaps add the crash output to commit log for reference? I have just added more inputs to the commit log. -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 19:52:53 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Fri, 24 Nov 2017 19:52:53 +0000 Subject: [PATCH] osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5030 to look at the new patch set (#3). DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash Problem: lchan->tch.dtx.dl_amr_fsm struct failed to allocate in l1sap_chan_act routine in l1sap.c due to illegal characters contained in lchan->name which are passed to osmo_fsm_inst_alloc routine. As a result, lchan->tch.dtx.dl_amr_fsm is NULL causing BTS crashed (SEG FAULT) when trying to access this struct. Below is snapshot of crash log obtained by GDB: ... Fri Nov 24 18:13:55 2017 <0000> rsl.c:1653 payload type: 98 Fri Nov 24 18:13:55 2017 <0000> rsl.c:1463 (bts=0,trx=0,ts=2,ss=0) RSL Tx IPAC_MDCX_ACK (local 127.0.0.1:11538, remote 127.0.0.1:30012) Program received signal SIGSEGV, Segmentation fault. 0x00031930 in dtx_dl_amr_fsm_step (lchan=lchan at entry=0xb69592a8, rtp_pl=rtp_pl at entry=0x87ae8 " \024\351Y\363_\337\345\351f\177\373\300\210\201\200\210", rtp_pl_len=17, fn=1728481, l1_payload=0x10dd25 "", marker=marker at entry=true, len=len at entry=0x10ddc4 "\024", ft_out=0xbefff7d7 "\002", ft_out at entry=0xbefff7cf "\276\341_\032") at msg_utils.c:233 233 msg_utils.c: No such file or directory. ... Fix: Simply replaces 'lchan->name' passed to osmo_fsm_inst_alloc routine by a string without any illegal characters will resolve the problem Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/5030/3 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c388c82..5a7775a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1359,7 +1359,7 @@ tall_bts_ctx, lchan, LOGL_DEBUG, - lchan->name); + "DTX-DL-FSM"); return 0; } -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:35:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:35:51 +0000 Subject: osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5010/1/suites/aoip_debug/interactive.py File suites/aoip_debug/interactive.py: Line 36: cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') lol this is getting out of hand dude -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:38:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:38:05 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:42:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:42:44 +0000 Subject: osmo-mgw[master]: vty: simplify endpoint allocation In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4775 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:43:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:43:19 +0000 Subject: osmo-pcu[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4961 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:45:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:45:06 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4669/2/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 73: no longer reserved. (is there also a LAC / cell id state now?) -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:48:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:48:26 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/4667/3/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 71: resources: it seems my edits got overwritten in the newest patch version. Was that intentional? Line 103: also was snapped back from my edits to your earlier version. In this one we should fix: 'osmo-gsm-tester.py' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Nov 24 21:48:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 24 Nov 2017 21:48:54 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Update import test->testenv In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4903 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:14:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:14:53 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/5030/3/src/common/l1sap.c File src/common/l1sap.c: Line 1362: "DTX-DL-FSM"); If fsm_inst_alloc fails again for any other reason, we will hit the same segfault. So we need error handling here. Easiest but most drastic is an OSMO_ASSERT(lchan->tch.dtx.dl_amr_fsm), better would be a return -RSL_ERR_*. Secondly, it is certainly extremely useful to see in the log output which lchan the FSM is about. Otherwise we see FSM transitions for numerous lchans mixed together without a hint at which lchan this is all about. So it might be worth it to mangle the name and strip illegal characters. We may actually want to add such to the FSM api. In the lack of such improvements, we may want to merge this change first, but IMHO definitely needs a timely follow-up. I'd appreciate if you could afford the time to add at least error handling. -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:16:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:16:04 +0000 Subject: osmo-msc[master]: cosmetic: remove duplicate logging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 yay, thx! :) -- To view, visit https://gerrit.osmocom.org/5031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:38:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:38:02 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (8 comments) excellent improvements. I still found two problems, a couple instances where I can accept if you oppose my previous comments but would like a comment on it if so. And few minor cosmetics. https://gerrit.osmocom.org/#/c/4980/3/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 65: static const struct value_string msc_mgcp_cause_codes_str[] = { (prefix 'msc_mgcp_': nice. Why not the common value_string[] suffix '_names'?) Line 283: "CRCX/CN creating connection for the CN side on MGW endpoint:%0x%x...\n", mgcp_ctx->rtp_endpoint); -1: oops: %0x%x Line 389: OSMO_ASSERT(false); well, or we added a new RAN type and forgot to implement it here. I usually do error log like "Unknown RAN type: %d" and returning an error. Line 445: conn->rtp.remote_port_cn); (i.e. you don't want to combine these two logs?) Line 529: conn->rtp.remote_port_ran); (i.e. you don't want to combine these two logs?) Line 803: mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); i.e. you don't want the FSM to be a child of the conn_fsm? Line 806: LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); (this is also a duplicate of FSM internal logging, right?) Line 858: LOGP(DMGCP, LOGL_ERROR, "invalid call state, call completion failed\n"); -1: context -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:39:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:39:52 +0000 Subject: osmo-mgw[master]: cosmetic: use correct VTY port number constant In-Reply-To: References: Message-ID: Patch Set 3: Verified+1 (somehow the jenkins V+1 got lost) -- To view, visit https://gerrit.osmocom.org/4836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:45:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:45:05 +0000 Subject: [MERGED] libosmocore[master]: fsm_tmr_cb: don't set T=0, the fi may no longer exist In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fsm_tmr_cb: don't set T=0, the fi may no longer exist ...................................................................... fsm_tmr_cb: don't set T=0, the fi may no longer exist When calling the timer_cb, that may have effected an fi termination and deallocation, e.g. from dispatching events and/or complex choices made. Current timer_cb implementations expect T to reflect the fired timer number, so we can't actually set T=0 before calling the timer_cb. Instead, never reset T to zero, let it always reflect the timer that last fired. When a new timer starts, T will be set to its new value. Adding a T arg to the timer_cb() would have been the cleanest solution, so that fi->T can be set to zero before dispatching the timer_cb. But since we've already rolled out this FSM API, we should stay backwards compatible. In the case where the timer returned 1 to request termination, we can assume that the fi still exists, but to be consistent, don't set T = 0 in that code path either. Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a --- M src/fsm.c 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/fsm.c b/src/fsm.c index 827e8b3..0bdcd9d 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -183,16 +183,17 @@ if (fsm->timer_cb) { int rc = fsm->timer_cb(fi); - if (rc != 1) { - fi->T = 0; + if (rc != 1) + /* We don't actually know whether fi exists anymore. + * Make sure to not access it and return right away. */ return; - } + /* The timer_cb told us to terminate, so we can safely assume + * that fi still exists. */ LOGPFSM(fi, "timer_cb requested termination\n"); } else LOGPFSM(fi, "No timer_cb, automatic termination\n"); /* if timer_cb returns 1 or there is no timer_cb */ - fi->T = 0; osmo_fsm_inst_term(fi, OSMO_FSM_TERM_TIMEOUT, &T); } -- To view, visit https://gerrit.osmocom.org/4941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:48:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:48:34 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/4915/5/tests/gtp/gtpie_test.c File tests/gtp/gtpie_test.c: Line 11: #include > Weird. I'm sure I've seen bits.h used in here before. damn, I might have overwitten some edit on gerrit -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 5 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Nov 25 17:51:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 25 Nov 2017 17:51:41 +0000 Subject: [PATCH] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4915 to look at the new patch set (#6). sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/4915/6 diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..e3bc2e0 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "../../lib/syserr.h" #include "../../gtp/gtpie.h" @@ -27,7 +28,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +74,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +88,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +102,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..d4a5dbc 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "../../lib/in46_addr.h" #include "../../lib/syserr.h" @@ -171,7 +172,7 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Nov 26 15:24:06 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 Nov 2017 15:24:06 +0000 Subject: [PATCH] osmo-bts[master]: doc/examples: add CalypsoBTS configuration example Message-ID: Review at https://gerrit.osmocom.org/5032 doc/examples: add CalypsoBTS configuration example Despite the CalypsoBTS transceiver is similar to OsmoTRX, there are some chenges required to make it work with OsmoBTS. Let's add a new configuration example for that. Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 --- A doc/examples/calypso/osmo-bts.cfg 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/5032/1 diff --git a/doc/examples/calypso/osmo-bts.cfg b/doc/examples/calypso/osmo-bts.cfg new file mode 100644 index 0000000..fa01953 --- /dev/null +++ b/doc/examples/calypso/osmo-bts.cfg @@ -0,0 +1,38 @@ +! +! OsmoBTS configuration example for CalypsoBTS +! http://osmocom.org/projects/baseband/wiki/CalypsoBTS +!! +! +log stderr + logging color 1 + logging timestamp 0 + logging level rsl notice + logging level oml notice + logging level rll notice + logging level rr notice + logging level meas error + logging level pag error + logging level l1c error + logging level l1p error + logging level dsp error + logging level abis error +! +line vty + no login +! +phy 0 + instance 0 + osmotrx rx-gain 1 + osmotrx ip local 127.0.0.1 + osmotrx ip remote 127.0.0.1 + osmotrx timing-advance-loop + osmotrx ms-power-loop -65 + osmotrx legacy-setbsic +bts 0 + oml remote-ip 127.0.0.1 + ipa unit-id 1801 0 + gsmtap-sapi pdtch + gsmtap-sapi ccch + band 900 + trx 0 + phy 0 instance 0 -- To view, visit https://gerrit.osmocom.org/5032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:48:40 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 09:48:40 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Switch from printf to LOGP statements In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Switch from printf to LOGP statements ...................................................................... mobile: Switch from printf to LOGP statements Add a mobile application logging category and replace printf with a LOGP. The code is sadly still using exit in the middle of handling. Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/main.c 5 files changed, 19 insertions(+), 12 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 3efa57a..efe493d 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -22,6 +22,7 @@ DSUM, DSIM, DGPS, + DMOB, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index d8fd076..3b761ef 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -127,6 +127,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DMOB] = { + .name = "DMOB", + .description = "Mobile", + .color = "\033[1;35m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index e3e948f..43631f3 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -97,7 +97,7 @@ /* waiting for reset after shutdown */ if (ms->shutdown == 2) { - printf("MS '%s' has been resetted\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "MS '%s' has been resetted\n", ms->name); ms->shutdown = 3; break; } @@ -175,7 +175,7 @@ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); - printf("Power off! (MS %s)\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "Power off! (MS %s)\n", ms->name); return 0; } @@ -212,7 +212,7 @@ rc = layer2_open(ms, ms->settings.layer2_socket_path); if (rc < 0) { - fprintf(stderr, "Failed during layer2_open()\n"); + LOGP(DMOB, LOGL_ERROR, "Failed during layer2_open()\n"); ms->l2_wq.bfd.fd = -1; mobile_exit(ms, 1); return rc; @@ -234,14 +234,14 @@ ms->started = 0; if (!strcmp(ms->settings.imei, "000000000000000")) { - printf("***\nWarning: Mobile '%s' has default IMEI: %s\n", + LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", ms->name, ms->settings.imei); - printf("This could relate your identitiy to other users with " + LOGP(DMOB, LOGL_NOTICE, "This could relate your identitiy to other users with " "default IMEI.\n***\n"); } l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); - printf("Mobile '%s' initialized, please start phone now!\n", ms->name); + LOGP(DMOB, LOGL_NOTICE, "Mobile '%s' initialized, please start phone now!\n", ms->name); return 0; } @@ -253,7 +253,7 @@ ms = talloc_zero(l23_ctx, struct osmocom_ms); if (!ms) { - fprintf(stderr, "Failed to allocate MS\n"); + LOGP(DMOB, LOGL_ERROR, "Failed to allocate MS: %s\n", name); return NULL; } diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 91729d8..6de8bec 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -3584,7 +3584,7 @@ gsm322_sync_to_cell(cs, NULL, 0); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when ret.idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when ret.idle, please fix!\n"); exit(0L); } @@ -3670,7 +3670,7 @@ gsm_print_arfcn(cs->arfcn)); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when leaving idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when leaving idle, please fix!\n"); exit(0L); } cs->sync_retries = SYNC_RETRIES; @@ -3700,7 +3700,7 @@ gsm_print_arfcn(cs->arfcn)); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI when leaving idle, please fix!\n"); + LOGP(DCS, LOGL_FATAL, "No SI when leaving idle, please fix!\n"); exit(0L); } cs->sync_retries = SYNC_RETRIES; @@ -4637,7 +4637,7 @@ cs->arfci = arfcn2index(cs->arfcn); cs->si = cs->list[cs->arfci].sysinfo; if (!cs->si) { - printf("No SI after neighbour scan, please fix!\n"); + LOGP(DNB, LOGL_FATAL, "No SI after neighbour scan, please fix!\n"); exit(0L); } LOGP(DNB, LOGL_INFO, "Syncing back to serving cell\n"); diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 91ed341..8921bd8 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4907 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71e7f6e6375a485b45bad76ada2be17b0901577d Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:50:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 09:50:02 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Use bool to show started can only be true or false In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Use bool to show started can only be true or false ...................................................................... mobile: Use bool to show started can only be true or false The state handling is complicated and maybe it gets better by moving started to bool and then the rest to an enum. Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/app_mobile.c 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 9b544ab..21b2880 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -62,7 +62,8 @@ uint16_t test_arfcn; struct osmol1_entity l1_entity; - uint8_t deleting, shutdown, started; + bool started, deleting; + uint8_t shutdown; struct gsm_support support; struct gsm_settings settings; struct gsm_subscriber subscr; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 43631f3..1905010 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -131,7 +131,7 @@ gsm322_cs_sendmsg(ms, nmsg); } - ms->started = 1; + ms->started = true; } return 0; } @@ -231,7 +231,7 @@ gsm_random_imei(&ms->settings); ms->shutdown = 0; - ms->started = 0; + ms->started = false; if (!strcmp(ms->settings.imei, "000000000000000")) { LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", @@ -291,7 +291,7 @@ { int rc; - ms->deleting = 1; + ms->deleting = true; if (mncc_recv_app) { mncc_sock_exit(ms->mncc_entity.sock_state); -- To view, visit https://gerrit.osmocom.org/4908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:54:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 09:54:38 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4909 to look at the new patch set (#3). mobile: Instead of putting semantic in a comment, use an enum The enum was created to understand the different states during the shutdown and find places where it is used. The normal transitions are like. Idle -> Imsi Detach -> L1 Reset -> Done Idle -> L1 Reset -> Done The shutdown can get stuck in case: * Out of memory situation while handling IMSI detach (timeout) * Never receiving l1 reset acknnowledgment. The code could benefit from the move to osmo fsm to deal with proper timeouts. Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 34 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/09/4909/3 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 21b2880..7a935f9 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -54,6 +54,13 @@ int16_t s, rl_fail; }; +enum { + MS_SHUTDOWN_NONE = 0, + MS_SHUTDOWN_IMSI_DETACH = 1, + MS_SHUTDOWN_WAIT_RESET = 2, + MS_SHUTDOWN_COMPL = 3, +}; + /* One Mobilestation for osmocom */ struct osmocom_ms { struct llist_head entity; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 1905010..d28af00 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -96,9 +96,9 @@ set = &ms->settings; /* waiting for reset after shutdown */ - if (ms->shutdown == 2) { + if (ms->shutdown == MS_SHUTDOWN_WAIT_RESET) { LOGP(DMOB, LOGL_NOTICE, "MS '%s' has been resetted\n", ms->name); - ms->shutdown = 3; + ms->shutdown = MS_SHUTDOWN_COMPL; break; } @@ -142,13 +142,13 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; /* if shutdown is already performed */ - if (ms->shutdown >= 2) + if (ms->shutdown >= MS_SHUTDOWN_WAIT_RESET) return 0; if (!force && ms->started) { struct msgb *nmsg; - ms->shutdown = 1; /* going down */ + ms->shutdown = MS_SHUTDOWN_IMSI_DETACH; nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_IMSI_DETACH); if (!nmsg) return -ENOMEM; @@ -168,10 +168,10 @@ lapdm_channel_exit(&ms->lapdm_channel); if (ms->started) { - ms->shutdown = 2; /* being down, wait for reset */ + ms->shutdown = MS_SHUTDOWN_WAIT_RESET; /* being down, wait for reset */ l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); } else { - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; /* being down */ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); @@ -230,7 +230,7 @@ gsm_random_imei(&ms->settings); - ms->shutdown = 0; + ms->shutdown = MS_SHUTDOWN_NONE; ms->started = false; if (!strcmp(ms->settings.imei, "000000000000000")) { @@ -268,7 +268,7 @@ gsm_support_init(ms); gsm_settings_init(ms); - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; if (mncc_recv_app) { mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); @@ -298,7 +298,7 @@ ms->mncc_entity.sock_state = NULL; } - if (ms->shutdown == 0 || (ms->shutdown == 1 && force)) { + if (ms->shutdown == MS_SHUTDOWN_NONE || (ms->shutdown == MS_SHUTDOWN_IMSI_DETACH && force)) { rc = mobile_exit(ms, force); if (rc < 0) return rc; @@ -339,9 +339,9 @@ int work = 0; llist_for_each_entry_safe(ms, ms2, &ms_list, entity) { - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) work |= mobile_work(ms); - if (ms->shutdown == 3) { + if (ms->shutdown == MS_SHUTDOWN_COMPL) { if (ms->l2_wq.bfd.fd > -1) { layer2_close(ms); ms->l2_wq.bfd.fd = -1; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 22db859..1b10262 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -633,7 +633,7 @@ LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n"); /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_COMPL) { LOGP(DLSMS, LOGL_ERROR, "Phone is down\n"); gsm411_sms_report(ms, sms, GSM411_RP_CAUSE_MO_TEMP_FAIL); sms_free(sms); diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index ff90faa..ee2c943 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -603,7 +603,7 @@ } /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { gsm480_ss_result(ms, "", 0); return -EIO; } diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index d398c76..f1e8109 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -1923,7 +1923,7 @@ struct gsm_trans *trans; int i, rc; - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { LOGP(DCC, LOGL_NOTICE, "Phone is down!\n"); if (ms->mncc_entity.mncc_recv && msg_type != MNCC_REL_REQ) { struct gsm_mncc rel; diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 4b1db1e..f32d57a 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -1849,7 +1849,7 @@ subscr->sim_valid = 0; /* wait for RR idle and then power off when IMSI is detached */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { if (mm->state == GSM48_MM_ST_MM_IDLE) { mobile_exit(ms, 1); return 0; @@ -1944,7 +1944,7 @@ new_mm_state(mm, GSM48_MM_ST_WAIT_NETWORK_CMD, 0); /* power off */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { mobile_exit(ms, 1); return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 3703ac5..d11f625 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -123,7 +123,7 @@ { if (vty_reading) return; - if (ms->shutdown != 0) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; vty_out(vty, "You must restart MS '%s' ('shutdown / no shutdown') for " "change to take effect!%s", ms->name, VTY_NEWLINE); @@ -142,7 +142,7 @@ llist_for_each_entry(ms, &ms_list, entity) { if (!strcmp(ms->name, name)) { - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { vty_out(vty, "MS '%s' is admin down.%s", name, VTY_NEWLINE); return NULL; @@ -189,9 +189,9 @@ service = ", MM connection active"; vty_out(vty, "MS '%s' is %s%s%s%s", ms->name, - (ms->shutdown) ? "administratively " : "", - (ms->shutdown || !ms->started) ? "down" : "up", - (!ms->shutdown) ? service : "", + (ms->shutdown != MS_SHUTDOWN_NONE) ? "administratively " : "", + (ms->shutdown != MS_SHUTDOWN_NONE || !ms->started) ? "down" : "up", + (ms->shutdown == MS_SHUTDOWN_NONE) ? service : "", VTY_NEWLINE); vty_out(vty, " IMEI: %s%s", set->imei, VTY_NEWLINE); vty_out(vty, " IMEISV: %s%s", set->imeisv, VTY_NEWLINE); @@ -201,7 +201,7 @@ else vty_out(vty, " IMEI generation: fixed%s", VTY_NEWLINE); - if (ms->shutdown) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; if (set->plmn_mode == PLMN_MODE_AUTO) @@ -303,7 +303,7 @@ gsm_subscr_dump(&ms->subscr, print_vty, vty); } else { llist_for_each_entry(ms, &ms_list, entity) { - if (!ms->shutdown) { + if (ms->shutdown == MS_SHUTDOWN_NONE) { gsm_subscr_dump(&ms->subscr, print_vty, vty); vty_out(vty, "%s", VTY_NEWLINE); } @@ -1529,7 +1529,7 @@ (set->test_always) ? "everywhere" : "foreign-country", VTY_NEWLINE); /* no shutdown must be written to config, because shutdown is default */ - vty_out(vty, " %sshutdown%s", (ms->shutdown) ? "" : "no ", + vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2699,7 +2699,7 @@ struct osmocom_ms *ms = vty->index, *tmp; int rc; - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) return CMD_SUCCESS; llist_for_each_entry(tmp, &ms_list, entity) { @@ -2738,7 +2738,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown == 0) + if (ms->shutdown == MS_SHUTDOWN_NONE) mobile_exit(ms, 0); return CMD_SUCCESS; @@ -2749,7 +2749,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= 1) + if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) mobile_exit(ms, 1); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:56:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 09:56:01 +0000 Subject: [PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4779 to look at the new patch set (#4). vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Closes: OS#2632 Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c 4 files changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/79/4779/4 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..c7634fb 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int vty_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..f542745 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1170,7 +1170,7 @@ trunk->audio_payload = 126; trunk->audio_send_ptime = 1; trunk->audio_send_name = 1; - trunk->number_endpoints = 33; + trunk->vty_number_endpoints = 33; trunk->omit_rtcp = 0; mgcp_trunk_set_keepalive(trunk, MGCP_KEEPALIVE_ONCE); llist_add_tail(&trunk->entry, &cfg->trunks); @@ -1202,12 +1202,12 @@ tcfg->endpoints = _talloc_zero_array(tcfg->cfg, sizeof(struct mgcp_endpoint), - tcfg->number_endpoints, + tcfg->vty_number_endpoints, "endpoints"); if (!tcfg->endpoints) return -1; - for (i = 0; i < tcfg->number_endpoints; ++i) { + for (i = 0; i < tcfg->vty_number_endpoints; ++i) { INIT_LLIST_HEAD(&tcfg->endpoints[i].conns); tcfg->endpoints[i].cfg = tcfg->cfg; tcfg->endpoints[i].tcfg = tcfg; @@ -1217,6 +1217,7 @@ tcfg->endpoints[i].type = &ep_typeset.rtp; } + tcfg->number_endpoints = tcfg->vty_number_endpoints; return 0; } diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 9420d96..e5456bf 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.vty_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -524,7 +524,7 @@ "Number options\n" "Endpoints available\n" "Number endpoints\n") { /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.vty_number_endpoints = atoi(argv[0]) + 1; return CMD_SUCCESS; } @@ -1306,6 +1306,7 @@ trunk->trunk_nr, trunk->number_endpoints); return -1; } + trunk->number_endpoints = trunk->vty_number_endpoints; } cfg->role = role; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..f35dc93 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -563,9 +563,8 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); - cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -685,7 +684,7 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -737,7 +736,7 @@ cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1025,7 +1024,7 @@ endp.type = &ep_typeset.rtp; - trunk.number_endpoints = 1; + trunk.vty_number_endpoints = 1; trunk.endpoints = &endp; trunk.force_constant_ssrc = patch_ssrc; trunk.force_aligned_timing = patch_ts; @@ -1097,7 +1096,7 @@ printf("Testing multiple payload types\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1228,7 +1227,7 @@ printf("Testing no sequence flow on initial packet\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); endp = &cfg->trunk.endpoints[1]; @@ -1274,7 +1273,7 @@ printf("Testing no rtpmap name\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; cfg->trunk.audio_send_name = 0; mgcp_endpoints_allocate(&cfg->trunk); -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:56:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 09:56:17 +0000 Subject: osmo-gsm-tester[master]: Add OsmoSgsn class In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5002/1/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl: PS1, Line 15: ggsn_tun_ip_address > why is this called ggsn_tun_ip_address? This is not the address of a tun d Good point, I'll change that in next version. -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:57:45 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 09:57:45 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: use correct VTY port number constant In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: cosmetic: use correct VTY port number constant ...................................................................... cosmetic: use correct VTY port number constant osmo-mgw currently uses VTY port number constant of osmo-bsc_mgwp, however, libosmore now offers a constant specifically for osmo_mgw, which has the same value, but is intended to be used by osmo-mgw use the new port number constant for osmo-mgw Closes: OS#2628 Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Depends: libosmocore I1770787e697906322ce5815fcaadba06c01ddee9 --- M src/osmo-mgw/mgw_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 20df923..227fc78 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -280,7 +280,7 @@ /* start telnet after reading config for vty_get_bind_addr() */ rc = telnet_init_dynif(tall_bsc_ctx, NULL, - vty_get_bind_addr(), OSMO_VTY_PORT_BSC_MGCP); + vty_get_bind_addr(), OSMO_VTY_PORT_MGW); if (rc < 0) return rc; -- To view, visit https://gerrit.osmocom.org/4836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63c3b300cc9287d1755a3f2c5b5ade7fc6398f6e Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 09:58:43 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 09:58:43 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: add missing spaces In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: cosmetic: add missing spaces ...................................................................... cosmetic: add missing spaces call to msc_call_connect() lacks spaces in parameter list Change-Id: I4c11abaeff62749cbc365dfef671c4e15a85fc95 --- M src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 1aa5954..5fab409 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2768,7 +2768,7 @@ return 0; } - msc_call_connect(trans,rtp->port,rtp->ip); + msc_call_connect(trans, rtp->port, rtp->ip); return 0; } -- To view, visit https://gerrit.osmocom.org/4979 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c11abaeff62749cbc365dfef671c4e15a85fc95 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:00:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:00:16 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: add VTY port number of osmo-mgw In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: common: add VTY port number of osmo-mgw ...................................................................... common: add VTY port number of osmo-mgw osmo-mgw currently uses the VTY port constant of osmo-bsc_mgcp. We decided to re use the same port number for osmo-mgw, this is not mentioned in the manuals yet. Add the port number of osmo-mgw to the manuals (common) Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 08d9b3c..f9bf311 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -18,7 +18,7 @@ |TCP|4240|telnet (VTY)|osmo-pcu |TCP|4241|telnet (VTY)|osmo-bts |TCP|4242|telnet (VTY)|osmo-nitb, osmo-bsc, cellmgr-ng -|TCP|4243|telnet (VTY)|osmo-bsc_mgcp +|TCP|4243|telnet (VTY)|osmo-bsc_mgcp, osmo-mgw |TCP|4244|telnet (VTY)|osmo-bsc_nat |TCP|4245|telnet (VTY)|osmo-sgsn |TCP|4246|telnet (VTY)|osmo-gbproxy -- To view, visit https://gerrit.osmocom.org/4835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41f7f2a7f850613707eddea610557b688de7a904 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:00:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:00:16 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: add osmo-mgw to mgcp In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: common: add osmo-mgw to mgcp ...................................................................... common: add osmo-mgw to mgcp Add osmo-mgw to the list of programs which use the MGCP port IETF Change-Id: Idfd0340297ddb15494b4b20d776e89e6288107e1 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index f9bf311..a69483a 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -10,7 +10,7 @@ [options="header",cols="10%,10%,40%,40%"] |=============== |L4 Protocol|Port Number|Purpose|Software -|UDP|2427|MGCP GW|osmo-bsc_mgcp +|UDP|2427|MGCP GW|osmo-bsc_mgcp, osmo-mgw |TCP|2775|SMPP (SMS interface for external programs)|osmo-nitb |TCP|3002|A-bis/IP OML|osmo-bts, osmo-bsc, osmo-nitb |TCP|3003|A-bis/IP RSL|osmo-bts, osmo-bsc, osmo-nitb -- To view, visit https://gerrit.osmocom.org/4837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfd0340297ddb15494b4b20d776e89e6288107e1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:00:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:00:16 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Revert "common: add VTY port number for osmo-mgw" In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: Revert "common: add VTY port number for osmo-mgw" ...................................................................... Revert "common: add VTY port number for osmo-mgw" We agreed to re-use the port of osmo-bsc-mgcp, so there is no need for this patch anymore. This reverts commit ad4a01e2a4674caf1f3d5680f825177e659254f0. Change-Id: I8629db5e975cc218c80c747a39c0fdca5f5d6e10 --- M common/chapters/port_numbers.adoc 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 32baad5..08d9b3c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,7 +35,6 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|ggsn (OpenGGSN) -|TCP|4261|telnet (VTY)|osmo-mgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/4834 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8629db5e975cc218c80c747a39c0fdca5f5d6e10 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:01:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:01:08 +0000 Subject: osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/5005/1/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 43: # TODO: othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" > Why is that a problem? AFAIK it will keep trying until BTS come up. That's not true, after that message the osmo.pcu exits. You don't notice it when running it in the sysmobts because the systemd service restarts it once it exits, and then at some point it works. Line 45: event_loop.sleep(self, seconds=20) > ugh, that's ugly ... can't you parse the log outputlike in trx_ready()? see I wanted to leave that for later, but I'll have a look. Initially I though about checking for unix socket available with netstat, but the issue isn't actually that the unix socket is not there. Some info is transfered but as the bts is not yet configured, then it fails. We should fix that in the osmo-pcu code to wait for the message instead of exiting. -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:11:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:11:23 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (4 comments) https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 58: 'bts[].direct_pcu': schema.BOOL_STR, > "direct PCU"? do we have an indirect PCU as well? AFAIK osmo-pcu always nee See this option from osmo-bts-symo: "-M --pcu-direct Force PCU to access message queue for" The indirect pcu is the default one, in which the pcu has no direct access to firmware/hw but instead received the data from osmo-bts through the unix socket. In the direct mode, only signalling is sent bts<->pcu, and the pcu fetches the data directly from the firmware. This mode is only supported so far by osmo-bts-sysmo (afaik). Actually, for sysmobts, the non-direct path is currently not working (I started investigating it and created a task to follow it later). https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl: PS1, Line 65: gprs > probably one would want to have a template here to decide if GPRS or EGPRS Indeed, but I never used egprs so far, so I didn't include it yet. We can leave it for next step in patch series. Do we need any other EGPRS config other than changing this line to egprs? PS1, Line 66: 0 > I'm not sure if RAC=0 is valid. LAC=0 has special meaning (MS detached), so I'll look into having an increasing RAC then. Reminder: check that we don't use LAC=0 when incrementing the value. PS1, Line 68: 1800 > the BVCI must be different for each BTS/PCU that connects to the SGSN. My Thanks, I'll do that then, or use an incrementing counter, same as LAC and RAC. -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:16:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:16:06 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5007/1/src/osmo_gsm_tester/bts_osmotrx.py File src/osmo_gsm_tester/bts_osmotrx.py: Line 51: self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) > I'd prefer to pass in the OsmoPcu class instance as argument, like we do fo >From my point of view the pcu is always attached to a specific bts and it's part of it, so not sure if it makes sense to move the instantiation outside of the class. Furthermore, we need to create a different pcu class depending on the bts we are creating, so I think it's better keeping it here. -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:19:39 +0000 Subject: osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5009/1/src/osmo_gsm_tester/modem.py File src/osmo_gsm_tester/modem.py: Line 340: CTX_PROT_IPv46 = 'dual' > (is this used internally only? I'd suggest using the same strings as you've That's expected to be used by tests when telling the modem to create a IPv4 context, an IPv6 one or a context supporting both. It's already used in the ping.py test, although now we only use the IPv4 one because the other ones are not working properly with the modem I was using, we need to investigate that further. About the naming, I took that naming because afaik we are using that 46 naming already in osmocom in several places and it's common. The strings need to be that way because that's how they are defined in ofono API. -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:21:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:21:13 +0000 Subject: osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5010/1/suites/aoip_debug/interactive.py File suites/aoip_debug/interactive.py: Line 36: cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') > lol this is getting out of hand dude I know, I agree we need to fix/improve it at some point :) -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:00 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5011/1/suites/gprs/ping.py File suites/gprs/ping.py: PS1, Line 46: no supported in EC20 > would be good to find out if this means "not supported in the modem firmwar I created this task as a reminder: https://osmocom.org/issues/2683 -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:52 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:52 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: Abstract the list of required ofono interfaces In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Abstract the list of required ofono interfaces ...................................................................... modem: Abstract the list of required ofono interfaces * We want to add more interfaces to this list when we add more features (such as waiting for ConnectionManager if we want to use GPRS). * We want to require some ifaces only if we are planning to use those features in osmo-gsm-tester (driven by config features attribute set to the modem in resources.conf). * Previous usage during shutdown was wrong, as it was waiting for any of them to be down to continue instead of waiting for all of them to be down. Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b --- M src/osmo_gsm_tester/modem.py 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index ca8387b..e73ae4e 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -421,6 +421,15 @@ def auth_algo(self): return self.conf.get('auth_algo', None) + def features(self): + return self.conf.get('features', []) + + def _required_ifaces(self): + req_ifaces = (I_NETREG,) + req_ifaces += (I_SMS,) if 'sms' in self.features() else () + req_ifaces += (I_SS,) if 'ussd' in self.features() else () + return req_ifaces + def _on_netreg_property_changed(self, name, value): self.dbg('%r.PropertyChanged() -> %s=%s' % (I_NETREG, name, value)) @@ -521,16 +530,18 @@ def power_cycle(self): 'Power the modem and put it online, power cycle it if it was already on' + req_ifaces = self._required_ifaces() if self.is_powered(): self.dbg('Power cycling') self.set_online(False) self.set_powered(False) - event_loop.wait(self, lambda: not self.dbus.has_interface(I_NETREG, I_SMS), timeout=10) + for iface in req_ifaces: + event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) else: self.dbg('Powering on') self.set_powered() self.set_online() - event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) + event_loop.wait(self, self.dbus.has_interface, *req_ifaces, timeout=10) def connect(self, mcc_mnc=None): 'Connect to MCC+MNC' -- To view, visit https://gerrit.osmocom.org/4997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:53 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: Move power off sequence to separate method In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Move power off sequence to separate method ...................................................................... modem: Move power off sequence to separate method Also make sure we power off the modem during cleanup, to make sure we set it offline (and in the future, we also detach GPRS). Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd --- M src/osmo_gsm_tester/modem.py 1 file changed, 10 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index e73ae4e..0796fa6 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -358,6 +358,8 @@ if self.cancellable: self.cancel_pending_dbus_methods() self.cancellable = None + if self.is_powered(): + self.power_off() self.dbus.cleanup() self.dbus = None @@ -528,15 +530,19 @@ # once it has been triggered, create a new one for next operation: self.cancellable = Gio.Cancellable.new() + def power_off(self): + self.set_online(False) + self.set_powered(False) + req_ifaces = self._required_ifaces() + for iface in req_ifaces: + event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) + def power_cycle(self): 'Power the modem and put it online, power cycle it if it was already on' req_ifaces = self._required_ifaces() if self.is_powered(): self.dbg('Power cycling') - self.set_online(False) - self.set_powered(False) - for iface in req_ifaces: - event_loop.wait(self, lambda: not self.dbus.has_interface(iface), timeout=10) + self.power_off() else: self.dbg('Powering on') self.set_powered() -- To view, visit https://gerrit.osmocom.org/4998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:53 +0000 Subject: [MERGED] osmo-gsm-tester[master]: defaults.conf: Add PDCH channels to test GPRS In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: defaults.conf: Add PDCH channels to test GPRS ...................................................................... defaults.conf: Add PDCH channels to test GPRS Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657 --- M example/defaults.conf 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index d555ab0..86223d1 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -42,5 +42,5 @@ - phys_chan_config: TCH/F - phys_chan_config: TCH/F - phys_chan_config: TCH/F - - phys_chan_config: TCH/F - - phys_chan_config: TCH/F + - phys_chan_config: PDCH + - phys_chan_config: PDCH -- To view, visit https://gerrit.osmocom.org/5000 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:54 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resources.conf: Add gprs feature for EC20 modem In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resources.conf: Add gprs feature for EC20 modem ...................................................................... resources.conf: Add gprs feature for EC20 modem Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 697b5c8..e8b1695 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -86,7 +86,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'ussd'] + features: ['sms', 'ussd', 'gprs'] - label: gobi_3 path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/4999 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:27:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:27:54 +0000 Subject: [MERGED] osmo-gsm-tester[master]: hlr: Rename conf_for API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: hlr: Rename conf_for API ...................................................................... hlr: Rename conf_for API The HLR has more clients than the MSC, for instance the SGSN. Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa --- M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/osmo_msc.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index b6ebf8a..f7dd80a 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -151,7 +151,7 @@ finally: conn.close() - def conf_for_msc(self): + def conf_for_client(self): return dict(hlr=dict(ip_address=self.ip_address)) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index ccf15fe..3ff2d6a 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -77,7 +77,7 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(msc=dict(ip_address=self.ip_address))) config.overlay(values, self.mgcpgw.conf_for_msc()) - config.overlay(values, self.hlr.conf_for_msc()) + config.overlay(values, self.hlr.conf_for_client()) config.overlay(values, self.stp.conf_for_client()) config.overlay(values, self.smsc.get_config()) -- To view, visit https://gerrit.osmocom.org/4996 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5024 to look at the new patch set (#2). client: use osmo_strlcpy instead of strncpy simplify \nul termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/2 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ac86f52..4b2ee91 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -201,8 +201,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 3a17993..97326a3 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#4). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 100 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/4 diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..5df7ab0 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_MAXLEN 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..cb2e796 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_MAXLEN]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..919da68 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_MAXLEN]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..9ab4a38 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,11 +78,13 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); @@ -102,9 +104,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +128,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +149,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +172,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +244,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +254,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..1b2b7b0 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing)\n", + ENDPOINT_NUMBER(endp)); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty)\n", + ENDPOINT_NUMBER(endp)); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_MAXLEN) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..a326f00 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..09739c1 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..451174d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -605,7 +605,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1033,9 +1033,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1111,7 +1111,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1125,7 +1125,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1139,7 +1139,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1153,7 +1153,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1170,7 +1170,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1182,7 +1182,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,7 +1199,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1211,7 +1211,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1233,9 +1233,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 10:30:56 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: fix sourcecode formatting Message-ID: Review at https://gerrit.osmocom.org/5034 cosmetic: fix sourcecode formatting Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 --- M include/osmocom/mgcp_client/mgcp_client.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/5034/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 919da68..73b0e17 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -27,9 +27,9 @@ typedef unsigned int mgcp_trans_id_t; struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - const char *comment; + int response_code; + mgcp_trans_id_t trans_id; + const char *comment; char conn_id[MGCP_CONN_ID_MAXLEN]; }; -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:31:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:31:39 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4669/2/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 73: no longer reserved. > (is there also a LAC / cell id state now?) Indeed, but that came after this patch iirc. I'll add a new patch on top adding it. I might wait a bit more as I'll probably be adding more counter like RAC. -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:32:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 10:32:47 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4667/3/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 71: these ways: > it seems my edits got overwritten in the newest patch version. Was that int It was not intentional, I probably didn't pull your changes from gerrit. I'll have a look on how to get your changes back. -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 10:35:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 10:35:26 +0000 Subject: [MERGED] osmo-pcu[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Replace '.' in counter names with ':' ...................................................................... Replace '.' in counter names with ':' The '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e --- M src/bts.cpp 1 file changed, 85 insertions(+), 85 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 6bdbb85..c323101 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -67,91 +67,91 @@ * the code below. */ static const struct rate_ctr_desc bts_ctr_description[] = { - { "tbf.dl.alloc", "TBF DL Allocated "}, - { "tbf.dl.freed", "TBF DL Freed "}, - { "tbf.dl.aborted", "TBF DL Aborted "}, - { "tbf.ul.alloc", "TBF UL Allocated "}, - { "tbf.ul.freed", "TBF UL Freed "}, - { "tbf.ul.aborted", "TBF UL Aborted "}, - { "tbf.reused", "TBF Reused "}, - { "tbf.alloc.algo-a", "TBF Alloc Algo A "}, - { "tbf.alloc.algo-b", "TBF Alloc Algo B "}, - { "tbf.failed.egprs-only", "TBF Failed EGPRS-only"}, - { "rlc.sent", "RLC Sent "}, - { "rlc.resent", "RLC Resent "}, - { "rlc.restarted", "RLC Restarted "}, - { "rlc.stalled", "RLC Stalled "}, - { "rlc.nacked", "RLC Nacked "}, - { "rlc.final_block_resent", "RLC Final Blk resent "}, - { "rlc.ass.timedout", "RLC Assign Timeout "}, - { "rlc.ass.failed", "RLC Assign Failed "}, - { "rlc.ack.timedout", "RLC Ack Timeout "}, - { "rlc.ack.failed", "RLC Ack Failed "}, - { "rlc.rel.timedout", "RLC Release Timeout "}, - { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent-dummy", "RLC Sent Dummy "}, - { "rlc.sent-control", "RLC Sent Control "}, - { "rlc.dl_bytes", "RLC DL Bytes "}, - { "rlc.dl_payload_bytes", "RLC DL Payload Bytes "}, - { "rlc.ul_bytes", "RLC UL Bytes "}, - { "rlc.ul_payload_bytes", "RLC UL Payload Bytes "}, - { "decode.errors", "Decode Errors "}, - { "sba.allocated", "SBA Allocated "}, - { "sba.freed", "SBA Freed "}, - { "sba.timedout", "SBA Timeout "}, - { "llc.timeout", "Timedout Frames "}, - { "llc.dropped", "Dropped Frames "}, - { "llc.scheduled", "Scheduled Frames "}, - { "llc.dl_bytes", "RLC encapsulated PDUs"}, - { "llc.ul_bytes", "full PDUs received "}, - { "rach.requests", "RACH requests "}, - { "11bit_rach.requests", "11BIT_RACH requests "}, - { "spb.uplink_first_segment", "First seg of UL SPB "}, - { "spb.uplink_second_segment", "Second seg of UL SPB "}, - { "spb.downlink_first_segment", "First seg of DL SPB "}, - { "spb.downlink_second_segment","Second seg of DL SPB "}, - { "immediate.assignment_UL", "Immediate Assign UL "}, - { "immediate.assignment_rej", "Immediate Assign Rej "}, - { "immediate.assignment_DL", "Immediate Assign DL "}, - { "channel.request_description","Channel Request Desc "}, - { "pkt.ul_assignment", "Packet UL Assignment "}, - { "pkt.access_reject", "Packet Access Reject "}, - { "pkt.dl_assignment", "Packet DL Assignment "}, - { "ul.control", "UL control Block "}, - { "ul.assignment_poll_timeout", "UL Assign Timeout "}, - { "ul.assignment_failed", "UL Assign Failed "}, - { "dl.assignment_timeout", "DL Assign Timeout "}, - { "dl.assignment_failed", "DL Assign Failed "}, - { "pkt.ul_ack_nack_timeout", "PUAN Poll Timeout "}, - { "pkt.ul_ack_nack_failed", "PUAN poll Failed "}, - { "pkt.dl_ack_nack_timeout", "PDAN poll Timeout "}, - { "pkt.dl_ack_nack_failed", "PDAN poll Failed "}, - { "gprs.downlink_cs1", "CS1 downlink "}, - { "gprs.downlink_cs2", "CS2 downlink "}, - { "gprs.downlink_cs3", "CS3 downlink "}, - { "gprs.downlink_cs4", "CS4 downlink "}, - { "egprs.downlink_mcs1", "MCS1 downlink "}, - { "egprs.downlink_mcs2", "MCS2 downlink "}, - { "egprs.downlink_mcs3", "MCS3 downlink "}, - { "egprs.downlink_mcs4", "MCS4 downlink "}, - { "egprs.downlink_mcs5", "MCS5 downlink "}, - { "egprs.downlink_mcs6", "MCS6 downlink "}, - { "egprs.downlink_mcs7", "MCS7 downlink "}, - { "egprs.downlink_mcs8", "MCS8 downlink "}, - { "egprs.downlink_mcs9", "MCS9 downlink "}, - { "gprs.uplink_cs1", "CS1 Uplink "}, - { "gprs.uplink_cs2", "CS2 Uplink "}, - { "gprs.uplink_cs3", "CS3 Uplink "}, - { "gprs.uplink_cs4", "CS4 Uplink "}, - { "egprs.uplink_mcs1", "MCS1 Uplink "}, - { "egprs.uplink_mcs2", "MCS2 Uplink "}, - { "egprs.uplink_mcs3", "MCS3 Uplink "}, - { "egprs.uplink_mcs4", "MCS4 Uplink "}, - { "egprs.uplink_mcs5", "MCS5 Uplink "}, - { "egprs.uplink_mcs6", "MCS6 Uplink "}, - { "egprs.uplink_mcs7", "MCS7 Uplink "}, - { "egprs.uplink_mcs8", "MCS8 Uplink "}, - { "egprs.uplink_mcs9", "MCS9 Uplink "}, + { "tbf:dl:alloc", "TBF DL Allocated "}, + { "tbf:dl:freed", "TBF DL Freed "}, + { "tbf:dl:aborted", "TBF DL Aborted "}, + { "tbf:ul:alloc", "TBF UL Allocated "}, + { "tbf:ul:freed", "TBF UL Freed "}, + { "tbf:ul:aborted", "TBF UL Aborted "}, + { "tbf:reused", "TBF Reused "}, + { "tbf:alloc:algo-a", "TBF Alloc Algo A "}, + { "tbf:alloc:algo-b", "TBF Alloc Algo B "}, + { "tbf:failed:egprs-only", "TBF Failed EGPRS-only"}, + { "rlc:sent", "RLC Sent "}, + { "rlc:resent", "RLC Resent "}, + { "rlc:restarted", "RLC Restarted "}, + { "rlc:stalled", "RLC Stalled "}, + { "rlc:nacked", "RLC Nacked "}, + { "rlc:final_block_resent", "RLC Final Blk resent "}, + { "rlc:ass:timedout", "RLC Assign Timeout "}, + { "rlc:ass:failed", "RLC Assign Failed "}, + { "rlc:ack:timedout", "RLC Ack Timeout "}, + { "rlc:ack:failed", "RLC Ack Failed "}, + { "rlc:rel:timedout", "RLC Release Timeout "}, + { "rlc:late-block", "RLC Late Block "}, + { "rlc:sent-dummy", "RLC Sent Dummy "}, + { "rlc:sent-control", "RLC Sent Control "}, + { "rlc:dl_bytes", "RLC DL Bytes "}, + { "rlc:dl_payload_bytes", "RLC DL Payload Bytes "}, + { "rlc:ul_bytes", "RLC UL Bytes "}, + { "rlc:ul_payload_bytes", "RLC UL Payload Bytes "}, + { "decode:errors", "Decode Errors "}, + { "sba:allocated", "SBA Allocated "}, + { "sba:freed", "SBA Freed "}, + { "sba:timedout", "SBA Timeout "}, + { "llc:timeout", "Timedout Frames "}, + { "llc:dropped", "Dropped Frames "}, + { "llc:scheduled", "Scheduled Frames "}, + { "llc:dl_bytes", "RLC encapsulated PDUs"}, + { "llc:ul_bytes", "full PDUs received "}, + { "rach:requests", "RACH requests "}, + { "11bit_rach:requests", "11BIT_RACH requests "}, + { "spb:uplink_first_segment", "First seg of UL SPB "}, + { "spb:uplink_second_segment", "Second seg of UL SPB "}, + { "spb:downlink_first_segment", "First seg of DL SPB "}, + { "spb:downlink_second_segment","Second seg of DL SPB "}, + { "immediate:assignment_UL", "Immediate Assign UL "}, + { "immediate:assignment_rej", "Immediate Assign Rej "}, + { "immediate:assignment_DL", "Immediate Assign DL "}, + { "channel:request_description","Channel Request Desc "}, + { "pkt:ul_assignment", "Packet UL Assignment "}, + { "pkt:access_reject", "Packet Access Reject "}, + { "pkt:dl_assignment", "Packet DL Assignment "}, + { "ul:control", "UL control Block "}, + { "ul:assignment_poll_timeout", "UL Assign Timeout "}, + { "ul:assignment_failed", "UL Assign Failed "}, + { "dl:assignment_timeout", "DL Assign Timeout "}, + { "dl:assignment_failed", "DL Assign Failed "}, + { "pkt:ul_ack_nack_timeout", "PUAN Poll Timeout "}, + { "pkt:ul_ack_nack_failed", "PUAN poll Failed "}, + { "pkt:dl_ack_nack_timeout", "PDAN poll Timeout "}, + { "pkt:dl_ack_nack_failed", "PDAN poll Failed "}, + { "gprs:downlink_cs1", "CS1 downlink "}, + { "gprs:downlink_cs2", "CS2 downlink "}, + { "gprs:downlink_cs3", "CS3 downlink "}, + { "gprs:downlink_cs4", "CS4 downlink "}, + { "egprs:downlink_mcs1", "MCS1 downlink "}, + { "egprs:downlink_mcs2", "MCS2 downlink "}, + { "egprs:downlink_mcs3", "MCS3 downlink "}, + { "egprs:downlink_mcs4", "MCS4 downlink "}, + { "egprs:downlink_mcs5", "MCS5 downlink "}, + { "egprs:downlink_mcs6", "MCS6 downlink "}, + { "egprs:downlink_mcs7", "MCS7 downlink "}, + { "egprs:downlink_mcs8", "MCS8 downlink "}, + { "egprs:downlink_mcs9", "MCS9 downlink "}, + { "gprs:uplink_cs1", "CS1 Uplink "}, + { "gprs:uplink_cs2", "CS2 Uplink "}, + { "gprs:uplink_cs3", "CS3 Uplink "}, + { "gprs:uplink_cs4", "CS4 Uplink "}, + { "egprs:uplink_mcs1", "MCS1 Uplink "}, + { "egprs:uplink_mcs2", "MCS2 Uplink "}, + { "egprs:uplink_mcs3", "MCS3 Uplink "}, + { "egprs:uplink_mcs4", "MCS4 Uplink "}, + { "egprs:uplink_mcs5", "MCS5 Uplink "}, + { "egprs:uplink_mcs6", "MCS6 Uplink "}, + { "egprs:uplink_mcs7", "MCS7 Uplink "}, + { "egprs:uplink_mcs8", "MCS8 Uplink "}, + { "egprs:uplink_mcs9", "MCS9 Uplink "}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { -- To view, visit https://gerrit.osmocom.org/4961 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:08:27 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:08:27 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#5). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 956 insertions(+), 164 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/5 diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..ac86f52 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +340,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +708,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +778,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index a59dcdb..5861dbe 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,38 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unuque + * for the current this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_LENGTH); + return 0; + } + } + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,22 +110,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -106,7 +133,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a326f00..17c24b1 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -466,9 +466,6 @@ break; case 'C': callid = (const char *)line + 3; - break; - case 'I': - conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -506,13 +503,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +550,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 451174d..9a55bc5 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,12 +555,84 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + memset(conn_id, 0, conn_id_len); + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\n') + conn_id[i] = '\0'; + } + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -568,6 +641,8 @@ cfg->policy_cb = mgcp_test_policy_cb; + memset(last_conn_id, 0, sizeof(last_conn_id)); + mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); for (i = 0; i < ARRAY_SIZE(tests); i++) { @@ -575,6 +650,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -583,7 +659,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -592,11 +668,16 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); if (dummy_packets) @@ -657,7 +738,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -682,6 +763,8 @@ { struct mgcp_config *cfg; int i; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -695,24 +778,31 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -733,6 +823,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -742,12 +833,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -762,7 +857,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -865,7 +960,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -875,7 +970,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1014,6 +1109,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1033,9 +1129,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1093,6 +1190,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1104,85 +1202,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,19 +1307,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1224,6 +1334,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1233,9 +1344,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1282,9 +1394,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:08:27 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:08:27 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#5). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 100 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/5 diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..29dc458 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_LENGTH 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..c3f9ba1 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..0eed89e 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_LENGTH]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..a59dcdb 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,11 +78,13 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_MAXLEN); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); @@ -102,9 +104,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +128,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +149,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +172,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +244,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +254,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..9803921 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing)\n", + ENDPOINT_NUMBER(endp)); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty)\n", + ENDPOINT_NUMBER(endp)); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..a326f00 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..09739c1 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..451174d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -605,7 +605,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1033,9 +1033,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1111,7 +1111,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1125,7 +1125,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1139,7 +1139,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1153,7 +1153,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1170,7 +1170,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1182,7 +1182,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,7 +1199,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1211,7 +1211,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1233,9 +1233,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:08:27 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:08:27 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: fix sourcecode formatting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5034 to look at the new patch set (#2). cosmetic: fix sourcecode formatting Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 --- M include/osmocom/mgcp_client/mgcp_client.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/5034/2 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 0eed89e..cf5e8c4 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -27,9 +27,9 @@ typedef unsigned int mgcp_trans_id_t; struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - const char *comment; + int response_code; + mgcp_trans_id_t trans_id; + const char *comment; char conn_id[MGCP_CONN_ID_LENGTH]; }; -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:18:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:18:53 +0000 Subject: [PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5024 to look at the new patch set (#4). client: use osmo_strlcpy instead of strncpy simplify \nul termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/4 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ac86f52..4b2ee91 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -201,8 +201,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 5861dbe..d4e1925 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:18:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:18:53 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#6). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 956 insertions(+), 164 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/6 diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..ac86f52 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +340,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +708,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +778,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index a89d60c..5861dbe 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,38 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unuque + * for the current this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_LENGTH); + return 0; + } + } + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,22 +110,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -106,7 +133,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a326f00..17c24b1 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -466,9 +466,6 @@ break; case 'C': callid = (const char *)line + 3; - break; - case 'I': - conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -506,13 +503,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +550,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 451174d..9a55bc5 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,12 +555,84 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + memset(conn_id, 0, conn_id_len); + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\n') + conn_id[i] = '\0'; + } + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -568,6 +641,8 @@ cfg->policy_cb = mgcp_test_policy_cb; + memset(last_conn_id, 0, sizeof(last_conn_id)); + mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); for (i = 0; i < ARRAY_SIZE(tests); i++) { @@ -575,6 +650,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -583,7 +659,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -592,11 +668,16 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); if (dummy_packets) @@ -657,7 +738,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -682,6 +763,8 @@ { struct mgcp_config *cfg; int i; + char conn_id[256]; + char last_conn_id[256]; cfg = mgcp_config_alloc(); @@ -695,24 +778,31 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg + && get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0) + memcpy(last_conn_id, conn_id, sizeof(conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -733,6 +823,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -742,12 +833,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -762,7 +857,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -865,7 +960,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -875,7 +970,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1014,6 +1109,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1033,9 +1129,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1093,6 +1190,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1104,85 +1202,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,19 +1307,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1224,6 +1334,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1233,9 +1344,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1282,9 +1394,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:18:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:18:53 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#6). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 100 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/6 diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..29dc458 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_LENGTH 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..c3f9ba1 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..0eed89e 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_LENGTH]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..a89d60c 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,11 +78,13 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); @@ -102,9 +104,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +128,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +149,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +172,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +244,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +254,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..9803921 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing)\n", + ENDPOINT_NUMBER(endp)); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty)\n", + ENDPOINT_NUMBER(endp)); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..a326f00 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..09739c1 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..451174d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -605,7 +605,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1033,9 +1033,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1111,7 +1111,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1125,7 +1125,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1139,7 +1139,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1153,7 +1153,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1170,7 +1170,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1182,7 +1182,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1199,7 +1199,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1211,7 +1211,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1233,9 +1233,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:18:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 11:18:53 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: fix sourcecode formatting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5034 to look at the new patch set (#3). cosmetic: fix sourcecode formatting Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 --- M include/osmocom/mgcp_client/mgcp_client.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/5034/3 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 0eed89e..cf5e8c4 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -27,9 +27,9 @@ typedef unsigned int mgcp_trans_id_t; struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - const char *comment; + int response_code; + mgcp_trans_id_t trans_id; + const char *comment; char conn_id[MGCP_CONN_ID_LENGTH]; }; -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:30:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:30:03 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:30:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:30:23 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:31:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:31:09 +0000 Subject: osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:31:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:31:20 +0000 Subject: osmo-mgw[master]: cosmetic: fix sourcecode formatting In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:31:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:31:38 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:38:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 11:38:57 +0000 Subject: osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:39:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 11:39:23 +0000 Subject: [MERGED] osmo-bsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: vty: Add cmd to configure 3g Early Classmark Sending ...................................................................... vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M include/osmocom/bsc/gsm_data_shared.h M include/osmocom/bsc/rest_octets.h M src/libbsc/bsc_vty.c M src/libbsc/rest_octets.c M src/libbsc/system_information.c M src/libcommon/gsm_data.c 6 files changed, 33 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 240be1c..04669e2 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -885,6 +885,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 568505a..876e0ab 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -49,6 +49,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + bool early_cm_restrict_3g; bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3ddd5de..71c2cef 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -278,8 +278,11 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); - vty_out(vty, "Early Classmark Sending: %s%s", + vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? + " (forbidden by 2G bit)" : "", VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -653,6 +656,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2789,6 +2794,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4310,6 +4331,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index abd621c..7c6d7cd 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -499,9 +499,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index d54dad8..c1b0d49 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -825,6 +825,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = false, .si2quater_indicator = false, .lsa_params = { .present = 0, @@ -871,6 +872,7 @@ si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = !bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index e085aa6..ef72881 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -269,6 +269,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:39:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 11:39:23 +0000 Subject: [MERGED] osmo-bsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: tests: Fix selection of python version ...................................................................... tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb --- M configure.ac M tests/Makefile.am M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 8 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index a66ed26..b7dd016 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then -AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 474f821..7b4656b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -47,8 +47,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index 2e59e13..ccc6758 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py old mode 100644 new mode 100755 index 3ecfd39..8aa3dda --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/5022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:39:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 11:39:24 +0000 Subject: [MERGED] osmo-bsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Use type bool for boolean fields in gsm48_si_ro_info ...................................................................... Use type bool for boolean fields in gsm48_si_ro_info Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c --- M include/osmocom/bsc/rest_octets.h M src/libbsc/system_information.c 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index e6e5303..568505a 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -41,15 +41,15 @@ struct gsm48_si_ro_info { struct gsm48_si_selection_params selection_params; struct gsm48_si_power_offset power_offset; - uint8_t si2ter_indicator; - uint8_t early_cm_ctrl; + bool si2ter_indicator; + bool early_cm_ctrl; struct { uint8_t where:3, present:1; } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ - uint8_t si2quater_indicator; + bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; uint16_t cell_id; diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 91e993d..d54dad8 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -815,8 +815,8 @@ .power_offset = { .present = 0, }, - .si2ter_indicator = 0, - .early_cm_ctrl = 1, + .si2ter_indicator = false, + .early_cm_ctrl = true, .scheduling = { .present = 0, }, @@ -825,7 +825,7 @@ .ra_colour = 0, .present = 1, }, - .si2quater_indicator = 0, + .si2quater_indicator = false, .lsa_params = { .present = 0, }, @@ -859,16 +859,16 @@ if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); - si_info.si2ter_indicator = 1; + si_info.si2ter_indicator = true; } else { - si_info.si2ter_indicator = 0; + si_info.si2ter_indicator = false; } if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) { LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n", si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length); - si_info.si2quater_indicator = 1; + si_info.si2quater_indicator = true; } else { - si_info.si2quater_indicator = 0; + si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; -- To view, visit https://gerrit.osmocom.org/5026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:43:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 11:43:08 +0000 Subject: [PATCH] osmo-bts[master]: doc/examples: add CalypsoBTS configuration example In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5032 to look at the new patch set (#2). doc/examples: add CalypsoBTS configuration example Despite the CalypsoBTS transceiver is similar to OsmoTRX, there are some changes required to make it work with OsmoBTS. Let's add a new configuration example for that. Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 --- A doc/examples/calypso/osmo-bts.cfg 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/5032/2 diff --git a/doc/examples/calypso/osmo-bts.cfg b/doc/examples/calypso/osmo-bts.cfg new file mode 100644 index 0000000..fa01953 --- /dev/null +++ b/doc/examples/calypso/osmo-bts.cfg @@ -0,0 +1,38 @@ +! +! OsmoBTS configuration example for CalypsoBTS +! http://osmocom.org/projects/baseband/wiki/CalypsoBTS +!! +! +log stderr + logging color 1 + logging timestamp 0 + logging level rsl notice + logging level oml notice + logging level rll notice + logging level rr notice + logging level meas error + logging level pag error + logging level l1c error + logging level l1p error + logging level dsp error + logging level abis error +! +line vty + no login +! +phy 0 + instance 0 + osmotrx rx-gain 1 + osmotrx ip local 127.0.0.1 + osmotrx ip remote 127.0.0.1 + osmotrx timing-advance-loop + osmotrx ms-power-loop -65 + osmotrx legacy-setbsic +bts 0 + oml remote-ip 127.0.0.1 + ipa unit-id 1801 0 + gsmtap-sapi pdtch + gsmtap-sapi ccch + band 900 + trx 0 + phy 0 instance 0 -- To view, visit https://gerrit.osmocom.org/5032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:43:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 11:43:15 +0000 Subject: osmo-bts[master]: doc/examples: add CalypsoBTS configuration example In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:43:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 11:43:49 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 11:49:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 11:49:20 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add osmo_ipa.py to setup's install Message-ID: Review at https://gerrit.osmocom.org/5035 Add osmo_ipa.py to setup's install When running jenkins job, osmo_ipa is not available despite latest osmo-python-tests being installed on the build slave. Let's try to fix it by explicitly adding it to setup.py Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 --- M setup.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/35/5035/1 diff --git a/setup.py b/setup.py index 864992d..e74146f 100755 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "osmopy/soap.py", "osmopy/rate_ctr2csv.py", "osmopy/osmo_ctrl.py", + "osmopy/osmo_ipa.py", "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/5035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:01:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 12:01:42 +0000 Subject: [PATCH] openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info Message-ID: Review at https://gerrit.osmocom.org/5036 Use type bool for boolean fields in gsm48_si_ro_info Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c --- M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/system_information.c 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/36/5036/1 diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index ca7b57c..a2750c1 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -40,15 +40,15 @@ struct gsm48_si_ro_info { struct gsm48_si_selection_params selection_params; struct gsm48_si_power_offset power_offset; - uint8_t si2ter_indicator; - uint8_t early_cm_ctrl; + bool si2ter_indicator; + bool early_cm_ctrl; struct { uint8_t where:3, present:1; } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ - uint8_t si2quater_indicator; + bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; uint16_t cell_id; diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index abb1a6d..b27465e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -802,8 +802,8 @@ .power_offset = { .present = 0, }, - .si2ter_indicator = 0, - .early_cm_ctrl = 1, + .si2ter_indicator = false, + .early_cm_ctrl = true, .scheduling = { .present = 0, }, @@ -812,7 +812,7 @@ .ra_colour = 0, .present = 1, }, - .si2quater_indicator = 0, + .si2quater_indicator = false, .lsa_params = { .present = 0, }, @@ -846,16 +846,16 @@ if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); - si_info.si2ter_indicator = 1; + si_info.si2ter_indicator = true; } else { - si_info.si2ter_indicator = 0; + si_info.si2ter_indicator = false; } if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) { LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n", si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length); - si_info.si2quater_indicator = 1; + si_info.si2quater_indicator = true; } else { - si_info.si2quater_indicator = 0; + si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:01:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 12:01:43 +0000 Subject: [PATCH] openbsc[master]: vty: Add cmd to configure 3g Early Classmark Sending Message-ID: Review at https://gerrit.osmocom.org/5037 vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/src/libcommon/gsm_data.c 6 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/5037/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index c19b125..30feedc 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -877,6 +877,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index a2750c1..0ae65f3 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -48,6 +48,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + bool early_cm_restrict_3g; bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 60bea4f..3daa262 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -283,8 +283,11 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); - vty_out(vty, "Early Classmark Sending: %s%s", + vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? + " (forbidden by 2G bit)" : "", VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -672,6 +675,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2770,6 +2775,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4291,6 +4312,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 7b77ce2..49c38b5 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -495,9 +495,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index b27465e..a878b52 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -812,6 +812,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = false, .si2quater_indicator = false, .lsa_params = { .present = 0, @@ -858,6 +859,7 @@ si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = !bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index f1049e9..55d6fce 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -300,6 +300,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:02:37 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 12:02:37 +0000 Subject: openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: Backported from osmo-bsc.git with git format-patch && git am -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:02:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 12:02:43 +0000 Subject: openbsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: Backported from osmo-bsc.git with git format-patch && git am -- To view, visit https://gerrit.osmocom.org/5037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:19:56 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 12:19:56 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#4). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c 12 files changed, 1,024 insertions(+), 308 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/4 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index e0fbcec..bdbb448 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -195,9 +195,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..9c6c858 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -5,3 +5,5 @@ struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); + +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..138538b --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,43 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..438b7cf 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + osmo_strlcpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 5fab409..39cfd44 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -78,6 +78,7 @@ #include #include +#include #include @@ -1329,7 +1330,7 @@ gsm48_stop_cc_timer(trans); /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1386,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1418,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1761,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1803,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2687,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2728,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2744,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2771,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2787,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = rtp->ip; + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..60e2b1b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -187,3 +187,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..250b4ec 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include "../../bscconfig.h" @@ -140,287 +142,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..de1e72f --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,893 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (BSS)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* Destroy the state machine and all context information */ + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = 0, + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + conn->rtp.mgcp_ctx = NULL; + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + /* FIXME: use apporpiate talloc context */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + /* FIXME: use apporpiate talloc context (third parameter) */ + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:38:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 12:38:38 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4669/2/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 73: no longer reserved. > Indeed, but that came after this patch iirc. I'll add a new patch on top ad on second thought, not sure if we need to spend effort describing each and every file in detail here, especially where the file name is self-explanatory. -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 12:52:06 +0000 Subject: [PATCH] osmo-pcu[master]: Add multislot classes from latest spec In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4072 to look at the new patch set (#6). Add multislot classes from latest spec The table B.1 is copy-pasted from 3GPP TS 45.002 and reformatted via Emacs macros into C struct to avoid typos. The test output expanded accordingly. The allocation test expectations and output are adjusted accordingly. Note: classes 35-45 which need TA offset are not properly supported yet. This can be extended once we have such devices available for tests. Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp M src/mslot_class.c M src/mslot_class.h M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok M tests/alloc/MslotTest.ok 7 files changed, 5,598 insertions(+), 1,312 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/72/4072/6 -- To view, visit https://gerrit.osmocom.org/4072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 12:52:06 +0000 Subject: [PATCH] osmo-pcu[master]: Add function to get max supported MS class In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4955 to look at the new patch set (#2). Add function to get max supported MS class It's useful for allocation tests. Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Related: OS#2282 --- M src/mslot_class.c M src/mslot_class.h 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/55/4955/2 diff --git a/src/mslot_class.c b/src/mslot_class.c index 6d7c09d..19fea3e 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -82,6 +82,11 @@ return &gprs_ms_multislot_class[index]; } +uint8_t mslot_class_max() +{ + return ARRAY_SIZE(gprs_ms_multislot_class); +} + uint8_t mslot_class_get_ta(uint8_t ms_cl) { return get_mslot_table(ms_cl)->ta; diff --git a/src/mslot_class.h b/src/mslot_class.h index f26bd64..9e9dfba 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -28,7 +28,7 @@ /* 3GPP TS 05.02 Annex B.1 */ -#define MS_NA 255 /* N/A */// +#define MS_NA 255 /* N/A */ #define MS_A 254 /* 1 with hopping, 0 without */ #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ @@ -44,3 +44,4 @@ uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); uint8_t mslot_class_get_type(uint8_t ms_cl); +uint8_t mslot_class_max(); -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 12:52:06 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: expand test output In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4957 to look at the new patch set (#2). AllocTest: expand test output * print MS classes * unify and print test mode description * print additional info on test completion This only changes meta info about test run but not the actual test output. Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.ok 2 files changed, 85 insertions(+), 101 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/57/4957/2 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index f84ee69..bbc8c7e 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -432,6 +432,19 @@ TEST_MODE_UL_AFTER_DL, }; +static inline char *test_mode_descr(enum test_mode t) +{ + switch (t) { + case TEST_MODE_UL_ONLY: return (char*)"UL only"; + case TEST_MODE_DL_ONLY: return (char*)"DL only"; + case TEST_MODE_UL_AND_DL: return (char*)"UL and DL"; + case TEST_MODE_DL_AND_UL: return (char*)"DL and UL"; + case TEST_MODE_DL_AFTER_UL: return (char*)"DL after UL"; + case TEST_MODE_UL_AFTER_DL: return (char*)"UL after DL"; + default: return NULL; + } +} + static GprsMs *alloc_tbfs(BTS *the_bts, GprsMs *ms, unsigned ms_class, enum test_mode mode) { @@ -617,7 +630,8 @@ struct gprs_rlcmac_trx *trx; unsigned counter; - printf("Going to test assignment with many TBF, %s\n", text); + printf("Going to test assignment with many TBF, algorithm %s class %u..%u (%s)\n", + text, min_class, max_class, test_mode_descr(mode)); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -631,9 +645,11 @@ counter = alloc_many_tbfs(&the_bts, min_class, max_class, mode); - printf(" Successfully allocated %d UL TBFs\n", counter); + printf(" Successfully allocated %u UL TBFs, algorithm %s class %u..%u (%s)\n", + counter, text, min_class, max_class, test_mode_descr(mode)); if (counter != expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %u TBFs (got %u), algorithm %s class %u..%u (%s)\n", + expect_num, counter, text, min_class, max_class, test_mode_descr(mode)); OSMO_ASSERT(counter == expect_num); @@ -655,7 +671,7 @@ TEST_MODE_DL_ONLY, }; - printf("Going to test assignment with many connections, %s\n", text); + printf("Going to test assignment with many connections, algorithm %s\n", text); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -690,67 +706,33 @@ printf(" Successfully allocated %d TBFs\n", counter1); if (counter1 != (int)expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %d TBFs (got %d) for algorithm %s\n", expect_num, counter1, text); OSMO_ASSERT(expect_num == (unsigned)counter1); } -static void test_successive_allocation() +static inline void test_a_b_dyn(enum test_mode mode, uint8_t exp_A, uint8_t exp_B, uint8_t exp_dyn) { - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AND_DL, - 35, "algorithm A (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 10 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 12 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 1-12 (UL and DL)"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, - 32, "algorithm B class 1-29 (UL and DL)"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, - 35, "algorithm dynamic class 1-29 (UL and DL)"); - - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL, - 35, "algorithm A (DL and UL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AND_UL, - 32, "algorithm B class 10 (DL and UL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_AND_UL, - 32, "algorithm dynamic class 10 (DL and UL)"); - - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AFTER_UL, - 160, "algorithm A (DL after UL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AFTER_UL, - 32, "algorithm B class 10 (DL after UL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_AFTER_UL, - 95, "algorithm dynamic class 10 (DL after UL)"); - - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AFTER_DL, - 35, "algorithm A (UL after DL)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AFTER_DL, - 32, "algorithm B class 10 (UL after DL)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_UL_AFTER_DL, - 35, "algorithm dynamic class 10 (UL after DL)"); - - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_ONLY, - 35, "algorithm A (UL only)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_ONLY, - 32, "algorithm B class 10 (UL only)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_UL_ONLY, - 35, "algorithm dynamic class 10 (UL only)"); - - test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_ONLY, - 160, "algorithm A (DL ONLY)"); - test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_ONLY, - 32, "algorithm B class 10 (DL ONLY)"); - test_successive_allocation(alloc_algorithm_dynamic, 10, 10, TEST_MODE_DL_ONLY, - 101, "algorithm dynamic class 10 (DL ONLY)"); + test_successive_allocation(alloc_algorithm_a, 1, 1, mode, exp_A, "A"); + test_successive_allocation(alloc_algorithm_b, 10, 10, mode, exp_B, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 10, 10, mode, exp_dyn, "dynamic"); } -static void test_many_connections() +static void test_successive_allocations() { - test_many_connections(alloc_algorithm_a, 160, "algorithm A"); - test_many_connections(alloc_algorithm_b, 32, "algorithm B"); - test_many_connections(alloc_algorithm_dynamic, 160, "algorithm dynamic"); + test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AND_DL, 35, "A"); + test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL, 32, "B"); + + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); + + test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); + test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); + test_a_b_dyn(TEST_MODE_UL_AFTER_DL, 35, 32, 35); + test_a_b_dyn(TEST_MODE_UL_ONLY, 35, 32, 35); + test_a_b_dyn(TEST_MODE_DL_ONLY, 160, 32, 101); } static void test_2_consecutive_dl_tbfs() @@ -818,8 +800,10 @@ test_alloc_a(); test_alloc_b(); - test_successive_allocation(); - test_many_connections(); + test_successive_allocations(); + test_many_connections(alloc_algorithm_a, 160, "A"); + test_many_connections(alloc_algorithm_b, 32, "B"); + test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; } diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index cbb65aa..a46bedb 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -8588,7 +8588,7 @@ Mass test: TS0(OOOOOOOO)TS7 MS_Class=27 Mass test: TS0(OOOOOOOO)TS7 MS_Class=28 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29 -Going to test assignment with many TBF, algorithm A (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8624,8 +8624,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL and DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL and DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL and DL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8658,8 +8658,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 12 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL and DL) +Going to test assignment with many TBF, algorithm B class 12..12 (UL and DL) TBF[0] class 12 reserves ...DDCD. TBF[1] class 12 reserves .....DCD TBF[2] class 12 reserves ...DCD.. @@ -8692,8 +8692,8 @@ TBF[29] class 12 reserves ...CD... TBF[30] class 12 reserves ...CD... TBF[31] class 12 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 1-12 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 12..12 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..12 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8726,8 +8726,8 @@ TBF[29] class 6 reserves ......CD TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 1-29 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..29 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8760,8 +8760,8 @@ TBF[29] class 1 reserves ...C.... TBF[30] class 2 reserves ......DC TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 1-29 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8797,8 +8797,8 @@ TBF[1] class 4 reserves ...C.... TBF[2] class 5 reserves ...C.... TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL and UL) + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8834,8 +8834,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL and UL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (DL and UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8868,8 +8868,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL and UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8902,8 +8902,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm A (DL after UL) + Successfully allocated 32 UL TBFs, algorithm dynamic class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL after UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9064,8 +9064,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL after UL) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL after UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9098,8 +9098,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...DCD.. TBF[31] class 10 reserves .....DCD - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL after UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9195,8 +9195,8 @@ TBF[28] class 10 reserves ......C. TBF[31] class 10 reserves ....C... TBF[30] class 10 reserves ......C. - Successfully allocated 95 UL TBFs -Going to test assignment with many TBF, algorithm A (UL after DL) + Successfully allocated 95 UL TBFs, algorithm dynamic class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL after DL) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9232,8 +9232,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL after DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL after DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9266,8 +9266,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves .......U TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL after DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9303,8 +9303,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (UL only) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL only) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9340,8 +9340,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL only) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL only) +Going to test assignment with many TBF, algorithm B class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9374,8 +9374,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves ...U.... TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL only) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9411,8 +9411,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL ONLY) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL only) +Going to test assignment with many TBF, algorithm A class 1..1 (DL only) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9573,8 +9573,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL ONLY) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL only) +Going to test assignment with many TBF, algorithm B class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9607,8 +9607,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL ONLY) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9710,7 +9710,7 @@ TBF[29] class 10 reserves ....C... TBF[31] class 10 reserves ......C. TBF[31] class 10 reserves .......C - Successfully allocated 101 UL TBFs + Successfully allocated 101 UL TBFs, algorithm dynamic class 10..10 (DL only) Going to test assignment with many connections, algorithm A TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... -- To view, visit https://gerrit.osmocom.org/4957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 12:52:06 +0000 Subject: [PATCH] osmo-pcu[master]: AllocTest: remove assumption on max MS class In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4958 to look at the new patch set (#3). AllocTest: remove assumption on max MS class So far the allocation was only tested up to hardcoded MS class 29. Drop that assumption and test for all supported MS classes. Adjust expected test output as necessary. Note: using mslot_class_max() forces allocation for MS classes 30 and 31 for which no actual data is available (will be added in follow-up patches) which current implementation treats differently depending on TX/RX direction - see gprs_alloc_max_dl_slots_per_ms(). Because of that we have to adjust the expected number of allocations in test_successive_allocation() as well. Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err M tests/alloc/AllocTest.ok 3 files changed, 1,794 insertions(+), 899 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/4958/3 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index bbc8c7e..231a946 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -26,6 +26,7 @@ #include extern "C" { +#include "mslot_class.h" #include #include #include @@ -397,13 +398,13 @@ for (uint8_t ts5 = 0; ts5 < 2; ++ts5) for (uint8_t ts6 = 0; ts6 < 2; ++ts6) for (uint8_t ts7 = 0; ts7 < 2; ++ts7) - for (int ms_class = 0; ms_class < 30; ++ms_class) + for (int ms_class = 0; ms_class < mslot_class_max(); ++ms_class) test_alloc_mass(ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7, ms_class); } static void test_alloc_b() { - for (int i = 0; i < 30; ++i) + for (int i = 0; i < mslot_class_max(); ++i) test_alloc_b_for_ms(i); test_all_alloc_b(); @@ -684,7 +685,7 @@ trx->pdch[7].enable(); for (i = 0; i < ARRAY_SIZE(mode_seq); i += 1) { - counter1 = alloc_many_tbfs(&the_bts, 1, 29, mode_seq[i]); + counter1 = alloc_many_tbfs(&the_bts, 1, mslot_class_max(), mode_seq[i]); fprintf(stderr, " Allocated %d TBFs (previously %d)\n", counter1, counter2); @@ -724,9 +725,9 @@ test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL, 32, "B"); test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 29, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, mslot_class_max(), TEST_MODE_UL_AND_DL, 35, "dynamic"); test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); @@ -802,7 +803,7 @@ test_alloc_b(); test_successive_allocations(); test_many_connections(alloc_algorithm_a, 160, "A"); - test_many_connections(alloc_algorithm_b, 32, "B"); + test_many_connections(alloc_algorithm_b, 29, "B"); test_many_connections(alloc_algorithm_dynamic, 160, "dynamic"); test_2_consecutive_dl_tbfs(); return EXIT_SUCCESS; diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err index a74c42b..2e87c04 100644 --- a/tests/alloc/AllocTest.err +++ b/tests/alloc/AllocTest.err @@ -8,6 +8,518 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) - Failed to allocate a TS, no USF available +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. +Multislot class 30 not applicable. +Multislot class 31 not applicable. - Failed to allocate a TS, no USF available No TFI available. No TFI available. @@ -18,15 +530,8 @@ No TFI available. No TFI available. - Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. +Multislot class 30 not applicable. +Multislot class 30 not applicable. - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available No TFI available. @@ -561,130 +1066,15 @@ No TFI available. - Failed to find a usable TRX (TFI exhausted) Allocated 160 TBFs (previously 160) -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously -1) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously -1) No USF available - Allocated 24 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -- Failed to allocate a TFI - Allocated 32 TBFs (previously 32) -No TFI available. -No TFI available. -- Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. + Allocated 24 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. + Allocated 29 TBFs (previously 29) +Multislot class 30 not applicable. No TFI available. No TFI available. No TFI available. @@ -706,9 +1096,9 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 97 TBFs (previously -1) + Allocated 99 TBFs (previously -1) - Failed to allocate a TS, no USF available - Allocated 24 TBFs (previously 97) + Allocated 24 TBFs (previously 99) No TFI available. No TFI available. No TFI available. @@ -729,7 +1119,7 @@ No TFI available. No TFI available. - Failed to find a usable TRX (TFI exhausted) - Allocated 160 TBFs (previously 97) + Allocated 160 TBFs (previously 99) No TFI available. No TFI available. No TFI available. diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index a46bedb..a63f933 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -938,6 +938,10 @@ PDCH[4] is used for DL PDCH[3] is control_ts for DL PDCH[3] is first common for DL +Going to test multislot assignment MS_CLASS=30 +Testing UL then DL assignment. +Going to test multislot assignment MS_CLASS=31 +Testing UL then DL assignment. Mass test: TS0(xxxxxxxO)TS7 MS_Class=0 Mass test: TS0(xxxxxxxO)TS7 MS_Class=1 Mass test: TS0(xxxxxxxO)TS7 MS_Class=2 @@ -968,6 +972,8 @@ Mass test: TS0(xxxxxxxO)TS7 MS_Class=27 Mass test: TS0(xxxxxxxO)TS7 MS_Class=28 Mass test: TS0(xxxxxxxO)TS7 MS_Class=29 +Mass test: TS0(xxxxxxxO)TS7 MS_Class=30 +Mass test: TS0(xxxxxxxO)TS7 MS_Class=31 Mass test: TS0(xxxxxxOx)TS7 MS_Class=0 Mass test: TS0(xxxxxxOx)TS7 MS_Class=1 Mass test: TS0(xxxxxxOx)TS7 MS_Class=2 @@ -998,6 +1004,8 @@ Mass test: TS0(xxxxxxOx)TS7 MS_Class=27 Mass test: TS0(xxxxxxOx)TS7 MS_Class=28 Mass test: TS0(xxxxxxOx)TS7 MS_Class=29 +Mass test: TS0(xxxxxxOx)TS7 MS_Class=30 +Mass test: TS0(xxxxxxOx)TS7 MS_Class=31 Mass test: TS0(xxxxxxOO)TS7 MS_Class=0 Mass test: TS0(xxxxxxOO)TS7 MS_Class=1 Mass test: TS0(xxxxxxOO)TS7 MS_Class=2 @@ -1028,6 +1036,8 @@ Mass test: TS0(xxxxxxOO)TS7 MS_Class=27 Mass test: TS0(xxxxxxOO)TS7 MS_Class=28 Mass test: TS0(xxxxxxOO)TS7 MS_Class=29 +Mass test: TS0(xxxxxxOO)TS7 MS_Class=30 +Mass test: TS0(xxxxxxOO)TS7 MS_Class=31 Mass test: TS0(xxxxxOxx)TS7 MS_Class=0 Mass test: TS0(xxxxxOxx)TS7 MS_Class=1 Mass test: TS0(xxxxxOxx)TS7 MS_Class=2 @@ -1058,6 +1068,8 @@ Mass test: TS0(xxxxxOxx)TS7 MS_Class=27 Mass test: TS0(xxxxxOxx)TS7 MS_Class=28 Mass test: TS0(xxxxxOxx)TS7 MS_Class=29 +Mass test: TS0(xxxxxOxx)TS7 MS_Class=30 +Mass test: TS0(xxxxxOxx)TS7 MS_Class=31 Mass test: TS0(xxxxxOxO)TS7 MS_Class=0 Mass test: TS0(xxxxxOxO)TS7 MS_Class=1 Mass test: TS0(xxxxxOxO)TS7 MS_Class=2 @@ -1088,6 +1100,8 @@ Mass test: TS0(xxxxxOxO)TS7 MS_Class=27 Mass test: TS0(xxxxxOxO)TS7 MS_Class=28 Mass test: TS0(xxxxxOxO)TS7 MS_Class=29 +Mass test: TS0(xxxxxOxO)TS7 MS_Class=30 +Mass test: TS0(xxxxxOxO)TS7 MS_Class=31 Mass test: TS0(xxxxxOOx)TS7 MS_Class=0 Mass test: TS0(xxxxxOOx)TS7 MS_Class=1 Mass test: TS0(xxxxxOOx)TS7 MS_Class=2 @@ -1118,6 +1132,8 @@ Mass test: TS0(xxxxxOOx)TS7 MS_Class=27 Mass test: TS0(xxxxxOOx)TS7 MS_Class=28 Mass test: TS0(xxxxxOOx)TS7 MS_Class=29 +Mass test: TS0(xxxxxOOx)TS7 MS_Class=30 +Mass test: TS0(xxxxxOOx)TS7 MS_Class=31 Mass test: TS0(xxxxxOOO)TS7 MS_Class=0 Mass test: TS0(xxxxxOOO)TS7 MS_Class=1 Mass test: TS0(xxxxxOOO)TS7 MS_Class=2 @@ -1148,6 +1164,8 @@ Mass test: TS0(xxxxxOOO)TS7 MS_Class=27 Mass test: TS0(xxxxxOOO)TS7 MS_Class=28 Mass test: TS0(xxxxxOOO)TS7 MS_Class=29 +Mass test: TS0(xxxxxOOO)TS7 MS_Class=30 +Mass test: TS0(xxxxxOOO)TS7 MS_Class=31 Mass test: TS0(xxxxOxxx)TS7 MS_Class=0 Mass test: TS0(xxxxOxxx)TS7 MS_Class=1 Mass test: TS0(xxxxOxxx)TS7 MS_Class=2 @@ -1178,6 +1196,8 @@ Mass test: TS0(xxxxOxxx)TS7 MS_Class=27 Mass test: TS0(xxxxOxxx)TS7 MS_Class=28 Mass test: TS0(xxxxOxxx)TS7 MS_Class=29 +Mass test: TS0(xxxxOxxx)TS7 MS_Class=30 +Mass test: TS0(xxxxOxxx)TS7 MS_Class=31 Mass test: TS0(xxxxOxxO)TS7 MS_Class=0 Mass test: TS0(xxxxOxxO)TS7 MS_Class=1 Mass test: TS0(xxxxOxxO)TS7 MS_Class=2 @@ -1208,6 +1228,8 @@ Mass test: TS0(xxxxOxxO)TS7 MS_Class=27 Mass test: TS0(xxxxOxxO)TS7 MS_Class=28 Mass test: TS0(xxxxOxxO)TS7 MS_Class=29 +Mass test: TS0(xxxxOxxO)TS7 MS_Class=30 +Mass test: TS0(xxxxOxxO)TS7 MS_Class=31 Mass test: TS0(xxxxOxOx)TS7 MS_Class=0 Mass test: TS0(xxxxOxOx)TS7 MS_Class=1 Mass test: TS0(xxxxOxOx)TS7 MS_Class=2 @@ -1238,6 +1260,8 @@ Mass test: TS0(xxxxOxOx)TS7 MS_Class=27 Mass test: TS0(xxxxOxOx)TS7 MS_Class=28 Mass test: TS0(xxxxOxOx)TS7 MS_Class=29 +Mass test: TS0(xxxxOxOx)TS7 MS_Class=30 +Mass test: TS0(xxxxOxOx)TS7 MS_Class=31 Mass test: TS0(xxxxOxOO)TS7 MS_Class=0 Mass test: TS0(xxxxOxOO)TS7 MS_Class=1 Mass test: TS0(xxxxOxOO)TS7 MS_Class=2 @@ -1268,6 +1292,8 @@ Mass test: TS0(xxxxOxOO)TS7 MS_Class=27 Mass test: TS0(xxxxOxOO)TS7 MS_Class=28 Mass test: TS0(xxxxOxOO)TS7 MS_Class=29 +Mass test: TS0(xxxxOxOO)TS7 MS_Class=30 +Mass test: TS0(xxxxOxOO)TS7 MS_Class=31 Mass test: TS0(xxxxOOxx)TS7 MS_Class=0 Mass test: TS0(xxxxOOxx)TS7 MS_Class=1 Mass test: TS0(xxxxOOxx)TS7 MS_Class=2 @@ -1298,6 +1324,8 @@ Mass test: TS0(xxxxOOxx)TS7 MS_Class=27 Mass test: TS0(xxxxOOxx)TS7 MS_Class=28 Mass test: TS0(xxxxOOxx)TS7 MS_Class=29 +Mass test: TS0(xxxxOOxx)TS7 MS_Class=30 +Mass test: TS0(xxxxOOxx)TS7 MS_Class=31 Mass test: TS0(xxxxOOxO)TS7 MS_Class=0 Mass test: TS0(xxxxOOxO)TS7 MS_Class=1 Mass test: TS0(xxxxOOxO)TS7 MS_Class=2 @@ -1328,6 +1356,8 @@ Mass test: TS0(xxxxOOxO)TS7 MS_Class=27 Mass test: TS0(xxxxOOxO)TS7 MS_Class=28 Mass test: TS0(xxxxOOxO)TS7 MS_Class=29 +Mass test: TS0(xxxxOOxO)TS7 MS_Class=30 +Mass test: TS0(xxxxOOxO)TS7 MS_Class=31 Mass test: TS0(xxxxOOOx)TS7 MS_Class=0 Mass test: TS0(xxxxOOOx)TS7 MS_Class=1 Mass test: TS0(xxxxOOOx)TS7 MS_Class=2 @@ -1358,6 +1388,8 @@ Mass test: TS0(xxxxOOOx)TS7 MS_Class=27 Mass test: TS0(xxxxOOOx)TS7 MS_Class=28 Mass test: TS0(xxxxOOOx)TS7 MS_Class=29 +Mass test: TS0(xxxxOOOx)TS7 MS_Class=30 +Mass test: TS0(xxxxOOOx)TS7 MS_Class=31 Mass test: TS0(xxxxOOOO)TS7 MS_Class=0 Mass test: TS0(xxxxOOOO)TS7 MS_Class=1 Mass test: TS0(xxxxOOOO)TS7 MS_Class=2 @@ -1388,6 +1420,8 @@ Mass test: TS0(xxxxOOOO)TS7 MS_Class=27 Mass test: TS0(xxxxOOOO)TS7 MS_Class=28 Mass test: TS0(xxxxOOOO)TS7 MS_Class=29 +Mass test: TS0(xxxxOOOO)TS7 MS_Class=30 +Mass test: TS0(xxxxOOOO)TS7 MS_Class=31 Mass test: TS0(xxxOxxxx)TS7 MS_Class=0 Mass test: TS0(xxxOxxxx)TS7 MS_Class=1 Mass test: TS0(xxxOxxxx)TS7 MS_Class=2 @@ -1418,6 +1452,8 @@ Mass test: TS0(xxxOxxxx)TS7 MS_Class=27 Mass test: TS0(xxxOxxxx)TS7 MS_Class=28 Mass test: TS0(xxxOxxxx)TS7 MS_Class=29 +Mass test: TS0(xxxOxxxx)TS7 MS_Class=30 +Mass test: TS0(xxxOxxxx)TS7 MS_Class=31 Mass test: TS0(xxxOxxxO)TS7 MS_Class=0 Mass test: TS0(xxxOxxxO)TS7 MS_Class=1 Mass test: TS0(xxxOxxxO)TS7 MS_Class=2 @@ -1448,6 +1484,8 @@ Mass test: TS0(xxxOxxxO)TS7 MS_Class=27 Mass test: TS0(xxxOxxxO)TS7 MS_Class=28 Mass test: TS0(xxxOxxxO)TS7 MS_Class=29 +Mass test: TS0(xxxOxxxO)TS7 MS_Class=30 +Mass test: TS0(xxxOxxxO)TS7 MS_Class=31 Mass test: TS0(xxxOxxOx)TS7 MS_Class=0 Mass test: TS0(xxxOxxOx)TS7 MS_Class=1 Mass test: TS0(xxxOxxOx)TS7 MS_Class=2 @@ -1478,6 +1516,8 @@ Mass test: TS0(xxxOxxOx)TS7 MS_Class=27 Mass test: TS0(xxxOxxOx)TS7 MS_Class=28 Mass test: TS0(xxxOxxOx)TS7 MS_Class=29 +Mass test: TS0(xxxOxxOx)TS7 MS_Class=30 +Mass test: TS0(xxxOxxOx)TS7 MS_Class=31 Mass test: TS0(xxxOxxOO)TS7 MS_Class=0 Mass test: TS0(xxxOxxOO)TS7 MS_Class=1 Mass test: TS0(xxxOxxOO)TS7 MS_Class=2 @@ -1508,6 +1548,8 @@ Mass test: TS0(xxxOxxOO)TS7 MS_Class=27 Mass test: TS0(xxxOxxOO)TS7 MS_Class=28 Mass test: TS0(xxxOxxOO)TS7 MS_Class=29 +Mass test: TS0(xxxOxxOO)TS7 MS_Class=30 +Mass test: TS0(xxxOxxOO)TS7 MS_Class=31 Mass test: TS0(xxxOxOxx)TS7 MS_Class=0 Mass test: TS0(xxxOxOxx)TS7 MS_Class=1 Mass test: TS0(xxxOxOxx)TS7 MS_Class=2 @@ -1538,6 +1580,8 @@ Mass test: TS0(xxxOxOxx)TS7 MS_Class=27 Mass test: TS0(xxxOxOxx)TS7 MS_Class=28 Mass test: TS0(xxxOxOxx)TS7 MS_Class=29 +Mass test: TS0(xxxOxOxx)TS7 MS_Class=30 +Mass test: TS0(xxxOxOxx)TS7 MS_Class=31 Mass test: TS0(xxxOxOxO)TS7 MS_Class=0 Mass test: TS0(xxxOxOxO)TS7 MS_Class=1 Mass test: TS0(xxxOxOxO)TS7 MS_Class=2 @@ -1568,6 +1612,8 @@ Mass test: TS0(xxxOxOxO)TS7 MS_Class=27 Mass test: TS0(xxxOxOxO)TS7 MS_Class=28 Mass test: TS0(xxxOxOxO)TS7 MS_Class=29 +Mass test: TS0(xxxOxOxO)TS7 MS_Class=30 +Mass test: TS0(xxxOxOxO)TS7 MS_Class=31 Mass test: TS0(xxxOxOOx)TS7 MS_Class=0 Mass test: TS0(xxxOxOOx)TS7 MS_Class=1 Mass test: TS0(xxxOxOOx)TS7 MS_Class=2 @@ -1598,6 +1644,8 @@ Mass test: TS0(xxxOxOOx)TS7 MS_Class=27 Mass test: TS0(xxxOxOOx)TS7 MS_Class=28 Mass test: TS0(xxxOxOOx)TS7 MS_Class=29 +Mass test: TS0(xxxOxOOx)TS7 MS_Class=30 +Mass test: TS0(xxxOxOOx)TS7 MS_Class=31 Mass test: TS0(xxxOxOOO)TS7 MS_Class=0 Mass test: TS0(xxxOxOOO)TS7 MS_Class=1 Mass test: TS0(xxxOxOOO)TS7 MS_Class=2 @@ -1628,6 +1676,8 @@ Mass test: TS0(xxxOxOOO)TS7 MS_Class=27 Mass test: TS0(xxxOxOOO)TS7 MS_Class=28 Mass test: TS0(xxxOxOOO)TS7 MS_Class=29 +Mass test: TS0(xxxOxOOO)TS7 MS_Class=30 +Mass test: TS0(xxxOxOOO)TS7 MS_Class=31 Mass test: TS0(xxxOOxxx)TS7 MS_Class=0 Mass test: TS0(xxxOOxxx)TS7 MS_Class=1 Mass test: TS0(xxxOOxxx)TS7 MS_Class=2 @@ -1658,6 +1708,8 @@ Mass test: TS0(xxxOOxxx)TS7 MS_Class=27 Mass test: TS0(xxxOOxxx)TS7 MS_Class=28 Mass test: TS0(xxxOOxxx)TS7 MS_Class=29 +Mass test: TS0(xxxOOxxx)TS7 MS_Class=30 +Mass test: TS0(xxxOOxxx)TS7 MS_Class=31 Mass test: TS0(xxxOOxxO)TS7 MS_Class=0 Mass test: TS0(xxxOOxxO)TS7 MS_Class=1 Mass test: TS0(xxxOOxxO)TS7 MS_Class=2 @@ -1688,6 +1740,8 @@ Mass test: TS0(xxxOOxxO)TS7 MS_Class=27 Mass test: TS0(xxxOOxxO)TS7 MS_Class=28 Mass test: TS0(xxxOOxxO)TS7 MS_Class=29 +Mass test: TS0(xxxOOxxO)TS7 MS_Class=30 +Mass test: TS0(xxxOOxxO)TS7 MS_Class=31 Mass test: TS0(xxxOOxOx)TS7 MS_Class=0 Mass test: TS0(xxxOOxOx)TS7 MS_Class=1 Mass test: TS0(xxxOOxOx)TS7 MS_Class=2 @@ -1718,6 +1772,8 @@ Mass test: TS0(xxxOOxOx)TS7 MS_Class=27 Mass test: TS0(xxxOOxOx)TS7 MS_Class=28 Mass test: TS0(xxxOOxOx)TS7 MS_Class=29 +Mass test: TS0(xxxOOxOx)TS7 MS_Class=30 +Mass test: TS0(xxxOOxOx)TS7 MS_Class=31 Mass test: TS0(xxxOOxOO)TS7 MS_Class=0 Mass test: TS0(xxxOOxOO)TS7 MS_Class=1 Mass test: TS0(xxxOOxOO)TS7 MS_Class=2 @@ -1748,6 +1804,8 @@ Mass test: TS0(xxxOOxOO)TS7 MS_Class=27 Mass test: TS0(xxxOOxOO)TS7 MS_Class=28 Mass test: TS0(xxxOOxOO)TS7 MS_Class=29 +Mass test: TS0(xxxOOxOO)TS7 MS_Class=30 +Mass test: TS0(xxxOOxOO)TS7 MS_Class=31 Mass test: TS0(xxxOOOxx)TS7 MS_Class=0 Mass test: TS0(xxxOOOxx)TS7 MS_Class=1 Mass test: TS0(xxxOOOxx)TS7 MS_Class=2 @@ -1778,6 +1836,8 @@ Mass test: TS0(xxxOOOxx)TS7 MS_Class=27 Mass test: TS0(xxxOOOxx)TS7 MS_Class=28 Mass test: TS0(xxxOOOxx)TS7 MS_Class=29 +Mass test: TS0(xxxOOOxx)TS7 MS_Class=30 +Mass test: TS0(xxxOOOxx)TS7 MS_Class=31 Mass test: TS0(xxxOOOxO)TS7 MS_Class=0 Mass test: TS0(xxxOOOxO)TS7 MS_Class=1 Mass test: TS0(xxxOOOxO)TS7 MS_Class=2 @@ -1808,6 +1868,8 @@ Mass test: TS0(xxxOOOxO)TS7 MS_Class=27 Mass test: TS0(xxxOOOxO)TS7 MS_Class=28 Mass test: TS0(xxxOOOxO)TS7 MS_Class=29 +Mass test: TS0(xxxOOOxO)TS7 MS_Class=30 +Mass test: TS0(xxxOOOxO)TS7 MS_Class=31 Mass test: TS0(xxxOOOOx)TS7 MS_Class=0 Mass test: TS0(xxxOOOOx)TS7 MS_Class=1 Mass test: TS0(xxxOOOOx)TS7 MS_Class=2 @@ -1838,6 +1900,8 @@ Mass test: TS0(xxxOOOOx)TS7 MS_Class=27 Mass test: TS0(xxxOOOOx)TS7 MS_Class=28 Mass test: TS0(xxxOOOOx)TS7 MS_Class=29 +Mass test: TS0(xxxOOOOx)TS7 MS_Class=30 +Mass test: TS0(xxxOOOOx)TS7 MS_Class=31 Mass test: TS0(xxxOOOOO)TS7 MS_Class=0 Mass test: TS0(xxxOOOOO)TS7 MS_Class=1 Mass test: TS0(xxxOOOOO)TS7 MS_Class=2 @@ -1868,6 +1932,8 @@ Mass test: TS0(xxxOOOOO)TS7 MS_Class=27 Mass test: TS0(xxxOOOOO)TS7 MS_Class=28 Mass test: TS0(xxxOOOOO)TS7 MS_Class=29 +Mass test: TS0(xxxOOOOO)TS7 MS_Class=30 +Mass test: TS0(xxxOOOOO)TS7 MS_Class=31 Mass test: TS0(xxOxxxxx)TS7 MS_Class=0 Mass test: TS0(xxOxxxxx)TS7 MS_Class=1 Mass test: TS0(xxOxxxxx)TS7 MS_Class=2 @@ -1898,6 +1964,8 @@ Mass test: TS0(xxOxxxxx)TS7 MS_Class=27 Mass test: TS0(xxOxxxxx)TS7 MS_Class=28 Mass test: TS0(xxOxxxxx)TS7 MS_Class=29 +Mass test: TS0(xxOxxxxx)TS7 MS_Class=30 +Mass test: TS0(xxOxxxxx)TS7 MS_Class=31 Mass test: TS0(xxOxxxxO)TS7 MS_Class=0 Mass test: TS0(xxOxxxxO)TS7 MS_Class=1 Mass test: TS0(xxOxxxxO)TS7 MS_Class=2 @@ -1928,6 +1996,8 @@ Mass test: TS0(xxOxxxxO)TS7 MS_Class=27 Mass test: TS0(xxOxxxxO)TS7 MS_Class=28 Mass test: TS0(xxOxxxxO)TS7 MS_Class=29 +Mass test: TS0(xxOxxxxO)TS7 MS_Class=30 +Mass test: TS0(xxOxxxxO)TS7 MS_Class=31 Mass test: TS0(xxOxxxOx)TS7 MS_Class=0 Mass test: TS0(xxOxxxOx)TS7 MS_Class=1 Mass test: TS0(xxOxxxOx)TS7 MS_Class=2 @@ -1958,6 +2028,8 @@ Mass test: TS0(xxOxxxOx)TS7 MS_Class=27 Mass test: TS0(xxOxxxOx)TS7 MS_Class=28 Mass test: TS0(xxOxxxOx)TS7 MS_Class=29 +Mass test: TS0(xxOxxxOx)TS7 MS_Class=30 +Mass test: TS0(xxOxxxOx)TS7 MS_Class=31 Mass test: TS0(xxOxxxOO)TS7 MS_Class=0 Mass test: TS0(xxOxxxOO)TS7 MS_Class=1 Mass test: TS0(xxOxxxOO)TS7 MS_Class=2 @@ -1988,6 +2060,8 @@ Mass test: TS0(xxOxxxOO)TS7 MS_Class=27 Mass test: TS0(xxOxxxOO)TS7 MS_Class=28 Mass test: TS0(xxOxxxOO)TS7 MS_Class=29 +Mass test: TS0(xxOxxxOO)TS7 MS_Class=30 +Mass test: TS0(xxOxxxOO)TS7 MS_Class=31 Mass test: TS0(xxOxxOxx)TS7 MS_Class=0 Mass test: TS0(xxOxxOxx)TS7 MS_Class=1 Mass test: TS0(xxOxxOxx)TS7 MS_Class=2 @@ -2018,6 +2092,8 @@ Mass test: TS0(xxOxxOxx)TS7 MS_Class=27 Mass test: TS0(xxOxxOxx)TS7 MS_Class=28 Mass test: TS0(xxOxxOxx)TS7 MS_Class=29 +Mass test: TS0(xxOxxOxx)TS7 MS_Class=30 +Mass test: TS0(xxOxxOxx)TS7 MS_Class=31 Mass test: TS0(xxOxxOxO)TS7 MS_Class=0 Mass test: TS0(xxOxxOxO)TS7 MS_Class=1 Mass test: TS0(xxOxxOxO)TS7 MS_Class=2 @@ -2048,6 +2124,8 @@ Mass test: TS0(xxOxxOxO)TS7 MS_Class=27 Mass test: TS0(xxOxxOxO)TS7 MS_Class=28 Mass test: TS0(xxOxxOxO)TS7 MS_Class=29 +Mass test: TS0(xxOxxOxO)TS7 MS_Class=30 +Mass test: TS0(xxOxxOxO)TS7 MS_Class=31 Mass test: TS0(xxOxxOOx)TS7 MS_Class=0 Mass test: TS0(xxOxxOOx)TS7 MS_Class=1 Mass test: TS0(xxOxxOOx)TS7 MS_Class=2 @@ -2078,6 +2156,8 @@ Mass test: TS0(xxOxxOOx)TS7 MS_Class=27 Mass test: TS0(xxOxxOOx)TS7 MS_Class=28 Mass test: TS0(xxOxxOOx)TS7 MS_Class=29 +Mass test: TS0(xxOxxOOx)TS7 MS_Class=30 +Mass test: TS0(xxOxxOOx)TS7 MS_Class=31 Mass test: TS0(xxOxxOOO)TS7 MS_Class=0 Mass test: TS0(xxOxxOOO)TS7 MS_Class=1 Mass test: TS0(xxOxxOOO)TS7 MS_Class=2 @@ -2108,6 +2188,8 @@ Mass test: TS0(xxOxxOOO)TS7 MS_Class=27 Mass test: TS0(xxOxxOOO)TS7 MS_Class=28 Mass test: TS0(xxOxxOOO)TS7 MS_Class=29 +Mass test: TS0(xxOxxOOO)TS7 MS_Class=30 +Mass test: TS0(xxOxxOOO)TS7 MS_Class=31 Mass test: TS0(xxOxOxxx)TS7 MS_Class=0 Mass test: TS0(xxOxOxxx)TS7 MS_Class=1 Mass test: TS0(xxOxOxxx)TS7 MS_Class=2 @@ -2138,6 +2220,8 @@ Mass test: TS0(xxOxOxxx)TS7 MS_Class=27 Mass test: TS0(xxOxOxxx)TS7 MS_Class=28 Mass test: TS0(xxOxOxxx)TS7 MS_Class=29 +Mass test: TS0(xxOxOxxx)TS7 MS_Class=30 +Mass test: TS0(xxOxOxxx)TS7 MS_Class=31 Mass test: TS0(xxOxOxxO)TS7 MS_Class=0 Mass test: TS0(xxOxOxxO)TS7 MS_Class=1 Mass test: TS0(xxOxOxxO)TS7 MS_Class=2 @@ -2168,6 +2252,8 @@ Mass test: TS0(xxOxOxxO)TS7 MS_Class=27 Mass test: TS0(xxOxOxxO)TS7 MS_Class=28 Mass test: TS0(xxOxOxxO)TS7 MS_Class=29 +Mass test: TS0(xxOxOxxO)TS7 MS_Class=30 +Mass test: TS0(xxOxOxxO)TS7 MS_Class=31 Mass test: TS0(xxOxOxOx)TS7 MS_Class=0 Mass test: TS0(xxOxOxOx)TS7 MS_Class=1 Mass test: TS0(xxOxOxOx)TS7 MS_Class=2 @@ -2198,6 +2284,8 @@ Mass test: TS0(xxOxOxOx)TS7 MS_Class=27 Mass test: TS0(xxOxOxOx)TS7 MS_Class=28 Mass test: TS0(xxOxOxOx)TS7 MS_Class=29 +Mass test: TS0(xxOxOxOx)TS7 MS_Class=30 +Mass test: TS0(xxOxOxOx)TS7 MS_Class=31 Mass test: TS0(xxOxOxOO)TS7 MS_Class=0 Mass test: TS0(xxOxOxOO)TS7 MS_Class=1 Mass test: TS0(xxOxOxOO)TS7 MS_Class=2 @@ -2228,6 +2316,8 @@ Mass test: TS0(xxOxOxOO)TS7 MS_Class=27 Mass test: TS0(xxOxOxOO)TS7 MS_Class=28 Mass test: TS0(xxOxOxOO)TS7 MS_Class=29 +Mass test: TS0(xxOxOxOO)TS7 MS_Class=30 +Mass test: TS0(xxOxOxOO)TS7 MS_Class=31 Mass test: TS0(xxOxOOxx)TS7 MS_Class=0 Mass test: TS0(xxOxOOxx)TS7 MS_Class=1 Mass test: TS0(xxOxOOxx)TS7 MS_Class=2 @@ -2258,6 +2348,8 @@ Mass test: TS0(xxOxOOxx)TS7 MS_Class=27 Mass test: TS0(xxOxOOxx)TS7 MS_Class=28 Mass test: TS0(xxOxOOxx)TS7 MS_Class=29 +Mass test: TS0(xxOxOOxx)TS7 MS_Class=30 +Mass test: TS0(xxOxOOxx)TS7 MS_Class=31 Mass test: TS0(xxOxOOxO)TS7 MS_Class=0 Mass test: TS0(xxOxOOxO)TS7 MS_Class=1 Mass test: TS0(xxOxOOxO)TS7 MS_Class=2 @@ -2288,6 +2380,8 @@ Mass test: TS0(xxOxOOxO)TS7 MS_Class=27 Mass test: TS0(xxOxOOxO)TS7 MS_Class=28 Mass test: TS0(xxOxOOxO)TS7 MS_Class=29 +Mass test: TS0(xxOxOOxO)TS7 MS_Class=30 +Mass test: TS0(xxOxOOxO)TS7 MS_Class=31 Mass test: TS0(xxOxOOOx)TS7 MS_Class=0 Mass test: TS0(xxOxOOOx)TS7 MS_Class=1 Mass test: TS0(xxOxOOOx)TS7 MS_Class=2 @@ -2318,6 +2412,8 @@ Mass test: TS0(xxOxOOOx)TS7 MS_Class=27 Mass test: TS0(xxOxOOOx)TS7 MS_Class=28 Mass test: TS0(xxOxOOOx)TS7 MS_Class=29 +Mass test: TS0(xxOxOOOx)TS7 MS_Class=30 +Mass test: TS0(xxOxOOOx)TS7 MS_Class=31 Mass test: TS0(xxOxOOOO)TS7 MS_Class=0 Mass test: TS0(xxOxOOOO)TS7 MS_Class=1 Mass test: TS0(xxOxOOOO)TS7 MS_Class=2 @@ -2348,6 +2444,8 @@ Mass test: TS0(xxOxOOOO)TS7 MS_Class=27 Mass test: TS0(xxOxOOOO)TS7 MS_Class=28 Mass test: TS0(xxOxOOOO)TS7 MS_Class=29 +Mass test: TS0(xxOxOOOO)TS7 MS_Class=30 +Mass test: TS0(xxOxOOOO)TS7 MS_Class=31 Mass test: TS0(xxOOxxxx)TS7 MS_Class=0 Mass test: TS0(xxOOxxxx)TS7 MS_Class=1 Mass test: TS0(xxOOxxxx)TS7 MS_Class=2 @@ -2378,6 +2476,8 @@ Mass test: TS0(xxOOxxxx)TS7 MS_Class=27 Mass test: TS0(xxOOxxxx)TS7 MS_Class=28 Mass test: TS0(xxOOxxxx)TS7 MS_Class=29 +Mass test: TS0(xxOOxxxx)TS7 MS_Class=30 +Mass test: TS0(xxOOxxxx)TS7 MS_Class=31 Mass test: TS0(xxOOxxxO)TS7 MS_Class=0 Mass test: TS0(xxOOxxxO)TS7 MS_Class=1 Mass test: TS0(xxOOxxxO)TS7 MS_Class=2 @@ -2408,6 +2508,8 @@ Mass test: TS0(xxOOxxxO)TS7 MS_Class=27 Mass test: TS0(xxOOxxxO)TS7 MS_Class=28 Mass test: TS0(xxOOxxxO)TS7 MS_Class=29 +Mass test: TS0(xxOOxxxO)TS7 MS_Class=30 +Mass test: TS0(xxOOxxxO)TS7 MS_Class=31 Mass test: TS0(xxOOxxOx)TS7 MS_Class=0 Mass test: TS0(xxOOxxOx)TS7 MS_Class=1 Mass test: TS0(xxOOxxOx)TS7 MS_Class=2 @@ -2438,6 +2540,8 @@ Mass test: TS0(xxOOxxOx)TS7 MS_Class=27 Mass test: TS0(xxOOxxOx)TS7 MS_Class=28 Mass test: TS0(xxOOxxOx)TS7 MS_Class=29 +Mass test: TS0(xxOOxxOx)TS7 MS_Class=30 +Mass test: TS0(xxOOxxOx)TS7 MS_Class=31 Mass test: TS0(xxOOxxOO)TS7 MS_Class=0 Mass test: TS0(xxOOxxOO)TS7 MS_Class=1 Mass test: TS0(xxOOxxOO)TS7 MS_Class=2 @@ -2468,6 +2572,8 @@ Mass test: TS0(xxOOxxOO)TS7 MS_Class=27 Mass test: TS0(xxOOxxOO)TS7 MS_Class=28 Mass test: TS0(xxOOxxOO)TS7 MS_Class=29 +Mass test: TS0(xxOOxxOO)TS7 MS_Class=30 +Mass test: TS0(xxOOxxOO)TS7 MS_Class=31 Mass test: TS0(xxOOxOxx)TS7 MS_Class=0 Mass test: TS0(xxOOxOxx)TS7 MS_Class=1 Mass test: TS0(xxOOxOxx)TS7 MS_Class=2 @@ -2498,6 +2604,8 @@ Mass test: TS0(xxOOxOxx)TS7 MS_Class=27 Mass test: TS0(xxOOxOxx)TS7 MS_Class=28 Mass test: TS0(xxOOxOxx)TS7 MS_Class=29 +Mass test: TS0(xxOOxOxx)TS7 MS_Class=30 +Mass test: TS0(xxOOxOxx)TS7 MS_Class=31 Mass test: TS0(xxOOxOxO)TS7 MS_Class=0 Mass test: TS0(xxOOxOxO)TS7 MS_Class=1 Mass test: TS0(xxOOxOxO)TS7 MS_Class=2 @@ -2528,6 +2636,8 @@ Mass test: TS0(xxOOxOxO)TS7 MS_Class=27 Mass test: TS0(xxOOxOxO)TS7 MS_Class=28 Mass test: TS0(xxOOxOxO)TS7 MS_Class=29 +Mass test: TS0(xxOOxOxO)TS7 MS_Class=30 +Mass test: TS0(xxOOxOxO)TS7 MS_Class=31 Mass test: TS0(xxOOxOOx)TS7 MS_Class=0 Mass test: TS0(xxOOxOOx)TS7 MS_Class=1 Mass test: TS0(xxOOxOOx)TS7 MS_Class=2 @@ -2558,6 +2668,8 @@ Mass test: TS0(xxOOxOOx)TS7 MS_Class=27 Mass test: TS0(xxOOxOOx)TS7 MS_Class=28 Mass test: TS0(xxOOxOOx)TS7 MS_Class=29 +Mass test: TS0(xxOOxOOx)TS7 MS_Class=30 +Mass test: TS0(xxOOxOOx)TS7 MS_Class=31 Mass test: TS0(xxOOxOOO)TS7 MS_Class=0 Mass test: TS0(xxOOxOOO)TS7 MS_Class=1 Mass test: TS0(xxOOxOOO)TS7 MS_Class=2 @@ -2588,6 +2700,8 @@ Mass test: TS0(xxOOxOOO)TS7 MS_Class=27 Mass test: TS0(xxOOxOOO)TS7 MS_Class=28 Mass test: TS0(xxOOxOOO)TS7 MS_Class=29 +Mass test: TS0(xxOOxOOO)TS7 MS_Class=30 +Mass test: TS0(xxOOxOOO)TS7 MS_Class=31 Mass test: TS0(xxOOOxxx)TS7 MS_Class=0 Mass test: TS0(xxOOOxxx)TS7 MS_Class=1 Mass test: TS0(xxOOOxxx)TS7 MS_Class=2 @@ -2618,6 +2732,8 @@ Mass test: TS0(xxOOOxxx)TS7 MS_Class=27 Mass test: TS0(xxOOOxxx)TS7 MS_Class=28 Mass test: TS0(xxOOOxxx)TS7 MS_Class=29 +Mass test: TS0(xxOOOxxx)TS7 MS_Class=30 +Mass test: TS0(xxOOOxxx)TS7 MS_Class=31 Mass test: TS0(xxOOOxxO)TS7 MS_Class=0 Mass test: TS0(xxOOOxxO)TS7 MS_Class=1 Mass test: TS0(xxOOOxxO)TS7 MS_Class=2 @@ -2648,6 +2764,8 @@ Mass test: TS0(xxOOOxxO)TS7 MS_Class=27 Mass test: TS0(xxOOOxxO)TS7 MS_Class=28 Mass test: TS0(xxOOOxxO)TS7 MS_Class=29 +Mass test: TS0(xxOOOxxO)TS7 MS_Class=30 +Mass test: TS0(xxOOOxxO)TS7 MS_Class=31 Mass test: TS0(xxOOOxOx)TS7 MS_Class=0 Mass test: TS0(xxOOOxOx)TS7 MS_Class=1 Mass test: TS0(xxOOOxOx)TS7 MS_Class=2 @@ -2678,6 +2796,8 @@ Mass test: TS0(xxOOOxOx)TS7 MS_Class=27 Mass test: TS0(xxOOOxOx)TS7 MS_Class=28 Mass test: TS0(xxOOOxOx)TS7 MS_Class=29 +Mass test: TS0(xxOOOxOx)TS7 MS_Class=30 +Mass test: TS0(xxOOOxOx)TS7 MS_Class=31 Mass test: TS0(xxOOOxOO)TS7 MS_Class=0 Mass test: TS0(xxOOOxOO)TS7 MS_Class=1 Mass test: TS0(xxOOOxOO)TS7 MS_Class=2 @@ -2708,6 +2828,8 @@ Mass test: TS0(xxOOOxOO)TS7 MS_Class=27 Mass test: TS0(xxOOOxOO)TS7 MS_Class=28 Mass test: TS0(xxOOOxOO)TS7 MS_Class=29 +Mass test: TS0(xxOOOxOO)TS7 MS_Class=30 +Mass test: TS0(xxOOOxOO)TS7 MS_Class=31 Mass test: TS0(xxOOOOxx)TS7 MS_Class=0 Mass test: TS0(xxOOOOxx)TS7 MS_Class=1 Mass test: TS0(xxOOOOxx)TS7 MS_Class=2 @@ -2738,6 +2860,8 @@ Mass test: TS0(xxOOOOxx)TS7 MS_Class=27 Mass test: TS0(xxOOOOxx)TS7 MS_Class=28 Mass test: TS0(xxOOOOxx)TS7 MS_Class=29 +Mass test: TS0(xxOOOOxx)TS7 MS_Class=30 +Mass test: TS0(xxOOOOxx)TS7 MS_Class=31 Mass test: TS0(xxOOOOxO)TS7 MS_Class=0 Mass test: TS0(xxOOOOxO)TS7 MS_Class=1 Mass test: TS0(xxOOOOxO)TS7 MS_Class=2 @@ -2768,6 +2892,8 @@ Mass test: TS0(xxOOOOxO)TS7 MS_Class=27 Mass test: TS0(xxOOOOxO)TS7 MS_Class=28 Mass test: TS0(xxOOOOxO)TS7 MS_Class=29 +Mass test: TS0(xxOOOOxO)TS7 MS_Class=30 +Mass test: TS0(xxOOOOxO)TS7 MS_Class=31 Mass test: TS0(xxOOOOOx)TS7 MS_Class=0 Mass test: TS0(xxOOOOOx)TS7 MS_Class=1 Mass test: TS0(xxOOOOOx)TS7 MS_Class=2 @@ -2798,6 +2924,8 @@ Mass test: TS0(xxOOOOOx)TS7 MS_Class=27 Mass test: TS0(xxOOOOOx)TS7 MS_Class=28 Mass test: TS0(xxOOOOOx)TS7 MS_Class=29 +Mass test: TS0(xxOOOOOx)TS7 MS_Class=30 +Mass test: TS0(xxOOOOOx)TS7 MS_Class=31 Mass test: TS0(xxOOOOOO)TS7 MS_Class=0 Mass test: TS0(xxOOOOOO)TS7 MS_Class=1 Mass test: TS0(xxOOOOOO)TS7 MS_Class=2 @@ -2828,6 +2956,8 @@ Mass test: TS0(xxOOOOOO)TS7 MS_Class=27 Mass test: TS0(xxOOOOOO)TS7 MS_Class=28 Mass test: TS0(xxOOOOOO)TS7 MS_Class=29 +Mass test: TS0(xxOOOOOO)TS7 MS_Class=30 +Mass test: TS0(xxOOOOOO)TS7 MS_Class=31 Mass test: TS0(xOxxxxxx)TS7 MS_Class=0 Mass test: TS0(xOxxxxxx)TS7 MS_Class=1 Mass test: TS0(xOxxxxxx)TS7 MS_Class=2 @@ -2858,6 +2988,8 @@ Mass test: TS0(xOxxxxxx)TS7 MS_Class=27 Mass test: TS0(xOxxxxxx)TS7 MS_Class=28 Mass test: TS0(xOxxxxxx)TS7 MS_Class=29 +Mass test: TS0(xOxxxxxx)TS7 MS_Class=30 +Mass test: TS0(xOxxxxxx)TS7 MS_Class=31 Mass test: TS0(xOxxxxxO)TS7 MS_Class=0 Mass test: TS0(xOxxxxxO)TS7 MS_Class=1 Mass test: TS0(xOxxxxxO)TS7 MS_Class=2 @@ -2888,6 +3020,8 @@ Mass test: TS0(xOxxxxxO)TS7 MS_Class=27 Mass test: TS0(xOxxxxxO)TS7 MS_Class=28 Mass test: TS0(xOxxxxxO)TS7 MS_Class=29 +Mass test: TS0(xOxxxxxO)TS7 MS_Class=30 +Mass test: TS0(xOxxxxxO)TS7 MS_Class=31 Mass test: TS0(xOxxxxOx)TS7 MS_Class=0 Mass test: TS0(xOxxxxOx)TS7 MS_Class=1 Mass test: TS0(xOxxxxOx)TS7 MS_Class=2 @@ -2918,6 +3052,8 @@ Mass test: TS0(xOxxxxOx)TS7 MS_Class=27 Mass test: TS0(xOxxxxOx)TS7 MS_Class=28 Mass test: TS0(xOxxxxOx)TS7 MS_Class=29 +Mass test: TS0(xOxxxxOx)TS7 MS_Class=30 +Mass test: TS0(xOxxxxOx)TS7 MS_Class=31 Mass test: TS0(xOxxxxOO)TS7 MS_Class=0 Mass test: TS0(xOxxxxOO)TS7 MS_Class=1 Mass test: TS0(xOxxxxOO)TS7 MS_Class=2 @@ -2948,6 +3084,8 @@ Mass test: TS0(xOxxxxOO)TS7 MS_Class=27 Mass test: TS0(xOxxxxOO)TS7 MS_Class=28 Mass test: TS0(xOxxxxOO)TS7 MS_Class=29 +Mass test: TS0(xOxxxxOO)TS7 MS_Class=30 +Mass test: TS0(xOxxxxOO)TS7 MS_Class=31 Mass test: TS0(xOxxxOxx)TS7 MS_Class=0 Mass test: TS0(xOxxxOxx)TS7 MS_Class=1 Mass test: TS0(xOxxxOxx)TS7 MS_Class=2 @@ -2978,6 +3116,8 @@ Mass test: TS0(xOxxxOxx)TS7 MS_Class=27 Mass test: TS0(xOxxxOxx)TS7 MS_Class=28 Mass test: TS0(xOxxxOxx)TS7 MS_Class=29 +Mass test: TS0(xOxxxOxx)TS7 MS_Class=30 +Mass test: TS0(xOxxxOxx)TS7 MS_Class=31 Mass test: TS0(xOxxxOxO)TS7 MS_Class=0 Mass test: TS0(xOxxxOxO)TS7 MS_Class=1 Mass test: TS0(xOxxxOxO)TS7 MS_Class=2 @@ -3008,6 +3148,8 @@ Mass test: TS0(xOxxxOxO)TS7 MS_Class=27 Mass test: TS0(xOxxxOxO)TS7 MS_Class=28 Mass test: TS0(xOxxxOxO)TS7 MS_Class=29 +Mass test: TS0(xOxxxOxO)TS7 MS_Class=30 +Mass test: TS0(xOxxxOxO)TS7 MS_Class=31 Mass test: TS0(xOxxxOOx)TS7 MS_Class=0 Mass test: TS0(xOxxxOOx)TS7 MS_Class=1 Mass test: TS0(xOxxxOOx)TS7 MS_Class=2 @@ -3038,6 +3180,8 @@ Mass test: TS0(xOxxxOOx)TS7 MS_Class=27 Mass test: TS0(xOxxxOOx)TS7 MS_Class=28 Mass test: TS0(xOxxxOOx)TS7 MS_Class=29 +Mass test: TS0(xOxxxOOx)TS7 MS_Class=30 +Mass test: TS0(xOxxxOOx)TS7 MS_Class=31 Mass test: TS0(xOxxxOOO)TS7 MS_Class=0 Mass test: TS0(xOxxxOOO)TS7 MS_Class=1 Mass test: TS0(xOxxxOOO)TS7 MS_Class=2 @@ -3068,6 +3212,8 @@ Mass test: TS0(xOxxxOOO)TS7 MS_Class=27 Mass test: TS0(xOxxxOOO)TS7 MS_Class=28 Mass test: TS0(xOxxxOOO)TS7 MS_Class=29 +Mass test: TS0(xOxxxOOO)TS7 MS_Class=30 +Mass test: TS0(xOxxxOOO)TS7 MS_Class=31 Mass test: TS0(xOxxOxxx)TS7 MS_Class=0 Mass test: TS0(xOxxOxxx)TS7 MS_Class=1 Mass test: TS0(xOxxOxxx)TS7 MS_Class=2 @@ -3098,6 +3244,8 @@ Mass test: TS0(xOxxOxxx)TS7 MS_Class=27 Mass test: TS0(xOxxOxxx)TS7 MS_Class=28 Mass test: TS0(xOxxOxxx)TS7 MS_Class=29 +Mass test: TS0(xOxxOxxx)TS7 MS_Class=30 +Mass test: TS0(xOxxOxxx)TS7 MS_Class=31 Mass test: TS0(xOxxOxxO)TS7 MS_Class=0 Mass test: TS0(xOxxOxxO)TS7 MS_Class=1 Mass test: TS0(xOxxOxxO)TS7 MS_Class=2 @@ -3128,6 +3276,8 @@ Mass test: TS0(xOxxOxxO)TS7 MS_Class=27 Mass test: TS0(xOxxOxxO)TS7 MS_Class=28 Mass test: TS0(xOxxOxxO)TS7 MS_Class=29 +Mass test: TS0(xOxxOxxO)TS7 MS_Class=30 +Mass test: TS0(xOxxOxxO)TS7 MS_Class=31 Mass test: TS0(xOxxOxOx)TS7 MS_Class=0 Mass test: TS0(xOxxOxOx)TS7 MS_Class=1 Mass test: TS0(xOxxOxOx)TS7 MS_Class=2 @@ -3158,6 +3308,8 @@ Mass test: TS0(xOxxOxOx)TS7 MS_Class=27 Mass test: TS0(xOxxOxOx)TS7 MS_Class=28 Mass test: TS0(xOxxOxOx)TS7 MS_Class=29 +Mass test: TS0(xOxxOxOx)TS7 MS_Class=30 +Mass test: TS0(xOxxOxOx)TS7 MS_Class=31 Mass test: TS0(xOxxOxOO)TS7 MS_Class=0 Mass test: TS0(xOxxOxOO)TS7 MS_Class=1 Mass test: TS0(xOxxOxOO)TS7 MS_Class=2 @@ -3188,6 +3340,8 @@ Mass test: TS0(xOxxOxOO)TS7 MS_Class=27 Mass test: TS0(xOxxOxOO)TS7 MS_Class=28 Mass test: TS0(xOxxOxOO)TS7 MS_Class=29 +Mass test: TS0(xOxxOxOO)TS7 MS_Class=30 +Mass test: TS0(xOxxOxOO)TS7 MS_Class=31 Mass test: TS0(xOxxOOxx)TS7 MS_Class=0 Mass test: TS0(xOxxOOxx)TS7 MS_Class=1 Mass test: TS0(xOxxOOxx)TS7 MS_Class=2 @@ -3218,6 +3372,8 @@ Mass test: TS0(xOxxOOxx)TS7 MS_Class=27 Mass test: TS0(xOxxOOxx)TS7 MS_Class=28 Mass test: TS0(xOxxOOxx)TS7 MS_Class=29 +Mass test: TS0(xOxxOOxx)TS7 MS_Class=30 +Mass test: TS0(xOxxOOxx)TS7 MS_Class=31 Mass test: TS0(xOxxOOxO)TS7 MS_Class=0 Mass test: TS0(xOxxOOxO)TS7 MS_Class=1 Mass test: TS0(xOxxOOxO)TS7 MS_Class=2 @@ -3248,6 +3404,8 @@ Mass test: TS0(xOxxOOxO)TS7 MS_Class=27 Mass test: TS0(xOxxOOxO)TS7 MS_Class=28 Mass test: TS0(xOxxOOxO)TS7 MS_Class=29 +Mass test: TS0(xOxxOOxO)TS7 MS_Class=30 +Mass test: TS0(xOxxOOxO)TS7 MS_Class=31 Mass test: TS0(xOxxOOOx)TS7 MS_Class=0 Mass test: TS0(xOxxOOOx)TS7 MS_Class=1 Mass test: TS0(xOxxOOOx)TS7 MS_Class=2 @@ -3278,6 +3436,8 @@ Mass test: TS0(xOxxOOOx)TS7 MS_Class=27 Mass test: TS0(xOxxOOOx)TS7 MS_Class=28 Mass test: TS0(xOxxOOOx)TS7 MS_Class=29 +Mass test: TS0(xOxxOOOx)TS7 MS_Class=30 +Mass test: TS0(xOxxOOOx)TS7 MS_Class=31 Mass test: TS0(xOxxOOOO)TS7 MS_Class=0 Mass test: TS0(xOxxOOOO)TS7 MS_Class=1 Mass test: TS0(xOxxOOOO)TS7 MS_Class=2 @@ -3308,6 +3468,8 @@ Mass test: TS0(xOxxOOOO)TS7 MS_Class=27 Mass test: TS0(xOxxOOOO)TS7 MS_Class=28 Mass test: TS0(xOxxOOOO)TS7 MS_Class=29 +Mass test: TS0(xOxxOOOO)TS7 MS_Class=30 +Mass test: TS0(xOxxOOOO)TS7 MS_Class=31 Mass test: TS0(xOxOxxxx)TS7 MS_Class=0 Mass test: TS0(xOxOxxxx)TS7 MS_Class=1 Mass test: TS0(xOxOxxxx)TS7 MS_Class=2 @@ -3338,6 +3500,8 @@ Mass test: TS0(xOxOxxxx)TS7 MS_Class=27 Mass test: TS0(xOxOxxxx)TS7 MS_Class=28 Mass test: TS0(xOxOxxxx)TS7 MS_Class=29 +Mass test: TS0(xOxOxxxx)TS7 MS_Class=30 +Mass test: TS0(xOxOxxxx)TS7 MS_Class=31 Mass test: TS0(xOxOxxxO)TS7 MS_Class=0 Mass test: TS0(xOxOxxxO)TS7 MS_Class=1 Mass test: TS0(xOxOxxxO)TS7 MS_Class=2 @@ -3368,6 +3532,8 @@ Mass test: TS0(xOxOxxxO)TS7 MS_Class=27 Mass test: TS0(xOxOxxxO)TS7 MS_Class=28 Mass test: TS0(xOxOxxxO)TS7 MS_Class=29 +Mass test: TS0(xOxOxxxO)TS7 MS_Class=30 +Mass test: TS0(xOxOxxxO)TS7 MS_Class=31 Mass test: TS0(xOxOxxOx)TS7 MS_Class=0 Mass test: TS0(xOxOxxOx)TS7 MS_Class=1 Mass test: TS0(xOxOxxOx)TS7 MS_Class=2 @@ -3398,6 +3564,8 @@ Mass test: TS0(xOxOxxOx)TS7 MS_Class=27 Mass test: TS0(xOxOxxOx)TS7 MS_Class=28 Mass test: TS0(xOxOxxOx)TS7 MS_Class=29 +Mass test: TS0(xOxOxxOx)TS7 MS_Class=30 +Mass test: TS0(xOxOxxOx)TS7 MS_Class=31 Mass test: TS0(xOxOxxOO)TS7 MS_Class=0 Mass test: TS0(xOxOxxOO)TS7 MS_Class=1 Mass test: TS0(xOxOxxOO)TS7 MS_Class=2 @@ -3428,6 +3596,8 @@ Mass test: TS0(xOxOxxOO)TS7 MS_Class=27 Mass test: TS0(xOxOxxOO)TS7 MS_Class=28 Mass test: TS0(xOxOxxOO)TS7 MS_Class=29 +Mass test: TS0(xOxOxxOO)TS7 MS_Class=30 +Mass test: TS0(xOxOxxOO)TS7 MS_Class=31 Mass test: TS0(xOxOxOxx)TS7 MS_Class=0 Mass test: TS0(xOxOxOxx)TS7 MS_Class=1 Mass test: TS0(xOxOxOxx)TS7 MS_Class=2 @@ -3458,6 +3628,8 @@ Mass test: TS0(xOxOxOxx)TS7 MS_Class=27 Mass test: TS0(xOxOxOxx)TS7 MS_Class=28 Mass test: TS0(xOxOxOxx)TS7 MS_Class=29 +Mass test: TS0(xOxOxOxx)TS7 MS_Class=30 +Mass test: TS0(xOxOxOxx)TS7 MS_Class=31 Mass test: TS0(xOxOxOxO)TS7 MS_Class=0 Mass test: TS0(xOxOxOxO)TS7 MS_Class=1 Mass test: TS0(xOxOxOxO)TS7 MS_Class=2 @@ -3488,6 +3660,8 @@ Mass test: TS0(xOxOxOxO)TS7 MS_Class=27 Mass test: TS0(xOxOxOxO)TS7 MS_Class=28 Mass test: TS0(xOxOxOxO)TS7 MS_Class=29 +Mass test: TS0(xOxOxOxO)TS7 MS_Class=30 +Mass test: TS0(xOxOxOxO)TS7 MS_Class=31 Mass test: TS0(xOxOxOOx)TS7 MS_Class=0 Mass test: TS0(xOxOxOOx)TS7 MS_Class=1 Mass test: TS0(xOxOxOOx)TS7 MS_Class=2 @@ -3518,6 +3692,8 @@ Mass test: TS0(xOxOxOOx)TS7 MS_Class=27 Mass test: TS0(xOxOxOOx)TS7 MS_Class=28 Mass test: TS0(xOxOxOOx)TS7 MS_Class=29 +Mass test: TS0(xOxOxOOx)TS7 MS_Class=30 +Mass test: TS0(xOxOxOOx)TS7 MS_Class=31 Mass test: TS0(xOxOxOOO)TS7 MS_Class=0 Mass test: TS0(xOxOxOOO)TS7 MS_Class=1 Mass test: TS0(xOxOxOOO)TS7 MS_Class=2 @@ -3548,6 +3724,8 @@ Mass test: TS0(xOxOxOOO)TS7 MS_Class=27 Mass test: TS0(xOxOxOOO)TS7 MS_Class=28 Mass test: TS0(xOxOxOOO)TS7 MS_Class=29 +Mass test: TS0(xOxOxOOO)TS7 MS_Class=30 +Mass test: TS0(xOxOxOOO)TS7 MS_Class=31 Mass test: TS0(xOxOOxxx)TS7 MS_Class=0 Mass test: TS0(xOxOOxxx)TS7 MS_Class=1 Mass test: TS0(xOxOOxxx)TS7 MS_Class=2 @@ -3578,6 +3756,8 @@ Mass test: TS0(xOxOOxxx)TS7 MS_Class=27 Mass test: TS0(xOxOOxxx)TS7 MS_Class=28 Mass test: TS0(xOxOOxxx)TS7 MS_Class=29 +Mass test: TS0(xOxOOxxx)TS7 MS_Class=30 +Mass test: TS0(xOxOOxxx)TS7 MS_Class=31 Mass test: TS0(xOxOOxxO)TS7 MS_Class=0 Mass test: TS0(xOxOOxxO)TS7 MS_Class=1 Mass test: TS0(xOxOOxxO)TS7 MS_Class=2 @@ -3608,6 +3788,8 @@ Mass test: TS0(xOxOOxxO)TS7 MS_Class=27 Mass test: TS0(xOxOOxxO)TS7 MS_Class=28 Mass test: TS0(xOxOOxxO)TS7 MS_Class=29 +Mass test: TS0(xOxOOxxO)TS7 MS_Class=30 +Mass test: TS0(xOxOOxxO)TS7 MS_Class=31 Mass test: TS0(xOxOOxOx)TS7 MS_Class=0 Mass test: TS0(xOxOOxOx)TS7 MS_Class=1 Mass test: TS0(xOxOOxOx)TS7 MS_Class=2 @@ -3638,6 +3820,8 @@ Mass test: TS0(xOxOOxOx)TS7 MS_Class=27 Mass test: TS0(xOxOOxOx)TS7 MS_Class=28 Mass test: TS0(xOxOOxOx)TS7 MS_Class=29 +Mass test: TS0(xOxOOxOx)TS7 MS_Class=30 +Mass test: TS0(xOxOOxOx)TS7 MS_Class=31 Mass test: TS0(xOxOOxOO)TS7 MS_Class=0 Mass test: TS0(xOxOOxOO)TS7 MS_Class=1 Mass test: TS0(xOxOOxOO)TS7 MS_Class=2 @@ -3668,6 +3852,8 @@ Mass test: TS0(xOxOOxOO)TS7 MS_Class=27 Mass test: TS0(xOxOOxOO)TS7 MS_Class=28 Mass test: TS0(xOxOOxOO)TS7 MS_Class=29 +Mass test: TS0(xOxOOxOO)TS7 MS_Class=30 +Mass test: TS0(xOxOOxOO)TS7 MS_Class=31 Mass test: TS0(xOxOOOxx)TS7 MS_Class=0 Mass test: TS0(xOxOOOxx)TS7 MS_Class=1 Mass test: TS0(xOxOOOxx)TS7 MS_Class=2 @@ -3698,6 +3884,8 @@ Mass test: TS0(xOxOOOxx)TS7 MS_Class=27 Mass test: TS0(xOxOOOxx)TS7 MS_Class=28 Mass test: TS0(xOxOOOxx)TS7 MS_Class=29 +Mass test: TS0(xOxOOOxx)TS7 MS_Class=30 +Mass test: TS0(xOxOOOxx)TS7 MS_Class=31 Mass test: TS0(xOxOOOxO)TS7 MS_Class=0 Mass test: TS0(xOxOOOxO)TS7 MS_Class=1 Mass test: TS0(xOxOOOxO)TS7 MS_Class=2 @@ -3728,6 +3916,8 @@ Mass test: TS0(xOxOOOxO)TS7 MS_Class=27 Mass test: TS0(xOxOOOxO)TS7 MS_Class=28 Mass test: TS0(xOxOOOxO)TS7 MS_Class=29 +Mass test: TS0(xOxOOOxO)TS7 MS_Class=30 +Mass test: TS0(xOxOOOxO)TS7 MS_Class=31 Mass test: TS0(xOxOOOOx)TS7 MS_Class=0 Mass test: TS0(xOxOOOOx)TS7 MS_Class=1 Mass test: TS0(xOxOOOOx)TS7 MS_Class=2 @@ -3758,6 +3948,8 @@ Mass test: TS0(xOxOOOOx)TS7 MS_Class=27 Mass test: TS0(xOxOOOOx)TS7 MS_Class=28 Mass test: TS0(xOxOOOOx)TS7 MS_Class=29 +Mass test: TS0(xOxOOOOx)TS7 MS_Class=30 +Mass test: TS0(xOxOOOOx)TS7 MS_Class=31 Mass test: TS0(xOxOOOOO)TS7 MS_Class=0 Mass test: TS0(xOxOOOOO)TS7 MS_Class=1 Mass test: TS0(xOxOOOOO)TS7 MS_Class=2 @@ -3788,6 +3980,8 @@ Mass test: TS0(xOxOOOOO)TS7 MS_Class=27 Mass test: TS0(xOxOOOOO)TS7 MS_Class=28 Mass test: TS0(xOxOOOOO)TS7 MS_Class=29 +Mass test: TS0(xOxOOOOO)TS7 MS_Class=30 +Mass test: TS0(xOxOOOOO)TS7 MS_Class=31 Mass test: TS0(xOOxxxxx)TS7 MS_Class=0 Mass test: TS0(xOOxxxxx)TS7 MS_Class=1 Mass test: TS0(xOOxxxxx)TS7 MS_Class=2 @@ -3818,6 +4012,8 @@ Mass test: TS0(xOOxxxxx)TS7 MS_Class=27 Mass test: TS0(xOOxxxxx)TS7 MS_Class=28 Mass test: TS0(xOOxxxxx)TS7 MS_Class=29 +Mass test: TS0(xOOxxxxx)TS7 MS_Class=30 +Mass test: TS0(xOOxxxxx)TS7 MS_Class=31 Mass test: TS0(xOOxxxxO)TS7 MS_Class=0 Mass test: TS0(xOOxxxxO)TS7 MS_Class=1 Mass test: TS0(xOOxxxxO)TS7 MS_Class=2 @@ -3848,6 +4044,8 @@ Mass test: TS0(xOOxxxxO)TS7 MS_Class=27 Mass test: TS0(xOOxxxxO)TS7 MS_Class=28 Mass test: TS0(xOOxxxxO)TS7 MS_Class=29 +Mass test: TS0(xOOxxxxO)TS7 MS_Class=30 +Mass test: TS0(xOOxxxxO)TS7 MS_Class=31 Mass test: TS0(xOOxxxOx)TS7 MS_Class=0 Mass test: TS0(xOOxxxOx)TS7 MS_Class=1 Mass test: TS0(xOOxxxOx)TS7 MS_Class=2 @@ -3878,6 +4076,8 @@ Mass test: TS0(xOOxxxOx)TS7 MS_Class=27 Mass test: TS0(xOOxxxOx)TS7 MS_Class=28 Mass test: TS0(xOOxxxOx)TS7 MS_Class=29 +Mass test: TS0(xOOxxxOx)TS7 MS_Class=30 +Mass test: TS0(xOOxxxOx)TS7 MS_Class=31 Mass test: TS0(xOOxxxOO)TS7 MS_Class=0 Mass test: TS0(xOOxxxOO)TS7 MS_Class=1 Mass test: TS0(xOOxxxOO)TS7 MS_Class=2 @@ -3908,6 +4108,8 @@ Mass test: TS0(xOOxxxOO)TS7 MS_Class=27 Mass test: TS0(xOOxxxOO)TS7 MS_Class=28 Mass test: TS0(xOOxxxOO)TS7 MS_Class=29 +Mass test: TS0(xOOxxxOO)TS7 MS_Class=30 +Mass test: TS0(xOOxxxOO)TS7 MS_Class=31 Mass test: TS0(xOOxxOxx)TS7 MS_Class=0 Mass test: TS0(xOOxxOxx)TS7 MS_Class=1 Mass test: TS0(xOOxxOxx)TS7 MS_Class=2 @@ -3938,6 +4140,8 @@ Mass test: TS0(xOOxxOxx)TS7 MS_Class=27 Mass test: TS0(xOOxxOxx)TS7 MS_Class=28 Mass test: TS0(xOOxxOxx)TS7 MS_Class=29 +Mass test: TS0(xOOxxOxx)TS7 MS_Class=30 +Mass test: TS0(xOOxxOxx)TS7 MS_Class=31 Mass test: TS0(xOOxxOxO)TS7 MS_Class=0 Mass test: TS0(xOOxxOxO)TS7 MS_Class=1 Mass test: TS0(xOOxxOxO)TS7 MS_Class=2 @@ -3968,6 +4172,8 @@ Mass test: TS0(xOOxxOxO)TS7 MS_Class=27 Mass test: TS0(xOOxxOxO)TS7 MS_Class=28 Mass test: TS0(xOOxxOxO)TS7 MS_Class=29 +Mass test: TS0(xOOxxOxO)TS7 MS_Class=30 +Mass test: TS0(xOOxxOxO)TS7 MS_Class=31 Mass test: TS0(xOOxxOOx)TS7 MS_Class=0 Mass test: TS0(xOOxxOOx)TS7 MS_Class=1 Mass test: TS0(xOOxxOOx)TS7 MS_Class=2 @@ -3998,6 +4204,8 @@ Mass test: TS0(xOOxxOOx)TS7 MS_Class=27 Mass test: TS0(xOOxxOOx)TS7 MS_Class=28 Mass test: TS0(xOOxxOOx)TS7 MS_Class=29 +Mass test: TS0(xOOxxOOx)TS7 MS_Class=30 +Mass test: TS0(xOOxxOOx)TS7 MS_Class=31 Mass test: TS0(xOOxxOOO)TS7 MS_Class=0 Mass test: TS0(xOOxxOOO)TS7 MS_Class=1 Mass test: TS0(xOOxxOOO)TS7 MS_Class=2 @@ -4028,6 +4236,8 @@ Mass test: TS0(xOOxxOOO)TS7 MS_Class=27 Mass test: TS0(xOOxxOOO)TS7 MS_Class=28 Mass test: TS0(xOOxxOOO)TS7 MS_Class=29 +Mass test: TS0(xOOxxOOO)TS7 MS_Class=30 +Mass test: TS0(xOOxxOOO)TS7 MS_Class=31 Mass test: TS0(xOOxOxxx)TS7 MS_Class=0 Mass test: TS0(xOOxOxxx)TS7 MS_Class=1 Mass test: TS0(xOOxOxxx)TS7 MS_Class=2 @@ -4058,6 +4268,8 @@ Mass test: TS0(xOOxOxxx)TS7 MS_Class=27 Mass test: TS0(xOOxOxxx)TS7 MS_Class=28 Mass test: TS0(xOOxOxxx)TS7 MS_Class=29 +Mass test: TS0(xOOxOxxx)TS7 MS_Class=30 +Mass test: TS0(xOOxOxxx)TS7 MS_Class=31 Mass test: TS0(xOOxOxxO)TS7 MS_Class=0 Mass test: TS0(xOOxOxxO)TS7 MS_Class=1 Mass test: TS0(xOOxOxxO)TS7 MS_Class=2 @@ -4088,6 +4300,8 @@ Mass test: TS0(xOOxOxxO)TS7 MS_Class=27 Mass test: TS0(xOOxOxxO)TS7 MS_Class=28 Mass test: TS0(xOOxOxxO)TS7 MS_Class=29 +Mass test: TS0(xOOxOxxO)TS7 MS_Class=30 +Mass test: TS0(xOOxOxxO)TS7 MS_Class=31 Mass test: TS0(xOOxOxOx)TS7 MS_Class=0 Mass test: TS0(xOOxOxOx)TS7 MS_Class=1 Mass test: TS0(xOOxOxOx)TS7 MS_Class=2 @@ -4118,6 +4332,8 @@ Mass test: TS0(xOOxOxOx)TS7 MS_Class=27 Mass test: TS0(xOOxOxOx)TS7 MS_Class=28 Mass test: TS0(xOOxOxOx)TS7 MS_Class=29 +Mass test: TS0(xOOxOxOx)TS7 MS_Class=30 +Mass test: TS0(xOOxOxOx)TS7 MS_Class=31 Mass test: TS0(xOOxOxOO)TS7 MS_Class=0 Mass test: TS0(xOOxOxOO)TS7 MS_Class=1 Mass test: TS0(xOOxOxOO)TS7 MS_Class=2 @@ -4148,6 +4364,8 @@ Mass test: TS0(xOOxOxOO)TS7 MS_Class=27 Mass test: TS0(xOOxOxOO)TS7 MS_Class=28 Mass test: TS0(xOOxOxOO)TS7 MS_Class=29 +Mass test: TS0(xOOxOxOO)TS7 MS_Class=30 +Mass test: TS0(xOOxOxOO)TS7 MS_Class=31 Mass test: TS0(xOOxOOxx)TS7 MS_Class=0 Mass test: TS0(xOOxOOxx)TS7 MS_Class=1 Mass test: TS0(xOOxOOxx)TS7 MS_Class=2 @@ -4178,6 +4396,8 @@ Mass test: TS0(xOOxOOxx)TS7 MS_Class=27 Mass test: TS0(xOOxOOxx)TS7 MS_Class=28 Mass test: TS0(xOOxOOxx)TS7 MS_Class=29 +Mass test: TS0(xOOxOOxx)TS7 MS_Class=30 +Mass test: TS0(xOOxOOxx)TS7 MS_Class=31 Mass test: TS0(xOOxOOxO)TS7 MS_Class=0 Mass test: TS0(xOOxOOxO)TS7 MS_Class=1 Mass test: TS0(xOOxOOxO)TS7 MS_Class=2 @@ -4208,6 +4428,8 @@ Mass test: TS0(xOOxOOxO)TS7 MS_Class=27 Mass test: TS0(xOOxOOxO)TS7 MS_Class=28 Mass test: TS0(xOOxOOxO)TS7 MS_Class=29 +Mass test: TS0(xOOxOOxO)TS7 MS_Class=30 +Mass test: TS0(xOOxOOxO)TS7 MS_Class=31 Mass test: TS0(xOOxOOOx)TS7 MS_Class=0 Mass test: TS0(xOOxOOOx)TS7 MS_Class=1 Mass test: TS0(xOOxOOOx)TS7 MS_Class=2 @@ -4238,6 +4460,8 @@ Mass test: TS0(xOOxOOOx)TS7 MS_Class=27 Mass test: TS0(xOOxOOOx)TS7 MS_Class=28 Mass test: TS0(xOOxOOOx)TS7 MS_Class=29 +Mass test: TS0(xOOxOOOx)TS7 MS_Class=30 +Mass test: TS0(xOOxOOOx)TS7 MS_Class=31 Mass test: TS0(xOOxOOOO)TS7 MS_Class=0 Mass test: TS0(xOOxOOOO)TS7 MS_Class=1 Mass test: TS0(xOOxOOOO)TS7 MS_Class=2 @@ -4268,6 +4492,8 @@ Mass test: TS0(xOOxOOOO)TS7 MS_Class=27 Mass test: TS0(xOOxOOOO)TS7 MS_Class=28 Mass test: TS0(xOOxOOOO)TS7 MS_Class=29 +Mass test: TS0(xOOxOOOO)TS7 MS_Class=30 +Mass test: TS0(xOOxOOOO)TS7 MS_Class=31 Mass test: TS0(xOOOxxxx)TS7 MS_Class=0 Mass test: TS0(xOOOxxxx)TS7 MS_Class=1 Mass test: TS0(xOOOxxxx)TS7 MS_Class=2 @@ -4298,6 +4524,8 @@ Mass test: TS0(xOOOxxxx)TS7 MS_Class=27 Mass test: TS0(xOOOxxxx)TS7 MS_Class=28 Mass test: TS0(xOOOxxxx)TS7 MS_Class=29 +Mass test: TS0(xOOOxxxx)TS7 MS_Class=30 +Mass test: TS0(xOOOxxxx)TS7 MS_Class=31 Mass test: TS0(xOOOxxxO)TS7 MS_Class=0 Mass test: TS0(xOOOxxxO)TS7 MS_Class=1 Mass test: TS0(xOOOxxxO)TS7 MS_Class=2 @@ -4328,6 +4556,8 @@ Mass test: TS0(xOOOxxxO)TS7 MS_Class=27 Mass test: TS0(xOOOxxxO)TS7 MS_Class=28 Mass test: TS0(xOOOxxxO)TS7 MS_Class=29 +Mass test: TS0(xOOOxxxO)TS7 MS_Class=30 +Mass test: TS0(xOOOxxxO)TS7 MS_Class=31 Mass test: TS0(xOOOxxOx)TS7 MS_Class=0 Mass test: TS0(xOOOxxOx)TS7 MS_Class=1 Mass test: TS0(xOOOxxOx)TS7 MS_Class=2 @@ -4358,6 +4588,8 @@ Mass test: TS0(xOOOxxOx)TS7 MS_Class=27 Mass test: TS0(xOOOxxOx)TS7 MS_Class=28 Mass test: TS0(xOOOxxOx)TS7 MS_Class=29 +Mass test: TS0(xOOOxxOx)TS7 MS_Class=30 +Mass test: TS0(xOOOxxOx)TS7 MS_Class=31 Mass test: TS0(xOOOxxOO)TS7 MS_Class=0 Mass test: TS0(xOOOxxOO)TS7 MS_Class=1 Mass test: TS0(xOOOxxOO)TS7 MS_Class=2 @@ -4388,6 +4620,8 @@ Mass test: TS0(xOOOxxOO)TS7 MS_Class=27 Mass test: TS0(xOOOxxOO)TS7 MS_Class=28 Mass test: TS0(xOOOxxOO)TS7 MS_Class=29 +Mass test: TS0(xOOOxxOO)TS7 MS_Class=30 +Mass test: TS0(xOOOxxOO)TS7 MS_Class=31 Mass test: TS0(xOOOxOxx)TS7 MS_Class=0 Mass test: TS0(xOOOxOxx)TS7 MS_Class=1 Mass test: TS0(xOOOxOxx)TS7 MS_Class=2 @@ -4418,6 +4652,8 @@ Mass test: TS0(xOOOxOxx)TS7 MS_Class=27 Mass test: TS0(xOOOxOxx)TS7 MS_Class=28 Mass test: TS0(xOOOxOxx)TS7 MS_Class=29 +Mass test: TS0(xOOOxOxx)TS7 MS_Class=30 +Mass test: TS0(xOOOxOxx)TS7 MS_Class=31 Mass test: TS0(xOOOxOxO)TS7 MS_Class=0 Mass test: TS0(xOOOxOxO)TS7 MS_Class=1 Mass test: TS0(xOOOxOxO)TS7 MS_Class=2 @@ -4448,6 +4684,8 @@ Mass test: TS0(xOOOxOxO)TS7 MS_Class=27 Mass test: TS0(xOOOxOxO)TS7 MS_Class=28 Mass test: TS0(xOOOxOxO)TS7 MS_Class=29 +Mass test: TS0(xOOOxOxO)TS7 MS_Class=30 +Mass test: TS0(xOOOxOxO)TS7 MS_Class=31 Mass test: TS0(xOOOxOOx)TS7 MS_Class=0 Mass test: TS0(xOOOxOOx)TS7 MS_Class=1 Mass test: TS0(xOOOxOOx)TS7 MS_Class=2 @@ -4478,6 +4716,8 @@ Mass test: TS0(xOOOxOOx)TS7 MS_Class=27 Mass test: TS0(xOOOxOOx)TS7 MS_Class=28 Mass test: TS0(xOOOxOOx)TS7 MS_Class=29 +Mass test: TS0(xOOOxOOx)TS7 MS_Class=30 +Mass test: TS0(xOOOxOOx)TS7 MS_Class=31 Mass test: TS0(xOOOxOOO)TS7 MS_Class=0 Mass test: TS0(xOOOxOOO)TS7 MS_Class=1 Mass test: TS0(xOOOxOOO)TS7 MS_Class=2 @@ -4508,6 +4748,8 @@ Mass test: TS0(xOOOxOOO)TS7 MS_Class=27 Mass test: TS0(xOOOxOOO)TS7 MS_Class=28 Mass test: TS0(xOOOxOOO)TS7 MS_Class=29 +Mass test: TS0(xOOOxOOO)TS7 MS_Class=30 +Mass test: TS0(xOOOxOOO)TS7 MS_Class=31 Mass test: TS0(xOOOOxxx)TS7 MS_Class=0 Mass test: TS0(xOOOOxxx)TS7 MS_Class=1 Mass test: TS0(xOOOOxxx)TS7 MS_Class=2 @@ -4538,6 +4780,8 @@ Mass test: TS0(xOOOOxxx)TS7 MS_Class=27 Mass test: TS0(xOOOOxxx)TS7 MS_Class=28 Mass test: TS0(xOOOOxxx)TS7 MS_Class=29 +Mass test: TS0(xOOOOxxx)TS7 MS_Class=30 +Mass test: TS0(xOOOOxxx)TS7 MS_Class=31 Mass test: TS0(xOOOOxxO)TS7 MS_Class=0 Mass test: TS0(xOOOOxxO)TS7 MS_Class=1 Mass test: TS0(xOOOOxxO)TS7 MS_Class=2 @@ -4568,6 +4812,8 @@ Mass test: TS0(xOOOOxxO)TS7 MS_Class=27 Mass test: TS0(xOOOOxxO)TS7 MS_Class=28 Mass test: TS0(xOOOOxxO)TS7 MS_Class=29 +Mass test: TS0(xOOOOxxO)TS7 MS_Class=30 +Mass test: TS0(xOOOOxxO)TS7 MS_Class=31 Mass test: TS0(xOOOOxOx)TS7 MS_Class=0 Mass test: TS0(xOOOOxOx)TS7 MS_Class=1 Mass test: TS0(xOOOOxOx)TS7 MS_Class=2 @@ -4598,6 +4844,8 @@ Mass test: TS0(xOOOOxOx)TS7 MS_Class=27 Mass test: TS0(xOOOOxOx)TS7 MS_Class=28 Mass test: TS0(xOOOOxOx)TS7 MS_Class=29 +Mass test: TS0(xOOOOxOx)TS7 MS_Class=30 +Mass test: TS0(xOOOOxOx)TS7 MS_Class=31 Mass test: TS0(xOOOOxOO)TS7 MS_Class=0 Mass test: TS0(xOOOOxOO)TS7 MS_Class=1 Mass test: TS0(xOOOOxOO)TS7 MS_Class=2 @@ -4628,6 +4876,8 @@ Mass test: TS0(xOOOOxOO)TS7 MS_Class=27 Mass test: TS0(xOOOOxOO)TS7 MS_Class=28 Mass test: TS0(xOOOOxOO)TS7 MS_Class=29 +Mass test: TS0(xOOOOxOO)TS7 MS_Class=30 +Mass test: TS0(xOOOOxOO)TS7 MS_Class=31 Mass test: TS0(xOOOOOxx)TS7 MS_Class=0 Mass test: TS0(xOOOOOxx)TS7 MS_Class=1 Mass test: TS0(xOOOOOxx)TS7 MS_Class=2 @@ -4658,6 +4908,8 @@ Mass test: TS0(xOOOOOxx)TS7 MS_Class=27 Mass test: TS0(xOOOOOxx)TS7 MS_Class=28 Mass test: TS0(xOOOOOxx)TS7 MS_Class=29 +Mass test: TS0(xOOOOOxx)TS7 MS_Class=30 +Mass test: TS0(xOOOOOxx)TS7 MS_Class=31 Mass test: TS0(xOOOOOxO)TS7 MS_Class=0 Mass test: TS0(xOOOOOxO)TS7 MS_Class=1 Mass test: TS0(xOOOOOxO)TS7 MS_Class=2 @@ -4688,6 +4940,8 @@ Mass test: TS0(xOOOOOxO)TS7 MS_Class=27 Mass test: TS0(xOOOOOxO)TS7 MS_Class=28 Mass test: TS0(xOOOOOxO)TS7 MS_Class=29 +Mass test: TS0(xOOOOOxO)TS7 MS_Class=30 +Mass test: TS0(xOOOOOxO)TS7 MS_Class=31 Mass test: TS0(xOOOOOOx)TS7 MS_Class=0 Mass test: TS0(xOOOOOOx)TS7 MS_Class=1 Mass test: TS0(xOOOOOOx)TS7 MS_Class=2 @@ -4718,6 +4972,8 @@ Mass test: TS0(xOOOOOOx)TS7 MS_Class=27 Mass test: TS0(xOOOOOOx)TS7 MS_Class=28 Mass test: TS0(xOOOOOOx)TS7 MS_Class=29 +Mass test: TS0(xOOOOOOx)TS7 MS_Class=30 +Mass test: TS0(xOOOOOOx)TS7 MS_Class=31 Mass test: TS0(xOOOOOOO)TS7 MS_Class=0 Mass test: TS0(xOOOOOOO)TS7 MS_Class=1 Mass test: TS0(xOOOOOOO)TS7 MS_Class=2 @@ -4748,6 +5004,8 @@ Mass test: TS0(xOOOOOOO)TS7 MS_Class=27 Mass test: TS0(xOOOOOOO)TS7 MS_Class=28 Mass test: TS0(xOOOOOOO)TS7 MS_Class=29 +Mass test: TS0(xOOOOOOO)TS7 MS_Class=30 +Mass test: TS0(xOOOOOOO)TS7 MS_Class=31 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=0 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=1 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=2 @@ -4778,6 +5036,8 @@ Mass test: TS0(Oxxxxxxx)TS7 MS_Class=27 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=28 Mass test: TS0(Oxxxxxxx)TS7 MS_Class=29 +Mass test: TS0(Oxxxxxxx)TS7 MS_Class=30 +Mass test: TS0(Oxxxxxxx)TS7 MS_Class=31 Mass test: TS0(OxxxxxxO)TS7 MS_Class=0 Mass test: TS0(OxxxxxxO)TS7 MS_Class=1 Mass test: TS0(OxxxxxxO)TS7 MS_Class=2 @@ -4808,6 +5068,8 @@ Mass test: TS0(OxxxxxxO)TS7 MS_Class=27 Mass test: TS0(OxxxxxxO)TS7 MS_Class=28 Mass test: TS0(OxxxxxxO)TS7 MS_Class=29 +Mass test: TS0(OxxxxxxO)TS7 MS_Class=30 +Mass test: TS0(OxxxxxxO)TS7 MS_Class=31 Mass test: TS0(OxxxxxOx)TS7 MS_Class=0 Mass test: TS0(OxxxxxOx)TS7 MS_Class=1 Mass test: TS0(OxxxxxOx)TS7 MS_Class=2 @@ -4838,6 +5100,8 @@ Mass test: TS0(OxxxxxOx)TS7 MS_Class=27 Mass test: TS0(OxxxxxOx)TS7 MS_Class=28 Mass test: TS0(OxxxxxOx)TS7 MS_Class=29 +Mass test: TS0(OxxxxxOx)TS7 MS_Class=30 +Mass test: TS0(OxxxxxOx)TS7 MS_Class=31 Mass test: TS0(OxxxxxOO)TS7 MS_Class=0 Mass test: TS0(OxxxxxOO)TS7 MS_Class=1 Mass test: TS0(OxxxxxOO)TS7 MS_Class=2 @@ -4868,6 +5132,8 @@ Mass test: TS0(OxxxxxOO)TS7 MS_Class=27 Mass test: TS0(OxxxxxOO)TS7 MS_Class=28 Mass test: TS0(OxxxxxOO)TS7 MS_Class=29 +Mass test: TS0(OxxxxxOO)TS7 MS_Class=30 +Mass test: TS0(OxxxxxOO)TS7 MS_Class=31 Mass test: TS0(OxxxxOxx)TS7 MS_Class=0 Mass test: TS0(OxxxxOxx)TS7 MS_Class=1 Mass test: TS0(OxxxxOxx)TS7 MS_Class=2 @@ -4898,6 +5164,8 @@ Mass test: TS0(OxxxxOxx)TS7 MS_Class=27 Mass test: TS0(OxxxxOxx)TS7 MS_Class=28 Mass test: TS0(OxxxxOxx)TS7 MS_Class=29 +Mass test: TS0(OxxxxOxx)TS7 MS_Class=30 +Mass test: TS0(OxxxxOxx)TS7 MS_Class=31 Mass test: TS0(OxxxxOxO)TS7 MS_Class=0 Mass test: TS0(OxxxxOxO)TS7 MS_Class=1 Mass test: TS0(OxxxxOxO)TS7 MS_Class=2 @@ -4928,6 +5196,8 @@ Mass test: TS0(OxxxxOxO)TS7 MS_Class=27 Mass test: TS0(OxxxxOxO)TS7 MS_Class=28 Mass test: TS0(OxxxxOxO)TS7 MS_Class=29 +Mass test: TS0(OxxxxOxO)TS7 MS_Class=30 +Mass test: TS0(OxxxxOxO)TS7 MS_Class=31 Mass test: TS0(OxxxxOOx)TS7 MS_Class=0 Mass test: TS0(OxxxxOOx)TS7 MS_Class=1 Mass test: TS0(OxxxxOOx)TS7 MS_Class=2 @@ -4958,6 +5228,8 @@ Mass test: TS0(OxxxxOOx)TS7 MS_Class=27 Mass test: TS0(OxxxxOOx)TS7 MS_Class=28 Mass test: TS0(OxxxxOOx)TS7 MS_Class=29 +Mass test: TS0(OxxxxOOx)TS7 MS_Class=30 +Mass test: TS0(OxxxxOOx)TS7 MS_Class=31 Mass test: TS0(OxxxxOOO)TS7 MS_Class=0 Mass test: TS0(OxxxxOOO)TS7 MS_Class=1 Mass test: TS0(OxxxxOOO)TS7 MS_Class=2 @@ -4988,6 +5260,8 @@ Mass test: TS0(OxxxxOOO)TS7 MS_Class=27 Mass test: TS0(OxxxxOOO)TS7 MS_Class=28 Mass test: TS0(OxxxxOOO)TS7 MS_Class=29 +Mass test: TS0(OxxxxOOO)TS7 MS_Class=30 +Mass test: TS0(OxxxxOOO)TS7 MS_Class=31 Mass test: TS0(OxxxOxxx)TS7 MS_Class=0 Mass test: TS0(OxxxOxxx)TS7 MS_Class=1 Mass test: TS0(OxxxOxxx)TS7 MS_Class=2 @@ -5018,6 +5292,8 @@ Mass test: TS0(OxxxOxxx)TS7 MS_Class=27 Mass test: TS0(OxxxOxxx)TS7 MS_Class=28 Mass test: TS0(OxxxOxxx)TS7 MS_Class=29 +Mass test: TS0(OxxxOxxx)TS7 MS_Class=30 +Mass test: TS0(OxxxOxxx)TS7 MS_Class=31 Mass test: TS0(OxxxOxxO)TS7 MS_Class=0 Mass test: TS0(OxxxOxxO)TS7 MS_Class=1 Mass test: TS0(OxxxOxxO)TS7 MS_Class=2 @@ -5048,6 +5324,8 @@ Mass test: TS0(OxxxOxxO)TS7 MS_Class=27 Mass test: TS0(OxxxOxxO)TS7 MS_Class=28 Mass test: TS0(OxxxOxxO)TS7 MS_Class=29 +Mass test: TS0(OxxxOxxO)TS7 MS_Class=30 +Mass test: TS0(OxxxOxxO)TS7 MS_Class=31 Mass test: TS0(OxxxOxOx)TS7 MS_Class=0 Mass test: TS0(OxxxOxOx)TS7 MS_Class=1 Mass test: TS0(OxxxOxOx)TS7 MS_Class=2 @@ -5078,6 +5356,8 @@ Mass test: TS0(OxxxOxOx)TS7 MS_Class=27 Mass test: TS0(OxxxOxOx)TS7 MS_Class=28 Mass test: TS0(OxxxOxOx)TS7 MS_Class=29 +Mass test: TS0(OxxxOxOx)TS7 MS_Class=30 +Mass test: TS0(OxxxOxOx)TS7 MS_Class=31 Mass test: TS0(OxxxOxOO)TS7 MS_Class=0 Mass test: TS0(OxxxOxOO)TS7 MS_Class=1 Mass test: TS0(OxxxOxOO)TS7 MS_Class=2 @@ -5108,6 +5388,8 @@ Mass test: TS0(OxxxOxOO)TS7 MS_Class=27 Mass test: TS0(OxxxOxOO)TS7 MS_Class=28 Mass test: TS0(OxxxOxOO)TS7 MS_Class=29 +Mass test: TS0(OxxxOxOO)TS7 MS_Class=30 +Mass test: TS0(OxxxOxOO)TS7 MS_Class=31 Mass test: TS0(OxxxOOxx)TS7 MS_Class=0 Mass test: TS0(OxxxOOxx)TS7 MS_Class=1 Mass test: TS0(OxxxOOxx)TS7 MS_Class=2 @@ -5138,6 +5420,8 @@ Mass test: TS0(OxxxOOxx)TS7 MS_Class=27 Mass test: TS0(OxxxOOxx)TS7 MS_Class=28 Mass test: TS0(OxxxOOxx)TS7 MS_Class=29 +Mass test: TS0(OxxxOOxx)TS7 MS_Class=30 +Mass test: TS0(OxxxOOxx)TS7 MS_Class=31 Mass test: TS0(OxxxOOxO)TS7 MS_Class=0 Mass test: TS0(OxxxOOxO)TS7 MS_Class=1 Mass test: TS0(OxxxOOxO)TS7 MS_Class=2 @@ -5168,6 +5452,8 @@ Mass test: TS0(OxxxOOxO)TS7 MS_Class=27 Mass test: TS0(OxxxOOxO)TS7 MS_Class=28 Mass test: TS0(OxxxOOxO)TS7 MS_Class=29 +Mass test: TS0(OxxxOOxO)TS7 MS_Class=30 +Mass test: TS0(OxxxOOxO)TS7 MS_Class=31 Mass test: TS0(OxxxOOOx)TS7 MS_Class=0 Mass test: TS0(OxxxOOOx)TS7 MS_Class=1 Mass test: TS0(OxxxOOOx)TS7 MS_Class=2 @@ -5198,6 +5484,8 @@ Mass test: TS0(OxxxOOOx)TS7 MS_Class=27 Mass test: TS0(OxxxOOOx)TS7 MS_Class=28 Mass test: TS0(OxxxOOOx)TS7 MS_Class=29 +Mass test: TS0(OxxxOOOx)TS7 MS_Class=30 +Mass test: TS0(OxxxOOOx)TS7 MS_Class=31 Mass test: TS0(OxxxOOOO)TS7 MS_Class=0 Mass test: TS0(OxxxOOOO)TS7 MS_Class=1 Mass test: TS0(OxxxOOOO)TS7 MS_Class=2 @@ -5228,6 +5516,8 @@ Mass test: TS0(OxxxOOOO)TS7 MS_Class=27 Mass test: TS0(OxxxOOOO)TS7 MS_Class=28 Mass test: TS0(OxxxOOOO)TS7 MS_Class=29 +Mass test: TS0(OxxxOOOO)TS7 MS_Class=30 +Mass test: TS0(OxxxOOOO)TS7 MS_Class=31 Mass test: TS0(OxxOxxxx)TS7 MS_Class=0 Mass test: TS0(OxxOxxxx)TS7 MS_Class=1 Mass test: TS0(OxxOxxxx)TS7 MS_Class=2 @@ -5258,6 +5548,8 @@ Mass test: TS0(OxxOxxxx)TS7 MS_Class=27 Mass test: TS0(OxxOxxxx)TS7 MS_Class=28 Mass test: TS0(OxxOxxxx)TS7 MS_Class=29 +Mass test: TS0(OxxOxxxx)TS7 MS_Class=30 +Mass test: TS0(OxxOxxxx)TS7 MS_Class=31 Mass test: TS0(OxxOxxxO)TS7 MS_Class=0 Mass test: TS0(OxxOxxxO)TS7 MS_Class=1 Mass test: TS0(OxxOxxxO)TS7 MS_Class=2 @@ -5288,6 +5580,8 @@ Mass test: TS0(OxxOxxxO)TS7 MS_Class=27 Mass test: TS0(OxxOxxxO)TS7 MS_Class=28 Mass test: TS0(OxxOxxxO)TS7 MS_Class=29 +Mass test: TS0(OxxOxxxO)TS7 MS_Class=30 +Mass test: TS0(OxxOxxxO)TS7 MS_Class=31 Mass test: TS0(OxxOxxOx)TS7 MS_Class=0 Mass test: TS0(OxxOxxOx)TS7 MS_Class=1 Mass test: TS0(OxxOxxOx)TS7 MS_Class=2 @@ -5318,6 +5612,8 @@ Mass test: TS0(OxxOxxOx)TS7 MS_Class=27 Mass test: TS0(OxxOxxOx)TS7 MS_Class=28 Mass test: TS0(OxxOxxOx)TS7 MS_Class=29 +Mass test: TS0(OxxOxxOx)TS7 MS_Class=30 +Mass test: TS0(OxxOxxOx)TS7 MS_Class=31 Mass test: TS0(OxxOxxOO)TS7 MS_Class=0 Mass test: TS0(OxxOxxOO)TS7 MS_Class=1 Mass test: TS0(OxxOxxOO)TS7 MS_Class=2 @@ -5348,6 +5644,8 @@ Mass test: TS0(OxxOxxOO)TS7 MS_Class=27 Mass test: TS0(OxxOxxOO)TS7 MS_Class=28 Mass test: TS0(OxxOxxOO)TS7 MS_Class=29 +Mass test: TS0(OxxOxxOO)TS7 MS_Class=30 +Mass test: TS0(OxxOxxOO)TS7 MS_Class=31 Mass test: TS0(OxxOxOxx)TS7 MS_Class=0 Mass test: TS0(OxxOxOxx)TS7 MS_Class=1 Mass test: TS0(OxxOxOxx)TS7 MS_Class=2 @@ -5378,6 +5676,8 @@ Mass test: TS0(OxxOxOxx)TS7 MS_Class=27 Mass test: TS0(OxxOxOxx)TS7 MS_Class=28 Mass test: TS0(OxxOxOxx)TS7 MS_Class=29 +Mass test: TS0(OxxOxOxx)TS7 MS_Class=30 +Mass test: TS0(OxxOxOxx)TS7 MS_Class=31 Mass test: TS0(OxxOxOxO)TS7 MS_Class=0 Mass test: TS0(OxxOxOxO)TS7 MS_Class=1 Mass test: TS0(OxxOxOxO)TS7 MS_Class=2 @@ -5408,6 +5708,8 @@ Mass test: TS0(OxxOxOxO)TS7 MS_Class=27 Mass test: TS0(OxxOxOxO)TS7 MS_Class=28 Mass test: TS0(OxxOxOxO)TS7 MS_Class=29 +Mass test: TS0(OxxOxOxO)TS7 MS_Class=30 +Mass test: TS0(OxxOxOxO)TS7 MS_Class=31 Mass test: TS0(OxxOxOOx)TS7 MS_Class=0 Mass test: TS0(OxxOxOOx)TS7 MS_Class=1 Mass test: TS0(OxxOxOOx)TS7 MS_Class=2 @@ -5438,6 +5740,8 @@ Mass test: TS0(OxxOxOOx)TS7 MS_Class=27 Mass test: TS0(OxxOxOOx)TS7 MS_Class=28 Mass test: TS0(OxxOxOOx)TS7 MS_Class=29 +Mass test: TS0(OxxOxOOx)TS7 MS_Class=30 +Mass test: TS0(OxxOxOOx)TS7 MS_Class=31 Mass test: TS0(OxxOxOOO)TS7 MS_Class=0 Mass test: TS0(OxxOxOOO)TS7 MS_Class=1 Mass test: TS0(OxxOxOOO)TS7 MS_Class=2 @@ -5468,6 +5772,8 @@ Mass test: TS0(OxxOxOOO)TS7 MS_Class=27 Mass test: TS0(OxxOxOOO)TS7 MS_Class=28 Mass test: TS0(OxxOxOOO)TS7 MS_Class=29 +Mass test: TS0(OxxOxOOO)TS7 MS_Class=30 +Mass test: TS0(OxxOxOOO)TS7 MS_Class=31 Mass test: TS0(OxxOOxxx)TS7 MS_Class=0 Mass test: TS0(OxxOOxxx)TS7 MS_Class=1 Mass test: TS0(OxxOOxxx)TS7 MS_Class=2 @@ -5498,6 +5804,8 @@ Mass test: TS0(OxxOOxxx)TS7 MS_Class=27 Mass test: TS0(OxxOOxxx)TS7 MS_Class=28 Mass test: TS0(OxxOOxxx)TS7 MS_Class=29 +Mass test: TS0(OxxOOxxx)TS7 MS_Class=30 +Mass test: TS0(OxxOOxxx)TS7 MS_Class=31 Mass test: TS0(OxxOOxxO)TS7 MS_Class=0 Mass test: TS0(OxxOOxxO)TS7 MS_Class=1 Mass test: TS0(OxxOOxxO)TS7 MS_Class=2 @@ -5528,6 +5836,8 @@ Mass test: TS0(OxxOOxxO)TS7 MS_Class=27 Mass test: TS0(OxxOOxxO)TS7 MS_Class=28 Mass test: TS0(OxxOOxxO)TS7 MS_Class=29 +Mass test: TS0(OxxOOxxO)TS7 MS_Class=30 +Mass test: TS0(OxxOOxxO)TS7 MS_Class=31 Mass test: TS0(OxxOOxOx)TS7 MS_Class=0 Mass test: TS0(OxxOOxOx)TS7 MS_Class=1 Mass test: TS0(OxxOOxOx)TS7 MS_Class=2 @@ -5558,6 +5868,8 @@ Mass test: TS0(OxxOOxOx)TS7 MS_Class=27 Mass test: TS0(OxxOOxOx)TS7 MS_Class=28 Mass test: TS0(OxxOOxOx)TS7 MS_Class=29 +Mass test: TS0(OxxOOxOx)TS7 MS_Class=30 +Mass test: TS0(OxxOOxOx)TS7 MS_Class=31 Mass test: TS0(OxxOOxOO)TS7 MS_Class=0 Mass test: TS0(OxxOOxOO)TS7 MS_Class=1 Mass test: TS0(OxxOOxOO)TS7 MS_Class=2 @@ -5588,6 +5900,8 @@ Mass test: TS0(OxxOOxOO)TS7 MS_Class=27 Mass test: TS0(OxxOOxOO)TS7 MS_Class=28 Mass test: TS0(OxxOOxOO)TS7 MS_Class=29 +Mass test: TS0(OxxOOxOO)TS7 MS_Class=30 +Mass test: TS0(OxxOOxOO)TS7 MS_Class=31 Mass test: TS0(OxxOOOxx)TS7 MS_Class=0 Mass test: TS0(OxxOOOxx)TS7 MS_Class=1 Mass test: TS0(OxxOOOxx)TS7 MS_Class=2 @@ -5618,6 +5932,8 @@ Mass test: TS0(OxxOOOxx)TS7 MS_Class=27 Mass test: TS0(OxxOOOxx)TS7 MS_Class=28 Mass test: TS0(OxxOOOxx)TS7 MS_Class=29 +Mass test: TS0(OxxOOOxx)TS7 MS_Class=30 +Mass test: TS0(OxxOOOxx)TS7 MS_Class=31 Mass test: TS0(OxxOOOxO)TS7 MS_Class=0 Mass test: TS0(OxxOOOxO)TS7 MS_Class=1 Mass test: TS0(OxxOOOxO)TS7 MS_Class=2 @@ -5648,6 +5964,8 @@ Mass test: TS0(OxxOOOxO)TS7 MS_Class=27 Mass test: TS0(OxxOOOxO)TS7 MS_Class=28 Mass test: TS0(OxxOOOxO)TS7 MS_Class=29 +Mass test: TS0(OxxOOOxO)TS7 MS_Class=30 +Mass test: TS0(OxxOOOxO)TS7 MS_Class=31 Mass test: TS0(OxxOOOOx)TS7 MS_Class=0 Mass test: TS0(OxxOOOOx)TS7 MS_Class=1 Mass test: TS0(OxxOOOOx)TS7 MS_Class=2 @@ -5678,6 +5996,8 @@ Mass test: TS0(OxxOOOOx)TS7 MS_Class=27 Mass test: TS0(OxxOOOOx)TS7 MS_Class=28 Mass test: TS0(OxxOOOOx)TS7 MS_Class=29 +Mass test: TS0(OxxOOOOx)TS7 MS_Class=30 +Mass test: TS0(OxxOOOOx)TS7 MS_Class=31 Mass test: TS0(OxxOOOOO)TS7 MS_Class=0 Mass test: TS0(OxxOOOOO)TS7 MS_Class=1 Mass test: TS0(OxxOOOOO)TS7 MS_Class=2 @@ -5708,6 +6028,8 @@ Mass test: TS0(OxxOOOOO)TS7 MS_Class=27 Mass test: TS0(OxxOOOOO)TS7 MS_Class=28 Mass test: TS0(OxxOOOOO)TS7 MS_Class=29 +Mass test: TS0(OxxOOOOO)TS7 MS_Class=30 +Mass test: TS0(OxxOOOOO)TS7 MS_Class=31 Mass test: TS0(OxOxxxxx)TS7 MS_Class=0 Mass test: TS0(OxOxxxxx)TS7 MS_Class=1 Mass test: TS0(OxOxxxxx)TS7 MS_Class=2 @@ -5738,6 +6060,8 @@ Mass test: TS0(OxOxxxxx)TS7 MS_Class=27 Mass test: TS0(OxOxxxxx)TS7 MS_Class=28 Mass test: TS0(OxOxxxxx)TS7 MS_Class=29 +Mass test: TS0(OxOxxxxx)TS7 MS_Class=30 +Mass test: TS0(OxOxxxxx)TS7 MS_Class=31 Mass test: TS0(OxOxxxxO)TS7 MS_Class=0 Mass test: TS0(OxOxxxxO)TS7 MS_Class=1 Mass test: TS0(OxOxxxxO)TS7 MS_Class=2 @@ -5768,6 +6092,8 @@ Mass test: TS0(OxOxxxxO)TS7 MS_Class=27 Mass test: TS0(OxOxxxxO)TS7 MS_Class=28 Mass test: TS0(OxOxxxxO)TS7 MS_Class=29 +Mass test: TS0(OxOxxxxO)TS7 MS_Class=30 +Mass test: TS0(OxOxxxxO)TS7 MS_Class=31 Mass test: TS0(OxOxxxOx)TS7 MS_Class=0 Mass test: TS0(OxOxxxOx)TS7 MS_Class=1 Mass test: TS0(OxOxxxOx)TS7 MS_Class=2 @@ -5798,6 +6124,8 @@ Mass test: TS0(OxOxxxOx)TS7 MS_Class=27 Mass test: TS0(OxOxxxOx)TS7 MS_Class=28 Mass test: TS0(OxOxxxOx)TS7 MS_Class=29 +Mass test: TS0(OxOxxxOx)TS7 MS_Class=30 +Mass test: TS0(OxOxxxOx)TS7 MS_Class=31 Mass test: TS0(OxOxxxOO)TS7 MS_Class=0 Mass test: TS0(OxOxxxOO)TS7 MS_Class=1 Mass test: TS0(OxOxxxOO)TS7 MS_Class=2 @@ -5828,6 +6156,8 @@ Mass test: TS0(OxOxxxOO)TS7 MS_Class=27 Mass test: TS0(OxOxxxOO)TS7 MS_Class=28 Mass test: TS0(OxOxxxOO)TS7 MS_Class=29 +Mass test: TS0(OxOxxxOO)TS7 MS_Class=30 +Mass test: TS0(OxOxxxOO)TS7 MS_Class=31 Mass test: TS0(OxOxxOxx)TS7 MS_Class=0 Mass test: TS0(OxOxxOxx)TS7 MS_Class=1 Mass test: TS0(OxOxxOxx)TS7 MS_Class=2 @@ -5858,6 +6188,8 @@ Mass test: TS0(OxOxxOxx)TS7 MS_Class=27 Mass test: TS0(OxOxxOxx)TS7 MS_Class=28 Mass test: TS0(OxOxxOxx)TS7 MS_Class=29 +Mass test: TS0(OxOxxOxx)TS7 MS_Class=30 +Mass test: TS0(OxOxxOxx)TS7 MS_Class=31 Mass test: TS0(OxOxxOxO)TS7 MS_Class=0 Mass test: TS0(OxOxxOxO)TS7 MS_Class=1 Mass test: TS0(OxOxxOxO)TS7 MS_Class=2 @@ -5888,6 +6220,8 @@ Mass test: TS0(OxOxxOxO)TS7 MS_Class=27 Mass test: TS0(OxOxxOxO)TS7 MS_Class=28 Mass test: TS0(OxOxxOxO)TS7 MS_Class=29 +Mass test: TS0(OxOxxOxO)TS7 MS_Class=30 +Mass test: TS0(OxOxxOxO)TS7 MS_Class=31 Mass test: TS0(OxOxxOOx)TS7 MS_Class=0 Mass test: TS0(OxOxxOOx)TS7 MS_Class=1 Mass test: TS0(OxOxxOOx)TS7 MS_Class=2 @@ -5918,6 +6252,8 @@ Mass test: TS0(OxOxxOOx)TS7 MS_Class=27 Mass test: TS0(OxOxxOOx)TS7 MS_Class=28 Mass test: TS0(OxOxxOOx)TS7 MS_Class=29 +Mass test: TS0(OxOxxOOx)TS7 MS_Class=30 +Mass test: TS0(OxOxxOOx)TS7 MS_Class=31 Mass test: TS0(OxOxxOOO)TS7 MS_Class=0 Mass test: TS0(OxOxxOOO)TS7 MS_Class=1 Mass test: TS0(OxOxxOOO)TS7 MS_Class=2 @@ -5948,6 +6284,8 @@ Mass test: TS0(OxOxxOOO)TS7 MS_Class=27 Mass test: TS0(OxOxxOOO)TS7 MS_Class=28 Mass test: TS0(OxOxxOOO)TS7 MS_Class=29 +Mass test: TS0(OxOxxOOO)TS7 MS_Class=30 +Mass test: TS0(OxOxxOOO)TS7 MS_Class=31 Mass test: TS0(OxOxOxxx)TS7 MS_Class=0 Mass test: TS0(OxOxOxxx)TS7 MS_Class=1 Mass test: TS0(OxOxOxxx)TS7 MS_Class=2 @@ -5978,6 +6316,8 @@ Mass test: TS0(OxOxOxxx)TS7 MS_Class=27 Mass test: TS0(OxOxOxxx)TS7 MS_Class=28 Mass test: TS0(OxOxOxxx)TS7 MS_Class=29 +Mass test: TS0(OxOxOxxx)TS7 MS_Class=30 +Mass test: TS0(OxOxOxxx)TS7 MS_Class=31 Mass test: TS0(OxOxOxxO)TS7 MS_Class=0 Mass test: TS0(OxOxOxxO)TS7 MS_Class=1 Mass test: TS0(OxOxOxxO)TS7 MS_Class=2 @@ -6008,6 +6348,8 @@ Mass test: TS0(OxOxOxxO)TS7 MS_Class=27 Mass test: TS0(OxOxOxxO)TS7 MS_Class=28 Mass test: TS0(OxOxOxxO)TS7 MS_Class=29 +Mass test: TS0(OxOxOxxO)TS7 MS_Class=30 +Mass test: TS0(OxOxOxxO)TS7 MS_Class=31 Mass test: TS0(OxOxOxOx)TS7 MS_Class=0 Mass test: TS0(OxOxOxOx)TS7 MS_Class=1 Mass test: TS0(OxOxOxOx)TS7 MS_Class=2 @@ -6038,6 +6380,8 @@ Mass test: TS0(OxOxOxOx)TS7 MS_Class=27 Mass test: TS0(OxOxOxOx)TS7 MS_Class=28 Mass test: TS0(OxOxOxOx)TS7 MS_Class=29 +Mass test: TS0(OxOxOxOx)TS7 MS_Class=30 +Mass test: TS0(OxOxOxOx)TS7 MS_Class=31 Mass test: TS0(OxOxOxOO)TS7 MS_Class=0 Mass test: TS0(OxOxOxOO)TS7 MS_Class=1 Mass test: TS0(OxOxOxOO)TS7 MS_Class=2 @@ -6068,6 +6412,8 @@ Mass test: TS0(OxOxOxOO)TS7 MS_Class=27 Mass test: TS0(OxOxOxOO)TS7 MS_Class=28 Mass test: TS0(OxOxOxOO)TS7 MS_Class=29 +Mass test: TS0(OxOxOxOO)TS7 MS_Class=30 +Mass test: TS0(OxOxOxOO)TS7 MS_Class=31 Mass test: TS0(OxOxOOxx)TS7 MS_Class=0 Mass test: TS0(OxOxOOxx)TS7 MS_Class=1 Mass test: TS0(OxOxOOxx)TS7 MS_Class=2 @@ -6098,6 +6444,8 @@ Mass test: TS0(OxOxOOxx)TS7 MS_Class=27 Mass test: TS0(OxOxOOxx)TS7 MS_Class=28 Mass test: TS0(OxOxOOxx)TS7 MS_Class=29 +Mass test: TS0(OxOxOOxx)TS7 MS_Class=30 +Mass test: TS0(OxOxOOxx)TS7 MS_Class=31 Mass test: TS0(OxOxOOxO)TS7 MS_Class=0 Mass test: TS0(OxOxOOxO)TS7 MS_Class=1 Mass test: TS0(OxOxOOxO)TS7 MS_Class=2 @@ -6128,6 +6476,8 @@ Mass test: TS0(OxOxOOxO)TS7 MS_Class=27 Mass test: TS0(OxOxOOxO)TS7 MS_Class=28 Mass test: TS0(OxOxOOxO)TS7 MS_Class=29 +Mass test: TS0(OxOxOOxO)TS7 MS_Class=30 +Mass test: TS0(OxOxOOxO)TS7 MS_Class=31 Mass test: TS0(OxOxOOOx)TS7 MS_Class=0 Mass test: TS0(OxOxOOOx)TS7 MS_Class=1 Mass test: TS0(OxOxOOOx)TS7 MS_Class=2 @@ -6158,6 +6508,8 @@ Mass test: TS0(OxOxOOOx)TS7 MS_Class=27 Mass test: TS0(OxOxOOOx)TS7 MS_Class=28 Mass test: TS0(OxOxOOOx)TS7 MS_Class=29 +Mass test: TS0(OxOxOOOx)TS7 MS_Class=30 +Mass test: TS0(OxOxOOOx)TS7 MS_Class=31 Mass test: TS0(OxOxOOOO)TS7 MS_Class=0 Mass test: TS0(OxOxOOOO)TS7 MS_Class=1 Mass test: TS0(OxOxOOOO)TS7 MS_Class=2 @@ -6188,6 +6540,8 @@ Mass test: TS0(OxOxOOOO)TS7 MS_Class=27 Mass test: TS0(OxOxOOOO)TS7 MS_Class=28 Mass test: TS0(OxOxOOOO)TS7 MS_Class=29 +Mass test: TS0(OxOxOOOO)TS7 MS_Class=30 +Mass test: TS0(OxOxOOOO)TS7 MS_Class=31 Mass test: TS0(OxOOxxxx)TS7 MS_Class=0 Mass test: TS0(OxOOxxxx)TS7 MS_Class=1 Mass test: TS0(OxOOxxxx)TS7 MS_Class=2 @@ -6218,6 +6572,8 @@ Mass test: TS0(OxOOxxxx)TS7 MS_Class=27 Mass test: TS0(OxOOxxxx)TS7 MS_Class=28 Mass test: TS0(OxOOxxxx)TS7 MS_Class=29 +Mass test: TS0(OxOOxxxx)TS7 MS_Class=30 +Mass test: TS0(OxOOxxxx)TS7 MS_Class=31 Mass test: TS0(OxOOxxxO)TS7 MS_Class=0 Mass test: TS0(OxOOxxxO)TS7 MS_Class=1 Mass test: TS0(OxOOxxxO)TS7 MS_Class=2 @@ -6248,6 +6604,8 @@ Mass test: TS0(OxOOxxxO)TS7 MS_Class=27 Mass test: TS0(OxOOxxxO)TS7 MS_Class=28 Mass test: TS0(OxOOxxxO)TS7 MS_Class=29 +Mass test: TS0(OxOOxxxO)TS7 MS_Class=30 +Mass test: TS0(OxOOxxxO)TS7 MS_Class=31 Mass test: TS0(OxOOxxOx)TS7 MS_Class=0 Mass test: TS0(OxOOxxOx)TS7 MS_Class=1 Mass test: TS0(OxOOxxOx)TS7 MS_Class=2 @@ -6278,6 +6636,8 @@ Mass test: TS0(OxOOxxOx)TS7 MS_Class=27 Mass test: TS0(OxOOxxOx)TS7 MS_Class=28 Mass test: TS0(OxOOxxOx)TS7 MS_Class=29 +Mass test: TS0(OxOOxxOx)TS7 MS_Class=30 +Mass test: TS0(OxOOxxOx)TS7 MS_Class=31 Mass test: TS0(OxOOxxOO)TS7 MS_Class=0 Mass test: TS0(OxOOxxOO)TS7 MS_Class=1 Mass test: TS0(OxOOxxOO)TS7 MS_Class=2 @@ -6308,6 +6668,8 @@ Mass test: TS0(OxOOxxOO)TS7 MS_Class=27 Mass test: TS0(OxOOxxOO)TS7 MS_Class=28 Mass test: TS0(OxOOxxOO)TS7 MS_Class=29 +Mass test: TS0(OxOOxxOO)TS7 MS_Class=30 +Mass test: TS0(OxOOxxOO)TS7 MS_Class=31 Mass test: TS0(OxOOxOxx)TS7 MS_Class=0 Mass test: TS0(OxOOxOxx)TS7 MS_Class=1 Mass test: TS0(OxOOxOxx)TS7 MS_Class=2 @@ -6338,6 +6700,8 @@ Mass test: TS0(OxOOxOxx)TS7 MS_Class=27 Mass test: TS0(OxOOxOxx)TS7 MS_Class=28 Mass test: TS0(OxOOxOxx)TS7 MS_Class=29 +Mass test: TS0(OxOOxOxx)TS7 MS_Class=30 +Mass test: TS0(OxOOxOxx)TS7 MS_Class=31 Mass test: TS0(OxOOxOxO)TS7 MS_Class=0 Mass test: TS0(OxOOxOxO)TS7 MS_Class=1 Mass test: TS0(OxOOxOxO)TS7 MS_Class=2 @@ -6368,6 +6732,8 @@ Mass test: TS0(OxOOxOxO)TS7 MS_Class=27 Mass test: TS0(OxOOxOxO)TS7 MS_Class=28 Mass test: TS0(OxOOxOxO)TS7 MS_Class=29 +Mass test: TS0(OxOOxOxO)TS7 MS_Class=30 +Mass test: TS0(OxOOxOxO)TS7 MS_Class=31 Mass test: TS0(OxOOxOOx)TS7 MS_Class=0 Mass test: TS0(OxOOxOOx)TS7 MS_Class=1 Mass test: TS0(OxOOxOOx)TS7 MS_Class=2 @@ -6398,6 +6764,8 @@ Mass test: TS0(OxOOxOOx)TS7 MS_Class=27 Mass test: TS0(OxOOxOOx)TS7 MS_Class=28 Mass test: TS0(OxOOxOOx)TS7 MS_Class=29 +Mass test: TS0(OxOOxOOx)TS7 MS_Class=30 +Mass test: TS0(OxOOxOOx)TS7 MS_Class=31 Mass test: TS0(OxOOxOOO)TS7 MS_Class=0 Mass test: TS0(OxOOxOOO)TS7 MS_Class=1 Mass test: TS0(OxOOxOOO)TS7 MS_Class=2 @@ -6428,6 +6796,8 @@ Mass test: TS0(OxOOxOOO)TS7 MS_Class=27 Mass test: TS0(OxOOxOOO)TS7 MS_Class=28 Mass test: TS0(OxOOxOOO)TS7 MS_Class=29 +Mass test: TS0(OxOOxOOO)TS7 MS_Class=30 +Mass test: TS0(OxOOxOOO)TS7 MS_Class=31 Mass test: TS0(OxOOOxxx)TS7 MS_Class=0 Mass test: TS0(OxOOOxxx)TS7 MS_Class=1 Mass test: TS0(OxOOOxxx)TS7 MS_Class=2 @@ -6458,6 +6828,8 @@ Mass test: TS0(OxOOOxxx)TS7 MS_Class=27 Mass test: TS0(OxOOOxxx)TS7 MS_Class=28 Mass test: TS0(OxOOOxxx)TS7 MS_Class=29 +Mass test: TS0(OxOOOxxx)TS7 MS_Class=30 +Mass test: TS0(OxOOOxxx)TS7 MS_Class=31 Mass test: TS0(OxOOOxxO)TS7 MS_Class=0 Mass test: TS0(OxOOOxxO)TS7 MS_Class=1 Mass test: TS0(OxOOOxxO)TS7 MS_Class=2 @@ -6488,6 +6860,8 @@ Mass test: TS0(OxOOOxxO)TS7 MS_Class=27 Mass test: TS0(OxOOOxxO)TS7 MS_Class=28 Mass test: TS0(OxOOOxxO)TS7 MS_Class=29 +Mass test: TS0(OxOOOxxO)TS7 MS_Class=30 +Mass test: TS0(OxOOOxxO)TS7 MS_Class=31 Mass test: TS0(OxOOOxOx)TS7 MS_Class=0 Mass test: TS0(OxOOOxOx)TS7 MS_Class=1 Mass test: TS0(OxOOOxOx)TS7 MS_Class=2 @@ -6518,6 +6892,8 @@ Mass test: TS0(OxOOOxOx)TS7 MS_Class=27 Mass test: TS0(OxOOOxOx)TS7 MS_Class=28 Mass test: TS0(OxOOOxOx)TS7 MS_Class=29 +Mass test: TS0(OxOOOxOx)TS7 MS_Class=30 +Mass test: TS0(OxOOOxOx)TS7 MS_Class=31 Mass test: TS0(OxOOOxOO)TS7 MS_Class=0 Mass test: TS0(OxOOOxOO)TS7 MS_Class=1 Mass test: TS0(OxOOOxOO)TS7 MS_Class=2 @@ -6548,6 +6924,8 @@ Mass test: TS0(OxOOOxOO)TS7 MS_Class=27 Mass test: TS0(OxOOOxOO)TS7 MS_Class=28 Mass test: TS0(OxOOOxOO)TS7 MS_Class=29 +Mass test: TS0(OxOOOxOO)TS7 MS_Class=30 +Mass test: TS0(OxOOOxOO)TS7 MS_Class=31 Mass test: TS0(OxOOOOxx)TS7 MS_Class=0 Mass test: TS0(OxOOOOxx)TS7 MS_Class=1 Mass test: TS0(OxOOOOxx)TS7 MS_Class=2 @@ -6578,6 +6956,8 @@ Mass test: TS0(OxOOOOxx)TS7 MS_Class=27 Mass test: TS0(OxOOOOxx)TS7 MS_Class=28 Mass test: TS0(OxOOOOxx)TS7 MS_Class=29 +Mass test: TS0(OxOOOOxx)TS7 MS_Class=30 +Mass test: TS0(OxOOOOxx)TS7 MS_Class=31 Mass test: TS0(OxOOOOxO)TS7 MS_Class=0 Mass test: TS0(OxOOOOxO)TS7 MS_Class=1 Mass test: TS0(OxOOOOxO)TS7 MS_Class=2 @@ -6608,6 +6988,8 @@ Mass test: TS0(OxOOOOxO)TS7 MS_Class=27 Mass test: TS0(OxOOOOxO)TS7 MS_Class=28 Mass test: TS0(OxOOOOxO)TS7 MS_Class=29 +Mass test: TS0(OxOOOOxO)TS7 MS_Class=30 +Mass test: TS0(OxOOOOxO)TS7 MS_Class=31 Mass test: TS0(OxOOOOOx)TS7 MS_Class=0 Mass test: TS0(OxOOOOOx)TS7 MS_Class=1 Mass test: TS0(OxOOOOOx)TS7 MS_Class=2 @@ -6638,6 +7020,8 @@ Mass test: TS0(OxOOOOOx)TS7 MS_Class=27 Mass test: TS0(OxOOOOOx)TS7 MS_Class=28 Mass test: TS0(OxOOOOOx)TS7 MS_Class=29 +Mass test: TS0(OxOOOOOx)TS7 MS_Class=30 +Mass test: TS0(OxOOOOOx)TS7 MS_Class=31 Mass test: TS0(OxOOOOOO)TS7 MS_Class=0 Mass test: TS0(OxOOOOOO)TS7 MS_Class=1 Mass test: TS0(OxOOOOOO)TS7 MS_Class=2 @@ -6668,6 +7052,8 @@ Mass test: TS0(OxOOOOOO)TS7 MS_Class=27 Mass test: TS0(OxOOOOOO)TS7 MS_Class=28 Mass test: TS0(OxOOOOOO)TS7 MS_Class=29 +Mass test: TS0(OxOOOOOO)TS7 MS_Class=30 +Mass test: TS0(OxOOOOOO)TS7 MS_Class=31 Mass test: TS0(OOxxxxxx)TS7 MS_Class=0 Mass test: TS0(OOxxxxxx)TS7 MS_Class=1 Mass test: TS0(OOxxxxxx)TS7 MS_Class=2 @@ -6698,6 +7084,8 @@ Mass test: TS0(OOxxxxxx)TS7 MS_Class=27 Mass test: TS0(OOxxxxxx)TS7 MS_Class=28 Mass test: TS0(OOxxxxxx)TS7 MS_Class=29 +Mass test: TS0(OOxxxxxx)TS7 MS_Class=30 +Mass test: TS0(OOxxxxxx)TS7 MS_Class=31 Mass test: TS0(OOxxxxxO)TS7 MS_Class=0 Mass test: TS0(OOxxxxxO)TS7 MS_Class=1 Mass test: TS0(OOxxxxxO)TS7 MS_Class=2 @@ -6728,6 +7116,8 @@ Mass test: TS0(OOxxxxxO)TS7 MS_Class=27 Mass test: TS0(OOxxxxxO)TS7 MS_Class=28 Mass test: TS0(OOxxxxxO)TS7 MS_Class=29 +Mass test: TS0(OOxxxxxO)TS7 MS_Class=30 +Mass test: TS0(OOxxxxxO)TS7 MS_Class=31 Mass test: TS0(OOxxxxOx)TS7 MS_Class=0 Mass test: TS0(OOxxxxOx)TS7 MS_Class=1 Mass test: TS0(OOxxxxOx)TS7 MS_Class=2 @@ -6758,6 +7148,8 @@ Mass test: TS0(OOxxxxOx)TS7 MS_Class=27 Mass test: TS0(OOxxxxOx)TS7 MS_Class=28 Mass test: TS0(OOxxxxOx)TS7 MS_Class=29 +Mass test: TS0(OOxxxxOx)TS7 MS_Class=30 +Mass test: TS0(OOxxxxOx)TS7 MS_Class=31 Mass test: TS0(OOxxxxOO)TS7 MS_Class=0 Mass test: TS0(OOxxxxOO)TS7 MS_Class=1 Mass test: TS0(OOxxxxOO)TS7 MS_Class=2 @@ -6788,6 +7180,8 @@ Mass test: TS0(OOxxxxOO)TS7 MS_Class=27 Mass test: TS0(OOxxxxOO)TS7 MS_Class=28 Mass test: TS0(OOxxxxOO)TS7 MS_Class=29 +Mass test: TS0(OOxxxxOO)TS7 MS_Class=30 +Mass test: TS0(OOxxxxOO)TS7 MS_Class=31 Mass test: TS0(OOxxxOxx)TS7 MS_Class=0 Mass test: TS0(OOxxxOxx)TS7 MS_Class=1 Mass test: TS0(OOxxxOxx)TS7 MS_Class=2 @@ -6818,6 +7212,8 @@ Mass test: TS0(OOxxxOxx)TS7 MS_Class=27 Mass test: TS0(OOxxxOxx)TS7 MS_Class=28 Mass test: TS0(OOxxxOxx)TS7 MS_Class=29 +Mass test: TS0(OOxxxOxx)TS7 MS_Class=30 +Mass test: TS0(OOxxxOxx)TS7 MS_Class=31 Mass test: TS0(OOxxxOxO)TS7 MS_Class=0 Mass test: TS0(OOxxxOxO)TS7 MS_Class=1 Mass test: TS0(OOxxxOxO)TS7 MS_Class=2 @@ -6848,6 +7244,8 @@ Mass test: TS0(OOxxxOxO)TS7 MS_Class=27 Mass test: TS0(OOxxxOxO)TS7 MS_Class=28 Mass test: TS0(OOxxxOxO)TS7 MS_Class=29 +Mass test: TS0(OOxxxOxO)TS7 MS_Class=30 +Mass test: TS0(OOxxxOxO)TS7 MS_Class=31 Mass test: TS0(OOxxxOOx)TS7 MS_Class=0 Mass test: TS0(OOxxxOOx)TS7 MS_Class=1 Mass test: TS0(OOxxxOOx)TS7 MS_Class=2 @@ -6878,6 +7276,8 @@ Mass test: TS0(OOxxxOOx)TS7 MS_Class=27 Mass test: TS0(OOxxxOOx)TS7 MS_Class=28 Mass test: TS0(OOxxxOOx)TS7 MS_Class=29 +Mass test: TS0(OOxxxOOx)TS7 MS_Class=30 +Mass test: TS0(OOxxxOOx)TS7 MS_Class=31 Mass test: TS0(OOxxxOOO)TS7 MS_Class=0 Mass test: TS0(OOxxxOOO)TS7 MS_Class=1 Mass test: TS0(OOxxxOOO)TS7 MS_Class=2 @@ -6908,6 +7308,8 @@ Mass test: TS0(OOxxxOOO)TS7 MS_Class=27 Mass test: TS0(OOxxxOOO)TS7 MS_Class=28 Mass test: TS0(OOxxxOOO)TS7 MS_Class=29 +Mass test: TS0(OOxxxOOO)TS7 MS_Class=30 +Mass test: TS0(OOxxxOOO)TS7 MS_Class=31 Mass test: TS0(OOxxOxxx)TS7 MS_Class=0 Mass test: TS0(OOxxOxxx)TS7 MS_Class=1 Mass test: TS0(OOxxOxxx)TS7 MS_Class=2 @@ -6938,6 +7340,8 @@ Mass test: TS0(OOxxOxxx)TS7 MS_Class=27 Mass test: TS0(OOxxOxxx)TS7 MS_Class=28 Mass test: TS0(OOxxOxxx)TS7 MS_Class=29 +Mass test: TS0(OOxxOxxx)TS7 MS_Class=30 +Mass test: TS0(OOxxOxxx)TS7 MS_Class=31 Mass test: TS0(OOxxOxxO)TS7 MS_Class=0 Mass test: TS0(OOxxOxxO)TS7 MS_Class=1 Mass test: TS0(OOxxOxxO)TS7 MS_Class=2 @@ -6968,6 +7372,8 @@ Mass test: TS0(OOxxOxxO)TS7 MS_Class=27 Mass test: TS0(OOxxOxxO)TS7 MS_Class=28 Mass test: TS0(OOxxOxxO)TS7 MS_Class=29 +Mass test: TS0(OOxxOxxO)TS7 MS_Class=30 +Mass test: TS0(OOxxOxxO)TS7 MS_Class=31 Mass test: TS0(OOxxOxOx)TS7 MS_Class=0 Mass test: TS0(OOxxOxOx)TS7 MS_Class=1 Mass test: TS0(OOxxOxOx)TS7 MS_Class=2 @@ -6998,6 +7404,8 @@ Mass test: TS0(OOxxOxOx)TS7 MS_Class=27 Mass test: TS0(OOxxOxOx)TS7 MS_Class=28 Mass test: TS0(OOxxOxOx)TS7 MS_Class=29 +Mass test: TS0(OOxxOxOx)TS7 MS_Class=30 +Mass test: TS0(OOxxOxOx)TS7 MS_Class=31 Mass test: TS0(OOxxOxOO)TS7 MS_Class=0 Mass test: TS0(OOxxOxOO)TS7 MS_Class=1 Mass test: TS0(OOxxOxOO)TS7 MS_Class=2 @@ -7028,6 +7436,8 @@ Mass test: TS0(OOxxOxOO)TS7 MS_Class=27 Mass test: TS0(OOxxOxOO)TS7 MS_Class=28 Mass test: TS0(OOxxOxOO)TS7 MS_Class=29 +Mass test: TS0(OOxxOxOO)TS7 MS_Class=30 +Mass test: TS0(OOxxOxOO)TS7 MS_Class=31 Mass test: TS0(OOxxOOxx)TS7 MS_Class=0 Mass test: TS0(OOxxOOxx)TS7 MS_Class=1 Mass test: TS0(OOxxOOxx)TS7 MS_Class=2 @@ -7058,6 +7468,8 @@ Mass test: TS0(OOxxOOxx)TS7 MS_Class=27 Mass test: TS0(OOxxOOxx)TS7 MS_Class=28 Mass test: TS0(OOxxOOxx)TS7 MS_Class=29 +Mass test: TS0(OOxxOOxx)TS7 MS_Class=30 +Mass test: TS0(OOxxOOxx)TS7 MS_Class=31 Mass test: TS0(OOxxOOxO)TS7 MS_Class=0 Mass test: TS0(OOxxOOxO)TS7 MS_Class=1 Mass test: TS0(OOxxOOxO)TS7 MS_Class=2 @@ -7088,6 +7500,8 @@ Mass test: TS0(OOxxOOxO)TS7 MS_Class=27 Mass test: TS0(OOxxOOxO)TS7 MS_Class=28 Mass test: TS0(OOxxOOxO)TS7 MS_Class=29 +Mass test: TS0(OOxxOOxO)TS7 MS_Class=30 +Mass test: TS0(OOxxOOxO)TS7 MS_Class=31 Mass test: TS0(OOxxOOOx)TS7 MS_Class=0 Mass test: TS0(OOxxOOOx)TS7 MS_Class=1 Mass test: TS0(OOxxOOOx)TS7 MS_Class=2 @@ -7118,6 +7532,8 @@ Mass test: TS0(OOxxOOOx)TS7 MS_Class=27 Mass test: TS0(OOxxOOOx)TS7 MS_Class=28 Mass test: TS0(OOxxOOOx)TS7 MS_Class=29 +Mass test: TS0(OOxxOOOx)TS7 MS_Class=30 +Mass test: TS0(OOxxOOOx)TS7 MS_Class=31 Mass test: TS0(OOxxOOOO)TS7 MS_Class=0 Mass test: TS0(OOxxOOOO)TS7 MS_Class=1 Mass test: TS0(OOxxOOOO)TS7 MS_Class=2 @@ -7148,6 +7564,8 @@ Mass test: TS0(OOxxOOOO)TS7 MS_Class=27 Mass test: TS0(OOxxOOOO)TS7 MS_Class=28 Mass test: TS0(OOxxOOOO)TS7 MS_Class=29 +Mass test: TS0(OOxxOOOO)TS7 MS_Class=30 +Mass test: TS0(OOxxOOOO)TS7 MS_Class=31 Mass test: TS0(OOxOxxxx)TS7 MS_Class=0 Mass test: TS0(OOxOxxxx)TS7 MS_Class=1 Mass test: TS0(OOxOxxxx)TS7 MS_Class=2 @@ -7178,6 +7596,8 @@ Mass test: TS0(OOxOxxxx)TS7 MS_Class=27 Mass test: TS0(OOxOxxxx)TS7 MS_Class=28 Mass test: TS0(OOxOxxxx)TS7 MS_Class=29 +Mass test: TS0(OOxOxxxx)TS7 MS_Class=30 +Mass test: TS0(OOxOxxxx)TS7 MS_Class=31 Mass test: TS0(OOxOxxxO)TS7 MS_Class=0 Mass test: TS0(OOxOxxxO)TS7 MS_Class=1 Mass test: TS0(OOxOxxxO)TS7 MS_Class=2 @@ -7208,6 +7628,8 @@ Mass test: TS0(OOxOxxxO)TS7 MS_Class=27 Mass test: TS0(OOxOxxxO)TS7 MS_Class=28 Mass test: TS0(OOxOxxxO)TS7 MS_Class=29 +Mass test: TS0(OOxOxxxO)TS7 MS_Class=30 +Mass test: TS0(OOxOxxxO)TS7 MS_Class=31 Mass test: TS0(OOxOxxOx)TS7 MS_Class=0 Mass test: TS0(OOxOxxOx)TS7 MS_Class=1 Mass test: TS0(OOxOxxOx)TS7 MS_Class=2 @@ -7238,6 +7660,8 @@ Mass test: TS0(OOxOxxOx)TS7 MS_Class=27 Mass test: TS0(OOxOxxOx)TS7 MS_Class=28 Mass test: TS0(OOxOxxOx)TS7 MS_Class=29 +Mass test: TS0(OOxOxxOx)TS7 MS_Class=30 +Mass test: TS0(OOxOxxOx)TS7 MS_Class=31 Mass test: TS0(OOxOxxOO)TS7 MS_Class=0 Mass test: TS0(OOxOxxOO)TS7 MS_Class=1 Mass test: TS0(OOxOxxOO)TS7 MS_Class=2 @@ -7268,6 +7692,8 @@ Mass test: TS0(OOxOxxOO)TS7 MS_Class=27 Mass test: TS0(OOxOxxOO)TS7 MS_Class=28 Mass test: TS0(OOxOxxOO)TS7 MS_Class=29 +Mass test: TS0(OOxOxxOO)TS7 MS_Class=30 +Mass test: TS0(OOxOxxOO)TS7 MS_Class=31 Mass test: TS0(OOxOxOxx)TS7 MS_Class=0 Mass test: TS0(OOxOxOxx)TS7 MS_Class=1 Mass test: TS0(OOxOxOxx)TS7 MS_Class=2 @@ -7298,6 +7724,8 @@ Mass test: TS0(OOxOxOxx)TS7 MS_Class=27 Mass test: TS0(OOxOxOxx)TS7 MS_Class=28 Mass test: TS0(OOxOxOxx)TS7 MS_Class=29 +Mass test: TS0(OOxOxOxx)TS7 MS_Class=30 +Mass test: TS0(OOxOxOxx)TS7 MS_Class=31 Mass test: TS0(OOxOxOxO)TS7 MS_Class=0 Mass test: TS0(OOxOxOxO)TS7 MS_Class=1 Mass test: TS0(OOxOxOxO)TS7 MS_Class=2 @@ -7328,6 +7756,8 @@ Mass test: TS0(OOxOxOxO)TS7 MS_Class=27 Mass test: TS0(OOxOxOxO)TS7 MS_Class=28 Mass test: TS0(OOxOxOxO)TS7 MS_Class=29 +Mass test: TS0(OOxOxOxO)TS7 MS_Class=30 +Mass test: TS0(OOxOxOxO)TS7 MS_Class=31 Mass test: TS0(OOxOxOOx)TS7 MS_Class=0 Mass test: TS0(OOxOxOOx)TS7 MS_Class=1 Mass test: TS0(OOxOxOOx)TS7 MS_Class=2 @@ -7358,6 +7788,8 @@ Mass test: TS0(OOxOxOOx)TS7 MS_Class=27 Mass test: TS0(OOxOxOOx)TS7 MS_Class=28 Mass test: TS0(OOxOxOOx)TS7 MS_Class=29 +Mass test: TS0(OOxOxOOx)TS7 MS_Class=30 +Mass test: TS0(OOxOxOOx)TS7 MS_Class=31 Mass test: TS0(OOxOxOOO)TS7 MS_Class=0 Mass test: TS0(OOxOxOOO)TS7 MS_Class=1 Mass test: TS0(OOxOxOOO)TS7 MS_Class=2 @@ -7388,6 +7820,8 @@ Mass test: TS0(OOxOxOOO)TS7 MS_Class=27 Mass test: TS0(OOxOxOOO)TS7 MS_Class=28 Mass test: TS0(OOxOxOOO)TS7 MS_Class=29 +Mass test: TS0(OOxOxOOO)TS7 MS_Class=30 +Mass test: TS0(OOxOxOOO)TS7 MS_Class=31 Mass test: TS0(OOxOOxxx)TS7 MS_Class=0 Mass test: TS0(OOxOOxxx)TS7 MS_Class=1 Mass test: TS0(OOxOOxxx)TS7 MS_Class=2 @@ -7418,6 +7852,8 @@ Mass test: TS0(OOxOOxxx)TS7 MS_Class=27 Mass test: TS0(OOxOOxxx)TS7 MS_Class=28 Mass test: TS0(OOxOOxxx)TS7 MS_Class=29 +Mass test: TS0(OOxOOxxx)TS7 MS_Class=30 +Mass test: TS0(OOxOOxxx)TS7 MS_Class=31 Mass test: TS0(OOxOOxxO)TS7 MS_Class=0 Mass test: TS0(OOxOOxxO)TS7 MS_Class=1 Mass test: TS0(OOxOOxxO)TS7 MS_Class=2 @@ -7448,6 +7884,8 @@ Mass test: TS0(OOxOOxxO)TS7 MS_Class=27 Mass test: TS0(OOxOOxxO)TS7 MS_Class=28 Mass test: TS0(OOxOOxxO)TS7 MS_Class=29 +Mass test: TS0(OOxOOxxO)TS7 MS_Class=30 +Mass test: TS0(OOxOOxxO)TS7 MS_Class=31 Mass test: TS0(OOxOOxOx)TS7 MS_Class=0 Mass test: TS0(OOxOOxOx)TS7 MS_Class=1 Mass test: TS0(OOxOOxOx)TS7 MS_Class=2 @@ -7478,6 +7916,8 @@ Mass test: TS0(OOxOOxOx)TS7 MS_Class=27 Mass test: TS0(OOxOOxOx)TS7 MS_Class=28 Mass test: TS0(OOxOOxOx)TS7 MS_Class=29 +Mass test: TS0(OOxOOxOx)TS7 MS_Class=30 +Mass test: TS0(OOxOOxOx)TS7 MS_Class=31 Mass test: TS0(OOxOOxOO)TS7 MS_Class=0 Mass test: TS0(OOxOOxOO)TS7 MS_Class=1 Mass test: TS0(OOxOOxOO)TS7 MS_Class=2 @@ -7508,6 +7948,8 @@ Mass test: TS0(OOxOOxOO)TS7 MS_Class=27 Mass test: TS0(OOxOOxOO)TS7 MS_Class=28 Mass test: TS0(OOxOOxOO)TS7 MS_Class=29 +Mass test: TS0(OOxOOxOO)TS7 MS_Class=30 +Mass test: TS0(OOxOOxOO)TS7 MS_Class=31 Mass test: TS0(OOxOOOxx)TS7 MS_Class=0 Mass test: TS0(OOxOOOxx)TS7 MS_Class=1 Mass test: TS0(OOxOOOxx)TS7 MS_Class=2 @@ -7538,6 +7980,8 @@ Mass test: TS0(OOxOOOxx)TS7 MS_Class=27 Mass test: TS0(OOxOOOxx)TS7 MS_Class=28 Mass test: TS0(OOxOOOxx)TS7 MS_Class=29 +Mass test: TS0(OOxOOOxx)TS7 MS_Class=30 +Mass test: TS0(OOxOOOxx)TS7 MS_Class=31 Mass test: TS0(OOxOOOxO)TS7 MS_Class=0 Mass test: TS0(OOxOOOxO)TS7 MS_Class=1 Mass test: TS0(OOxOOOxO)TS7 MS_Class=2 @@ -7568,6 +8012,8 @@ Mass test: TS0(OOxOOOxO)TS7 MS_Class=27 Mass test: TS0(OOxOOOxO)TS7 MS_Class=28 Mass test: TS0(OOxOOOxO)TS7 MS_Class=29 +Mass test: TS0(OOxOOOxO)TS7 MS_Class=30 +Mass test: TS0(OOxOOOxO)TS7 MS_Class=31 Mass test: TS0(OOxOOOOx)TS7 MS_Class=0 Mass test: TS0(OOxOOOOx)TS7 MS_Class=1 Mass test: TS0(OOxOOOOx)TS7 MS_Class=2 @@ -7598,6 +8044,8 @@ Mass test: TS0(OOxOOOOx)TS7 MS_Class=27 Mass test: TS0(OOxOOOOx)TS7 MS_Class=28 Mass test: TS0(OOxOOOOx)TS7 MS_Class=29 +Mass test: TS0(OOxOOOOx)TS7 MS_Class=30 +Mass test: TS0(OOxOOOOx)TS7 MS_Class=31 Mass test: TS0(OOxOOOOO)TS7 MS_Class=0 Mass test: TS0(OOxOOOOO)TS7 MS_Class=1 Mass test: TS0(OOxOOOOO)TS7 MS_Class=2 @@ -7628,6 +8076,8 @@ Mass test: TS0(OOxOOOOO)TS7 MS_Class=27 Mass test: TS0(OOxOOOOO)TS7 MS_Class=28 Mass test: TS0(OOxOOOOO)TS7 MS_Class=29 +Mass test: TS0(OOxOOOOO)TS7 MS_Class=30 +Mass test: TS0(OOxOOOOO)TS7 MS_Class=31 Mass test: TS0(OOOxxxxx)TS7 MS_Class=0 Mass test: TS0(OOOxxxxx)TS7 MS_Class=1 Mass test: TS0(OOOxxxxx)TS7 MS_Class=2 @@ -7658,6 +8108,8 @@ Mass test: TS0(OOOxxxxx)TS7 MS_Class=27 Mass test: TS0(OOOxxxxx)TS7 MS_Class=28 Mass test: TS0(OOOxxxxx)TS7 MS_Class=29 +Mass test: TS0(OOOxxxxx)TS7 MS_Class=30 +Mass test: TS0(OOOxxxxx)TS7 MS_Class=31 Mass test: TS0(OOOxxxxO)TS7 MS_Class=0 Mass test: TS0(OOOxxxxO)TS7 MS_Class=1 Mass test: TS0(OOOxxxxO)TS7 MS_Class=2 @@ -7688,6 +8140,8 @@ Mass test: TS0(OOOxxxxO)TS7 MS_Class=27 Mass test: TS0(OOOxxxxO)TS7 MS_Class=28 Mass test: TS0(OOOxxxxO)TS7 MS_Class=29 +Mass test: TS0(OOOxxxxO)TS7 MS_Class=30 +Mass test: TS0(OOOxxxxO)TS7 MS_Class=31 Mass test: TS0(OOOxxxOx)TS7 MS_Class=0 Mass test: TS0(OOOxxxOx)TS7 MS_Class=1 Mass test: TS0(OOOxxxOx)TS7 MS_Class=2 @@ -7718,6 +8172,8 @@ Mass test: TS0(OOOxxxOx)TS7 MS_Class=27 Mass test: TS0(OOOxxxOx)TS7 MS_Class=28 Mass test: TS0(OOOxxxOx)TS7 MS_Class=29 +Mass test: TS0(OOOxxxOx)TS7 MS_Class=30 +Mass test: TS0(OOOxxxOx)TS7 MS_Class=31 Mass test: TS0(OOOxxxOO)TS7 MS_Class=0 Mass test: TS0(OOOxxxOO)TS7 MS_Class=1 Mass test: TS0(OOOxxxOO)TS7 MS_Class=2 @@ -7748,6 +8204,8 @@ Mass test: TS0(OOOxxxOO)TS7 MS_Class=27 Mass test: TS0(OOOxxxOO)TS7 MS_Class=28 Mass test: TS0(OOOxxxOO)TS7 MS_Class=29 +Mass test: TS0(OOOxxxOO)TS7 MS_Class=30 +Mass test: TS0(OOOxxxOO)TS7 MS_Class=31 Mass test: TS0(OOOxxOxx)TS7 MS_Class=0 Mass test: TS0(OOOxxOxx)TS7 MS_Class=1 Mass test: TS0(OOOxxOxx)TS7 MS_Class=2 @@ -7778,6 +8236,8 @@ Mass test: TS0(OOOxxOxx)TS7 MS_Class=27 Mass test: TS0(OOOxxOxx)TS7 MS_Class=28 Mass test: TS0(OOOxxOxx)TS7 MS_Class=29 +Mass test: TS0(OOOxxOxx)TS7 MS_Class=30 +Mass test: TS0(OOOxxOxx)TS7 MS_Class=31 Mass test: TS0(OOOxxOxO)TS7 MS_Class=0 Mass test: TS0(OOOxxOxO)TS7 MS_Class=1 Mass test: TS0(OOOxxOxO)TS7 MS_Class=2 @@ -7808,6 +8268,8 @@ Mass test: TS0(OOOxxOxO)TS7 MS_Class=27 Mass test: TS0(OOOxxOxO)TS7 MS_Class=28 Mass test: TS0(OOOxxOxO)TS7 MS_Class=29 +Mass test: TS0(OOOxxOxO)TS7 MS_Class=30 +Mass test: TS0(OOOxxOxO)TS7 MS_Class=31 Mass test: TS0(OOOxxOOx)TS7 MS_Class=0 Mass test: TS0(OOOxxOOx)TS7 MS_Class=1 Mass test: TS0(OOOxxOOx)TS7 MS_Class=2 @@ -7838,6 +8300,8 @@ Mass test: TS0(OOOxxOOx)TS7 MS_Class=27 Mass test: TS0(OOOxxOOx)TS7 MS_Class=28 Mass test: TS0(OOOxxOOx)TS7 MS_Class=29 +Mass test: TS0(OOOxxOOx)TS7 MS_Class=30 +Mass test: TS0(OOOxxOOx)TS7 MS_Class=31 Mass test: TS0(OOOxxOOO)TS7 MS_Class=0 Mass test: TS0(OOOxxOOO)TS7 MS_Class=1 Mass test: TS0(OOOxxOOO)TS7 MS_Class=2 @@ -7868,6 +8332,8 @@ Mass test: TS0(OOOxxOOO)TS7 MS_Class=27 Mass test: TS0(OOOxxOOO)TS7 MS_Class=28 Mass test: TS0(OOOxxOOO)TS7 MS_Class=29 +Mass test: TS0(OOOxxOOO)TS7 MS_Class=30 +Mass test: TS0(OOOxxOOO)TS7 MS_Class=31 Mass test: TS0(OOOxOxxx)TS7 MS_Class=0 Mass test: TS0(OOOxOxxx)TS7 MS_Class=1 Mass test: TS0(OOOxOxxx)TS7 MS_Class=2 @@ -7898,6 +8364,8 @@ Mass test: TS0(OOOxOxxx)TS7 MS_Class=27 Mass test: TS0(OOOxOxxx)TS7 MS_Class=28 Mass test: TS0(OOOxOxxx)TS7 MS_Class=29 +Mass test: TS0(OOOxOxxx)TS7 MS_Class=30 +Mass test: TS0(OOOxOxxx)TS7 MS_Class=31 Mass test: TS0(OOOxOxxO)TS7 MS_Class=0 Mass test: TS0(OOOxOxxO)TS7 MS_Class=1 Mass test: TS0(OOOxOxxO)TS7 MS_Class=2 @@ -7928,6 +8396,8 @@ Mass test: TS0(OOOxOxxO)TS7 MS_Class=27 Mass test: TS0(OOOxOxxO)TS7 MS_Class=28 Mass test: TS0(OOOxOxxO)TS7 MS_Class=29 +Mass test: TS0(OOOxOxxO)TS7 MS_Class=30 +Mass test: TS0(OOOxOxxO)TS7 MS_Class=31 Mass test: TS0(OOOxOxOx)TS7 MS_Class=0 Mass test: TS0(OOOxOxOx)TS7 MS_Class=1 Mass test: TS0(OOOxOxOx)TS7 MS_Class=2 @@ -7958,6 +8428,8 @@ Mass test: TS0(OOOxOxOx)TS7 MS_Class=27 Mass test: TS0(OOOxOxOx)TS7 MS_Class=28 Mass test: TS0(OOOxOxOx)TS7 MS_Class=29 +Mass test: TS0(OOOxOxOx)TS7 MS_Class=30 +Mass test: TS0(OOOxOxOx)TS7 MS_Class=31 Mass test: TS0(OOOxOxOO)TS7 MS_Class=0 Mass test: TS0(OOOxOxOO)TS7 MS_Class=1 Mass test: TS0(OOOxOxOO)TS7 MS_Class=2 @@ -7988,6 +8460,8 @@ Mass test: TS0(OOOxOxOO)TS7 MS_Class=27 Mass test: TS0(OOOxOxOO)TS7 MS_Class=28 Mass test: TS0(OOOxOxOO)TS7 MS_Class=29 +Mass test: TS0(OOOxOxOO)TS7 MS_Class=30 +Mass test: TS0(OOOxOxOO)TS7 MS_Class=31 Mass test: TS0(OOOxOOxx)TS7 MS_Class=0 Mass test: TS0(OOOxOOxx)TS7 MS_Class=1 Mass test: TS0(OOOxOOxx)TS7 MS_Class=2 @@ -8018,6 +8492,8 @@ Mass test: TS0(OOOxOOxx)TS7 MS_Class=27 Mass test: TS0(OOOxOOxx)TS7 MS_Class=28 Mass test: TS0(OOOxOOxx)TS7 MS_Class=29 +Mass test: TS0(OOOxOOxx)TS7 MS_Class=30 +Mass test: TS0(OOOxOOxx)TS7 MS_Class=31 Mass test: TS0(OOOxOOxO)TS7 MS_Class=0 Mass test: TS0(OOOxOOxO)TS7 MS_Class=1 Mass test: TS0(OOOxOOxO)TS7 MS_Class=2 @@ -8048,6 +8524,8 @@ Mass test: TS0(OOOxOOxO)TS7 MS_Class=27 Mass test: TS0(OOOxOOxO)TS7 MS_Class=28 Mass test: TS0(OOOxOOxO)TS7 MS_Class=29 +Mass test: TS0(OOOxOOxO)TS7 MS_Class=30 +Mass test: TS0(OOOxOOxO)TS7 MS_Class=31 Mass test: TS0(OOOxOOOx)TS7 MS_Class=0 Mass test: TS0(OOOxOOOx)TS7 MS_Class=1 Mass test: TS0(OOOxOOOx)TS7 MS_Class=2 @@ -8078,6 +8556,8 @@ Mass test: TS0(OOOxOOOx)TS7 MS_Class=27 Mass test: TS0(OOOxOOOx)TS7 MS_Class=28 Mass test: TS0(OOOxOOOx)TS7 MS_Class=29 +Mass test: TS0(OOOxOOOx)TS7 MS_Class=30 +Mass test: TS0(OOOxOOOx)TS7 MS_Class=31 Mass test: TS0(OOOxOOOO)TS7 MS_Class=0 Mass test: TS0(OOOxOOOO)TS7 MS_Class=1 Mass test: TS0(OOOxOOOO)TS7 MS_Class=2 @@ -8108,6 +8588,8 @@ Mass test: TS0(OOOxOOOO)TS7 MS_Class=27 Mass test: TS0(OOOxOOOO)TS7 MS_Class=28 Mass test: TS0(OOOxOOOO)TS7 MS_Class=29 +Mass test: TS0(OOOxOOOO)TS7 MS_Class=30 +Mass test: TS0(OOOxOOOO)TS7 MS_Class=31 Mass test: TS0(OOOOxxxx)TS7 MS_Class=0 Mass test: TS0(OOOOxxxx)TS7 MS_Class=1 Mass test: TS0(OOOOxxxx)TS7 MS_Class=2 @@ -8138,6 +8620,8 @@ Mass test: TS0(OOOOxxxx)TS7 MS_Class=27 Mass test: TS0(OOOOxxxx)TS7 MS_Class=28 Mass test: TS0(OOOOxxxx)TS7 MS_Class=29 +Mass test: TS0(OOOOxxxx)TS7 MS_Class=30 +Mass test: TS0(OOOOxxxx)TS7 MS_Class=31 Mass test: TS0(OOOOxxxO)TS7 MS_Class=0 Mass test: TS0(OOOOxxxO)TS7 MS_Class=1 Mass test: TS0(OOOOxxxO)TS7 MS_Class=2 @@ -8168,6 +8652,8 @@ Mass test: TS0(OOOOxxxO)TS7 MS_Class=27 Mass test: TS0(OOOOxxxO)TS7 MS_Class=28 Mass test: TS0(OOOOxxxO)TS7 MS_Class=29 +Mass test: TS0(OOOOxxxO)TS7 MS_Class=30 +Mass test: TS0(OOOOxxxO)TS7 MS_Class=31 Mass test: TS0(OOOOxxOx)TS7 MS_Class=0 Mass test: TS0(OOOOxxOx)TS7 MS_Class=1 Mass test: TS0(OOOOxxOx)TS7 MS_Class=2 @@ -8198,6 +8684,8 @@ Mass test: TS0(OOOOxxOx)TS7 MS_Class=27 Mass test: TS0(OOOOxxOx)TS7 MS_Class=28 Mass test: TS0(OOOOxxOx)TS7 MS_Class=29 +Mass test: TS0(OOOOxxOx)TS7 MS_Class=30 +Mass test: TS0(OOOOxxOx)TS7 MS_Class=31 Mass test: TS0(OOOOxxOO)TS7 MS_Class=0 Mass test: TS0(OOOOxxOO)TS7 MS_Class=1 Mass test: TS0(OOOOxxOO)TS7 MS_Class=2 @@ -8228,6 +8716,8 @@ Mass test: TS0(OOOOxxOO)TS7 MS_Class=27 Mass test: TS0(OOOOxxOO)TS7 MS_Class=28 Mass test: TS0(OOOOxxOO)TS7 MS_Class=29 +Mass test: TS0(OOOOxxOO)TS7 MS_Class=30 +Mass test: TS0(OOOOxxOO)TS7 MS_Class=31 Mass test: TS0(OOOOxOxx)TS7 MS_Class=0 Mass test: TS0(OOOOxOxx)TS7 MS_Class=1 Mass test: TS0(OOOOxOxx)TS7 MS_Class=2 @@ -8258,6 +8748,8 @@ Mass test: TS0(OOOOxOxx)TS7 MS_Class=27 Mass test: TS0(OOOOxOxx)TS7 MS_Class=28 Mass test: TS0(OOOOxOxx)TS7 MS_Class=29 +Mass test: TS0(OOOOxOxx)TS7 MS_Class=30 +Mass test: TS0(OOOOxOxx)TS7 MS_Class=31 Mass test: TS0(OOOOxOxO)TS7 MS_Class=0 Mass test: TS0(OOOOxOxO)TS7 MS_Class=1 Mass test: TS0(OOOOxOxO)TS7 MS_Class=2 @@ -8288,6 +8780,8 @@ Mass test: TS0(OOOOxOxO)TS7 MS_Class=27 Mass test: TS0(OOOOxOxO)TS7 MS_Class=28 Mass test: TS0(OOOOxOxO)TS7 MS_Class=29 +Mass test: TS0(OOOOxOxO)TS7 MS_Class=30 +Mass test: TS0(OOOOxOxO)TS7 MS_Class=31 Mass test: TS0(OOOOxOOx)TS7 MS_Class=0 Mass test: TS0(OOOOxOOx)TS7 MS_Class=1 Mass test: TS0(OOOOxOOx)TS7 MS_Class=2 @@ -8318,6 +8812,8 @@ Mass test: TS0(OOOOxOOx)TS7 MS_Class=27 Mass test: TS0(OOOOxOOx)TS7 MS_Class=28 Mass test: TS0(OOOOxOOx)TS7 MS_Class=29 +Mass test: TS0(OOOOxOOx)TS7 MS_Class=30 +Mass test: TS0(OOOOxOOx)TS7 MS_Class=31 Mass test: TS0(OOOOxOOO)TS7 MS_Class=0 Mass test: TS0(OOOOxOOO)TS7 MS_Class=1 Mass test: TS0(OOOOxOOO)TS7 MS_Class=2 @@ -8348,6 +8844,8 @@ Mass test: TS0(OOOOxOOO)TS7 MS_Class=27 Mass test: TS0(OOOOxOOO)TS7 MS_Class=28 Mass test: TS0(OOOOxOOO)TS7 MS_Class=29 +Mass test: TS0(OOOOxOOO)TS7 MS_Class=30 +Mass test: TS0(OOOOxOOO)TS7 MS_Class=31 Mass test: TS0(OOOOOxxx)TS7 MS_Class=0 Mass test: TS0(OOOOOxxx)TS7 MS_Class=1 Mass test: TS0(OOOOOxxx)TS7 MS_Class=2 @@ -8378,6 +8876,8 @@ Mass test: TS0(OOOOOxxx)TS7 MS_Class=27 Mass test: TS0(OOOOOxxx)TS7 MS_Class=28 Mass test: TS0(OOOOOxxx)TS7 MS_Class=29 +Mass test: TS0(OOOOOxxx)TS7 MS_Class=30 +Mass test: TS0(OOOOOxxx)TS7 MS_Class=31 Mass test: TS0(OOOOOxxO)TS7 MS_Class=0 Mass test: TS0(OOOOOxxO)TS7 MS_Class=1 Mass test: TS0(OOOOOxxO)TS7 MS_Class=2 @@ -8408,6 +8908,8 @@ Mass test: TS0(OOOOOxxO)TS7 MS_Class=27 Mass test: TS0(OOOOOxxO)TS7 MS_Class=28 Mass test: TS0(OOOOOxxO)TS7 MS_Class=29 +Mass test: TS0(OOOOOxxO)TS7 MS_Class=30 +Mass test: TS0(OOOOOxxO)TS7 MS_Class=31 Mass test: TS0(OOOOOxOx)TS7 MS_Class=0 Mass test: TS0(OOOOOxOx)TS7 MS_Class=1 Mass test: TS0(OOOOOxOx)TS7 MS_Class=2 @@ -8438,6 +8940,8 @@ Mass test: TS0(OOOOOxOx)TS7 MS_Class=27 Mass test: TS0(OOOOOxOx)TS7 MS_Class=28 Mass test: TS0(OOOOOxOx)TS7 MS_Class=29 +Mass test: TS0(OOOOOxOx)TS7 MS_Class=30 +Mass test: TS0(OOOOOxOx)TS7 MS_Class=31 Mass test: TS0(OOOOOxOO)TS7 MS_Class=0 Mass test: TS0(OOOOOxOO)TS7 MS_Class=1 Mass test: TS0(OOOOOxOO)TS7 MS_Class=2 @@ -8468,6 +8972,8 @@ Mass test: TS0(OOOOOxOO)TS7 MS_Class=27 Mass test: TS0(OOOOOxOO)TS7 MS_Class=28 Mass test: TS0(OOOOOxOO)TS7 MS_Class=29 +Mass test: TS0(OOOOOxOO)TS7 MS_Class=30 +Mass test: TS0(OOOOOxOO)TS7 MS_Class=31 Mass test: TS0(OOOOOOxx)TS7 MS_Class=0 Mass test: TS0(OOOOOOxx)TS7 MS_Class=1 Mass test: TS0(OOOOOOxx)TS7 MS_Class=2 @@ -8498,6 +9004,8 @@ Mass test: TS0(OOOOOOxx)TS7 MS_Class=27 Mass test: TS0(OOOOOOxx)TS7 MS_Class=28 Mass test: TS0(OOOOOOxx)TS7 MS_Class=29 +Mass test: TS0(OOOOOOxx)TS7 MS_Class=30 +Mass test: TS0(OOOOOOxx)TS7 MS_Class=31 Mass test: TS0(OOOOOOxO)TS7 MS_Class=0 Mass test: TS0(OOOOOOxO)TS7 MS_Class=1 Mass test: TS0(OOOOOOxO)TS7 MS_Class=2 @@ -8528,6 +9036,8 @@ Mass test: TS0(OOOOOOxO)TS7 MS_Class=27 Mass test: TS0(OOOOOOxO)TS7 MS_Class=28 Mass test: TS0(OOOOOOxO)TS7 MS_Class=29 +Mass test: TS0(OOOOOOxO)TS7 MS_Class=30 +Mass test: TS0(OOOOOOxO)TS7 MS_Class=31 Mass test: TS0(OOOOOOOx)TS7 MS_Class=0 Mass test: TS0(OOOOOOOx)TS7 MS_Class=1 Mass test: TS0(OOOOOOOx)TS7 MS_Class=2 @@ -8558,6 +9068,8 @@ Mass test: TS0(OOOOOOOx)TS7 MS_Class=27 Mass test: TS0(OOOOOOOx)TS7 MS_Class=28 Mass test: TS0(OOOOOOOx)TS7 MS_Class=29 +Mass test: TS0(OOOOOOOx)TS7 MS_Class=30 +Mass test: TS0(OOOOOOOx)TS7 MS_Class=31 Mass test: TS0(OOOOOOOO)TS7 MS_Class=0 Mass test: TS0(OOOOOOOO)TS7 MS_Class=1 Mass test: TS0(OOOOOOOO)TS7 MS_Class=2 @@ -8588,6 +9100,8 @@ Mass test: TS0(OOOOOOOO)TS7 MS_Class=27 Mass test: TS0(OOOOOOOO)TS7 MS_Class=28 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29 +Mass test: TS0(OOOOOOOO)TS7 MS_Class=30 +Mass test: TS0(OOOOOOOO)TS7 MS_Class=31 Going to test assignment with many TBF, algorithm A class 1..1 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -8727,7 +9241,7 @@ TBF[30] class 7 reserves ...CD... TBF[31] class 8 reserves ...DDCD. Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) -Going to test assignment with many TBF, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm B class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8757,11 +9271,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) -Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) + Successfully allocated 29 UL TBFs, algorithm B class 1..32 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..32 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8791,13 +9302,13 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DDC - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ....DC.. - TBF[1] class 4 reserves ...C.... - TBF[2] class 5 reserves ...C.... - TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) + TBF[1] class 30 reserves ...C.... + TBF[2] class 31 reserves ...C.... + TBF[0] class 32 reserves .......C + TBF[3] class 1 reserves ...C.... + TBF[0] class 2 reserves ......C. + TBF[0] class 3 reserves .....C.. + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..32 (UL and DL) Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... @@ -9741,137 +10252,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9901,12 +10412,12 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -9936,137 +10447,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... TBF[0] class 3 reserves .....C.. @@ -10096,137 +10607,137 @@ TBF[5] class 27 reserves ....C... TBF[5] class 28 reserves .....C.. TBF[5] class 29 reserves ......C. - TBF[5] class 1 reserves .......C - TBF[6] class 2 reserves ...C.... - TBF[6] class 3 reserves ....C... - TBF[6] class 4 reserves .....C.. - TBF[6] class 5 reserves ......C. - TBF[6] class 6 reserves .......C - TBF[7] class 7 reserves ...C.... - TBF[7] class 8 reserves ....C... - TBF[7] class 9 reserves .....C.. - TBF[7] class 10 reserves ......C. - TBF[7] class 11 reserves .......C - TBF[8] class 12 reserves ...C.... - TBF[8] class 13 reserves ....C... - TBF[8] class 14 reserves .....C.. - TBF[8] class 15 reserves ......C. - TBF[8] class 16 reserves .......C - TBF[9] class 17 reserves ...C.... - TBF[9] class 18 reserves ....C... - TBF[9] class 19 reserves .....C.. - TBF[9] class 20 reserves ......C. - TBF[9] class 21 reserves .......C - TBF[10] class 22 reserves ...C.... - TBF[10] class 23 reserves ....C... - TBF[10] class 24 reserves .....C.. - TBF[10] class 25 reserves ......C. - TBF[10] class 26 reserves .......C - TBF[11] class 27 reserves ...C.... - TBF[11] class 28 reserves ....C... - TBF[11] class 29 reserves .....C.. - TBF[11] class 1 reserves ......C. - TBF[11] class 2 reserves .......C - TBF[12] class 3 reserves ...C.... - TBF[12] class 4 reserves ....C... - TBF[12] class 5 reserves .....C.. - TBF[12] class 6 reserves ......C. - TBF[12] class 7 reserves .......C - TBF[13] class 8 reserves ...C.... - TBF[13] class 9 reserves ....C... - TBF[13] class 10 reserves .....C.. - TBF[13] class 11 reserves ......C. - TBF[13] class 12 reserves .......C - TBF[14] class 13 reserves ...C.... - TBF[14] class 14 reserves ....C... - TBF[14] class 15 reserves .....C.. - TBF[14] class 16 reserves ......C. - TBF[14] class 17 reserves .......C - TBF[15] class 18 reserves ...C.... - TBF[15] class 19 reserves ....C... - TBF[15] class 20 reserves .....C.. - TBF[15] class 21 reserves ......C. - TBF[15] class 22 reserves .......C - TBF[16] class 23 reserves ...C.... - TBF[16] class 24 reserves ....C... - TBF[16] class 25 reserves .....C.. - TBF[16] class 26 reserves ......C. - TBF[16] class 27 reserves .......C - TBF[17] class 28 reserves ...C.... - TBF[17] class 29 reserves ....C... - TBF[17] class 1 reserves .....C.. - TBF[17] class 2 reserves ......C. - TBF[17] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[18] class 6 reserves .....C.. - TBF[18] class 7 reserves ......C. - TBF[18] class 8 reserves .......C - TBF[19] class 9 reserves ...C.... - TBF[19] class 10 reserves ....C... - TBF[19] class 11 reserves .....C.. - TBF[19] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[20] class 14 reserves ...C.... - TBF[20] class 15 reserves ....C... - TBF[20] class 16 reserves .....C.. - TBF[20] class 17 reserves ......C. - TBF[20] class 18 reserves .......C - TBF[21] class 19 reserves ...C.... - TBF[21] class 20 reserves ....C... - TBF[21] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[21] class 23 reserves .......C - TBF[22] class 24 reserves ...C.... - TBF[22] class 25 reserves ....C... - TBF[22] class 26 reserves .....C.. - TBF[22] class 27 reserves ......C. - TBF[22] class 28 reserves .......C - TBF[23] class 29 reserves ...C.... - TBF[23] class 1 reserves ....C... - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[5] class 30 reserves .......C + TBF[6] class 31 reserves ...C.... + TBF[6] class 32 reserves ....C... + TBF[6] class 1 reserves .....C.. + TBF[6] class 2 reserves ......C. + TBF[6] class 3 reserves .......C + TBF[7] class 4 reserves ...C.... + TBF[7] class 5 reserves ....C... + TBF[7] class 6 reserves .....C.. + TBF[7] class 7 reserves ......C. + TBF[7] class 8 reserves .......C + TBF[8] class 9 reserves ...C.... + TBF[8] class 10 reserves ....C... + TBF[8] class 11 reserves .....C.. + TBF[8] class 12 reserves ......C. + TBF[8] class 13 reserves .......C + TBF[9] class 14 reserves ...C.... + TBF[9] class 15 reserves ....C... + TBF[9] class 16 reserves .....C.. + TBF[9] class 17 reserves ......C. + TBF[9] class 18 reserves .......C + TBF[10] class 19 reserves ...C.... + TBF[10] class 20 reserves ....C... + TBF[10] class 21 reserves .....C.. + TBF[10] class 22 reserves ......C. + TBF[10] class 23 reserves .......C + TBF[11] class 24 reserves ...C.... + TBF[11] class 25 reserves ....C... + TBF[11] class 26 reserves .....C.. + TBF[11] class 27 reserves ......C. + TBF[11] class 28 reserves .......C + TBF[12] class 29 reserves ...C.... + TBF[12] class 30 reserves ....C... + TBF[12] class 31 reserves .....C.. + TBF[12] class 32 reserves ......C. + TBF[12] class 1 reserves .......C + TBF[13] class 2 reserves ...C.... + TBF[13] class 3 reserves ....C... + TBF[13] class 4 reserves .....C.. + TBF[13] class 5 reserves ......C. + TBF[13] class 6 reserves .......C + TBF[14] class 7 reserves ...C.... + TBF[14] class 8 reserves ....C... + TBF[14] class 9 reserves .....C.. + TBF[14] class 10 reserves ......C. + TBF[14] class 11 reserves .......C + TBF[15] class 12 reserves ...C.... + TBF[15] class 13 reserves ....C... + TBF[15] class 14 reserves .....C.. + TBF[15] class 15 reserves ......C. + TBF[15] class 16 reserves .......C + TBF[16] class 17 reserves ...C.... + TBF[16] class 18 reserves ....C... + TBF[16] class 19 reserves .....C.. + TBF[16] class 20 reserves ......C. + TBF[16] class 21 reserves .......C + TBF[17] class 22 reserves ...C.... + TBF[17] class 23 reserves ....C... + TBF[17] class 24 reserves .....C.. + TBF[17] class 25 reserves ......C. + TBF[17] class 26 reserves .......C + TBF[18] class 27 reserves ...C.... + TBF[18] class 28 reserves ....C... + TBF[18] class 29 reserves .....C.. + TBF[18] class 30 reserves ......C. + TBF[18] class 31 reserves .......C + TBF[19] class 32 reserves ...C.... + TBF[19] class 1 reserves ....C... + TBF[19] class 2 reserves .....C.. + TBF[19] class 3 reserves ......C. + TBF[19] class 4 reserves .......C + TBF[20] class 5 reserves ...C.... + TBF[20] class 6 reserves ....C... + TBF[20] class 7 reserves .....C.. + TBF[20] class 8 reserves ......C. + TBF[20] class 9 reserves .......C + TBF[21] class 10 reserves ...C.... + TBF[21] class 11 reserves ....C... + TBF[21] class 12 reserves .....C.. + TBF[21] class 13 reserves ......C. + TBF[21] class 14 reserves .......C + TBF[22] class 15 reserves ...C.... + TBF[22] class 16 reserves ....C... + TBF[22] class 17 reserves .....C.. + TBF[22] class 18 reserves ......C. + TBF[22] class 19 reserves .......C + TBF[23] class 20 reserves ...C.... + TBF[23] class 21 reserves ....C... + TBF[23] class 22 reserves .....C.. + TBF[23] class 23 reserves ......C. + TBF[23] class 24 reserves .......C + TBF[24] class 25 reserves ...C.... + TBF[24] class 26 reserves ....C... + TBF[24] class 27 reserves .....C.. + TBF[24] class 28 reserves ......C. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Going to test assignment with many connections, algorithm B TBF[0] class 1 reserves ...C.... @@ -10258,9 +10769,6 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -10314,11 +10822,8 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 1 reserves ...C.... - TBF[1] class 2 reserves ...DC... + TBF[0] class 1 reserves .......C + TBF[1] class 2 reserves ......DC TBF[2] class 3 reserves ......DC TBF[3] class 4 reserves ....DCD. TBF[4] class 5 reserves ...CD... @@ -10326,9 +10831,9 @@ TBF[6] class 7 reserves ......CD TBF[7] class 8 reserves ...DDCD. TBF[8] class 9 reserves ...DCD.. - TBF[9] class 10 reserves ....DCD. - TBF[10] class 11 reserves ...DCD.. - TBF[11] class 12 reserves .....DCD + TBF[9] class 10 reserves ...DCD.. + TBF[10] class 11 reserves .....DCD + TBF[11] class 12 reserves ...DCD.. TBF[12] class 13 reserves .....CDD TBF[13] class 14 reserves ...CDDD. TBF[14] class 15 reserves ...CDDDD @@ -10346,10 +10851,7 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves ...C.... - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - Successfully allocated 32 TBFs + Successfully allocated 29 TBFs Going to test assignment with many connections, algorithm dynamic TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. @@ -10380,74 +10882,76 @@ TBF[26] class 27 reserves .....DCD TBF[27] class 28 reserves ...DCD.. TBF[28] class 29 reserves .....DCD - TBF[29] class 1 reserves .......C - TBF[30] class 2 reserves ......DC - TBF[31] class 3 reserves ......DC - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[18] class 4 reserves ...C.... - TBF[18] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[12] class 8 reserves .......C - TBF[20] class 9 reserves ...C.... - TBF[20] class 10 reserves ....C... - TBF[29] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[19] class 13 reserves .......C - TBF[22] class 14 reserves ...C.... - TBF[22] class 15 reserves ....C... - TBF[30] class 16 reserves .....C.. - TBF[19] class 17 reserves ......C. - TBF[21] class 18 reserves .......C - TBF[24] class 19 reserves ...C.... - TBF[24] class 20 reserves ....C... - TBF[31] class 21 reserves .....C.. - TBF[21] class 22 reserves ......C. - TBF[23] class 23 reserves .......C - TBF[26] class 24 reserves ...C.... - TBF[26] class 25 reserves ....C... - TBF[23] class 26 reserves ......C. - TBF[25] class 27 reserves .......C - TBF[28] class 28 reserves ...C.... - TBF[28] class 29 reserves ....C... - TBF[25] class 1 reserves ......C. - TBF[27] class 2 reserves .......C - TBF[29] class 3 reserves ...C.... - TBF[29] class 4 reserves ....C... - TBF[27] class 5 reserves ......C. - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[29] class 8 reserves ......C. - TBF[31] class 9 reserves ...C.... - TBF[31] class 10 reserves ....C... + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[5] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[6] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[8] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[10] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[12] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[19] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[21] class 30 reserves .......C + TBF[18] class 31 reserves ...C.... + TBF[18] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[23] class 3 reserves .......C + TBF[20] class 4 reserves ...C.... + TBF[20] class 5 reserves ....C... + TBF[29] class 6 reserves .....C.. + TBF[19] class 7 reserves ......C. + TBF[25] class 8 reserves .......C + TBF[22] class 9 reserves ...C.... + TBF[22] class 10 reserves ....C... + TBF[30] class 11 reserves .....C.. + TBF[21] class 12 reserves ......C. + TBF[27] class 13 reserves .......C + TBF[24] class 14 reserves ...C.... + TBF[24] class 15 reserves ....C... + TBF[31] class 16 reserves .....C.. + TBF[23] class 17 reserves ......C. + TBF[29] class 18 reserves .......C + TBF[26] class 19 reserves ...C.... + TBF[26] class 20 reserves ....C... + TBF[25] class 21 reserves ......C. + TBF[30] class 22 reserves .......C + TBF[28] class 23 reserves ...C.... + TBF[28] class 24 reserves ....C... + TBF[27] class 25 reserves ......C. + TBF[31] class 26 reserves .......C + TBF[29] class 27 reserves ...C.... + TBF[29] class 28 reserves ....C... + TBF[29] class 29 reserves ......C. + TBF[30] class 30 reserves ...C.... + TBF[30] class 31 reserves ....C... + TBF[30] class 32 reserves ......C. + TBF[31] class 1 reserves ...C.... + TBF[31] class 2 reserves ....C... + TBF[31] class 3 reserves ......C. TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....DC.. TBF[0] class 3 reserves ......DC @@ -10501,137 +11005,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves .....C.. TBF[2] class 3 reserves .......C @@ -10661,137 +11165,137 @@ TBF[15] class 27 reserves ......C. TBF[14] class 28 reserves ....C... TBF[16] class 29 reserves ......C. - TBF[4] class 1 reserves .......C - TBF[7] class 2 reserves .......C - TBF[9] class 3 reserves .......C - TBF[0] class 4 reserves .....C.. - TBF[1] class 5 reserves ...C.... - TBF[2] class 6 reserves ...C.... - TBF[0] class 7 reserves .......C - TBF[4] class 8 reserves ...C.... - TBF[0] class 9 reserves ....C... - TBF[1] class 10 reserves .......C - TBF[6] class 11 reserves ...C.... - TBF[2] class 12 reserves ....C... - TBF[0] class 13 reserves ......C. - TBF[3] class 14 reserves .......C - TBF[7] class 15 reserves ...C.... - TBF[4] class 16 reserves ....C... - TBF[1] class 17 reserves ......C. - TBF[5] class 18 reserves .......C - TBF[9] class 19 reserves ...C.... - TBF[6] class 20 reserves ....C... - TBF[3] class 21 reserves ......C. - TBF[6] class 22 reserves .......C - TBF[11] class 23 reserves ...C.... - TBF[9] class 24 reserves ....C... - TBF[2] class 25 reserves .....C.. - TBF[5] class 26 reserves ......C. - TBF[8] class 27 reserves .......C - TBF[13] class 28 reserves ...C.... - TBF[11] class 29 reserves ....C... - TBF[4] class 1 reserves .....C.. - TBF[8] class 2 reserves ......C. - TBF[10] class 3 reserves .......C - TBF[15] class 4 reserves ...C.... - TBF[15] class 5 reserves ....C... - TBF[5] class 6 reserves .....C.. - TBF[10] class 7 reserves ......C. - TBF[11] class 8 reserves .......C - TBF[16] class 9 reserves ...C.... - TBF[16] class 10 reserves ....C... - TBF[6] class 11 reserves .....C.. - TBF[12] class 12 reserves ......C. - TBF[12] class 13 reserves .......C - TBF[17] class 14 reserves ...C.... - TBF[17] class 15 reserves ....C... - TBF[7] class 16 reserves .....C.. - TBF[17] class 17 reserves ......C. - TBF[13] class 18 reserves .......C - TBF[18] class 19 reserves ...C.... - TBF[18] class 20 reserves ....C... - TBF[8] class 21 reserves .....C.. - TBF[18] class 22 reserves ......C. - TBF[14] class 23 reserves .......C - TBF[19] class 24 reserves ...C.... - TBF[19] class 25 reserves ....C... - TBF[19] class 26 reserves ......C. - TBF[15] class 27 reserves .......C - TBF[20] class 28 reserves ...C.... - TBF[20] class 29 reserves ....C... - TBF[20] class 1 reserves ......C. - TBF[16] class 2 reserves .......C - TBF[21] class 3 reserves ...C.... - TBF[21] class 4 reserves ....C... - TBF[21] class 5 reserves ......C. - TBF[22] class 6 reserves ...C.... - TBF[22] class 7 reserves ....C... - TBF[22] class 8 reserves ......C. - TBF[23] class 9 reserves ...C.... - TBF[23] class 10 reserves ....C... - TBF[9] class 11 reserves .....C.. - TBF[10] class 12 reserves .....C.. - TBF[11] class 13 reserves .....C.. - TBF[12] class 14 reserves .....C.. - TBF[13] class 15 reserves .....C.. - TBF[14] class 16 reserves .....C.. - TBF[15] class 17 reserves .....C.. - TBF[16] class 18 reserves .....C.. - TBF[17] class 19 reserves .....C.. - TBF[17] class 20 reserves .......C - TBF[18] class 21 reserves .....C.. - TBF[18] class 22 reserves .......C - TBF[19] class 23 reserves .....C.. - TBF[19] class 24 reserves .......C - TBF[20] class 25 reserves .....C.. - TBF[20] class 26 reserves .......C - TBF[21] class 27 reserves .....C.. - TBF[21] class 28 reserves .......C - TBF[22] class 29 reserves .....C.. - TBF[22] class 1 reserves .......C - TBF[23] class 2 reserves .....C.. - TBF[23] class 3 reserves ......C. - TBF[23] class 4 reserves .......C - TBF[24] class 5 reserves ...C.... - TBF[24] class 6 reserves ....C... - TBF[24] class 7 reserves .....C.. - TBF[24] class 8 reserves ......C. - TBF[24] class 9 reserves .......C - TBF[25] class 10 reserves ...C.... - TBF[25] class 11 reserves ....C... - TBF[25] class 12 reserves .....C.. - TBF[25] class 13 reserves ......C. - TBF[25] class 14 reserves .......C - TBF[26] class 15 reserves ...C.... - TBF[26] class 16 reserves ....C... - TBF[26] class 17 reserves .....C.. - TBF[26] class 18 reserves ......C. - TBF[26] class 19 reserves .......C - TBF[27] class 20 reserves ...C.... - TBF[27] class 21 reserves ....C... - TBF[27] class 22 reserves .....C.. - TBF[27] class 23 reserves ......C. - TBF[27] class 24 reserves .......C - TBF[28] class 25 reserves ...C.... - TBF[28] class 26 reserves ....C... - TBF[28] class 27 reserves .....C.. - TBF[28] class 28 reserves ......C. - TBF[28] class 29 reserves .......C - TBF[29] class 1 reserves ...C.... - TBF[29] class 2 reserves ....C... - TBF[29] class 3 reserves .....C.. - TBF[29] class 4 reserves ......C. - TBF[29] class 5 reserves .......C - TBF[30] class 6 reserves ...C.... - TBF[30] class 7 reserves ....C... - TBF[30] class 8 reserves .....C.. - TBF[30] class 9 reserves ......C. - TBF[30] class 10 reserves .......C - TBF[31] class 11 reserves ...C.... - TBF[31] class 12 reserves ....C... - TBF[31] class 13 reserves .....C.. - TBF[31] class 14 reserves ......C. - TBF[31] class 15 reserves .......C + TBF[0] class 30 reserves .......C + TBF[1] class 31 reserves .......C + TBF[1] class 32 reserves ...C.... + TBF[3] class 1 reserves .......C + TBF[2] class 2 reserves ...C.... + TBF[4] class 3 reserves .......C + TBF[4] class 4 reserves ...C.... + TBF[0] class 5 reserves ....C... + TBF[0] class 6 reserves ......C. + TBF[5] class 7 reserves .......C + TBF[6] class 8 reserves ...C.... + TBF[2] class 9 reserves ....C... + TBF[1] class 10 reserves ......C. + TBF[6] class 11 reserves .......C + TBF[7] class 12 reserves ...C.... + TBF[4] class 13 reserves ....C... + TBF[3] class 14 reserves ......C. + TBF[7] class 15 reserves .......C + TBF[9] class 16 reserves ...C.... + TBF[6] class 17 reserves ....C... + TBF[0] class 18 reserves .....C.. + TBF[5] class 19 reserves ......C. + TBF[8] class 20 reserves .......C + TBF[11] class 21 reserves ...C.... + TBF[9] class 22 reserves ....C... + TBF[2] class 23 reserves .....C.. + TBF[8] class 24 reserves ......C. + TBF[9] class 25 reserves .......C + TBF[13] class 26 reserves ...C.... + TBF[11] class 27 reserves ....C... + TBF[4] class 28 reserves .....C.. + TBF[10] class 29 reserves ......C. + TBF[10] class 30 reserves .......C + TBF[15] class 31 reserves ...C.... + TBF[15] class 32 reserves ....C... + TBF[5] class 1 reserves .....C.. + TBF[12] class 2 reserves ......C. + TBF[11] class 3 reserves .......C + TBF[16] class 4 reserves ...C.... + TBF[16] class 5 reserves ....C... + TBF[6] class 6 reserves .....C.. + TBF[17] class 7 reserves ......C. + TBF[12] class 8 reserves .......C + TBF[17] class 9 reserves ...C.... + TBF[17] class 10 reserves ....C... + TBF[7] class 11 reserves .....C.. + TBF[18] class 12 reserves ......C. + TBF[13] class 13 reserves .......C + TBF[18] class 14 reserves ...C.... + TBF[18] class 15 reserves ....C... + TBF[8] class 16 reserves .....C.. + TBF[19] class 17 reserves ......C. + TBF[14] class 18 reserves .......C + TBF[19] class 19 reserves ...C.... + TBF[19] class 20 reserves ....C... + TBF[20] class 21 reserves ......C. + TBF[15] class 22 reserves .......C + TBF[20] class 23 reserves ...C.... + TBF[20] class 24 reserves ....C... + TBF[21] class 25 reserves ......C. + TBF[16] class 26 reserves .......C + TBF[21] class 27 reserves ...C.... + TBF[21] class 28 reserves ....C... + TBF[22] class 29 reserves ......C. + TBF[22] class 30 reserves ...C.... + TBF[22] class 31 reserves ....C... + TBF[23] class 32 reserves ......C. + TBF[23] class 1 reserves ...C.... + TBF[23] class 2 reserves ....C... + TBF[24] class 3 reserves ......C. + TBF[9] class 4 reserves .....C.. + TBF[10] class 5 reserves .....C.. + TBF[11] class 6 reserves .....C.. + TBF[12] class 7 reserves .....C.. + TBF[13] class 8 reserves .....C.. + TBF[14] class 9 reserves .....C.. + TBF[15] class 10 reserves .....C.. + TBF[16] class 11 reserves .....C.. + TBF[17] class 12 reserves .....C.. + TBF[17] class 13 reserves .......C + TBF[18] class 14 reserves .....C.. + TBF[18] class 15 reserves .......C + TBF[19] class 16 reserves .....C.. + TBF[19] class 17 reserves .......C + TBF[20] class 18 reserves .....C.. + TBF[20] class 19 reserves .......C + TBF[21] class 20 reserves .....C.. + TBF[21] class 21 reserves .......C + TBF[22] class 22 reserves .....C.. + TBF[22] class 23 reserves .......C + TBF[23] class 24 reserves .....C.. + TBF[23] class 25 reserves .......C + TBF[24] class 26 reserves ...C.... + TBF[24] class 27 reserves ....C... + TBF[24] class 28 reserves .....C.. + TBF[24] class 29 reserves .......C + TBF[25] class 30 reserves ...C.... + TBF[25] class 31 reserves ....C... + TBF[25] class 32 reserves .....C.. + TBF[25] class 1 reserves ......C. + TBF[25] class 2 reserves .......C + TBF[26] class 3 reserves ...C.... + TBF[26] class 4 reserves ....C... + TBF[26] class 5 reserves .....C.. + TBF[26] class 6 reserves ......C. + TBF[26] class 7 reserves .......C + TBF[27] class 8 reserves ...C.... + TBF[27] class 9 reserves ....C... + TBF[27] class 10 reserves .....C.. + TBF[27] class 11 reserves ......C. + TBF[27] class 12 reserves .......C + TBF[28] class 13 reserves ...C.... + TBF[28] class 14 reserves ....C... + TBF[28] class 15 reserves .....C.. + TBF[28] class 16 reserves ......C. + TBF[28] class 17 reserves .......C + TBF[29] class 18 reserves ...C.... + TBF[29] class 19 reserves ....C... + TBF[29] class 20 reserves .....C.. + TBF[29] class 21 reserves ......C. + TBF[29] class 22 reserves .......C + TBF[30] class 23 reserves ...C.... + TBF[30] class 24 reserves ....C... + TBF[30] class 25 reserves .....C.. + TBF[30] class 26 reserves ......C. + TBF[30] class 27 reserves .......C + TBF[31] class 28 reserves ...C.... + TBF[31] class 29 reserves ....C... + TBF[31] class 30 reserves .....C.. + TBF[31] class 31 reserves ......C. + TBF[31] class 32 reserves .......C Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) -- To view, visit https://gerrit.osmocom.org/4958 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7737f303d97197ef159b14a19c3312a11f07b433 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 12:52:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 12:52:13 +0000 Subject: [ABANDON] osmo-pcu[master]: Clarify alloc tests In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Clarify alloc tests ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4956 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3feeb92237ffb9557ac6998540b740f1f67186b3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:00:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 13:00:49 +0000 Subject: openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:01:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 13:01:51 +0000 Subject: openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: Is there similar patch for OsmoBSC? -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:06:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 13:06:20 +0000 Subject: openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: > Is there similar patch for OsmoBSC? As explained in the comment in here in gerrit, it's a backport ffrom osmo-bsc.git :-) -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:10:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:10:03 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review-1 (10 comments) nice, but found some details, mostly in the test https://gerrit.osmocom.org/#/c/4905/6/src/libosmo-mgcp/mgcp_protocol.c File src/libosmo-mgcp/mgcp_protocol.c: Line 487: ENDPOINT_NUMBER(endp), *line, *line); the commit log says, we should reject MGCP requests that contain 'I:', this is logging the error only. I guess this is ok, would just be nice to have commit log in line with the implementation. https://gerrit.osmocom.org/#/c/4905/6/tests/mgcp/mgcp_test.c File tests/mgcp/mgcp_test.c: Line 490: len = sprintf((char *)msg->data, "%s", str); (curious, in one sprintf() the str directly serves as format, in the other we use "%s" and str as parameter. Seems to me that this could have used str as format directly all the time (even before this patch).) Line 574: if (conn_id[i] == '\n' || conn_id[i] == '\n') -1: did you mean '\r' instead of \n twice? Line 766: char conn_id[256]; (what is this for, just a temp buffer while reading the conn_id? Seems it is always just copied straight to last_conn_id, right? Why not use only last_conn_id?) Line 767: char last_conn_id[256]; -1: IIUC last_conn_id may be fed into create_msg as uninitialized mem and gets printed into the message? ... ah, a previous iteration should have written to it. But let's start off with it saying "invalid" or something. Line 784: inp = create_msg(t->req, last_conn_id); <- uninitialized here Line 796: memcpy(last_conn_id, conn_id, sizeof(conn_id)); <- changes here Line 802: inp = create_msg(t->req, last_conn_id); -1: at this point the last_conn_id may have changed, right? Not a clean re-transmission? https://gerrit.osmocom.org/#/c/4905/6/tests/mgcp/mgcp_test.ok File tests/mgcp/mgcp_test.ok: Line 24: Response matches our expectations. (are these three lines useful output?) Line 89: using message with patched conn_id for comparison -1: I'd prefer to see the actual patched message instead of %s and a loose fact that it was patched, so that we can spot whether all %s were in fact fed with data correctly. -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:16:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:16:59 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 6: (4 comments) ...and some more. https://gerrit.osmocom.org/#/c/4905/6/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 42: rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); er... so we do 32 attempts at creating a random id? Why not just count the number of connections and express that as hex? I think this choice deserves an explanation in a comment. What's the rationale behind it? Line 50: /* ensure that the generated conn_id is unuque "unique" Line 51: * for the current this endpoint */ "current this" Line 57: with usually only two conn ids per endpoint, it's unlikely to fail, but if it does, that deserves logging. -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:20:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:20:30 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 6: Code-Review-1 (4 comments) https://gerrit.osmocom.org/#/c/4906/6/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 87: OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); -1: you ignored my earlier comment. It's ok to disagree but if you do, please respond. Line 135: OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); ... https://gerrit.osmocom.org/#/c/4906/6/src/libosmo-mgcp/mgcp_msg.c File src/libosmo-mgcp/mgcp_msg.c: Line 338: "endpoint:%x invalid ConnectionIdentifier (missing)\n", -1: ignored earlier comment on 0x Line 346: "endpoint:%x invalid ConnectionIdentifier (empty)\n", ... -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:22:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:22:41 +0000 Subject: osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4911/1/src/host/layer23/src/mobile/gsm411_sms.c File src/host/layer23/src/mobile/gsm411_sms.c: Line 380: rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); > Well. This is why the next patch is killing msg_ref from the sms structure. I don't mind, just making sure you're aware of it -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:28:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:28:56 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5006/1/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 58: 'bts[].direct_pcu': schema.BOOL_STR, > See this option from osmo-bts-symo: (ah now i remember. maybe we can add a "_dsp_" in the name for forgetful fools?) -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:35:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:35:35 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5007/1/src/osmo_gsm_tester/bts_osmotrx.py File src/osmo_gsm_tester/bts_osmotrx.py: Line 51: self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) > From my point of view the pcu is always attached to a specific bts and it's but you are also creating a PCU in case we're not even going to test GPRS. In general code design, creating more classes from the constructor is a bad choice. E.g. for testing, for readability, avoid unintended cascades... Alternatives: create the PCU from an explicit function (def create_pcu()), create the PCU from the general BTS startup function conditionally on whether GRPS is used, or create-if-not-exists from def pcu(). -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:35:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 13:35:43 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/4906/6/src/libosmo-mgcp/mgcp_msg.c File src/libosmo-mgcp/mgcp_msg.c: Line 346: "endpoint:%x invalid ConnectionIdentifier (empty)\n", > ... I don't understand why you keep insisting on using a LOG line formatting that's inconsistent with all of the existing log statements in the MGW/MGCP code. Please don't apply "general rules" but most and foremost ensure it is consistent within one program. If it needs to be changed, then one has to change all occurrences in a separate patch. -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:43:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:43:09 +0000 Subject: osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5009/1/src/osmo_gsm_tester/modem.py File src/osmo_gsm_tester/modem.py: Line 340: CTX_PROT_IPv46 = 'dual' > That's expected to be used by tests when telling the modem to create a IPv4 > The strings need to be that way because that's how they are defined in ofono API. Ok, accepted! -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:47:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:47:56 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) the test is still incomplete, particularly the ping that the commit log talks about is not there. It's ok for a first version, but say so in the commit log https://gerrit.osmocom.org/#/c/5011/1/suites/gprs/ping.py File suites/gprs/ping.py: Line 45: ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) is ms.activate_context() blocking? For the ms.attach() we chose to go for non-blocking. -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:50:28 +0000 Subject: osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Patch Set 4: > (1 comment) > > I see a number of other strcpy and strncpy instances around > osmo-mgw.git. I think at some point I replaced all with > osmo_strlcpy(), I wonder where all these are coming from now. Would > you mind to replace all of the occurences in one fell swoop? > > src/libosmo-mgcp/mgcp_conn.c:107: strcpy(conn->name, name); > src/libosmo-mgcp/mgcp_network.c:91: strncpy(addr, > endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); > src/libosmo-mgcp/mgcp_network.c:99: strncpy(addr, > endp->cfg->source_addr, INET_ADDRSTRLEN); > src/libosmo-mgcp-client/mgcp_client.c:204: strncpy(r->audio_ip, > line + 9, sizeof(r->audio_ip)); > src/libosmo-mgcp-client/mgcp_client.c:343: strncpy(strbuf, (const > char*)msg->data, l); > tests/mgcp_client/mgcp_client_test.c:49: strncpy(data, head, l); > tests/mgcp_client/mgcp_client_test.c:56: strncpy(data, params, l); > tests/mgcp_client/mgcp_client_test.c:69: strncpy(data, str, l); any reply on this? -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:55:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:55:55 +0000 Subject: python/osmo-python-tests[master]: Fix parsing for python3 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5028/1/osmopy/osmo_ipa.py File osmopy/osmo_ipa.py: Line 241: if s == self.CTRL_ERR: so you are splitting bytes into smaller bytes, then you go on to compare against string constants ... Instead, you may want to do data_str = data.decode('utf-8') If we're allowing arbitrary bytes in the value, you want to do the decode step after the split... But there should be some decode step *somewhere*. I wonder why this alone seems to be working for you, it should still cause encoding problems. -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:57:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:57:26 +0000 Subject: python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 13:58:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 13:58:28 +0000 Subject: python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 ah, you may also want to add installed scripts to setup.py -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:01:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:01:08 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:01:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:01:45 +0000 Subject: python/osmo-python-tests[master]: Add osmo_ipa.py to setup's install In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 oh here it is. could be merged with that other patch... -- To view, visit https://gerrit.osmocom.org/5035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:01:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:01:54 +0000 Subject: python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:03:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:03:48 +0000 Subject: osmo-bts[master]: doc/examples: add CalypsoBTS configuration example In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:05:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:05:59 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp In-Reply-To: References: Message-ID: Patch Set 2: > > It appears that osmo-hnbgw *does* need -lsctp. > > Which particular libsctp API is used directly by osmo-hnbgw? for the record: it turns out osmo-hnbgw still had an unused function that called sctp_send() from an earlier code state. With that function dropped, all worked out. -- To view, visit https://gerrit.osmocom.org/4618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:07:00 +0000 Subject: python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Patch Set 5: Verified+1 -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:07:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:07:08 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Add *.py from OsmoBSC In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add *.py from OsmoBSC ...................................................................... Add *.py from OsmoBSC Those are generic enough and can be used as advanced example of uzing CTRL interface from python on top of osmo_ipa. Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e --- M README M osmopy/__init__.py A osmopy/osmo_ctrl.py A osmopy/soap.py A osmopy/twisted_ipa.py M setup.py 6 files changed, 705 insertions(+), 3 deletions(-) Approvals: Max: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/README b/README index b85f7c9..25be782 100644 --- a/README +++ b/README @@ -2,13 +2,15 @@ sudo python setup.py install If you prefer to have it cleanly removable, install checkinstall and run sudo checkinstall python setup.py install -Alternatively, just run 'pip install --user -e ./' +Alternatively, just run 'pip install --user -e ./' or 'pip3 install --user -e ./' +depending on your python version. Use -There are currently 3 scripts in this package: +There are currently following scripts in this package: osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) +soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,5 +26,7 @@ Libraries: osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts +osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework obscvty.py may be of general use. osmoutil.py probably isn't. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 1b97e33..b760111 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,9 +1,12 @@ #!/usr/bin/env python -__version__ = '0.0.1' +__version__ = '0.0.2' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', + 'osmo_ctrl', + 'soap', + 'twisted_ipa', 'osmo_interact_common', 'osmo_interact_vty', 'osmo_interact_ctrl', diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py new file mode 100755 index 0000000..003f100 --- /dev/null +++ b/osmopy/osmo_ctrl.py @@ -0,0 +1,120 @@ +#!/usr/bin/python +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from optparse import OptionParser +from osmopy.osmo_ipa import Ctrl +import socket + +verbose = False + +def connect(host, port): + if verbose: + print "Connecting to host %s:%i" % (host, port) + + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def do_set_get(sck, var, value = None): + (r, c) = Ctrl().cmd(var, value) + sck.send(c) + answer = Ctrl().rem_header(sck.recv(4096)) + return (answer,) + Ctrl().verify(answer, r, var, value) + +def set_var(sck, var, val): + (a, _, _) = do_set_get(sck, var, val) + return a + +def get_var(sck, var): + (_, _, v) = do_set_get(sck, var) + return v + +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False + if len(data) != 0: + tail = data + while True: + (head, tail) = Ctrl().split_combined(tail) + print "Got message:", Ctrl().rem_header(head) + if len(tail) == 0: + break + return True + return False + +if __name__ == '__main__': + parser = OptionParser("Usage: %prog [options] var [value]") + parser.add_option("-d", "--host", dest="host", + help="connect to HOST", metavar="HOST") + parser.add_option("-p", "--port", dest="port", type="int", + help="use PORT", metavar="PORT", default=4249) + parser.add_option("-g", "--get", action="store_true", + dest="cmd_get", help="perform GET operation") + parser.add_option("-s", "--set", action="store_true", + dest="cmd_set", help="perform SET operation") + parser.add_option("-v", "--verbose", action="store_true", + dest="verbose", help="be verbose", default=False) + parser.add_option("-m", "--monitor", action="store_true", + dest="monitor", help="monitor the connection for traps", default=False) + + (options, args) = parser.parse_args() + + verbose = options.verbose + + if options.cmd_set and options.cmd_get: + parser.error("Get and set options are mutually exclusive!") + + if not (options.cmd_get or options.cmd_set or options.monitor): + parser.error("One of -m, -g, or -s must be set") + + if not (options.host): + parser.error("Destination host and port required!") + + sock = connect(options.host, options.port) + + if options.cmd_set: + if len(args) < 2: + parser.error("Set requires var and value arguments") + _leftovers(sock, socket.MSG_DONTWAIT) + print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + + if options.cmd_get: + if len(args) != 1: + parser.error("Get requires the var argument") + _leftovers(sock, socket.MSG_DONTWAIT) + (a, _, _) = do_set_get(sock, args[0]) + print "Got message:", a + + if options.monitor: + while True: + if not _leftovers(sock, 0): + print "Connection is gone." + break + sock.close() diff --git a/osmopy/soap.py b/osmopy/soap.py new file mode 100755 index 0000000..f1da8f2 --- /dev/null +++ b/osmopy/soap.py @@ -0,0 +1,188 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.1" # bump this on every non-trivial change + +from twisted.internet import defer, reactor +from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version +from osmopy.osmo_ipa import Ctrl +from treq import post, collect +from suds.client import Client +from functools import partial +from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available +import argparse, datetime, signal, sys, os, logging, logging.handlers + +# we don't support older versions of TwistedIPA module +assert V(twisted_ipa_version) > V('0.4') + +# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific +oper = { 'inoperational' : 0, 'operational' : 1 } +admin = { 'locked' : 0, 'unlocked' : 1 } +policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } + +# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c +fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int + + +def handle_reply(p, f, log, r): + """ + Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v + """ + repl = p(r) # result is expected to have both commands[] array and error string (could be None) + bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format + log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) + log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) + for t in repl.commands: # Process OpenBscCommands format from .wsdl + (_, m) = Ctrl().cmd(*t.split()) + f(m) + + +class Trap(CTRL): + """ + TRAP handler (agnostic to factory's client object) + """ + def ctrl_TRAP(self, data, op_id, v): + """ + Parse CTRL TRAP and dispatch to appropriate handler after normalization + """ + (l, r) = v.split() + loc = l.split('.') + t_type = loc[-1] + p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper + method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) + method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix + + def ctrl_SET_REPLY(self, data, _, v): + """ + Debug log for replies to our commands + """ + self.factory.log.debug('SET REPLY %s' % v) + + def ctrl_ERROR(self, data, op_id, v): + """ + We want to know if smth went wrong + """ + self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) + + def connectionMade(self): + """ + Logging wrapper, calling super() is necessary not to break reconnection logic + """ + self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) + super(CTRL, self).connectionMade() + + @defer.inlineCallbacks + def handle_locationstate(self, net, bsc, bts, trx, data): + """ + Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers + """ + (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') + tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() + self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) + ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) + d = post(self.factory.location, ctx.envelope) + d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx + d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors + # Ensure that we run only limited number of requests in parallel: + yield self.factory.semaphore.acquire() + yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit + self.factory.semaphore.release() + + def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): + """ + Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled + """ + self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) + + +class TrapFactory(IPAFactory): + """ + Store SOAP client object so TRAP handler can use it for requests + """ + location = None + log = None + semaphore = None + client = None + host = None + port = None + def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): + self.host = host # for logging only, + self.port = port # seems to be no way to get it from ReconnectingClientFactory + self.log = log + self.semaphore = semaphore + soap = Client(wsdl, location=location, nosend=True) # make async SOAP client + self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq + self.client = soap.service + level = self.log.getEffectiveLevel() + self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels + super(TrapFactory, self).__init__(proto, self.log) + self.log.setLevel(level) + self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) + + +def reloader(path, script, log, dbg1, dbg2, signum, _): + """ + Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation + """ + log.info("Received Signal %d - restarting..." % signum) + if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: + sys.argv.append(dbg1) # enforce debug + if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug + if dbg1 in sys.argv: + sys.argv.remove(dbg1) + if dbg2 in sys.argv: + sys.argv.remove(dbg2) + os.execl(path, script, *sys.argv[1:]) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") + p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") + p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") + args = p.parse_args() + + log = logging.getLogger('CTRL2SOAP') + if args.debug: + log.setLevel(logging.DEBUG) + else: + log.setLevel(logging.INFO) + log.addHandler(logging.handlers.SysLogHandler('/dev/log')) + if args.output: + log.addHandler(logging.StreamHandler(sys.stdout)) + + reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above + signal.signal(signal.SIGHUP, reboot) + signal.signal(signal.SIGQUIT, reboot) + signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output + signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output + + log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) + reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) + reactor.run() diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py new file mode 100755 index 0000000..bb8323d --- /dev/null +++ b/osmopy/twisted_ipa.py @@ -0,0 +1,384 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +__version__ = "0.7.0" # bump this on every non-trivial change + +from osmopy.osmo_ipa import Ctrl, IPA +from twisted.internet.protocol import ReconnectingClientFactory +from twisted.internet import reactor +from twisted.protocols import basic +import argparse, logging, sys + +class IPACommon(basic.Int16StringReceiver): + """ + Generic IPA protocol handler: include some routines for simpler subprotocols. + It's not intended as full implementation of all subprotocols, rather common ground and example code. + """ + def dbg(self, line): + """ + Debug print helper + """ + self.factory.log.debug(line) + + def osmo_CTRL(self, data): + """ + OSMO CTRL protocol + Placeholder, see corresponding derived class + """ + pass + + def osmo_MGCP(self, data): + """ + OSMO MGCP extension + """ + self.dbg('OSMO MGCP received %s' % data) + + def osmo_LAC(self, data): + """ + OSMO LAC extension + """ + self.dbg('OSMO LAC received %s' % data) + + def osmo_SMSC(self, data): + """ + OSMO SMSC extension + """ + self.dbg('OSMO SMSC received %s' % data) + + def osmo_ORC(self, data): + """ + OSMO ORC extension + """ + self.dbg('OSMO ORC received %s' % data) + + def osmo_GSUP(self, data): + """ + OSMO GSUP extension + """ + self.dbg('OSMO GSUP received %s' % data) + + def osmo_OAP(self, data): + """ + OSMO OAP extension + """ + self.dbg('OSMO OAP received %s' % data) + + def osmo_UNKNOWN(self, data): + """ + OSMO defaul extension handler + """ + self.dbg('OSMO unknown extension received %s' % data) + + def handle_RSL(self, data, proto, extension): + """ + RSL protocol handler + """ + self.dbg('IPA RSL received message with extension %s' % extension) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Placeholder, see corresponding derived class + """ + pass + + def handle_SCCP(self, data, proto, extension): + """ + SCCP protocol handler + """ + self.dbg('IPA SCCP received message with extension %s' % extension) + + def handle_OML(self, data, proto, extension): + """ + OML protocol handler + """ + self.dbg('IPA OML received message with extension %s' % extension) + + def handle_OSMO(self, data, proto, extension): + """ + Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen + """ + method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") + method(data) + + def handle_MGCP(self, data, proto, extension): + """ + MGCP protocol handler + """ + self.dbg('IPA MGCP received message with attribute %s' % extension) + + def handle_UNKNOWN(self, data, proto, extension): + """ + Default protocol handler + """ + self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) + + def process_chunk(self, data): + """ + Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen + """ + (_, proto, extension, content) = IPA().del_header(data) + if content is not None: + self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) + method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") + method(content, proto, extension) + + def dataReceived(self, data): + """ + Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length + If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) + """ + if len(data): + (head, tail) = IPA().split_combined(data) + self.process_chunk(head) + self.dataReceived(tail) + + def connectionMade(self): + """ + We have to resetDelay() here to drop internal state to default values to make reconnection logic work + Make sure to call this via super() if overriding to keep reconnection logic intact + """ + addr = self.transport.getPeer() + self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) + self.factory.resetDelay() + + +class CCM(IPACommon): + """ + Implementation of CCM protocol for IPA multiplex + """ + def ack(self): + self.transport.write(IPA().id_ack()) + + def ping(self): + self.transport.write(IPA().ping()) + + def pong(self): + self.transport.write(IPA().pong()) + + def handle_CCM(self, data, proto, msgt): + """ + CCM (IPA Connection Management) + Only basic logic necessary for tests is implemented (ping-pong, id ack etc) + """ + if msgt == IPA.MSGT['ID_GET']: + self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) + # if we call + # self.transport.write(IPA().id_resp(self.factory.test_id)) + # instead, than we would have to also call + # reactor.callLater(1, self.ack) + # instead of self.ack() + # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout + # Note: this still might work depending on the IPA implementation details on the other side + self.ack() + # schedule PING in 4s + reactor.callLater(4, self.ping) + if msgt == IPA.MSGT['PING']: + self.pong() + + +class CTRL(IPACommon): + """ + Implementation of Osmocom control protocol for IPA multiplex + """ + def ctrl_SET(self, data, op_id, v): + """ + Handle CTRL SET command + """ + self.dbg('CTRL SET [%s] %s' % (op_id, v)) + + def ctrl_SET_REPLY(self, data, op_id, v): + """ + Handle CTRL SET reply + """ + self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + Handle CTRL GET command + """ + self.dbg('CTRL GET [%s] %s' % (op_id, v)) + + def ctrl_GET_REPLY(self, data, op_id, v): + """ + Handle CTRL GET reply + """ + self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) + + def ctrl_TRAP(self, data, op_id, v): + """ + Handle CTRL TRAP command + """ + self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) + + def ctrl_ERROR(self, data, op_id, v): + """ + Handle CTRL ERROR reply + """ + self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) + + def osmo_CTRL(self, data): + """ + OSMO CTRL message dispatcher, lambda default should never happen + For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example + """ + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) + method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") + method(data, op_id, v) + + +class IPAServer(CCM): + """ + Test implementation of IPA server + Demonstrate CCM opearation by overriding necessary bits from CCM + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CCM + Initiate CCM upon connection + """ + addr = self.transport.getPeer() + self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) + super(IPAServer, self).connectionMade() + self.transport.write(IPA().id_get()) + + +class CtrlServer(CTRL): + """ + Test implementation of CTRL server + Demonstarte CTRL handling by overriding simpler routines from CTRL + """ + def connectionMade(self): + """ + Keep reconnection logic working by calling routine from CTRL + Send TRAP upon connection + Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix + """ + addr = self.transport.getPeer() + self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) + super(CtrlServer, self).connectionMade() + self.transport.write(Ctrl().trap('LOL', 'what')) + self.transport.write(Ctrl().trap('rulez', 'XXX')) + + def reply(self, r): + self.transport.write(Ctrl().add_header(r)) + + def ctrl_SET(self, data, op_id, v): + """ + CTRL SET command: always succeed + """ + self.dbg('SET [%s] %s' % (op_id, v)) + self.reply('SET_REPLY %s %s' % (op_id, v)) + + def ctrl_GET(self, data, op_id, v): + """ + CTRL GET command: always fail + """ + self.dbg('GET [%s] %s' % (op_id, v)) + self.reply('ERROR %s No variable found' % op_id) + + +class IPAFactory(ReconnectingClientFactory): + """ + Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections + Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity + """ + protocol = IPACommon + log = None + ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) + + def __init__(self, proto=None, log=None, ccm_id=None): + if proto: + self.protocol = proto + if ccm_id: + self.ccm_id = ccm_id + if log: + self.log = log + else: + self.log = logging.getLogger('IPAFactory') + self.log.setLevel(logging.CRITICAL) + self.log.addHandler(logging.NullHandler) + + def clientConnectionFailed(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) + + def clientConnectionLost(self, connector, reason): + """ + Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method + """ + self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) + ReconnectingClientFactory.clientConnectionLost(self, connector, reason) + + +if __name__ == '__main__': + p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) + p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) + p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") + p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") + cs = p.add_mutually_exclusive_group() + cs.add_argument("-c", "--client", action='store_true', help="asume client role") + cs.add_argument("-s", "--server", action='store_true', help="asume server role") + ic = p.add_mutually_exclusive_group() + ic.add_argument("--ipa", action='store_true', help="use IPA protocol") + ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") + args = p.parse_args() + test = False + + log = logging.getLogger('TwistedIPA') + log.setLevel(logging.DEBUG) + log.addHandler(logging.StreamHandler(sys.stdout)) + + if args.ctrl: + if args.client: + # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it + print('CTRL client, connecting to %s:%d' % (args.host, args.port)) + reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) + test = True + if args.server: + # Use bsc_control.py to issue set/get commands + print('CTRL server, listening on port %d' % args.port) + reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) + test = True + if args.ipa: + if args.client: + # Start osmo-nitb which would initiate A-bis/IP session + print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) + reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) + test = True + if args.server: + # Start osmo-bts-* which would attempt to connect to us + print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) + reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) + reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) + test = True + if test: + reactor.run() + else: + print("Please specify which protocol in which role you'd like to test.") diff --git a/setup.py b/setup.py index a1fad1a..daff5ea 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,9 @@ elif sys.version_info.major == 3: scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", + "osmopy/soap.py", + "osmopy/osmo_ctrl.py", + "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/4992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4e1155d3bd546feaabab34a46e354c69058056e Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:08:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:08:45 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 1: This depends on I7a24cc307450efdcd28168fffe477320c59fcd36 - let's not merge it before that. -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:13:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:13:05 +0000 Subject: osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/4972/3/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: Line 1362: transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); wait what, this should have been added by https://gerrit.osmocom.org/4974 -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:22:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:22:31 +0000 Subject: python/osmo-python-tests[master]: Add osmo_ipa.py to setup's install In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:22:35 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Add osmo_ipa.py to setup's install In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add osmo_ipa.py to setup's install ...................................................................... Add osmo_ipa.py to setup's install When running jenkins job, osmo_ipa is not available despite latest osmo-python-tests being installed on the build slave. Let's try to fix it by explicitly adding it to setup.py Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 --- M setup.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/setup.py b/setup.py index daff5ea..3e147c4 100755 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ "osmopy/osmo_interact_ctrl.py", "osmopy/soap.py", "osmopy/osmo_ctrl.py", + "osmopy/osmo_ipa.py", "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/5035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3e160c220ca6d2b55df0dfcdcdcb56e4e240bb3 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:37:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:37:44 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4779/5/src/libosmo-mgcp/mgcp_vty.c File src/libosmo-mgcp/mgcp_vty.c: Line 1309: trunk->number_endpoints = trunk->vty_number_endpoints; this seems wrong, in the commit by accident? ah, no harm done, but the same is done in mgcp_endpoints_allocate() now. -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:38:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:38:35 +0000 Subject: [PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4779 to look at the new patch set (#6). vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Closes: OS#2632 Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c 4 files changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/79/4779/6 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..c7634fb 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int vty_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..f542745 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1170,7 +1170,7 @@ trunk->audio_payload = 126; trunk->audio_send_ptime = 1; trunk->audio_send_name = 1; - trunk->number_endpoints = 33; + trunk->vty_number_endpoints = 33; trunk->omit_rtcp = 0; mgcp_trunk_set_keepalive(trunk, MGCP_KEEPALIVE_ONCE); llist_add_tail(&trunk->entry, &cfg->trunks); @@ -1202,12 +1202,12 @@ tcfg->endpoints = _talloc_zero_array(tcfg->cfg, sizeof(struct mgcp_endpoint), - tcfg->number_endpoints, + tcfg->vty_number_endpoints, "endpoints"); if (!tcfg->endpoints) return -1; - for (i = 0; i < tcfg->number_endpoints; ++i) { + for (i = 0; i < tcfg->vty_number_endpoints; ++i) { INIT_LLIST_HEAD(&tcfg->endpoints[i].conns); tcfg->endpoints[i].cfg = tcfg->cfg; tcfg->endpoints[i].tcfg = tcfg; @@ -1217,6 +1217,7 @@ tcfg->endpoints[i].type = &ep_typeset.rtp; } + tcfg->number_endpoints = tcfg->vty_number_endpoints; return 0; } diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 9420d96..80396e0 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.vty_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -524,7 +524,7 @@ "Number options\n" "Endpoints available\n" "Number endpoints\n") { /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.vty_number_endpoints = atoi(argv[0]) + 1; return CMD_SUCCESS; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..f35dc93 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -563,9 +563,8 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); - cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -685,7 +684,7 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -737,7 +736,7 @@ cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1025,7 +1024,7 @@ endp.type = &ep_typeset.rtp; - trunk.number_endpoints = 1; + trunk.vty_number_endpoints = 1; trunk.endpoints = &endp; trunk.force_constant_ssrc = patch_ssrc; trunk.force_aligned_timing = patch_ts; @@ -1097,7 +1096,7 @@ printf("Testing multiple payload types\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1228,7 +1227,7 @@ printf("Testing no sequence flow on initial packet\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); endp = &cfg->trunk.endpoints[1]; @@ -1274,7 +1273,7 @@ printf("Testing no rtpmap name\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; cfg->trunk.audio_send_name = 0; mgcp_endpoints_allocate(&cfg->trunk); -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:38:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:38:58 +0000 Subject: osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 edited that line away, now it should be good -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:41:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 14:41:39 +0000 Subject: [PATCH] osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4972 to look at the new patch set (#4). subscr_conn: introduce usage tokens for ref error tracking When hunting a conn use count bug, it was very hard to figure out who's (not) using the conn. To ease tracking down this bug and future bugs, explicitly name what a conn is being reserved for, and track in a bit mask. Show in the DREF logs what uses and un-uses a conn. See the test expectation updates, which nicely show how that clarifies the state of the conn in the logs. On errors, log them, but don't fail hard: if one conn use/un-use fails, we don't want to crash the entire MSC before we have to. Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/osmo_msc.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_11.c M src/libmsc/osmo_msc.c M src/libmsc/silent_call.c M src/libmsc/subscr_conn.c M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 18 files changed, 850 insertions(+), 789 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/4972/4 -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 14:56:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 14:56:53 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility Message-ID: Review at https://gerrit.osmocom.org/5038 Improve python3 compatibility * use print() * use named exception In case of osmo_ctrl.py we can already switch to python3 as it's a standalone script. Other scripts might be used as a libraries so leave the shebang without modifications for now. Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M osmopy/obscvty.py M osmopy/osmo_ctrl.py M osmopy/osmodumpdoc.py M osmopy/osmotestconfig.py M osmopy/osmotestvty.py M osmopy/osmoutil.py 6 files changed, 45 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/1 diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..2963393 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -31,12 +31,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,14 +86,14 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ()) took, self.host, self.port, self.socket, len(VTYInteract.all_sockets)) self.socket.recv(4096) @@ -108,9 +108,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +248,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..b8a6c94 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -1,8 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * Copyright (C) 2016-2017 sysmocom s.f.m.c. GmbH * * All Rights Reserved * @@ -22,6 +22,7 @@ */ """ +# FIXME: use argparse instead of deprecated optparse from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +31,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +58,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +104,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() diff --git a/osmopy/osmodumpdoc.py b/osmopy/osmodumpdoc.py index 2464b05..796b2b5 100644 --- a/osmopy/osmodumpdoc.py +++ b/osmopy/osmodumpdoc.py @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py index 2132c43..7c0715f 100644 --- a/osmopy/osmotestconfig.py +++ b/osmopy/osmotestconfig.py @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/osmopy/osmotestvty.py b/osmopy/osmotestvty.py index e513c05..52c5f22 100644 --- a/osmopy/osmotestvty.py +++ b/osmopy/osmotestvty.py @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..86c7e3d 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -30,10 +30,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +65,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +80,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:19:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 15:19:08 +0000 Subject: [PATCH] osmo-bts[master]: Remove leftover comments and checks Message-ID: Review at https://gerrit.osmocom.org/5039 Remove leftover comments and checks It seems like rx previously had 'float' type. Remove the comments and checks which are not relevant since rx is 'int'. Change-Id: Idb4aad53667f88f9656c5bb1c52e7e75b385f446 Fixes: OS#2223 --- M src/common/power_control.c 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/39/5039/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index 78d2702..e040ee4 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -56,18 +56,9 @@ if (lchan->ms_power_ctrl.current != ms_power) return 0; - /* - * What is the difference between what we want and received? - * Ignore a margin that is within the range of measurement - * and MS output issues. - */ + /* What is the difference between what we want and received? */ rx = btsb->ul_power_target - rxLevel; - if (rx >= 0 && rx < 1) - return 0; - if (rx < 0 && rx > -1) - return 0; - /* We don't really care about the truncation of int + float */ cur_dBm = ms_pwr_dbm(band, ms_power); new_dBm = cur_dBm + rx; -- To view, visit https://gerrit.osmocom.org/5039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb4aad53667f88f9656c5bb1c52e7e75b385f446 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:30 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:30 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4771 to look at the new patch set (#5). mobile: Begin with a primitive interface on top of the code We want the script interface to interface through a primitive interface. This will allow to move it to a different thread or a process in the future. The script interface will just use the primitives. It is not clear how "sap" will be used here. I am keeping it at 0 right now. The first primitive is starting a timer with a request and then getting an indication as a response. Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/main.c A src/host/layer23/src/mobile/primitives.c 7 files changed, 193 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/4771/5 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index efe493d..fb1229e 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -23,6 +23,7 @@ DSIM, DGPS, DMOB, + DPRIM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index b58b952..12cf24b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h + transaction.h vty.h mncc_sock.h primitives.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h new file mode 100644 index 0000000..a3168b2 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -0,0 +1,48 @@ +#pragma once + +#include + +struct mobile_prim; + +/** + * Mobile Script<->App primitives. Application script will receive + * indications and will send primitives to the lower layers. Here + * we will convert from internal state/events to the primitives. In + * the future the indications might be generated at lower levels + * directly. + */ +enum mobile_prims { + PRIM_MOB_TIMER, + PRIM_MOB_TIMER_CANCEL, +}; + +struct mobile_prim_intf { + struct osmocom_ms *ms; + void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim); + + /* Internal state */ + struct llist_head timers; +}; + +/** + * Primitive to create timers and get indication once they have + * expired. Currently there is no way to cancel timers. + */ +struct mobile_timer_param { + uint64_t timer_id; /*!< Unique Id identifying the timer */ + int seconds; /*!< Seconds the timer should fire in */ +}; + +struct mobile_prim { + struct osmo_prim_hdr hdr; /*!< Primitive base class */ + union { + struct mobile_timer_param timer; + } u; +}; + + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); +void mobile_prim_intf_free(struct mobile_prim_intf *intf); + +struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 3b761ef..7b3ea26 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -133,6 +133,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DPRIM] = { + .name = "DPRIM", + .description = "PRIM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..90468c0 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -5,7 +5,7 @@ noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ gsm48_rr.c mnccms.c settings.c subscriber.c support.c \ - transaction.c vty_interface.c voice.c mncc_sock.c + transaction.c vty_interface.c voice.c mncc_sock.c primitives.c bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 8921bd8..227cd10 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c new file mode 100644 index 0000000..efa7f3f --- /dev/null +++ b/src/host/layer23/src/mobile/primitives.c @@ -0,0 +1,135 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include +#include + +struct timer_closure { + struct llist_head entry; + struct mobile_prim_intf *intf; + struct osmo_timer_list timer; + uint64_t id; +}; + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms) +{ + struct mobile_prim_intf *intf; + + intf = talloc_zero(ms, struct mobile_prim_intf); + intf->ms = ms; + + INIT_LLIST_HEAD(&intf->timers); + return intf; +} + +void mobile_prim_intf_free(struct mobile_prim_intf *intf) +{ + struct timer_closure *timer, *tmp; + + llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) { + osmo_timer_del(&timer->timer); + llist_del(&timer->entry); + talloc_free(timer); + } + talloc_free(intf); +} + +struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op) +{ + struct msgb *msg = msgb_alloc(1024, "Mobile Primitive"); + struct mobile_prim *prim = (struct mobile_prim *) msgb_put(msg, sizeof(*prim)); + osmo_prim_init(&prim->hdr, 0, primitive, op, msg); + msg->l2h = msg->tail; + return prim; +} + +static void timer_expired_cb(void *_closure) +{ + struct timer_closure *closure = _closure; + struct mobile_prim_intf *intf; + struct mobile_prim *prim; + + prim = mobile_prim_alloc(PRIM_MOB_TIMER, PRIM_OP_INDICATION); + intf = closure->intf; + prim->u.timer.timer_id = closure->id; + + llist_del(&closure->entry); + talloc_free(closure); + + intf->indication(intf, prim); +} + +static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_closure *closure; + + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", param->timer_id); + + closure = talloc_zero(intf, struct timer_closure); + closure->intf = intf; + closure->id = param->timer_id; + closure->timer.cb = timer_expired_cb; + closure->timer.data = closure; + llist_add_tail(&closure->entry, &intf->timers); + osmo_timer_schedule(&closure->timer, param->seconds, 0); + return 0; +} + +static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_closure *closure; + + + llist_for_each_entry(closure, &intf->timers, entry) { + if (closure->id != param->timer_id) + continue; + + LOGP(DPRIM, LOGL_DEBUG, + "Canceling timer with reference: %llu\n", param->timer_id); + osmo_timer_del(&closure->timer); + llist_del(&closure->entry); + talloc_free(closure); + return 0; + } + return -1; +} + +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *prim) +{ + int rc = 0; + + switch (OSMO_PRIM_HDR(&prim->hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_REQUEST): + rc = create_timer(intf, &prim->u.timer); + break; + case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): + rc = cancel_timer(intf, &prim->u.timer); + break; + default: + LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); + break; + } + + msgb_free(prim->hdr.msg); + return rc; +} -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:30 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:30 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Directly inform the primitive layer about an event In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4931 to look at the new patch set (#3). mobile: Directly inform the primitive layer about an event Forward started/shutdown changes to the primitive layer which will turn them into indications. The other option might be to use the signals but it seems primitives are a superset of the signals. The notify will be done per MS and then the right primitive instance will be searched and the indication be sent. The approach will be applied to other systems as well. The signal framework might be seen as a subset of the primitives A signal mostly being a different form of an indication. Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 61 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/31/4931/3 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index a3168b2..4d81ba1 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -14,6 +14,8 @@ enum mobile_prims { PRIM_MOB_TIMER, PRIM_MOB_TIMER_CANCEL, + PRIM_MOB_STARTED, + PRIM_MOB_SHUTDOWN, }; struct mobile_prim_intf { @@ -21,6 +23,7 @@ void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim); /* Internal state */ + struct llist_head entry; struct llist_head timers; }; @@ -33,16 +36,36 @@ int seconds; /*!< Seconds the timer should fire in */ }; +/** + * Primitive to indicate starting of the mobile. + */ +struct mobile_started_param { + bool started; +}; + +/** + * Primitive to indicate shutdown of the mobile. It will go through + * various states. + */ +struct mobile_shutdown_param { + int old_state; + int new_state; +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { struct mobile_timer_param timer; + struct mobile_started_param started; + struct mobile_shutdown_param shutdown; } u; }; - struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); void mobile_prim_intf_free(struct mobile_prim_intf *intf); struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); \ No newline at end of file diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index c5c84e6..46cf171 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -447,9 +448,14 @@ void mobile_set_started(struct osmocom_ms *ms, bool state) { ms->started = state; + + mobile_prim_ntfy_started(ms, state); } void mobile_set_shutdown(struct osmocom_ms *ms, int state) { + int old_state = ms->shutdown; ms->shutdown = state; + + mobile_prim_ntfy_shutdown(ms, old_state, state); } diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index efa7f3f..dde34bc 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -24,6 +24,8 @@ #include #include +static LLIST_HEAD(s_prims); + struct timer_closure { struct llist_head entry; struct mobile_prim_intf *intf; @@ -39,6 +41,7 @@ intf->ms = ms; INIT_LLIST_HEAD(&intf->timers); + llist_add_tail(&intf->entry, &s_prims); return intf; } @@ -51,6 +54,7 @@ llist_del(&timer->entry); talloc_free(timer); } + llist_del(&intf->entry); talloc_free(intf); } @@ -95,6 +99,33 @@ return 0; } +static void dispatch(struct osmocom_ms *ms, struct mobile_prim *prim) +{ + struct mobile_prim_intf *intf, *tmp; + + llist_for_each_entry_safe(intf, tmp, &s_prims, entry) { + if (intf->ms == ms) + intf->indication(intf, prim); + } +} + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_STARTED, PRIM_OP_INDICATION); + + prim->u.started.started = started; + dispatch(ms, prim); +} + +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION); + + prim->u.shutdown.old_state = old_state; + prim->u.shutdown.new_state = new_state; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4931 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:30 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:30 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Inform the primitive layer about status and new sms In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4932 to look at the new patch set (#3). mobile: Inform the primitive layer about status and new sms Inform the layer about new SMS and inform about the cause of it. In both cases pass the SMS. Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c 4 files changed, 46 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/32/4932/3 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index 0d0578a..5f33922 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -4,6 +4,12 @@ #define SMS_HDR_SIZE 128 #define SMS_TEXT_SIZE 256 +#include +#include + +struct osmocom_ms; +struct msgb; + struct gsm_sms { unsigned long validity_minutes; uint8_t reply_path_req; diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 4d81ba1..6804fc0 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -1,5 +1,7 @@ #pragma once +#include + #include struct mobile_prim; @@ -16,6 +18,7 @@ PRIM_MOB_TIMER_CANCEL, PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, + PRIM_MOB_SMS, }; struct mobile_prim_intf { @@ -52,14 +55,26 @@ int new_state; }; +/** + * SMS related configs. + */ +struct mobile_sms_param { + struct gsm_sms sms; + + bool cause_valid; + int cause; +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { struct mobile_timer_param timer; struct mobile_started_param started; struct mobile_shutdown_param shutdown; + struct mobile_sms_param sms; } u; }; + struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); @@ -68,4 +83,6 @@ struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); -void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); \ No newline at end of file +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 73fad84..21b416a 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -40,6 +40,7 @@ #include #include #include +#include #define UM_SAPI_SMS 3 @@ -129,6 +130,7 @@ vty_notify(ms, "SMS to %s failed: %s\n", sms->address, get_value_string(gsm411_rp_cause_strs, cause)); + mobile_prim_ntfy_sms_status(ms, sms, cause); return 0; } /* @@ -186,6 +188,8 @@ char vty_text[sizeof(gsms->text)], *p; FILE *fp; + mobile_prim_ntfy_sms_new(ms, gsms); + /* remove linefeeds and show at VTY */ strcpy(vty_text, gsms->text); for (p = vty_text; *p; p++) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index dde34bc..0902139 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -126,6 +126,24 @@ dispatch(ms, prim); } +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION); + + prim->u.sms.sms = *sms; + dispatch(ms, prim); +} + +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION); + + prim->u.sms.sms = *sms; + prim->u.sms.cause_valid = true; + prim->u.sms.cause = cause; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4932 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:30 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:30 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add osmo.timeout for lua code to have timeouts In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4839 to look at the new patch set (#4). mobile: Add osmo.timeout for lua code to have timeouts Allow to callback into lua code after a user configured timeout. Make it only work on seconds (truncate double to int). Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 134 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/39/4839/4 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index b3b9c99..cd7e8bc 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -25,7 +25,26 @@ #include #include +#include + #include + +struct timer_userdata { + int cb_ref; +}; + +static char lua_prim_key[] = "osmocom.org-mobile-prim"; + +static struct mobile_prim_intf *get_primitive(lua_State *L) +{ + struct mobile_prim_intf *intf; + + lua_pushlightuserdata(L, lua_prim_key); + lua_gettable(L, LUA_REGISTRYINDEX); + intf = (void *) lua_topointer(L, -1); + lua_pop(L, 1); + return intf; +} static int lua_osmo_do_log(lua_State *L, int loglevel) { @@ -75,6 +94,94 @@ { NULL, NULL }, }; +static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_userdata *timer = (void *)(intptr_t) param->timer_id; + lua_State *L = intf->ms->lua_state; + int err; + + lua_rawgeti(L, LUA_REGISTRYINDEX, timer->cb_ref); + luaL_unref(L, LUA_REGISTRYINDEX, timer->cb_ref); + + err = lua_pcall(L, 0, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 1); + } +} + +static int lua_osmo_timeout(lua_State *L) +{ + struct mobile_prim *prim; + struct timer_userdata *timer; + + if(lua_gettop(L) != 2) { + lua_pushliteral(L, "Need two arguments"); + lua_error(L); + return 0; + } + + luaL_argcheck(L, lua_isnumber(L, -2), 1, "Timeout needs to be a number"); + luaL_argcheck(L, lua_isfunction(L, -1), 2, "Callback needs to be a function"); + + /* + * Create a handle to prevent the function to be GCed while we run the + * timer. Add a metatable to the object so itself will be GCed properly. + */ + timer = lua_newuserdata(L, sizeof(*timer)); + luaL_getmetatable(L, "Timer"); + lua_setmetatable(L, -2); + + lua_pushvalue(L, -2); + timer->cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + + /* Take the address of the user data... */ + prim = mobile_prim_alloc(PRIM_MOB_TIMER, PRIM_OP_REQUEST); + prim->u.timer.timer_id = (intptr_t) timer; + prim->u.timer.seconds = lua_tonumber(L, -3); + mobile_prim_intf_req(get_primitive(L), prim); + + return 1; +} + +static int lua_timer_cancel(lua_State *L) +{ + struct mobile_prim *prim; + struct timer_userdata *timer; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + timer = lua_touserdata(L, -1); + + prim = mobile_prim_alloc(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST); + prim->u.timer.timer_id = (intptr_t) timer; + mobile_prim_intf_req(get_primitive(L), prim); + return 0; +} + +static const struct luaL_Reg timer_funcs[] = { + { "cancel", lua_timer_cancel }, + { "__gc", lua_timer_cancel }, + { NULL, NULL }, +}; + +static const struct luaL_Reg osmo_funcs[] = { + { "timeout", lua_osmo_timeout }, + { NULL, NULL }, +}; + +static void lua_prim_ind(struct mobile_prim_intf *intf, struct mobile_prim *prim) +{ + switch (OSMO_PRIM_HDR(&prim->hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): + handle_timeout(intf, (struct mobile_timer_param *) &prim->u.timer); + break; + default: + LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); + }; + + msgb_free(prim->hdr.msg); +} + /* * Add functions to the global lua scope. Technically these are * included in the _G table. The following lua code can be used @@ -89,9 +196,29 @@ lua_pop(L, 1); } -static void add_runtime(lua_State *L, struct osmocom_ms *ms) +static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); + + /* Add a osmo module/table. Seems an oldschool module? */ + lua_newtable(L); + luaL_setfuncs(L, osmo_funcs, 0); + lua_setglobal(L, "osmo"); + + /* Create metatables so we can GC objects... */ + luaL_newmetatable(L, "Timer"); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, timer_funcs, 0); + lua_pop(L, 1); + + + /* Remember the primitive pointer... store it in the registry */ + lua_pushlightuserdata(L, lua_prim_key); + lua_pushlightuserdata(L, intf); + lua_settable(L, LUA_REGISTRYINDEX); + } static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) @@ -115,6 +242,7 @@ int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) { + struct mobile_prim_intf *intf; int err; if (ms->lua_state) @@ -124,6 +252,11 @@ return -1; luaL_openlibs(ms->lua_state); + + intf = mobile_prim_intf_alloc(ms); + intf->indication = lua_prim_ind; + add_runtime(ms->lua_state, intf); + err = luaL_loadfilex(ms->lua_state, filename, NULL); if (err) { vty_out(vty, "%% LUA load error: %s%s", @@ -132,7 +265,6 @@ return -2; } - add_runtime(ms->lua_state, ms); err = lua_pcall(ms->lua_state, 0, 0, 0); if (err) { -- To view, visit https://gerrit.osmocom.org/4839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:31 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:31 +0000 Subject: [PATCH] osmocom-bb[master]: WIP: start/stop for the MS.. Message-ID: Review at https://gerrit.osmocom.org/5040 WIP: start/stop for the MS.. Change-Id: I7d52e5f61e77ef1ecf00aeecad85e56cbafb4379 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/40/5040/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 0e57a32..fb54ddd 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -190,9 +191,38 @@ return 1; } +static int lua_ms_no_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + int res; + + res = mobile_init(ms); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + int argc = lua_gettop(L); + int force = 0; + int res; + + if (argc >= 1) { + luaL_argcheck(L, lua_isboolean(L, -1), 1, "Force"); + force = lua_toboolean(L, -1); + } + + res = mobile_exit(ms, force); + lua_pushinteger(L, res); + return 1; +} + static const struct luaL_Reg ms_funcs[] = { { "imsi", lua_ms_imsi }, { "imei", lua_ms_imei }, + { "start", lua_ms_no_shutdown }, + { "stop", lua_ms_shutdown }, { NULL, NULL }, }; -- To view, visit https://gerrit.osmocom.org/5040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d52e5f61e77ef1ecf00aeecad85e56cbafb4379 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:21:32 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 27 Nov 2017 15:21:32 +0000 Subject: [PATCH] osmocom-bb[master]: WIP... compiler warning.. Message-ID: Review at https://gerrit.osmocom.org/5041 WIP... compiler warning.. In file included from settings.c:27:0: ../../include/osmocom/bb/mobile/app_mobile.h:10:42: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), ^~~~~~~~~~ ../../include/osmocom/bb/mobile/app_mobile.h:14:26: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int mobile_delete(struct osmocom_ms *ms, int force); Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/5041/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index af4ac23..2ecd619 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -5,6 +5,7 @@ extern char *config_dir; +struct osmocom_ms; struct vty; int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon Nov 27 15:53:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 15:53:24 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Print additional debug info for extended tests Message-ID: Review at https://gerrit.osmocom.org/5042 Print additional debug info for extended tests The following error has been observed in gerrit test: /usr/bin/python ./vty_test_runner.py -w /build -v Traceback (most recent call last): File "./vty_test_runner.py", line 26, in from osmopy.osmo_ipa import IPA ImportError: No module named osmo_ipa This should not be happening as previous debug command shows osmotestconfig.py (which is part of the same module) running from /usr/local/bin/. Let's try to debug this by reporting the content of /usr/local/bin/ same way we report running osmo processes. Change-Id: I7f3ef3665352c4e74affff2c2e8d345a408a2f52 --- M osmopy/obscvty.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/42/5042/1 diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..a74f0a3 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -47,6 +47,7 @@ cmd('ss -tn'); cmd('ss -tln'); cmd('ps xua | grep osmo'); + cmd('ls -alh /usr/local/bin/'); class VTYInteract(object): """__init__(self, name, host, port): -- To view, visit https://gerrit.osmocom.org/5042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f3ef3665352c4e74affff2c2e8d345a408a2f52 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:05:44 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 16:05:44 +0000 Subject: [MERGED] osmo-mgw[master]: vty: do not change number_endpoints at runtime In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: vty: do not change number_endpoints at runtime ...................................................................... vty: do not change number_endpoints at runtime The variable number_endpoints is used as a length indicator for the array that contains the trunk endpoints at all times. When osmo-mgw is startet up, the variable is set and osmo-mgw will allocate the memory for the endpoints. However, it is still possible to manipulate the variable via the telnet interface. When the value is increased osmo-mgw might start using unallocated memory at some point. Store subsequent changes of number_enspoints in a separate variable in order to write them to the config file. The changes will then take effect after a restart. Closes: OS#2632 Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c 4 files changed, 14 insertions(+), 13 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 42a91d8..c7634fb 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -151,6 +151,7 @@ int rtp_accept_all; unsigned int number_endpoints; + int vty_number_endpoints; struct mgcp_endpoint *endpoints; }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 9e04e50..f542745 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1170,7 +1170,7 @@ trunk->audio_payload = 126; trunk->audio_send_ptime = 1; trunk->audio_send_name = 1; - trunk->number_endpoints = 33; + trunk->vty_number_endpoints = 33; trunk->omit_rtcp = 0; mgcp_trunk_set_keepalive(trunk, MGCP_KEEPALIVE_ONCE); llist_add_tail(&trunk->entry, &cfg->trunks); @@ -1202,12 +1202,12 @@ tcfg->endpoints = _talloc_zero_array(tcfg->cfg, sizeof(struct mgcp_endpoint), - tcfg->number_endpoints, + tcfg->vty_number_endpoints, "endpoints"); if (!tcfg->endpoints) return -1; - for (i = 0; i < tcfg->number_endpoints; ++i) { + for (i = 0; i < tcfg->vty_number_endpoints; ++i) { INIT_LLIST_HEAD(&tcfg->endpoints[i].conns); tcfg->endpoints[i].cfg = tcfg->cfg; tcfg->endpoints[i].tcfg = tcfg; @@ -1217,6 +1217,7 @@ tcfg->endpoints[i].type = &ep_typeset.rtp; } + tcfg->number_endpoints = tcfg->vty_number_endpoints; return 0; } diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 9420d96..80396e0 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -115,7 +115,7 @@ g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE); vty_out(vty, " loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE); vty_out(vty, " number endpoints %u%s", - g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE); + g_cfg->trunk.vty_number_endpoints - 1, VTY_NEWLINE); vty_out(vty, " %sallow-transcoding%s", g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE); if (g_cfg->call_agent_addr) @@ -524,7 +524,7 @@ "Number options\n" "Endpoints available\n" "Number endpoints\n") { /* + 1 as we start counting at one */ - g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1; + g_cfg->trunk.vty_number_endpoints = atoi(argv[0]) + 1; return CMD_SUCCESS; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 99491e6..f35dc93 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -563,9 +563,8 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); - cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -685,7 +684,7 @@ cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -737,7 +736,7 @@ cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1025,7 +1024,7 @@ endp.type = &ep_typeset.rtp; - trunk.number_endpoints = 1; + trunk.vty_number_endpoints = 1; trunk.endpoints = &endp; trunk.force_constant_ssrc = patch_ssrc; trunk.force_aligned_timing = patch_ts; @@ -1097,7 +1096,7 @@ printf("Testing multiple payload types\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -1228,7 +1227,7 @@ printf("Testing no sequence flow on initial packet\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); endp = &cfg->trunk.endpoints[1]; @@ -1274,7 +1273,7 @@ printf("Testing no rtpmap name\n"); cfg = mgcp_config_alloc(); - cfg->trunk.number_endpoints = 64; + cfg->trunk.vty_number_endpoints = 64; cfg->trunk.audio_send_name = 0; mgcp_endpoints_allocate(&cfg->trunk); -- To view, visit https://gerrit.osmocom.org/4779 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:05:45 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 16:05:45 +0000 Subject: [MERGED] osmo-mgw[master]: vty: simplify endpoint allocation In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: vty: simplify endpoint allocation ...................................................................... vty: simplify endpoint allocation mgcp_parse_config() uses a helper function allocate_trunk() to perform the trunk allocation. This helper function only calls mgcp_endpoints_allocate() and checks the return code. Call mgcp_endpoints_allocate() directly from mgcp_parse_config() Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 6 insertions(+), 17 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 06420dd..9420d96 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1269,18 +1269,6 @@ return 0; } -static int allocate_trunk(struct mgcp_trunk_config *trunk) -{ - if (mgcp_endpoints_allocate(trunk) != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "Failed to allocate %d endpoints on trunk %d.\n", - trunk->number_endpoints, trunk->trunk_nr); - return -1; - } - - return 0; -} - int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg, enum mgcp_role role) { @@ -1304,17 +1292,18 @@ return -1; } - if (allocate_trunk(&g_cfg->trunk) != 0) { + if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "Failed to initialize the virtual trunk.\n"); + "Failed to initialize the virtual trunk (%d endpoints)\n", + g_cfg->trunk.number_endpoints); return -1; } llist_for_each_entry(trunk, &g_cfg->trunks, entry) { - if (allocate_trunk(trunk) != 0) { + if (mgcp_endpoints_allocate(trunk) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "Failed to initialize E1 trunk %d.\n", - trunk->trunk_nr); + "Failed to initialize trunk %d (%d endpoints)\n", + trunk->trunk_nr, trunk->number_endpoints); return -1; } } -- To view, visit https://gerrit.osmocom.org/4775 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:06:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 Nov 2017 16:06:54 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) Ok, I'll improvie the commit description https://gerrit.osmocom.org/#/c/5011/1/suites/gprs/ping.py File suites/gprs/ping.py: Line 45: ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) > is ms.activate_context() blocking? For the ms.attach() we chose to go for n activate_context is blocking for now, to simplify the API. We can move it to non-blocking later if we see any use for it, but I don't think it's that important. I have no strong opinion on it being one way or the other. For attach(), I made it non-blocking because we can enable that early (see attach being used right after connect) and we may speed up the tests as it may become attached during registering time. -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:27:25 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 27 Nov 2017 16:27:25 +0000 Subject: osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) > > (1 comment) > > > > I see a number of other strcpy and strncpy instances around > > osmo-mgw.git. I think at some point I replaced all with > > osmo_strlcpy(), I wonder where all these are coming from now. > Would > > you mind to replace all of the occurences in one fell swoop? > > > > src/libosmo-mgcp/mgcp_conn.c:107: strcpy(conn->name, name); > > src/libosmo-mgcp/mgcp_network.c:91: strncpy(addr, > > endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); > > src/libosmo-mgcp/mgcp_network.c:99: strncpy(addr, > > endp->cfg->source_addr, INET_ADDRSTRLEN); > > src/libosmo-mgcp-client/mgcp_client.c:204: strncpy(r->audio_ip, > > line + 9, sizeof(r->audio_ip)); > > src/libosmo-mgcp-client/mgcp_client.c:343: strncpy(strbuf, (const > > char*)msg->data, l); > > tests/mgcp_client/mgcp_client_test.c:49: strncpy(data, head, l); > > tests/mgcp_client/mgcp_client_test.c:56: strncpy(data, params, > l); > > tests/mgcp_client/mgcp_client_test.c:69: strncpy(data, str, l); > > any reply on this? I see, will replace them. https://gerrit.osmocom.org/#/c/5024/1//COMMIT_MSG Commit Message: Line 9: simplify \nul termination of the ip_addr string > (technically it's "nul termination", "null" refers to a NULL pointer. '\nul Done -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:29:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:29:15 +0000 Subject: osmocom-bb[master]: WIP... compiler warning.. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:29:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:29:29 +0000 Subject: osmocom-bb[master]: WIP: start/stop for the MS.. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d52e5f61e77ef1ecf00aeecad85e56cbafb4379 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:30:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:30:47 +0000 Subject: osmocom-bb[master]: mobile: Add osmo.timeout for lua code to have timeouts In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:31:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:31:44 +0000 Subject: osmocom-bb[master]: mobile: Directly inform the primitive layer about an event In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4931 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:32:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:32:34 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:32:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:32:50 +0000 Subject: osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:33:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:33:13 +0000 Subject: osmocom-bb[master]: mobile: Change started and shutdown state through function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4930 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6a0591bb2785232681b23e41368323f16d3c960c Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:33:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:33:40 +0000 Subject: osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:34:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:34:39 +0000 Subject: python/osmo-python-tests[master]: Print additional debug info for extended tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f3ef3665352c4e74affff2c2e8d345a408a2f52 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:35:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:35:09 +0000 Subject: osmocom-bb[master]: mobile: Inform the primitive layer about status and new sms In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4932 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:36:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:36:12 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5038/1/osmopy/osmo_ctrl.py File osmopy/osmo_ctrl.py: PS1, Line 1: 3 this is not improving compatibility, but it is *mandating* python3 -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:39:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:39:19 +0000 Subject: osmo-bts[master]: Remove leftover comments and checks In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb4aad53667f88f9656c5bb1c52e7e75b385f446 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:42:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:42:40 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/5029/2/osmopy/rate_ctr2csv.py File osmopy/rate_ctr2csv.py: Line 71: args.output.write('group,counter,absolute,second,minute,hour,day\n') One can do it this way, but generally it would be better to use a python module for CSV generation, don't you agree? Line 80: args.output.write('%s,%s,%s,%s,%s,%s,%s\n' % (gr, k, absolute, per_sec, per_min, per_hour, per_day)) one problem I see here is that the strings are not quoted. Isn't it standard practise that only integers occur in non-quoted form of CSV, but all strings are quoted with ""? -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:43:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:43:23 +0000 Subject: osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:44:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:44:02 +0000 Subject: libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:44:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:44:09 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Update rate_ctr description In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Update rate_ctr description ...................................................................... Update rate_ctr description * use example new counter names with ':' separator * mention that 'counter' is obsolete * mention group name and index * use bold and monospace fonts to improve visibility Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 19 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index e8379d9..5e72fe4 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -150,14 +150,25 @@ |rate_ctr.*|RO||Get rate counter value. |=== -Those read-only variables allow to get value of arbitrary counter or rate -counter using its name e. g. "counter.net.sms.submitted" or -"rate_ctr.per_hour.nat.bsc.sccp.conn". Of course for that to work the program -in question have to register corresponding counter names using libosmocore -functions. Note the difference between counter and rate_ctr access format: in -case of rate_ctr the counter name have to be prefixed with interval -specification which can be any of "per_sec", "per_min", "per_hour", "per_day" -or "abs" for absolute value. +Those read-only variables allow to get value of arbitrary +counter using its name. + +For example "+rate_ctr.per_hour.bsc.0.handover:timeout+" is the number of handover timeouts per hour. + +Of course for that to work the program +in question have to register corresponding counter names and groups using +libosmocore functions. + +In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to +obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. + +The rate counter group name have to be prefixed with interval +specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" +or "*abs*" for absolute value. + +The old-style counters available via "+counter.*+" variables are superceeded by "+rate_ctr.abs+" +so its use is discouraged. +There might still be some applications not yet converted to rate_ctr. === Control Interface python example: `bsc_control.py` -- To view, visit https://gerrit.osmocom.org/5014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia962367bb93cb826002db6c950d23ae2102ac713 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:44:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:44:28 +0000 Subject: [MERGED] libosmocore[master]: ctrl: make response easier to parse In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: make response easier to parse ...................................................................... ctrl: make response easier to parse Previously ctrl request for all counters in group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable description which is not regular enough and is hard to both parse and generate. The ctrl interface is intended for m2m, not for human interaction. Let's simplify things by making response similar to counter group request ('rate_ctr.*'). Reply now looks as follows: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 loc_update_type:attach 0;loc_update_type:normal 0; Previously it was: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 All counters in msc.0 loc_update_type:attach 0 loc_update_type:normal 0 Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Related: OS#2550 --- M src/ctrl/control_if.c 1 file changed, 9 insertions(+), 32 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 38e7aef..015c55e 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -499,42 +499,19 @@ } } -static char *get_all_rate_ctr_in_group(void *ctx, const struct rate_ctr_group *ctrg, int intv) -{ - int i; - char *counters = talloc_strdup(ctx, ""); - if (!counters) - return NULL; - - for (i=0;idesc->num_ctr;i++) { - counters = talloc_asprintf_append(counters, "\n%s.%u.%s %"PRIu64, - ctrg->desc->group_name_prefix, ctrg->idx, - ctrg->desc->ctr_desc[i].name, - get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); - if (!counters) - return NULL; - } - return counters; -} - static int get_rate_ctr_group_idx(const struct rate_ctr_group *ctrg, int intv, struct ctrl_cmd *cmd) { - char *counters; - - counters = get_all_rate_ctr_in_group(cmd, ctrg, intv); - if (!counters) - goto oom; - - cmd->reply = talloc_asprintf(cmd, "All counters in %s.%u%s", - ctrg->desc->group_name_prefix, ctrg->idx, counters); - talloc_free(counters); - if (!cmd->reply) - goto oom; + unsigned int i; + for (i = 0; i < ctrg->desc->num_ctr; i++) { + ctrl_cmd_reply_printf(cmd, "%s %"PRIu64";", ctrg->desc->ctr_desc[i].name, + get_rate_ctr_value(&ctrg->ctr[i], intv, ctrg->desc->group_name_prefix)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + } return CTRL_CMD_REPLY; -oom: - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; } static int ctrl_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *data) -- To view, visit https://gerrit.osmocom.org/5023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 27 Nov 2017 16:44:38 +0000 Subject: [MERGED] osmo-bts[master]: Remove leftover comments and checks In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove leftover comments and checks ...................................................................... Remove leftover comments and checks It seems like rx previously had 'float' type. Remove the comments and checks which are not relevant since rx is 'int'. Change-Id: Idb4aad53667f88f9656c5bb1c52e7e75b385f446 Fixes: OS#2223 --- M src/common/power_control.c 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/power_control.c b/src/common/power_control.c index 78d2702..e040ee4 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -56,18 +56,9 @@ if (lchan->ms_power_ctrl.current != ms_power) return 0; - /* - * What is the difference between what we want and received? - * Ignore a margin that is within the range of measurement - * and MS output issues. - */ + /* What is the difference between what we want and received? */ rx = btsb->ul_power_target - rxLevel; - if (rx >= 0 && rx < 1) - return 0; - if (rx < 0 && rx > -1) - return 0; - /* We don't really care about the truncation of int + float */ cur_dBm = ms_pwr_dbm(band, ms_power); new_dBm = cur_dBm + rx; -- To view, visit https://gerrit.osmocom.org/5039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb4aad53667f88f9656c5bb1c52e7e75b385f446 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:44:54 +0000 Subject: openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:45:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:45:06 +0000 Subject: openbsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:45:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:45:09 +0000 Subject: [MERGED] openbsc[master]: vty: Add cmd to configure 3g Early Classmark Sending In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: Add cmd to configure 3g Early Classmark Sending ...................................................................... vty: Add cmd to configure 3g Early Classmark Sending In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/src/libcommon/gsm_data.c 6 files changed, 33 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index c19b125..30feedc 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -877,6 +877,7 @@ } data; } si_common; bool early_classmark_allowed; + bool early_classmark_allowed_3g; /* for testing only: Have an infinitely long radio link timeout */ bool infinite_radio_link_timeout; diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index a2750c1..0ae65f3 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -48,6 +48,7 @@ } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ + bool early_cm_restrict_3g; bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 60bea4f..3daa262 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -283,8 +283,11 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); - vty_out(vty, "Early Classmark Sending: %s%s", + vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", + bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ? + " (forbidden by 2G bit)" : "", VTY_NEWLINE); if (bts->pcu_sock_path) vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -672,6 +675,8 @@ } vty_out(vty, " early-classmark-sending %s%s", bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); + vty_out(vty, " early-classmark-sending-3g %s%s", + bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMOBTS: @@ -2770,6 +2775,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd, + "early-classmark-sending-3g (allowed|forbidden)", + "3G Early Classmark Sending\n" + "3G Early Classmark Sending is allowed\n" + "3G Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed_3g = true; + else + bts->early_classmark_allowed_3g = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -4291,6 +4312,7 @@ install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); install_element(BTS_NODE, &cfg_bts_early_cm_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 7b77ce2..49c38b5 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -495,9 +495,12 @@ /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - /* 3G Early Classmark Sending Restriction controlled by + /* 3G Early Classmark Sending Restriction. If H, then controlled by * early_cm_ctrl above */ - bitvec_set_bit(&bv, H); + if (si3->early_cm_restrict_3g) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); if (si3->si2quater_indicator) { bitvec_set_bit(&bv, H); /* indicator struct present */ diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index b27465e..a878b52 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -812,6 +812,7 @@ .ra_colour = 0, .present = 1, }, + .early_cm_restrict_3g = false, .si2quater_indicator = false, .lsa_params = { .present = 0, @@ -858,6 +859,7 @@ si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; + si_info.early_cm_restrict_3g = !bts->early_classmark_allowed_3g; /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index f1049e9..55d6fce 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -300,6 +300,7 @@ bts->dtxd = false; bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */ bts->neigh_list_manual_mode = 0; + bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; -- To view, visit https://gerrit.osmocom.org/5037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 16:45:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 16:45:10 +0000 Subject: [MERGED] openbsc[master]: Use type bool for boolean fields in gsm48_si_ro_info In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Use type bool for boolean fields in gsm48_si_ro_info ...................................................................... Use type bool for boolean fields in gsm48_si_ro_info Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c --- M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/system_information.c 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index ca7b57c..a2750c1 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -40,15 +40,15 @@ struct gsm48_si_ro_info { struct gsm48_si_selection_params selection_params; struct gsm48_si_power_offset power_offset; - uint8_t si2ter_indicator; - uint8_t early_cm_ctrl; + bool si2ter_indicator; + bool early_cm_ctrl; struct { uint8_t where:3, present:1; } scheduling; struct gsm48_si3_gprs_ind gprs_ind; /* SI 3 specific */ - uint8_t si2quater_indicator; + bool si2quater_indicator; /* SI 4 specific */ struct gsm48_lsa_params lsa_params; uint16_t cell_id; diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index abb1a6d..b27465e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -802,8 +802,8 @@ .power_offset = { .present = 0, }, - .si2ter_indicator = 0, - .early_cm_ctrl = 1, + .si2ter_indicator = false, + .early_cm_ctrl = true, .scheduling = { .present = 0, }, @@ -812,7 +812,7 @@ .ra_colour = 0, .present = 1, }, - .si2quater_indicator = 0, + .si2quater_indicator = false, .lsa_params = { .present = 0, }, @@ -846,16 +846,16 @@ if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); - si_info.si2ter_indicator = 1; + si_info.si2ter_indicator = true; } else { - si_info.si2ter_indicator = 0; + si_info.si2ter_indicator = false; } if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) { LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n", si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length); - si_info.si2quater_indicator = 1; + si_info.si2quater_indicator = true; } else { - si_info.si2quater_indicator = 0; + si_info.si2quater_indicator = false; } si_info.early_cm_ctrl = bts->early_classmark_allowed; -- To view, visit https://gerrit.osmocom.org/5036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Nov 27 19:31:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 19:31:31 +0000 Subject: osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 19:31:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 Nov 2017 19:31:42 +0000 Subject: osmo-msc[master]: cosmetic: log error when using a conn that's in release In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4971 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:36:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:36:14 +0000 Subject: [PATCH] osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar... Message-ID: Review at https://gerrit.osmocom.org/5043 compiler warnings: add includes in abis_rsl.h, gsm_data_shared.h Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f --- M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/gsm_data_shared.h 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5043/1 diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index c092723..49d8a6c 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -27,6 +27,7 @@ #include #include #include +#include struct gsm_bts; struct gsm_lchan; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 04669e2..310dfb6 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -26,6 +26,7 @@ #include #include +#include /* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1: 4-bit index is used (2#1111 = 10#15) */ -- To view, visit https://gerrit.osmocom.org/5043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:36:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:36:14 +0000 Subject: [PATCH] osmo-bsc[master]: compiler warnings: drop some unused variables Message-ID: Review at https://gerrit.osmocom.org/5044 compiler warnings: drop some unused variables Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4 --- M src/libbsc/abis_om2000_vty.c M src/libbsc/pcu_sock.c 2 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/5044/1 diff --git a/src/libbsc/abis_om2000_vty.c b/src/libbsc/abis_om2000_vty.c index e1dd914..b55a6c4 100644 --- a/src/libbsc/abis_om2000_vty.c +++ b/src/libbsc/abis_om2000_vty.c @@ -424,7 +424,6 @@ "SuperChannel (Packet Abis)\n") { struct gsm_bts *bts = vty->index; - struct con_group *cg; if (bts->type != GSM_BTS_TYPE_RBS2000) { vty_out(vty, "%% Command only works for RBS2000%s", diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c index 40dd68d..9f1c80c 100644 --- a/src/libbsc/pcu_sock.c +++ b/src/libbsc/pcu_sock.c @@ -356,9 +356,6 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, struct gsm_pcu_if_data *data_req) { - uint8_t is_ptcch; - struct gsm_bts_trx *trx; - struct gsm_bts_trx_ts *ts; struct msgb *msg; char imsi_digit_buf[4]; uint32_t tlli = -1; -- To view, visit https://gerrit.osmocom.org/5044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:36:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:36:14 +0000 Subject: [PATCH] osmo-bsc[master]: compiler warnings: constify in abis_nm.c Message-ID: Review at https://gerrit.osmocom.org/5045 compiler warnings: constify in abis_nm.c Constify in- and output arguments for Parse Attribute Response Info chain to avoid compiler warnings, and more clearly indicate const data in the first place. Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb --- M src/libbsc/abis_nm.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/5045/1 diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index b7391a1..21adcff 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -455,7 +455,7 @@ } /* Parse Attribute Response Info - return pointer to the actual content */ -static inline uint8_t *parse_attr_resp_info_unreported(uint8_t bts_nr, uint8_t *ari, uint16_t ari_len, uint16_t *out_len) +static inline const uint8_t *parse_attr_resp_info_unreported(uint8_t bts_nr, const uint8_t *ari, uint16_t ari_len, uint16_t *out_len) { uint8_t num_unreported = ari[0], i; @@ -474,7 +474,7 @@ } /* Parse Attribute Response Info content for 3GPP TS 52.021 ?9.4.30 Manufacturer Id */ -static inline uint8_t *parse_attr_resp_info_manuf_id(struct gsm_bts *bts, uint8_t *data, uint16_t *data_len) +static inline const uint8_t *parse_attr_resp_info_manuf_id(struct gsm_bts *bts, const uint8_t *data, uint16_t *data_len) { struct tlv_parsed tp; uint16_t m_id_len = 0; @@ -513,7 +513,7 @@ } /* Parse Attribute Response Info content for 3GPP TS 52.021 ?9.4.28 Manufacturer Dependent State */ -static inline uint8_t *parse_attr_resp_info_manuf_state(const struct gsm_bts_trx *trx, uint8_t *data, uint16_t *data_len) +static inline const uint8_t *parse_attr_resp_info_manuf_state(const struct gsm_bts_trx *trx, const uint8_t *data, uint16_t *data_len) { struct tlv_parsed tp; const uint8_t *power; @@ -542,7 +542,8 @@ struct e1inp_sign_link *sign_link = mb->dst; struct gsm_bts *bts = trx ? trx->bts : sign_link->trx->bts; struct tlv_parsed tp; - uint8_t *data, i; + const uint8_t *data; + int i; uint16_t data_len; int rc; struct abis_nm_sw_desc sw_descr[MAX_BTS_ATTR]; -- To view, visit https://gerrit.osmocom.org/5045 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:36:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:36:15 +0000 Subject: [PATCH] osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_* Message-ID: Review at https://gerrit.osmocom.org/5046 cleanup: gsm_data_shared.h: drop unused ROLE_* While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, drop the ROLE #ifdefs and an unused void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 --- M include/osmocom/bsc/gsm_data_shared.h 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/5046/1 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 310dfb6..671d2f0 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -466,15 +466,6 @@ int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ -#ifndef ROLE_BSC - struct trx_power_params power_params; - int ms_power_control; - - struct { - void *l1h; - } role_bts; -#endif - union { struct { struct { @@ -848,7 +839,6 @@ int force_combined_si; int bcch_change_mark; -#ifdef ROLE_BSC /* Abis NM queue */ struct llist_head abis_queue; int abis_nm_pend; @@ -910,8 +900,6 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; -#endif /* ROLE_BSC */ - void *role; }; -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:57:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:57:32 +0000 Subject: [PATCH] osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5043 to look at the new patch set (#2). compiler warnings: add includes in abis_rsl.h, gsm_data_shared.h Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f --- M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/gsm_data_shared.h 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5043/2 diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index c092723..b30702f 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -27,6 +27,7 @@ #include #include #include +#include struct gsm_bts; struct gsm_lchan; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 95b310f..c2f630f 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -22,6 +22,7 @@ #include #include +#include /* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1: 4-bit index is used (2#1111 = 10#15) */ -- To view, visit https://gerrit.osmocom.org/5043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 21:57:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 27 Nov 2017 21:57:32 +0000 Subject: [PATCH] osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_* In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5046 to look at the new patch set (#2). cleanup: gsm_data_shared.h: drop unused ROLE_* While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, drop the ROLE #ifdefs and an unused void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data_shared.c 3 files changed, 0 insertions(+), 117 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/5046/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b9427b8..75109e3 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -218,7 +218,6 @@ }; -#define ROLE_BSC #include "gsm_data_shared.h" diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 04669e2..95b310f 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -20,10 +20,6 @@ #include -#ifndef ROLE_BSC -#include -#endif - #include #include @@ -251,7 +247,6 @@ uint8_t rtp_payload; uint8_t rtp_payload2; uint8_t speech_mode; -#ifdef ROLE_BSC struct rtp_socket *rtp_socket; /* info we need to postpone the AoIP @@ -263,16 +258,12 @@ uint8_t speech_mode; bool valid; } ass_compl; -#else - struct osmo_rtp_socket *rtp_socket; -#endif } abis_ip; uint8_t rqd_ta; char *name; -#ifdef ROLE_BSC struct osmo_timer_list T3101; struct osmo_timer_list T3109; struct osmo_timer_list T3111; @@ -300,88 +291,6 @@ struct gsm48_req_ref *rqd_ref; uint8_t rqd_ta; } dyn; -#else - /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23. - * Currently we don't share these headers so this is a magic number. */ - struct llist_head sapi_cmds; - uint8_t sapis_dl[23]; - uint8_t sapis_ul[23]; - struct lapdm_channel lapdm_ch; - struct llist_head dl_tch_queue; - struct { - /* bitmask of all SI that are present/valid in si_buf */ - uint32_t valid; - uint32_t last; - /* buffers where we put the pre-computed SI: - SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */ - sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM]; - } si; - struct { - uint8_t flags; - /* RSL measurment result number, 0 at lchan_act */ - uint8_t res_nr; - /* current Tx power level of the BTS */ - uint8_t bts_tx_pwr; - /* number of measurements stored in array below */ - uint8_t num_ul_meas; - struct bts_ul_meas uplink[MAX_NUM_UL_MEAS]; - /* last L1 header from the MS */ - uint8_t l1_info[2]; - struct gsm_meas_rep_unidir ul_res; - } meas; - struct { - struct amr_multirate_conf amr_mr; - struct { - struct osmo_fsm_inst *dl_amr_fsm; - /* TCH cache */ - uint8_t cache[20]; - /* FACCH cache */ - uint8_t facch[GSM_MACBLOCK_LEN]; - uint8_t len; - uint32_t fn; - bool is_update; - /* set for each SID frame to detect talkspurt for codecs - without explicit ONSET event */ - bool ul_sid; - /* indicates if DTXd was active during DL measurement - period */ - bool dl_active; - } dtx; - uint8_t last_cmr; - uint32_t last_fn; - } tch; - - /* 3GPP TS 48.058 ? 9.3.37: [0; 255] ok, -1 means invalid*/ - int16_t ms_t_offs; - /* 3GPP TS 45.010 ? 1.2 round trip propagation delay (in symbols) or -1 */ - int16_t p_offs; - - /* BTS-side ciphering state (rx only, bi-directional, ...) */ - uint8_t ciph_state; - uint8_t ciph_ns; - uint8_t loopback; - struct { - uint8_t active; - uint8_t ref; - /* T3105: PHYS INF retransmission */ - struct osmo_timer_list t3105; - /* counts up to Ny1 */ - unsigned int phys_info_count; - } ho; - /* S counter for link loss */ - int s; - /* Kind of the release/activation. E.g. RSL or PCU */ - int rel_act_kind; - /* RTP header Marker bit to indicate beginning of speech after pause */ - bool rtp_tx_marker; - /* power handling */ - struct { - uint8_t current; - uint8_t fixed; - } ms_power_ctrl; - - struct msgb *pending_rel_ind_msg; -#endif }; enum { @@ -464,15 +373,6 @@ uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ - -#ifndef ROLE_BSC - struct trx_power_params power_params; - int ms_power_control; - - struct { - void *l1h; - } role_bts; -#endif union { struct { @@ -847,7 +747,6 @@ int force_combined_si; int bcch_change_mark; -#ifdef ROLE_BSC /* Abis NM queue */ struct llist_head abis_queue; int abis_nm_pend; @@ -909,8 +808,6 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; -#endif /* ROLE_BSC */ - void *role; }; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 84a71cb..b001562 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -271,9 +271,6 @@ name = gsm_lchan_name_compute(lchan); lchan->name = talloc_strdup(trx, name); -#ifndef ROLE_BSC - INIT_LLIST_HEAD(&lchan->sapi_cmds); -#endif } } @@ -679,17 +676,7 @@ break; default: case GSM_PCHAN_CCCH: -#ifdef ROLE_BSC OSMO_ASSERT(lchan_nr == 0); -#else - /* - * FIXME: On octphy and litecell, we hit above assertion (see - * Max's comment at https://gerrit.osmocom.org/589 ); disabled - * for BTS until this is clarified; remove the #ifdef when it - * is fixed. - */ -#warning "fix caller that passes lchan_nr != 0" -#endif cbits = 0x10; break; } -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Nov 27 22:59:21 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 Nov 2017 22:59:21 +0000 Subject: [MERGED] osmo-bts[master]: doc/examples: add CalypsoBTS configuration example In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: doc/examples: add CalypsoBTS configuration example ...................................................................... doc/examples: add CalypsoBTS configuration example Despite the CalypsoBTS transceiver is similar to OsmoTRX, there are some changes required to make it work with OsmoBTS. Let's add a new configuration example for that. Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 --- A doc/examples/calypso/osmo-bts.cfg 1 file changed, 38 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/calypso/osmo-bts.cfg b/doc/examples/calypso/osmo-bts.cfg new file mode 100644 index 0000000..fa01953 --- /dev/null +++ b/doc/examples/calypso/osmo-bts.cfg @@ -0,0 +1,38 @@ +! +! OsmoBTS configuration example for CalypsoBTS +! http://osmocom.org/projects/baseband/wiki/CalypsoBTS +!! +! +log stderr + logging color 1 + logging timestamp 0 + logging level rsl notice + logging level oml notice + logging level rll notice + logging level rr notice + logging level meas error + logging level pag error + logging level l1c error + logging level l1p error + logging level dsp error + logging level abis error +! +line vty + no login +! +phy 0 + instance 0 + osmotrx rx-gain 1 + osmotrx ip local 127.0.0.1 + osmotrx ip remote 127.0.0.1 + osmotrx timing-advance-loop + osmotrx ms-power-loop -65 + osmotrx legacy-setbsic +bts 0 + oml remote-ip 127.0.0.1 + ipa unit-id 1801 0 + gsmtap-sapi pdtch + gsmtap-sapi ccch + band 900 + trx 0 + phy 0 instance 0 -- To view, visit https://gerrit.osmocom.org/5032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4b1797de576ab987b05046aa9a9828858023ed3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:31:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:31:18 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c... Message-ID: Review at https://gerrit.osmocom.org/5047 cosmetic: handover.h: use "#pragma once", declare structs, comments Use new #pragma style instead of #ifndef dance. Forward-declare all structs we're using pointers of. Move function comments to their definitions in the .c file. Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea --- M include/osmocom/bsc/handover.h M src/libbsc/handover_logic.c 2 files changed, 5 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/5047/1 diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h index 3fe71a2..9e2ba1a 100644 --- a/include/osmocom/bsc/handover.h +++ b/include/osmocom/bsc/handover.h @@ -1,14 +1,9 @@ -#ifndef _HANDOVER_H -#define _HANDOVER_H +#pragma once +struct gsm_lchan; +struct gsm_bts; struct gsm_subscriber_connection; int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts); - -/* clear any operation for this connection */ void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan); - -/* Return the old lchan or NULL. This is meant for audio handling */ struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan); - -#endif /* _HANDOVER_H */ diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index ace8ac3..7b9dece 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -159,6 +159,7 @@ return 0; } +/* clear any operation for this connection */ void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan) { struct bsc_handover *ho; @@ -366,6 +367,7 @@ return 0; } +/* Return the old lchan or NULL. This is meant for audio handling */ struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan) { struct bsc_handover *ho; -- To view, visit https://gerrit.osmocom.org/5047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:31:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:31:23 +0000 Subject: [PATCH] osmo-bsc[master]: examples: add osmo-bsc-minimal.cfg Message-ID: Review at https://gerrit.osmocom.org/5048 examples: add osmo-bsc-minimal.cfg An upcoming VTY test requires a cfg that doesn't have handover values set. Prepare for that by adding a minimal BSC config. It is a version further stripped down from the Osmocom Network In The Box wiki page. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e --- A doc/examples/osmo-bsc/osmo-bsc-minimal.cfg 1 file changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/5048/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg new file mode 100644 index 0000000..c972e06 --- /dev/null +++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg @@ -0,0 +1,36 @@ +network + network country code 901 + mobile network code 70 + mm info 1 + short name OsmoBSC + long name OsmoBSC + bts 0 + type sysmobts + band GSM-1800 + location_area_code 23 + ip.access unit_id 1800 0 + trx 0 + rf_locked 0 + arfcn 868 + nominal power 23 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + timeslot 1 + phys_chan_config SDCCH8 + timeslot 2 + phys_chan_config TCH/F + timeslot 3 + phys_chan_config TCH/F + timeslot 4 + phys_chan_config TCH/F + timeslot 5 + phys_chan_config TCH/F + timeslot 6 + phys_chan_config TCH/F + timeslot 7 + phys_chan_config TCH/F +e1_input + e1_line 0 driver ipa +msc 0 + allow-emergency deny + codec-list hr3 -- To view, visit https://gerrit.osmocom.org/5048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:31:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:31:23 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: pass gsm_network to gsm_bts_alloc() already Message-ID: Review at https://gerrit.osmocom.org/5049 HO prep: pass gsm_network to gsm_bts_alloc() already Prepare for a future change that accesses bts->network during gsm_bts_alloc(). Currently, gsm_bts_alloc() takes a ctx parameter, and gsm_bts_alloc_register() then gets the gsm_network pointer and sets bts->network to it. All callers anyway pass gsm_network as ctx to gsm_bts_alloc(), and anything else would not make sense anyway. So enforce passing exactly gsm_network to gsm_bts_alloc() and already set the bts->network pointer from there. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a --- M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c 3 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/5049/1 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index c2f630f..c19db7e 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -812,7 +812,7 @@ }; -struct gsm_bts *gsm_bts_alloc(void *talloc_ctx, uint8_t bts_num); +struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num); struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num); struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index ef72881..6a78e3a 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -261,7 +261,6 @@ net->num_bts++; - bts->network = net; bts->type = type; bts->model = model; bts->bsic = bsic; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index b001562..d7c9f3d 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -309,9 +309,9 @@ .initial_mcs = 6, }; -struct gsm_bts *gsm_bts_alloc(void *ctx, uint8_t bts_num) +struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num) { - struct gsm_bts *bts = talloc_zero(ctx, struct gsm_bts); + struct gsm_bts *bts = talloc_zero(net, struct gsm_bts); int i; if (!bts) @@ -320,6 +320,8 @@ bts->nr = bts_num; bts->num_trx = 0; INIT_LLIST_HEAD(&bts->trx_list); + bts->network = net; + bts->ms_max_power = 15; /* dBm */ gsm_mo_init(&bts->mo, bts, NM_OC_BTS, -- To view, visit https://gerrit.osmocom.org/5049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:31:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:31:24 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... Message-ID: Review at https://gerrit.osmocom.org/5050 HO prep: introduce per-BTS handover config, with defaults on net node It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. Though the ho_cfg value getter/setter function definitions are made by a macro, the declarations in handover_cfg.h are written out in full for better API readability. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h A include/osmocom/bsc/handover_cfg.h A include/osmocom/bsc/handover_vty.h M src/libbsc/Makefile.am M src/libbsc/bsc_vty.c M src/libbsc/handover_decision.c A src/libbsc/handover_vty.c M src/libbsc/net_init.c M src/libcommon/Makefile.am M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c A src/libcommon/handover_cfg.c M tests/Makefile.am A tests/handover_cfg.vty 16 files changed, 657 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/5050/1 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..614f633 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -28,7 +28,9 @@ gsm_data_shared.h \ gsm_subscriber.h \ handover.h \ + handover_cfg.h \ handover_decision.h \ + handover_vty.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 75109e3..b33400b 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -376,22 +376,7 @@ bool authentication_required; int neci; int send_mm_info; - struct { - int active; - /* Window RXLEV averaging */ - unsigned int win_rxlev_avg; /* number of SACCH frames */ - /* Window RXQUAL averaging */ - unsigned int win_rxqual_avg; /* number of SACCH frames */ - /* Window RXLEV neighbouring cells averaging */ - unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */ - - /* how often should we check for power budget HO */ - unsigned int pwr_interval; /* SACCH frames */ - /* how much better does a neighbor cell have to be ? */ - unsigned int pwr_hysteresis; /* dBm */ - /* maximum distacne before we try a handover */ - unsigned int max_distance; /* TA values */ - } handover; + struct handover_cfg *ho; struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index c19db7e..52a90c0 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -809,6 +809,7 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + struct handover_cfg *ho; }; diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h new file mode 100644 index 0000000..9b0ad5e --- /dev/null +++ b/include/osmocom/bsc/handover_cfg.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +struct vty; + +/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover + * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, + * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ +struct handover_cfg; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); + +bool ho_get_active(struct handover_cfg *ho); +void ho_set_active(struct handover_cfg *ho, bool val); +bool ho_isset_active(struct handover_cfg *ho); +void ho_clear_active(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg(struct handover_cfg *ho); +void ho_set_win_rxlev_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxqual_avg(struct handover_cfg *ho); +void ho_set_win_rxqual_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxqual_avg(struct handover_cfg *ho); +void ho_clear_win_rxqual_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_set_win_rxlev_avg_neigh(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg_neigh(struct handover_cfg *ho); + +unsigned int ho_get_pwr_interval(struct handover_cfg *ho); +void ho_set_pwr_interval(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_interval(struct handover_cfg *ho); +void ho_clear_pwr_interval(struct handover_cfg *ho); + +unsigned int ho_get_pwr_hysteresis(struct handover_cfg *ho); +void ho_set_pwr_hysteresis(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_hysteresis(struct handover_cfg *ho); +void ho_clear_pwr_hysteresis(struct handover_cfg *ho); + +unsigned int ho_get_max_distance(struct handover_cfg *ho); +void ho_set_max_distance(struct handover_cfg *ho, unsigned int val); +bool ho_isset_max_distance(struct handover_cfg *ho); +void ho_clear_max_distance(struct handover_cfg *ho); diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h new file mode 100644 index 0000000..48af136 --- /dev/null +++ b/include/osmocom/bsc/handover_vty.h @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +void ho_vty_init(); +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho); diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..79a3739 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -53,5 +53,6 @@ net_init.c \ bsc_dyn_ts.c \ bts_ipaccess_nanobts_omlattr.c \ + handover_vty.c \ $(NULL) diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 71c2cef..c192b03 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -188,8 +190,27 @@ VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); - vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", - VTY_NEWLINE); + + { + struct gsm_bts *bts; + unsigned int ho_active_count = 0; + unsigned int ho_inactive_count = 0; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (ho_get_active(bts->ho)) + ho_active_count ++; + else + ho_inactive_count ++; + } + + if (ho_active_count && ho_inactive_count) + vty_out(vty, " Handover: On at %u BTS, Off at %u BTS%s", + ho_active_count, ho_inactive_count, VTY_NEWLINE); + else + vty_out(vty, " Handover: %s%s", ho_active_count ? "On" : "Off", + VTY_NEWLINE); + } + network_chan_load(&pl, net); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); @@ -775,6 +796,8 @@ if (bts->pcu_sock_path) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); + ho_vty_write(vty, " ", bts->ho); + config_write_bts_model(vty, bts); } @@ -817,19 +840,9 @@ vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); - vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); - vty_out(vty, " handover window rxlev averaging %u%s", - gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxqual averaging %u%s", - gsmnet->handover.win_rxqual_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxlev neighbor averaging %u%s", - gsmnet->handover.win_rxlev_avg_neigh, VTY_NEWLINE); - vty_out(vty, " handover power budget interval %u%s", - gsmnet->handover.pwr_interval, VTY_NEWLINE); - vty_out(vty, " handover power budget hysteresis %u%s", - gsmnet->handover.pwr_hysteresis, VTY_NEWLINE); - vty_out(vty, " handover maximum distance %u%s", - gsmnet->handover.max_distance, VTY_NEWLINE); + + ho_vty_write(vty, " ", gsmnet->ho); + VTY_OUT_TIMER(3101); VTY_OUT_TIMER(3103); VTY_OUT_TIMER(3105); @@ -1498,100 +1511,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -#define HANDOVER_STR "Handover Options\n" - -DEFUN(cfg_net_handover, cfg_net_handover_cmd, - "handover (0|1)", - HANDOVER_STR - "Don't perform in-call handover\n" - "Perform in-call handover\n") -{ - int enable = atoi(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - if (enable && ipacc_rtp_direct) { - vty_out(vty, "%% Cannot enable handover unless RTP Proxy mode " - "is enabled by using the -P command line option%s", - VTY_NEWLINE); - return CMD_WARNING; - } - gsmnet->handover.active = enable; - - return CMD_SUCCESS; -} - -#define HO_WIN_STR HANDOVER_STR "Measurement Window\n" -#define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n" -#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n" -#define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n" -#define HO_AVG_COUNT_STR "Amount to use for Averaging\n" - -DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd, - "handover window rxlev averaging <1-10>", - HO_WIN_RXLEV_STR - "How many RxLev measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd, - "handover window rxqual averaging <1-10>", - HO_WIN_RXQUAL_STR - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxqual_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd, - "handover window rxlev neighbor averaging <1-10>", - HO_WIN_RXLEV_STR "Neighbor\n" - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd, - "handover power budget interval <1-99>", - HO_PBUDGET_STR - "How often to check if we have a better cell (SACCH frames)\n" - "Interval\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_interval = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd, - "handover power budget hysteresis <0-999>", - HO_PBUDGET_STR - "How many dB does a neighbor to be stronger to become a HO candidate\n" - "Hysteresis\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_hysteresis = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd, - "handover maximum distance <0-9999>", - HANDOVER_STR - "How big is the maximum timing advance before HO is forced\n" - "Distance\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.max_distance = atoi(argv[0]); return CMD_SUCCESS; } @@ -4247,13 +4166,6 @@ logging_vty_add_cmds(NULL); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_handover_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_neigh_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_interval_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_hysteresis_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_max_distance_cmd); install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_net_T3103_cmd); install_element(GSMNET_NODE, &cfg_net_T3105_cmd); @@ -4268,6 +4180,7 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + /* See also handover commands added on net level from handover_vty.c */ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -4373,6 +4286,7 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); + /* See also handover commands added on bts level from handover_vty.c */ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); @@ -4411,6 +4325,8 @@ e1inp_vty_init(); osmo_fsm_vty_add_cmds(); + ho_vty_init(); + bsc_vty_init_extra(); return 0; diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c index 09c7eaa..a717653 100644 --- a/src/libbsc/handover_decision.c +++ b/src/libbsc/handover_decision.c @@ -30,8 +30,10 @@ #include #include #include -#include #include + +#include +#include /* Get reference to a neighbor cell on a given BCCH ARFCN */ static struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts, @@ -187,7 +189,7 @@ /* attempt to do a handover */ static int attempt_handover(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; struct neigh_meas_proc *best_cell = NULL; unsigned int best_better_db = 0; int i, rc; @@ -204,10 +206,10 @@ continue; /* caculate average rxlev for this cell over the window */ - avg = neigh_meas_avg(nmp, net->handover.win_rxlev_avg_neigh); + avg = neigh_meas_avg(nmp, ho_get_win_rxlev_avg_neigh(bts->ho)); /* check if hysteresis is fulfilled */ - if (avg < mr->dl.full.rx_lev + net->handover.pwr_hysteresis) + if (avg < mr->dl.full.rx_lev + ho_get_pwr_hysteresis(bts->ho)) continue; better = avg - mr->dl.full.rx_lev; @@ -222,7 +224,7 @@ LOGP(DHO, LOGL_INFO, "%s: Cell on ARFCN %u is better: ", gsm_ts_name(mr->lchan->ts), best_cell->arfcn); - if (!net->handover.active) { + if (!ho_get_active(bts->ho)) { LOGPC(DHO, LOGL_INFO, "Skipping, Handover disabled\n"); return 0; } @@ -248,7 +250,7 @@ * attempt a handover */ static int process_meas_rep(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; enum meas_rep_field dlev, dqual; int av_rxlev; @@ -274,7 +276,7 @@ process_meas_neigh(mr); av_rxlev = get_meas_rep_avg(mr->lchan, dlev, - net->handover.win_rxlev_avg); + ho_get_win_rxlev_avg(bts->ho)); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && @@ -290,11 +292,11 @@ return attempt_handover(mr); /* Distance */ - if (mr->ms_l1.ta > net->handover.max_distance) + if (mr->ms_l1.ta > ho_get_max_distance(bts->ho)) return attempt_handover(mr); /* Power Budget AKA Better Cell */ - if ((mr->nr % net->handover.pwr_interval) == 0) + if ((mr->nr % ho_get_pwr_interval(bts->ho)) == 0) return attempt_handover(mr); return 0; diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c new file mode 100644 index 0000000..efa36ae --- /dev/null +++ b/src/libbsc/handover_vty.c @@ -0,0 +1,130 @@ +#include +#include +#include + +static struct handover_cfg *ho_cfg_from_vty(struct vty *vty) +{ + switch (vty->node) { + case GSMNET_NODE: + return gsmnet_from_vty(vty)->ho; + case BTS_NODE: + OSMO_ASSERT(vty->index); + return ((struct gsm_bts *)vty->index)->ho; + default: + OSMO_ASSERT(false); + } +} + +#define HANDOVER_STR "Handover options\n" +#define HO_WIN_STR HANDOVER_STR "Measurement averaging settings\n" +#define HO_WIN_RXLEV_STR HO_WIN_STR "Received-Level averaging\n" +#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received-Quality averaging\n" +#define HO_POWER_BUDGET_STR HANDOVER_STR "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" +#define HO_AVG_COUNT_STR "Number of values to average over\n" +#define DEFAULT_STR "Use default, remove explicit setting on this node\n" + +#define HO_COMMON_VTY(NAME, CMDSTR, DOCSTR) \ +DEFUN(cfg_ho_##NAME, cfg_ho_##NAME##_cmd, \ + CMDSTR, DOCSTR) \ +{ \ + struct handover_cfg *ho = ho_cfg_from_vty(vty); \ + const char *val = argv[0]; \ + if (!strcmp(val, "default")) \ + ho_clear_##NAME(ho); \ + else \ + ho_set_##NAME(ho, atoi(val)); \ + return CMD_SUCCESS; \ +} + +HO_COMMON_VTY(active, + "handover (0|1|default)", + HANDOVER_STR + "Disable in-call handover\n" + "Enable in-call handover\n" + "Enable/Disable HO: " DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg, + "handover window rxlev averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many RxLev measurements are used for averaging\n" + "RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxqual_avg, + "handover window rxqual averaging (<1-10>|default)", + HO_WIN_RXQUAL_STR + "How many RxQual measurements are used for averaging\n" + "RxQual averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg_neigh, + "handover window rxlev neighbor averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many Neighbor RxLev measurements are used for averaging\n" + "How many Neighbor RxLev measurements are used for averaging\n" + "Neighbor RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(pwr_interval, + "handover power budget interval (<1-99>|default)", + HO_POWER_BUDGET_STR + "How often to check for a better cell (SACCH frames)\n" + "Check for stronger neighbor every N number of SACCH frames\n" + DEFAULT_STR) + +HO_COMMON_VTY(pwr_hysteresis, + "handover power budget hysteresis (<0-999>|default)", + HO_POWER_BUDGET_STR + "How many dBm stronger must a neighbor be to become a HO candidate\n" + "Neighbor's strength difference in dBm\n" + DEFAULT_STR) + +HO_COMMON_VTY(max_distance, + "handover maximum distance (<0-9999>|default)", + HANDOVER_STR + "Timing-Advance (i.e. distance) triggering\n" + "Timing-Advance (i.e. distance) triggering\n" + "Maximum Timing-Advance value before forcing HO\n" + DEFAULT_STR) + +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho) +{ + if (ho_isset_active(ho)) + vty_out(vty, "%shandover %u%s", indent, ho_get_active(ho) ? 1 : 0, VTY_NEWLINE); + if (ho_isset_win_rxlev_avg(ho)) + vty_out(vty, "%shandover window rxlev averaging %u%s", + indent, ho_get_win_rxlev_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxqual_avg(ho)) + vty_out(vty, "%shandover window rxqual averaging %u%s", + indent, ho_get_win_rxqual_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxlev_avg_neigh(ho)) + vty_out(vty, "%shandover window rxlev neighbor averaging %u%s", + indent, ho_get_win_rxlev_avg_neigh(ho), VTY_NEWLINE); + if (ho_isset_pwr_interval(ho)) + vty_out(vty, "%shandover power budget interval %u%s", + indent, ho_get_pwr_interval(ho), VTY_NEWLINE); + if (ho_isset_pwr_hysteresis(ho)) + vty_out(vty, "%shandover power budget hysteresis %u%s", + indent, ho_get_pwr_hysteresis(ho), VTY_NEWLINE); + if (ho_isset_max_distance(ho)) + vty_out(vty, "%shandover maximum distance %u%s", + indent, ho_get_max_distance(ho), VTY_NEWLINE); +} + +static void ho_vty_init_cmds(int parent_node) +{ + install_element(parent_node, &cfg_ho_active_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxqual_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_neigh_cmd); + install_element(parent_node, &cfg_ho_pwr_interval_cmd); + install_element(parent_node, &cfg_ho_pwr_hysteresis_cmd); + install_element(parent_node, &cfg_ho_max_distance_cmd); +} + +void ho_vty_init() +{ + ho_vty_init_cmds(GSMNET_NODE); + ho_vty_init_cmds(BTS_NODE); +} + diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..3f05273 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -21,6 +21,7 @@ #include #include #include +#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -57,13 +58,7 @@ net->T3122 = GSM_T3122_DEFAULT; net->T3141 = GSM_T3141_DEFAULT; - /* default set of handover parameters */ - net->handover.win_rxlev_avg = 10; - net->handover.win_rxqual_avg = 1; - net->handover.win_rxlev_avg_neigh = 10; - net->handover.pwr_interval = 6; - net->handover.pwr_hysteresis = 3; - net->handover.max_distance = 9999; + net->ho = ho_cfg_init(net, NULL); INIT_LLIST_HEAD(&net->bts_list); diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..d82b188 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -26,4 +26,5 @@ socket.c \ talloc_ctx.c \ gsm_subscriber_base.c \ + handover_cfg.c \ $(NULL) diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..e38da14 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -37,6 +37,7 @@ #include #include #include +#include void *tall_bsc_ctx; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index d7c9f3d..a74b4c8 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -33,6 +33,7 @@ #include #include +#include void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { @@ -363,6 +364,8 @@ /* si handling */ bts->bcch_change_mark = 1; + bts->ho = ho_cfg_init(bts, net->ho); + return bts; } diff --git a/src/libcommon/handover_cfg.c b/src/libcommon/handover_cfg.c new file mode 100644 index 0000000..eb41083 --- /dev/null +++ b/src/libcommon/handover_cfg.c @@ -0,0 +1,93 @@ +/* OsmoBSC interface to quagga VTY for handover parameters */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include +#include + +struct handover_cfg { + struct handover_cfg *higher_level_cfg; + + bool has_active; + bool active; + + /* Window parameters in number of SACCH frames */ + bool has_win_rxlev_avg; + unsigned int win_rxlev_avg; + bool has_win_rxqual_avg; + unsigned int win_rxqual_avg; + bool has_win_rxlev_avg_neigh; + unsigned int win_rxlev_avg_neigh; + + /* how often should we check for power budget HO */ + bool has_pwr_interval; + unsigned int pwr_interval; /* SACCH frames */ + bool has_pwr_hysteresis; + unsigned int pwr_hysteresis; /* dBm */ + bool has_max_distance; + unsigned int max_distance; /* TA values */ +}; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg) +{ + struct handover_cfg *ho = talloc_zero(ctx, struct handover_cfg); + OSMO_ASSERT(ho); + ho->higher_level_cfg = higher_level_cfg; + return ho; +} + +#define HO_GETTER_SETTER_DEFS(TYPE, NAME, DEFAULT_VAL) \ +TYPE ho_get_##NAME(struct handover_cfg *ho) \ +{ \ + if (ho->has_##NAME) \ + return ho->NAME; \ + if (ho->higher_level_cfg) \ + return ho_get_##NAME(ho->higher_level_cfg); \ + return DEFAULT_VAL; \ +} \ +\ +void ho_set_##NAME(struct handover_cfg *ho, TYPE value) \ +{ \ + ho->NAME = value; \ + ho->has_##NAME = true; \ +} \ +\ +bool ho_isset_##NAME(struct handover_cfg *ho) \ +{ \ + return ho->has_##NAME; \ +} \ +\ +void ho_clear_##NAME(struct handover_cfg *ho) \ +{ \ + ho->has_##NAME = false; \ +} + +HO_GETTER_SETTER_DEFS(bool, active, false) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg, 10) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxqual_avg, 1) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg_neigh, 10) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_interval, 6) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_hysteresis, 3) +HO_GETTER_SETTER_DEFS(unsigned int, max_distance, 9999) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..25940e7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -45,11 +45,21 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) + $(MAKE) vty-test osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-test U=-u +vty-test: + osmo_verify_transcript_vty.py -v \ + -n OsmoBSC -p 4242 \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + $(U) $(srcdir)/*.vty else python-tests: $(BUILT_SOURCES) echo "Not running python-based tests (determined at configure-time)" diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty new file mode 100644 index 0000000..9dacc36 --- /dev/null +++ b/tests/handover_cfg.vty @@ -0,0 +1,315 @@ +OsmoBSC> show network +... + Handover: Off +... +OsmoBSC> enable + +OsmoBSC# !--- No handover config present +OsmoBSC# show running-config +... +network + network country code 901 + mobile network code 70 + short name OsmoBSC + long name OsmoBSC + auth policy closed + authorized-regexp .* + location updating reject cause 13 + encryption a5 0 + authentication optional + neci 0 + paging any use tch 0 + rrlp mode none + mm info 1 + dyn_ts_allow_tch_f 1 + periodic location update 30 + bts 0 + type sysmobts + band DCS1800 + cell_identity 0 + location_area_code 23 + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + early-classmark-sending-3g allowed + ip.access unit_id 1800 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode automatic + codec-support fr + gprs mode none + no force-combined-si + trx 0 +... + +OsmoBSC# !--- Toggling handover on network level affects 'show network': +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On +... + +OsmoBSC(config-net)# !--- If network level default is 'on', bts level can still override to 'off': +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover 0 +OsmoBSC(config-net-bts)# do show network +... + Handover: Off +... +OsmoBSC(config-net-bts)# exit + +OsmoBSC(config-net)# !--- Create a *second* BTS that is not explicitly 'off': +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-net-bts)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... + +OsmoBSC(config-net-bts)# !--- Add arbitrary handover config item for bts 1: +OsmoBSC(config-net-bts)# handover power budget interval 23 +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# !--- HO is 'on' globally, bts 0 disables it, bts 1 tweaks a param: +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Set global default to 'off', now bts 1 also uses the global default of 'off': +OsmoBSC(config-net)# handover 0 +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 0 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove the global setting, i.e. use the factory default net level, with same effect: +OsmoBSC(config-net)# handover default +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Re-enable net-level handover, but bts 0 remains disabled explicitly +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove explicit setting of bts 0 to also use the global setting: +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover default +OsmoBSC(config-net-bts)# do show network +... + Handover: On +... +OsmoBSC(config-net-bts)# show running-config +... +network +... + handover 1 +... + bts 0 +... + bts 1 +... + handover power budget interval 23 +... + + +OsmoBSC(config-net-bts)# !--- Checking online help +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# list +... + handover (0|1|default) + handover window rxlev averaging (<1-10>|default) + handover window rxqual averaging (<1-10>|default) + handover window rxlev neighbor averaging (<1-10>|default) + handover power budget interval (<1-99>|default) + handover power budget hysteresis (<0-999>|default) + handover maximum distance (<0-9999>|default) +... + +OsmoBSC(config-net)# handover? + handover Handover options + +OsmoBSC(config-net)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node + + +OsmoBSC(config-net)# !--- Same on BTS level +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover? + handover Handover options + +OsmoBSC(config-net-bts)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net-bts)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net-bts)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net-bts)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:32:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:32:14 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: log error when using a conn that's in release In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: log error when using a conn that's in release ...................................................................... cosmetic: log error when using a conn that's in release If a conn is attempted to be used when in release, log an error, but don't skip tracking. No current code path apparently hits this, according to msc_vlr_tests. Just making sure that we will prominently see such errors when we introduce any. Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 --- M src/libmsc/osmo_msc.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index d55940d..2a868a8 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -349,7 +349,10 @@ OSMO_ASSERT(conn); if (conn->in_release) - return NULL; + LOGPSRC(DREF, LOGL_ERROR, file, line, + "%s: MSC conn use error: using conn that is already in release (%s)\n", + vlr_subscr_name(conn->vsub), + msc_subscr_conn_use_name(balance_token)); if (balance_token != MSC_CONN_USE_UNTRACKED) { uint32_t flag = 1 << balance_token; -- To view, visit https://gerrit.osmocom.org/4971 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8dd20ee56ce5ad7a90fcd03a06604c383e5eed54 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:32:15 +0000 Subject: [MERGED] osmo-msc[master]: subscr_conn: introduce usage tokens for ref error tracking In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: subscr_conn: introduce usage tokens for ref error tracking ...................................................................... subscr_conn: introduce usage tokens for ref error tracking When hunting a conn use count bug, it was very hard to figure out who's (not) using the conn. To ease tracking down this bug and future bugs, explicitly name what a conn is being reserved for, and track in a bit mask. Show in the DREF logs what uses and un-uses a conn. See the test expectation updates, which nicely show how that clarifies the state of the conn in the logs. On errors, log them, but don't fail hard: if one conn use/un-use fails, we don't want to crash the entire MSC before we have to. Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/osmo_msc.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_11.c M src/libmsc/osmo_msc.c M src/libmsc/silent_call.c M src/libmsc/subscr_conn.c M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 18 files changed, 850 insertions(+), 789 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/4972 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:32:15 +0000 Subject: [MERGED] osmo-msc[master]: add msc_vlr_test_call to reproduce a sanitizer error In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: add msc_vlr_test_call to reproduce a sanitizer error ...................................................................... add msc_vlr_test_call to reproduce a sanitizer error On MT call, there is a bug in CC conn use which leads to an early free and use-after-free. Add msc_vlr_test_call to show both MO and MT call legs separately and reproduce the failure. It is visible in a sanitizer build (on debian 9). A subsequent patch will fix the bug: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Related: OS#2672 Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 --- M tests/msc_vlr/Makefile.am A tests/msc_vlr/msc_vlr_test_call.c A tests/msc_vlr/msc_vlr_test_call.err A tests/msc_vlr/msc_vlr_test_call.ok M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/testsuite.at 7 files changed, 1,131 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 7fc9212..8bbe6cb 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,6 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=msc_call_assignment \ + -Wl,--wrap=msc_call_release \ $(NULL) LDADD = \ @@ -75,6 +77,8 @@ msc_vlr_test_ms_timeout.err \ msc_vlr_test_reject_concurrency.ok \ msc_vlr_test_reject_concurrency.err \ + msc_vlr_test_call.ok \ + msc_vlr_test_call.err \ msc_vlr_test_rest.ok \ msc_vlr_test_rest.err \ $(NULL) @@ -89,6 +93,7 @@ msc_vlr_test_hlr_timeout \ msc_vlr_test_ms_timeout \ msc_vlr_test_reject_concurrency \ + msc_vlr_test_call \ msc_vlr_test_rest \ $(NULL) @@ -137,6 +142,11 @@ msc_vlr_tests.c \ $(NULL) +msc_vlr_test_call_SOURCES = \ + msc_vlr_test_call.c \ + msc_vlr_tests.c \ + $(NULL) + msc_vlr_test_rest_SOURCES = \ msc_vlr_test_rest.c \ msc_vlr_tests.c \ @@ -153,4 +163,5 @@ $(builddir)/msc_vlr_test_hlr_timeout >$(srcdir)/msc_vlr_test_hlr_timeout.ok 2>$(srcdir)/msc_vlr_test_hlr_timeout.err $(builddir)/msc_vlr_test_ms_timeout >$(srcdir)/msc_vlr_test_ms_timeout.ok 2>$(srcdir)/msc_vlr_test_ms_timeout.err $(builddir)/msc_vlr_test_reject_concurrency >$(srcdir)/msc_vlr_test_reject_concurrency.ok 2>$(srcdir)/msc_vlr_test_reject_concurrency.err + $(builddir)/msc_vlr_test_call >$(srcdir)/msc_vlr_test_call.ok 2>$(srcdir)/msc_vlr_test_call.err $(builddir)/msc_vlr_test_rest >$(srcdir)/msc_vlr_test_rest.ok 2>$(srcdir)/msc_vlr_test_rest.err diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c new file mode 100644 index 0000000..cc120c8 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -0,0 +1,341 @@ +/* Osmocom MSC+VLR end-to-end tests */ + +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include "msc_vlr_tests.h" + +#include + +void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) +{ + mncc->msg_type = msg_type; + mncc_tx_to_cc(net, msg_type, mncc); +} + +#define IMSI "901700000010650" + +static void standard_lu() +{ + struct vlr_subscr *vsub; + + net->authentication_required = true; + net->vlr->cfg.assign_tmsi = true; + rx_from_ran = RAN_UTRAN_IU; + + btw("Location Update request causes a GSUP Send Auth Info request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("080108" "09710000000156f0"); + ms_sends_msg("0508" /* MM LU */ + "7" /* ciph key seq: no key available */ + "0" /* LU type: normal */ + "09f107" "0017" /* LAI, LAC */ + "57" /* classmark 1: R99, early classmark, no power lvl */ + "089910070000106005" /* IMSI */ + "3303575886" /* classmark 2 */ + ); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS"); + /* based on auc_3g: + * K = 'EB215756028D60E3275E613320AEC880', + * OPC = 'FB2A3D1B360F599ABAB99DB8669F8308' + * SQN = 0 + */ + auth_request_sent = false; + auth_request_expect_rand = "39fa2f4e3d523d8619a73b4f65c3e14d"; + auth_request_expect_autn = "8704f5ba55f30000d2ee44b22c8ea919"; + gsup_rx("0a" + /* imsi */ + "0108" "09710000000156f0" + /* 5 auth vectors... */ + /* TL TL rand */ + "0362" "2010" "39fa2f4e3d523d8619a73b4f65c3e14d" + /* TL sres TL kc */ + "2104" "9b36efdf" "2208" "059a4f668f6fbe39" + /* TL 3G IK */ + "2310" "27497388b6cb044648f396aa155b95ef" + /* TL 3G CK */ + "2410" "f64735036e5871319c679f4742a75ea1" + /* TL AUTN */ + "2510" "8704f5ba55f30000d2ee44b22c8ea919" + /* TL RES */ + "2708" "e229c19e791f2e41" + /* TL TL rand */ + "0362" "2010" "c187a53a5e6b9d573cac7c74451fd46d" + "2104" "85aa3130" "2208" "d3d50a000bf04f6e" + "2310" "1159ec926a50e98c034a6b7d7c9f418d" + "2410" "df3a03d9ca5335641efc8e36d76cd20b" + "2510" "1843a645b98d00005b2d666af46c45d9" + "2708" "7db47cf7f81e4dc7" + "0362" "2010" "efa9c29a9742148d5c9070348716e1bb" + "2104" "69d5f9fb" "2208" "3df176f0c29f1a3d" + "2310" "eb50e770ddcc3060101d2f43b6c2b884" + "2410" "76542abce5ff9345b0e8947f4c6e019c" + "2510" "f9375e6d41e1000096e7fe4ff1c27e39" + "2708" "706f996719ba609c" + "0362" "2010" "f023d5a3b24726e0631b64b3840f8253" + "2104" "d570c03f" "2208" "ec011be8919883d6" + "2310" "c4e58af4ba43f3bcd904e16984f086d7" + "2410" "0593f65e752e5cb7f473862bda05aa0a" + "2510" "541ff1f077270000c5ea00d658bc7e9a" + "2708" "3fd26072eaa2a04d" + "0362" "2010" "2f8f90c780d6a9c0c53da7ac57b6707e" + "2104" "b072446f220823f39f9f425ad6e6" + "2310" "65af0527fda95b0dc5ae4aa515cdf32f" + "2410" "537c3b35a3b13b08d08eeb28098f45cc" + "2510" "4bf4e564f75300009bc796706bc65744" + "2708" "0edb0eadbea94ac2", + NULL); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "e229c19e" "2104" "791f2e41"); + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR"); + gsup_expect_tx("04010809710000000156f0"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(gsup_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000000156f00804032443f2", + "12010809710000000156f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + gsup_rx("06010809710000000156f0", NULL); + + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + + btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); + EXPECT_CONN_COUNT(1); + EXPECT_ACCEPTED(false); + + btw("MS sends TMSI Realloc Complete"); + iu_release_expected = true; + iu_release_sent = false; + ms_sends_msg("055b"); + VERBOSE_ASSERT(iu_release_sent, == true, "%d"); \ + + btw("LU was successful, and the conn has already been closed"); + EXPECT_CONN_COUNT(0); + + vsub = vlr_subscr_find_by_imsi(net->vlr, IMSI); + VERBOSE_ASSERT(vsub != NULL, == true, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imsi, IMSI), == 0, "%d"); + VERBOSE_ASSERT(vsub->lac, == 23, "%u"); + vlr_subscr_put(vsub); +} + +void test_call_mo() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + cm_service_result_sent = RES_NONE; + ms_sends_msg("052478" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + OSMO_ASSERT(g_conn); + OSMO_ASSERT(g_conn->conn_fsm); + OSMO_ASSERT(g_conn->vsub); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("needs auth, not yet accepted"); + EXPECT_ACCEPTED(false); + + /* On UTRAN */ + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept"); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d"); + + BTW("a call is initiated"); + + btw("SETUP gets forwarded to MNCC"); + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND); + ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */ + "0406600402000581" /* Bearer Capability */ + "5e038121f3" /* Called Number BCD */ + "15020100" /* CC Capabilities */ + "4008" /* Supported Codec List */ + "04026000" /* UMTS: AMR 2 | AMR */ + "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */ + ); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + mncc.callref = cc_to_mncc_tx_got_callref; + + btw("MNCC says that's fine"); + dtap_expect_tx("8302" /* CC: Call Proceeding */); + mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + btw("The other call leg got established (not shown here), MNCC tells us so"); + dtap_expect_tx("8301" /* CC: Call Alerting */); + mncc_sends_to_cc(MNCC_ALERT_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + dtap_expect_tx("8307" /* CC: Connect */); + mncc_sends_to_cc(MNCC_SETUP_RSP, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_SETUP_COMPL_IND); + ms_sends_msg("03cf" /* CC: Connect Acknowledge */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("032502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("832d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("036a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +void test_call_mt() +{ + struct gsm_mncc mncc = { + .imsi = IMSI, + .callref = 0x423, + }; + + comment_start(); + + fake_time_start(); + + standard_lu(); + + BTW("after a while, MNCC asks us to setup a call, causing Paging"); + + paging_expect_imsi(IMSI); + paging_sent = false; + mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc); + + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("MS replies with Paging Response, and VLR sends Auth Request"); + auth_request_sent = false; + auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d"; + auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9"; + ms_sends_msg("062707" + "03575886" /* classmark 2 */ + "089910070000106005" /* IMSI */); + VERBOSE_ASSERT(auth_request_sent, == true, "%d"); + + btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); + cipher_mode_cmd_sent = false; + ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */ + VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d"); + + btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup"); + dtap_expect_tx("0305" /* CC: Setup */); + ms_sends_security_mode_complete(); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + cc_to_mncc_expect_tx(IMSI, MNCC_CALL_CONF_IND); + ms_sends_msg("8348" /* CC: Call Confirmed */ + "0406600402000581" /* Bearer Capability */ + "15020100" /* Call Control Capabilities */ + "40080402600400021f00" /* Supported Codec List */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx("", MNCC_ALERT_IND); + ms_sends_msg("8381" /* CC: Alerting */); + + fake_time_passes(1, 23); + + cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_CNF); + ms_sends_msg("83c7" /* CC: Connect */); + + dtap_expect_tx("030f" /* CC: Connect Acknowledge */); + mncc_sends_to_cc(MNCC_SETUP_COMPL_REQ, &mncc); + + BTW("RTP stream goes ahead, not shown here."); + fake_time_passes(123, 45); + + BTW("Call ends"); + cc_to_mncc_expect_tx("", MNCC_DISC_IND); + ms_sends_msg("832502e090" /* CC: Disconnect, cause: Normal Call Clearing */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + dtap_expect_tx("032d" /* CC: Release */); + mncc_sends_to_cc(MNCC_REL_REQ, &mncc); + OSMO_ASSERT(dtap_tx_confirmed); + + cc_to_mncc_expect_tx("", MNCC_REL_CNF); + expect_iu_release(); + ms_sends_msg("836a" /* CC: Release Complete */); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + OSMO_ASSERT(iu_release_sent); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + +msc_vlr_test_func_t msc_vlr_tests[] = { + test_call_mo, + test_call_mt, + NULL +}; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err new file mode 100644 index 0000000..6fd9288 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -0,0 +1,700 @@ +===== test_call_mo +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_CM_SERV_REQ + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24) +DMM <- CM SERVICE REQUEST serv_type=0x08 MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + cm_service_result_sent == 0 + auth_request_sent == 1 +- needs auth, not yet accepted +msc_subscr_conn_is_accepted() == false +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + cm_service_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_CM_SERVICE_REQ +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: received_cm_service_request = true +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: still awaiting first request after a CM Service Request + cm_service_result_sent == 0 +--- +- a call is initiated +- SETUP gets forwarded to MNCC + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_SETUP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DREF MSISDN:42342: MSC conn use + trans_cc == 3 (0xe) +DMM MSISDN:42342: rx msg GSM48_MT_CC_SETUP: received_cm_service_request changes to false +DCC Subscriber MSISDN:42342 (42342) sends SETUP to 123 +DMNCC transmit message MNCC_SETUP_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +- MNCC says that's fine +DMNCC receive message MNCC_CALL_PROC_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CALL_PROC: 8302 +- DTAP matches expected message + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x80000001 +- Total time passed: 1.000023 s +- The other call leg got established (not shown here), MNCC tells us so +DMNCC receive message MNCC_ALERT_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_ALERTING: 8301 +- DTAP matches expected message +DMNCC receive message MNCC_SETUP_RSP +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT: 8307 +- DTAP matches expected message +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT_ACK +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT_ACK (0x3:0xf) +DMNCC transmit message MNCC_SETUP_COMPL_IND + MSC --> MNCC: callref 0x80000001: MNCC_SETUP_COMPL_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x80000001: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 832d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x80000001: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mo: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +===== test_call_mt +- Total time passed: 0.000000 s +- Location Update request causes a GSUP Send Auth Info request to HLR + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000010650 type=NORMAL +DMM LU/new-LAC: 23/23 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: rev=R99 net=UTRAN Auth+Ciph +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000010650 id=901700000010650 +DVLR New subscr, IMSI: 901700000010650 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR GSUP tx: 08010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000000156f0 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DVLR GSUP rx 511: 0a010809710000000156f00362201039fa2f4e3d523d8619a73b4f65c3e14d21049b36efdf2208059a4f668f6fbe39231027497388b6cb044648f396aa155b95ef2410f64735036e5871319c679f4742a75ea125108704f5ba55f30000d2ee44b22c8ea9192708e229c19e791f2e4103622010c187a53a5e6b9d573cac7c74451fd46d210485aa31302208d3d50a000bf04f6e23101159ec926a50e98c034a6b7d7c9f418d2410df3a03d9ca5335641efc8e36d76cd20b25101843a645b98d00005b2d666af46c45d927087db47cf7f81e4dc703622010efa9c29a9742148d5c9070348716e1bb210469d5f9fb22083df176f0c29f1a3d2310eb50e770ddcc3060101d2f43b6c2b884241076542abce5ff9345b0e8947f4c6e019c2510f9375e6d41e1000096e7fe4ff1c27e392708706f996719ba609c03622010f023d5a3b24726e0631b64b3840f82532104d570c03f2208ec011be8919883d62310c4e58af4ba43f3bcd904e16984f086d724100593f65e752e5cb7f473862bda05aa0a2510541ff1f077270000c5ea00d658bc7e9a27083fd26072eaa2a04d036220102f8f90c780d6a9c0c53da7ac57b6707e2104b072446f220823f39f9f425ad6e6231065af0527fda95b0dc5ae4aa515cdf32f2410537c3b35a3b13b08d08eeb28098f45cc25104bf4e564f75300009bc796706bc6574427080edb0eadbea94ac2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK +DVLR SUBSCR(IMSI:901700000010650) Received 5 auth tuples +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 +- sending UMTS Auth Request for IMSI:901700000010650: tuple use_count=1 key_seq=0 auth_types=0x3 and... +- ...rand=39fa2f4e3d523d8619a73b4f65c3e14d +- ...autn=8704f5ba55f30000d2ee44b22c8ea919 +- ...expecting res=e229c19e791f2e41 +DREF VLR subscr IMSI:901700000010650 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0 + auth_request_sent == 1 + lu_result_sent == 0 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF IMSI:901700000010650: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM IMSI:901700000010650: MM R99 AUTHENTICATION RESPONSE (res = e229c19e791f2e41) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 +DVLR SUBSCR(IMSI:901700000010650) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +- sending SecurityModeControl for IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH +DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000010650: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 + lu_result_sent == 0 +- MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR +DMM <- SECURITY MODE COMPLETE IMSI:901700000010650 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() +DIUCS IMSI:901700000010650: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000156f0 +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA + gsup_tx_confirmed == 1 + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000156f00804032443f2 +DVLR GSUP rx 17: 10010809710000000156f00804032443f2 +DREF VLR subscr IMSI:901700000010650 usage increases to: 2 +DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR GSUP tx: 12010809710000000156f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000156f0 +DVLR GSUP rx 11: 06010809710000000156f0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000010650){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000010650) +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000010650){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +- sending LU Accept for MSISDN:42342, with TMSI 0x03020100 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 1 +- a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl + llist_count(&net->subscr_conns) == 1 +msc_subscr_conn_is_accepted() == false +- MS sends TMSI Realloc Complete + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_TMSI_REALL_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_TMSI_REALL_COMPL (0x5:0x1b) +DMM TMSI Reallocation Completed. Subscriber: MSISDN:42342 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_NEW_TMSI_ACK +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: Received Event LU_COMPL_VLR_E_NEW_TMSI_ACK +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_WAIT_TMSI_CNF}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000010650) +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000010650){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 + iu_release_sent == 1 +- LU was successful, and the conn has already been closed + llist_count(&net->subscr_conns) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 2 + vsub != NULL == 1 + strcmp(vsub->imsi, IMSI) == 0 + vsub->lac == 23 +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +--- +- after a while, MNCC asks us to setup a call, causing Paging +DMNCC receive message MNCC_SETUP_REQ +DREF VLR subscr MSISDN:42342 usage increases to: 2 +DREF VLR subscr MSISDN:42342 usage increases to: 3 +DMM Subscriber MSISDN:42342 not paged yet, start paging. + RAN_UTRAN_IU sends out paging request to IMSI 901700000010650, TMSI 0x03020100, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- MS replies with Paging Response, and VLR sends Auth Request + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_RR_PAG_RESP + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_RR_PAG_RESP (0x6:0x27) +DRR PAGING RESPONSE: MI(IMSI)=901700000010650 +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Allocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: is child of Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: rev=R99 net=UTRAN Auth+Ciph +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START +DREF VLR subscr MSISDN:42342 usage increases to: 4 +DREF VLR subscr MSISDN:42342 usage increases to: 5 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Allocated +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 +- sending UMTS Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x3 and... +- ...rand=c187a53a5e6b9d573cac7c74451fd46d +- ...autn=1843a645b98d00005b2d666af46c45d9 +- ...expecting res=7db47cf7f81e4dc7 +DREF VLR subscr MSISDN:42342 usage decreases to: 4 +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - compl_l3 == 1 (0x4) + auth_request_sent == 1 +- MS sends Authen Response, VLR accepts and sends SecurityModeControl + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_AUTH_RESP +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14) +DMM MSISDN:42342: MM R99 AUTHENTICATION RESPONSE (res = 7db47cf7f81e4dc7) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP +DVLR SUBSCR(MSISDN:42342) received res: 7d b4 7c f7 f8 1e 4d c7 +DVLR SUBSCR(MSISDN:42342) AUTH established UMTS security context +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_PASSED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(901700000010650) +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Freeing instance +DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +- sending SecurityModeControl for MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH +DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) + cipher_mode_cmd_sent == 1 +- MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup +DMM <- SECURITY MODE COMPLETE MSISDN:42342 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph() +DIUCS MSISDN:42342: tx CommonID 901700000010650 +- Iu Common ID --RAN_UTRAN_IU--> MS (IMSI=901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(VLR_PR_ARQ_RES_PASSED) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Process Access Request result: VLR_PR_ARQ_RES_PASSED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_PAGING_RESP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DPAG Paging success for MSISDN:42342 (event=0) +DPAG Calling paging cbfn. +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 +- DTAP matches expected message +DREF VLR subscr MSISDN:42342 usage decreases to: 3 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC + paging_stopped == 1 + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) + MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 +DMNCC transmit message MNCC_CALL_CONF_IND + MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 1.000023 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) +DMNCC transmit message MNCC_ALERT_IND + MSC --> MNCC: callref 0x423: MNCC_ALERT_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +- Total time passed: 2.000046 s + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) +DMNCC transmit message MNCC_SETUP_CNF + MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_SETUP_COMPL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f +- DTAP matches expected message +--- +- RTP stream goes ahead, not shown here. +- Total time passed: 125.000091 s +--- +- Call ends + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) +DMNCC transmit message MNCC_DISC_IND + MSC --> MNCC: callref 0x423: MNCC_DISC_IND +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC +DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DMNCC receive message MNCC_REL_REQ +DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU +- DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d +- DTAP matches expected message + MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL +DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) +DMNCC transmit message MNCC_REL_CNF + MSC --> MNCC: callref 0x423: MNCC_REL_CNF + MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 +DREF VLR subscr MSISDN:42342 usage decreases to: 2 +DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc +DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(901700000010650) +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Freeing instance +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. +- Iu Release --RAN_UTRAN_IU--> MS +DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF unknown: MSC conn use - dtap failed: is already 0 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:42342 +===== test_call_mt: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + diff --git a/tests/msc_vlr/msc_vlr_test_call.ok b/tests/msc_vlr/msc_vlr_test_call.ok new file mode 100644 index 0000000..a965a70 --- /dev/null +++ b/tests/msc_vlr/msc_vlr_test_call.ok @@ -0,0 +1 @@ +Done diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 550c5d8..dd7196c 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -34,6 +34,7 @@ #include #include #include +#include #if BUILD_IU #include @@ -68,6 +69,11 @@ bool iu_release_sent = false; bool bssap_clear_expected = false; bool bssap_clear_sent = false; + +uint32_t cc_to_mncc_tx_expected_msg_type = 0; +const char *cc_to_mncc_tx_expected_imsi = NULL; +bool cc_to_mncc_tx_confirmed = false; +uint32_t cc_to_mncc_tx_got_callref = 0; struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex) { @@ -377,7 +383,7 @@ [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .enabled = 1, .loglevel = LOGL_NOTICE, + .enabled = 1, .loglevel = LOGL_INFO, }, [DMM] = { .name = "DMM", @@ -404,6 +410,11 @@ .description = "Iu-CS Protocol", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DMNCC] = { + .name = "DMNCC", + .description = "MNCC API for Call Control application", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; static struct log_info info = { @@ -413,9 +424,31 @@ extern void *tall_bsc_ctx; -int fake_mncc_recv(struct gsm_network *net, struct msgb *msg) +int mncc_recv(struct gsm_network *net, struct msgb *msg) { - fprintf(stderr, "rx MNCC\n"); + struct gsm_mncc *mncc = (void*)msg->data; + log("MSC --> MNCC: callref 0x%x: %s", mncc->callref, + get_mncc_name(mncc->msg_type)); + + OSMO_ASSERT(cc_to_mncc_tx_expected_msg_type); + if (cc_to_mncc_tx_expected_msg_type != mncc->msg_type) { + log("Mismatch! Expected MNCC msg type: %s", + get_mncc_name(cc_to_mncc_tx_expected_msg_type)); + abort(); + } + + if (strcmp(cc_to_mncc_tx_expected_imsi, mncc->imsi)) { + log("Mismatch! Expected MNCC msg IMSI: '%s', got '%s'", + cc_to_mncc_tx_expected_imsi, + mncc->imsi); + abort(); + } + + cc_to_mncc_tx_confirmed = true; + cc_to_mncc_tx_got_callref = mncc->callref; + cc_to_mncc_tx_expected_imsi = NULL; + cc_to_mncc_tx_expected_msg_type = 0; + talloc_free(msg); return 0; } @@ -521,6 +554,23 @@ bssap_clear_expected = false; bssap_clear_sent = true; return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_assignment' */ +int __real_msc_call_assignment(struct gsm_trans *trans); +int __wrap_msc_call_assignment(struct gsm_trans *trans) +{ + log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); + return 0; +} + +/* override, requires '-Wl,--wrap=msc_call_release' */ +void __real_msc_call_release(struct gsm_trans *trans); +void __wrap_msc_call_release(struct gsm_trans *trans) +{ + log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", + vlr_subscr_name(trans->vsub), trans->callref); } static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi) @@ -774,7 +824,7 @@ log_set_print_filename(osmo_stderr_target, _log_lines? 1 : 0); log_set_print_category(osmo_stderr_target, 1); - net = gsm_network_init(tall_bsc_ctx, 1, 1, fake_mncc_recv); + net = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server"); net->gsup_server_port = 0; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 1cd3914..ee26ac4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -29,6 +29,7 @@ #include #include #include +#include extern bool _log_lines; #define _log(fmt, args...) do { \ @@ -83,6 +84,11 @@ extern bool iu_release_sent; extern bool bssap_clear_expected; extern bool bssap_clear_sent; + +extern uint32_t cc_to_mncc_tx_expected_msg_type; +extern const char *cc_to_mncc_tx_expected_imsi; +extern bool cc_to_mncc_tx_confirmed; +extern uint32_t cc_to_mncc_tx_got_callref; static inline void expect_iu_release() { @@ -169,6 +175,17 @@ gsup_tx_confirmed = false; \ } while (0) +#define cc_to_mncc_expect_tx(imsi, msg_type) do \ +{ \ + if (cc_to_mncc_tx_expected_msg_type) { \ + log("Previous expected MNCC tx was not confirmed!"); \ + OSMO_ASSERT(!cc_to_mncc_tx_expected_msg_type); \ + } \ + cc_to_mncc_tx_expected_imsi = imsi; \ + cc_to_mncc_tx_expected_msg_type = msg_type; \ + cc_to_mncc_tx_confirmed = false; \ +} while (0) + void fake_time_start(); /* as macro to get the test file's source line number */ diff --git a/tests/testsuite.at b/tests/testsuite.at index f0147e7..5307899 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -79,6 +79,13 @@ AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_reject_concurrency], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([msc_vlr_test_call]) +AT_KEYWORDS([msc_vlr_test_call]) +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.ok > expout +cat $abs_srcdir/msc_vlr/msc_vlr_test_call.err > experr +AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_call], [], [expout], [experr]) +AT_CLEANUP + AT_SETUP([msc_vlr_test_rest]) AT_KEYWORDS([msc_vlr_test_rest]) cat $abs_srcdir/msc_vlr/msc_vlr_test_rest.ok > expout -- To view, visit https://gerrit.osmocom.org/4973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c3ca0c660388b1e2c82df17ec540c846201b0c7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 01:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 01:32:15 +0000 Subject: [MERGED] osmo-msc[master]: fix use after free: missing conn_get on CC paging response In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix use after free: missing conn_get on CC paging response ...................................................................... fix use after free: missing conn_get on CC paging response Adjust test expectations accordingly. The error was: ==16084==ERROR: AddressSanitizer: heap-use-after-free on address 0x61500000f5f4 at pc 0x561be639ac2b bp 0x7ffc0aabbe40 sp 0x7ffc0aabbe38 READ of size 4 at 0x61500000f5f4 thread T0 #0 0x561be639ac2a in _msc_subscr_conn_put ../../../../src/osmo-msc/src/libmsc/osmo_msc.c:384 #1 0x561be636070b in rx_from_ms ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:204 #2 0x561be6360b21 in ms_sends_msg ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:217 #3 0x561be635b40a in test_call_mt ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_test_call.c:328 #4 0x561be6363bb7 in run_tests ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:802 #5 0x561be63524ea in main ../../../../src/osmo-msc/tests/msc_vlr/msc_vlr_tests.c:849 #6 0x7f6eebb3e2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #7 0x561be6352fb9 in _start (/n/s/osmo/make-3G/osmo-msc/tests/msc_vlr/msc_vlr_test_call+0xdafb9) Related: OS#2672 Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 --- M src/libmsc/gsm_04_08.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 16 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index e783b5e..d71b48b 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -1359,7 +1359,7 @@ vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = conn; + transt->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); break; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 6fd9288..5ffab4a 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -602,6 +602,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED DPAG Paging success for MSISDN:42342 (event=0) DPAG Calling paging cbfn. +DREF MSISDN:42342: MSC conn use + trans_cc == 2 (0xc) DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_SETUP: 0305 - DTAP matches expected message @@ -610,7 +611,7 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: bump: connection still has active transaction: GSM48_PDISC_CC paging_stopped == 1 MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CALL_CONF -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CALL_CONF (0x3:0x8) MS <--Call Assignment-- MSC: subscr=MSISDN:42342 callref=0x423 DMNCC transmit message MNCC_CALL_CONF_IND @@ -619,27 +620,27 @@ DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 1.000023 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_ALERTING -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_ALERTING (0x3:0x1) DMNCC transmit message MNCC_ALERT_IND MSC --> MNCC: callref 0x423: MNCC_ALERT_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) - Total time passed: 2.000046 s MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_CONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_CONNECT (0x3:0x7) DMNCC transmit message MNCC_SETUP_CNF MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_SETUP_COMPL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_CONNECT_ACK: 030f @@ -650,27 +651,26 @@ --- - Call ends MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_DISCONNECT -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_DISCONNECT (0x3:0x25) DMNCC transmit message MNCC_DISC_IND MSC --> MNCC: callref 0x423: MNCC_DISC_IND DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: connection still has active transaction: GSM48_PDISC_CC -DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4) +DREF MSISDN:42342: MSC conn use - dtap == 2 (0xc) DMNCC receive message MNCC_REL_REQ DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_UTRAN_IU - DTAP --RAN_UTRAN_IU--> MS: GSM48_MT_CC_RELEASE: 032d - DTAP matches expected message MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_CC_RELEASE_COMPL -DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6) +DREF MSISDN:42342: MSC conn use + dtap == 3 (0xe) DRLL Dispatching 04.08 message GSM48_MT_CC_RELEASE_COMPL (0x3:0x2a) DMNCC transmit message MNCC_REL_CNF MSC --> MNCC: callref 0x423: MNCC_REL_CNF MS <--Call Release-- MSC: subscr=MSISDN:42342 callref=0x0 DREF VLR subscr MSISDN:42342 usage decreases to: 2 -DREF MSISDN:42342: MSC conn use error: freeing an unused token: trans_cc -DREF MSISDN:42342: MSC conn use - trans_cc == 1 (0x6) +DREF MSISDN:42342: MSC conn use - trans_cc == 2 (0x6) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_BUMP DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing conn @@ -682,12 +682,12 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_DONE}: Deallocated DMM msc_subscr_conn_close(vsub=MSISDN:42342, cause=2): no conn fsm, releasing directly without release event. - Iu Release --RAN_UTRAN_IU--> MS -DREF MSISDN:42342: MSC conn use - fsm == 0 (0x2) -DRLL subscr MSISDN:42342: Freeing subscriber connection -DREF VLR subscr MSISDN:42342 usage decreases to: 1 +DREF MSISDN:42342: MSC conn use - fsm == 1 (0x2) DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Freeing instance DMM Subscr_Conn(901700000010650){SUBSCR_CONN_S_RELEASED}: Deallocated -DREF unknown: MSC conn use - dtap failed: is already 0 +DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0) +DRLL subscr MSISDN:42342: Freeing subscriber connection +DREF VLR subscr MSISDN:42342 usage decreases to: 1 llist_count(&net->subscr_conns) == 0 DREF freeing VLR subscr MSISDN:42342 ===== test_call_mt: SUCCESS -- To view, visit https://gerrit.osmocom.org/4974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0659a878deb383ed0300217e2c41c8c79b2b6a5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:05 +0000 Subject: [PATCH] osmo-ci[master]: contrib/jenkins.sh: update from current jenkins job update-o... Message-ID: Review at https://gerrit.osmocom.org/5051 contrib/jenkins.sh: update from current jenkins job update-osmo-ci-on-slaves We're not calling this script on the update-osmo-ci-on-slaves job yet. To move over to calling this script, apply some edits we made on the jenkins UI in the meantime. Change-Id: I54d3f56a89934c1c7b0e445b5c447c91bf94d579 --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/51/5051/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eb079a2..3bc49f9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,12 +1,16 @@ #!/bin/sh +set -e -x -set -e - -cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd osmo-ci) +cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd ~/osmo-ci) git rev-parse HEAD git status -git fetch && git checkout -f -B master origin/master +git pull origin git rev-parse HEAD git status + +if [ `uname` = "Linux" ]; then + cd docker + ./rebuild_osmocom_jenkins_image.sh +fi -- To view, visit https://gerrit.osmocom.org/5051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54d3f56a89934c1c7b0e445b5c447c91bf94d579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:05 +0000 Subject: [PATCH] osmo-ci[master]: jobs: add update-osmo-ci-on-slaves.yml Message-ID: Review at https://gerrit.osmocom.org/5052 jobs: add update-osmo-ci-on-slaves.yml Change-Id: Ia933288f87f53f832732f650ba4be30d58faea7f --- A jobs/update-osmo-ci-on-slaves.yml 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/52/5052/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml new file mode 100644 index 0000000..ca284e1 --- /dev/null +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -0,0 +1,23 @@ +- job: + name: update-osmo-ci-on-slaves + project-type: matrix + axes: + - axis: + type: slave + name: label + values: [ OsmocomBuild1 , build1-debian9-lxc , build2-deb8build ] + build-discarder: + daysToKeep: 30 + numToKeep: 120 + scm: + - git: + url: git://git.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins at osmocom.org' + skip-tag: true + builders: + - shell: './contrib/jenkins.sh' + description: | + Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia933288f87f53f832732f650ba4be30d58faea7f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:06 +0000 Subject: [PATCH] osmo-ci[master]: jobs: update-osmo-ci-on-slaves: remove build2-deb8build Message-ID: Review at https://gerrit.osmocom.org/5053 jobs: update-osmo-ci-on-slaves: remove build2-deb8build The node is offline and has been for a long time. The last osmo-ci-on-slaves job ran for a week waiting for it to come back online. Change-Id: I5a315d1ce3d7d5763ba07bf29f9cdd5d6f7c6491 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/53/5053/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index ca284e1..0ec665e 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -5,7 +5,7 @@ - axis: type: slave name: label - values: [ OsmocomBuild1 , build1-debian9-lxc , build2-deb8build ] + values: [ OsmocomBuild1 , build1-debian9-lxc ] build-discarder: daysToKeep: 30 numToKeep: 120 -- To view, visit https://gerrit.osmocom.org/5053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a315d1ce3d7d5763ba07bf29f9cdd5d6f7c6491 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:25 +0000 Subject: [PATCH] osmo-ci[master]: jenkins docker: also install py3 scripts of osmo-python-tests Message-ID: Review at https://gerrit.osmocom.org/5054 jenkins docker: also install py3 scripts of osmo-python-tests Allow using the osmo_verify_transcript_{ctrl,vty}.py scripts from the docker image. Change-Id: I27d02d516c1cccd5a2447ee8d76ae476d0951d56 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/54/5054/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 8f33233..5ecf6de 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -37,7 +37,7 @@ # and all RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client -RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install # 2017-03-06 +RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install RUN echo "#!/bin/sh \n\ -- To view, visit https://gerrit.osmocom.org/5054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27d02d516c1cccd5a2447ee8d76ae476d0951d56 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:25 +0000 Subject: [PATCH] osmo-ci[master]: jenkins docker: drop hardcoded osmo-deps.sh Message-ID: Review at https://gerrit.osmocom.org/5055 jenkins docker: drop hardcoded osmo-deps.sh The jenkins invocation of the docker image commonly includes the osmo-ci scripts via binding ~/bin to an up-to-date checkout. We don't need another version of osmo-deps.sh in /usr/local/bin. Change-Id: I5ce9ab992afa3c5a7a0bb13b55cae016bc8e805f --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/55/5055/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 5ecf6de..5481a50 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -40,19 +40,6 @@ RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install -RUN echo "#!/bin/sh \n\ - \n\ -if ! test -d \$1; \n\ -then \n\ - git clone git://git.osmocom.org/\$1 \$1 \n\ -fi \n\ -\n\ -cd \$1 \n\ -git fetch origin \n\ -git reset --hard origin/master" > /usr/local/bin/osmo-deps.sh -RUN chmod +x /usr/local/bin/osmo-deps.sh - - RUN git clone http://git.savannah.gnu.org/r/smalltalk.git RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev RUN cd smalltalk && autoreconf --install --force && ./configure && make install -- To view, visit https://gerrit.osmocom.org/5055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ce9ab992afa3c5a7a0bb13b55cae016bc8e805f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:17:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:17:26 +0000 Subject: [PATCH] osmo-ci[master]: jenkins docker: remove smalltalk things Message-ID: Review at https://gerrit.osmocom.org/5056 jenkins docker: remove smalltalk things I am personally not aware of any smalltalk related builds that might be using our jenkins docker image. Let's remove this and see what falls on its face, presumably nothing. Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 0 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/56/5056/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 5481a50..8d97bce 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -38,19 +38,3 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install - - -RUN git clone http://git.savannah.gnu.org/r/smalltalk.git -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev -RUN cd smalltalk && autoreconf --install --force && ./configure && make install -RUN rm -rf smalltalk -RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package package.xml -RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --test package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/fakebts && gst-package --test package.xml -RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-gsm osmo-st-openbsc-test -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip -RUN pip install timeout_decorator -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:18:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:18:59 +0000 Subject: osmo-ci[master]: contrib/jenkins.sh: update from current jenkins job update-o... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54d3f56a89934c1c7b0e445b5c447c91bf94d579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:19:04 +0000 Subject: osmo-ci[master]: jobs: add update-osmo-ci-on-slaves.yml In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia933288f87f53f832732f650ba4be30d58faea7f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:19:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:19:12 +0000 Subject: osmo-ci[master]: jobs: update-osmo-ci-on-slaves: remove build2-deb8build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a315d1ce3d7d5763ba07bf29f9cdd5d6f7c6491 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:19:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:19:15 +0000 Subject: [MERGED] osmo-ci[master]: jobs: update-osmo-ci-on-slaves: remove build2-deb8build In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: update-osmo-ci-on-slaves: remove build2-deb8build ...................................................................... jobs: update-osmo-ci-on-slaves: remove build2-deb8build The node is offline and has been for a long time. The last osmo-ci-on-slaves job ran for a week waiting for it to come back online. Change-Id: I5a315d1ce3d7d5763ba07bf29f9cdd5d6f7c6491 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index ca284e1..0ec665e 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -5,7 +5,7 @@ - axis: type: slave name: label - values: [ OsmocomBuild1 , build1-debian9-lxc , build2-deb8build ] + values: [ OsmocomBuild1 , build1-debian9-lxc ] build-discarder: daysToKeep: 30 numToKeep: 120 -- To view, visit https://gerrit.osmocom.org/5053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a315d1ce3d7d5763ba07bf29f9cdd5d6f7c6491 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:19:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:19:15 +0000 Subject: [MERGED] osmo-ci[master]: jobs: add update-osmo-ci-on-slaves.yml In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: add update-osmo-ci-on-slaves.yml ...................................................................... jobs: add update-osmo-ci-on-slaves.yml Change-Id: Ia933288f87f53f832732f650ba4be30d58faea7f --- A jobs/update-osmo-ci-on-slaves.yml 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml new file mode 100644 index 0000000..ca284e1 --- /dev/null +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -0,0 +1,23 @@ +- job: + name: update-osmo-ci-on-slaves + project-type: matrix + axes: + - axis: + type: slave + name: label + values: [ OsmocomBuild1 , build1-debian9-lxc , build2-deb8build ] + build-discarder: + daysToKeep: 30 + numToKeep: 120 + scm: + - git: + url: git://git.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins at osmocom.org' + skip-tag: true + builders: + - shell: './contrib/jenkins.sh' + description: | + Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia933288f87f53f832732f650ba4be30d58faea7f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:19:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:19:16 +0000 Subject: [MERGED] osmo-ci[master]: contrib/jenkins.sh: update from current jenkins job update-o... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: contrib/jenkins.sh: update from current jenkins job update-osmo-ci-on-slaves ...................................................................... contrib/jenkins.sh: update from current jenkins job update-osmo-ci-on-slaves We're not calling this script on the update-osmo-ci-on-slaves job yet. To move over to calling this script, apply some edits we made on the jenkins UI in the meantime. Change-Id: I54d3f56a89934c1c7b0e445b5c447c91bf94d579 --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eb079a2..3bc49f9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,12 +1,16 @@ #!/bin/sh +set -e -x -set -e - -cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd osmo-ci) +cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd ~/osmo-ci) git rev-parse HEAD git status -git fetch && git checkout -f -B master origin/master +git pull origin git rev-parse HEAD git status + +if [ `uname` = "Linux" ]; then + cd docker + ./rebuild_osmocom_jenkins_image.sh +fi -- To view, visit https://gerrit.osmocom.org/5051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54d3f56a89934c1c7b0e445b5c447c91bf94d579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:32:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:32:59 +0000 Subject: [PATCH] osmo-ci[master]: jobs: describe how to install jenkins-jobs on deb 9 Message-ID: Review at https://gerrit.osmocom.org/5057 jobs: describe how to install jenkins-jobs on deb 9 Change-Id: Id3a0684e567ae26ca8158fda56898eb683374d09 --- M jobs/README.adoc 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/57/5057/1 diff --git a/jobs/README.adoc b/jobs/README.adoc index d526771..6532825 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -5,6 +5,8 @@ Install jenkins-job-builder: +For debian 9, see troubleshooting below. Otherwise: + apt-get install jenkins-job-builder Have a jenkins-job-builder.ini file. Convenient is to place a system wide one, @@ -68,3 +70,21 @@ individual job names. Also be aware that jobs are only actually updated when anything changed. + +- debian 9 + +For jenkins-job-builder to work on debian 9: + +add 'testing' to /etc/apt/sources.list like + + deb http://ftp.de.debian.org/debian/ testing main + +then + + sudo apt-get update + sudo apt-get -t testing install python-jenkins + sudo apt-get install jenkins-job-builder + +and make sure to *not* pick the python3 versions +(or you'll need to add catching of HTTPError to jenkins/__init__.py in +'def maybe_add_crumb') -- To view, visit https://gerrit.osmocom.org/5057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3a0684e567ae26ca8158fda56898eb683374d09 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:43:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:43:56 +0000 Subject: [PATCH] osmo-ci[master]: contrib/jenkins.sh: rather git checkout -f instead of pull Message-ID: Review at https://gerrit.osmocom.org/5058 contrib/jenkins.sh: rather git checkout -f instead of pull Change-Id: Idc672879dcb3d38978e27b90c173f0aa950c4eb1 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/58/5058/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3bc49f9..b161230 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ git rev-parse HEAD git status -git pull origin +git fetch && git checkout -f -B master origin/master git rev-parse HEAD git status -- To view, visit https://gerrit.osmocom.org/5058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc672879dcb3d38978e27b90c173f0aa950c4eb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:44:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:44:33 +0000 Subject: osmo-ci[master]: jenkins docker: drop hardcoded osmo-deps.sh In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ce9ab992afa3c5a7a0bb13b55cae016bc8e805f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:44:39 +0000 Subject: osmo-ci[master]: jenkins docker: also install py3 scripts of osmo-python-tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27d02d516c1cccd5a2447ee8d76ae476d0951d56 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:44:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:44:43 +0000 Subject: [MERGED] osmo-ci[master]: jenkins docker: also install py3 scripts of osmo-python-tests In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins docker: also install py3 scripts of osmo-python-tests ...................................................................... jenkins docker: also install py3 scripts of osmo-python-tests Allow using the osmo_verify_transcript_{ctrl,vty}.py scripts from the docker image. Change-Id: I27d02d516c1cccd5a2447ee8d76ae476d0951d56 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 8f33233..5ecf6de 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -37,7 +37,7 @@ # and all RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client -RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install # 2017-03-06 +RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install RUN echo "#!/bin/sh \n\ -- To view, visit https://gerrit.osmocom.org/5054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27d02d516c1cccd5a2447ee8d76ae476d0951d56 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:44:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:44:44 +0000 Subject: [MERGED] osmo-ci[master]: jenkins docker: drop hardcoded osmo-deps.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins docker: drop hardcoded osmo-deps.sh ...................................................................... jenkins docker: drop hardcoded osmo-deps.sh The jenkins invocation of the docker image commonly includes the osmo-ci scripts via binding ~/bin to an up-to-date checkout. We don't need another version of osmo-deps.sh in /usr/local/bin. Change-Id: I5ce9ab992afa3c5a7a0bb13b55cae016bc8e805f --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 5ecf6de..5481a50 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -40,19 +40,6 @@ RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install -RUN echo "#!/bin/sh \n\ - \n\ -if ! test -d \$1; \n\ -then \n\ - git clone git://git.osmocom.org/\$1 \$1 \n\ -fi \n\ -\n\ -cd \$1 \n\ -git fetch origin \n\ -git reset --hard origin/master" > /usr/local/bin/osmo-deps.sh -RUN chmod +x /usr/local/bin/osmo-deps.sh - - RUN git clone http://git.savannah.gnu.org/r/smalltalk.git RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev RUN cd smalltalk && autoreconf --install --force && ./configure && make install -- To view, visit https://gerrit.osmocom.org/5055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ce9ab992afa3c5a7a0bb13b55cae016bc8e805f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:45:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:45:00 +0000 Subject: osmo-ci[master]: contrib/jenkins.sh: rather git checkout -f instead of pull In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc672879dcb3d38978e27b90c173f0aa950c4eb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:45:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:45:02 +0000 Subject: [MERGED] osmo-ci[master]: contrib/jenkins.sh: rather git checkout -f instead of pull In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: contrib/jenkins.sh: rather git checkout -f instead of pull ...................................................................... contrib/jenkins.sh: rather git checkout -f instead of pull Change-Id: Idc672879dcb3d38978e27b90c173f0aa950c4eb1 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3bc49f9..b161230 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ git rev-parse HEAD git status -git pull origin +git fetch && git checkout -f -B master origin/master git rev-parse HEAD git status -- To view, visit https://gerrit.osmocom.org/5058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc672879dcb3d38978e27b90c173f0aa950c4eb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:45:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:45:06 +0000 Subject: osmo-ci[master]: jobs: describe how to install jenkins-jobs on deb 9 In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id3a0684e567ae26ca8158fda56898eb683374d09 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 04:45:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 04:45:08 +0000 Subject: [MERGED] osmo-ci[master]: jobs: describe how to install jenkins-jobs on deb 9 In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: describe how to install jenkins-jobs on deb 9 ...................................................................... jobs: describe how to install jenkins-jobs on deb 9 Change-Id: Id3a0684e567ae26ca8158fda56898eb683374d09 --- M jobs/README.adoc 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/README.adoc b/jobs/README.adoc index d526771..6532825 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -5,6 +5,8 @@ Install jenkins-job-builder: +For debian 9, see troubleshooting below. Otherwise: + apt-get install jenkins-job-builder Have a jenkins-job-builder.ini file. Convenient is to place a system wide one, @@ -68,3 +70,21 @@ individual job names. Also be aware that jobs are only actually updated when anything changed. + +- debian 9 + +For jenkins-job-builder to work on debian 9: + +add 'testing' to /etc/apt/sources.list like + + deb http://ftp.de.debian.org/debian/ testing main + +then + + sudo apt-get update + sudo apt-get -t testing install python-jenkins + sudo apt-get install jenkins-job-builder + +and make sure to *not* pick the python3 versions +(or you'll need to add catching of HTTPError to jenkins/__init__.py in +'def maybe_add_crumb') -- To view, visit https://gerrit.osmocom.org/5057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3a0684e567ae26ca8158fda56898eb683374d09 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 05:35:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 28 Nov 2017 05:35:07 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5050 to look at the new patch set (#2). HO prep: introduce per-BTS handover config, with defaults on net node It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. Though the ho_cfg value getter/setter function definitions are made by a macro, the declarations in handover_cfg.h are written out in full for better API readability. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h A include/osmocom/bsc/handover_cfg.h A include/osmocom/bsc/handover_vty.h M src/libbsc/Makefile.am M src/libbsc/bsc_vty.c M src/libbsc/handover_decision.c A src/libbsc/handover_vty.c M src/libbsc/net_init.c M src/libcommon/Makefile.am M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c A src/libcommon/handover_cfg.c M tests/Makefile.am A tests/handover_cfg.vty 16 files changed, 658 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/5050/2 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..614f633 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -28,7 +28,9 @@ gsm_data_shared.h \ gsm_subscriber.h \ handover.h \ + handover_cfg.h \ handover_decision.h \ + handover_vty.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 75109e3..b33400b 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -376,22 +376,7 @@ bool authentication_required; int neci; int send_mm_info; - struct { - int active; - /* Window RXLEV averaging */ - unsigned int win_rxlev_avg; /* number of SACCH frames */ - /* Window RXQUAL averaging */ - unsigned int win_rxqual_avg; /* number of SACCH frames */ - /* Window RXLEV neighbouring cells averaging */ - unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */ - - /* how often should we check for power budget HO */ - unsigned int pwr_interval; /* SACCH frames */ - /* how much better does a neighbor cell have to be ? */ - unsigned int pwr_hysteresis; /* dBm */ - /* maximum distacne before we try a handover */ - unsigned int max_distance; /* TA values */ - } handover; + struct handover_cfg *ho; struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index c19db7e..52a90c0 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -809,6 +809,7 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + struct handover_cfg *ho; }; diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h new file mode 100644 index 0000000..9b0ad5e --- /dev/null +++ b/include/osmocom/bsc/handover_cfg.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +struct vty; + +/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover + * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, + * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ +struct handover_cfg; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); + +bool ho_get_active(struct handover_cfg *ho); +void ho_set_active(struct handover_cfg *ho, bool val); +bool ho_isset_active(struct handover_cfg *ho); +void ho_clear_active(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg(struct handover_cfg *ho); +void ho_set_win_rxlev_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxqual_avg(struct handover_cfg *ho); +void ho_set_win_rxqual_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxqual_avg(struct handover_cfg *ho); +void ho_clear_win_rxqual_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_set_win_rxlev_avg_neigh(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg_neigh(struct handover_cfg *ho); + +unsigned int ho_get_pwr_interval(struct handover_cfg *ho); +void ho_set_pwr_interval(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_interval(struct handover_cfg *ho); +void ho_clear_pwr_interval(struct handover_cfg *ho); + +unsigned int ho_get_pwr_hysteresis(struct handover_cfg *ho); +void ho_set_pwr_hysteresis(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_hysteresis(struct handover_cfg *ho); +void ho_clear_pwr_hysteresis(struct handover_cfg *ho); + +unsigned int ho_get_max_distance(struct handover_cfg *ho); +void ho_set_max_distance(struct handover_cfg *ho, unsigned int val); +bool ho_isset_max_distance(struct handover_cfg *ho); +void ho_clear_max_distance(struct handover_cfg *ho); diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h new file mode 100644 index 0000000..48af136 --- /dev/null +++ b/include/osmocom/bsc/handover_vty.h @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +void ho_vty_init(); +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho); diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..79a3739 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -53,5 +53,6 @@ net_init.c \ bsc_dyn_ts.c \ bts_ipaccess_nanobts_omlattr.c \ + handover_vty.c \ $(NULL) diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 71c2cef..c192b03 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -188,8 +190,27 @@ VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); - vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", - VTY_NEWLINE); + + { + struct gsm_bts *bts; + unsigned int ho_active_count = 0; + unsigned int ho_inactive_count = 0; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (ho_get_active(bts->ho)) + ho_active_count ++; + else + ho_inactive_count ++; + } + + if (ho_active_count && ho_inactive_count) + vty_out(vty, " Handover: On at %u BTS, Off at %u BTS%s", + ho_active_count, ho_inactive_count, VTY_NEWLINE); + else + vty_out(vty, " Handover: %s%s", ho_active_count ? "On" : "Off", + VTY_NEWLINE); + } + network_chan_load(&pl, net); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); @@ -775,6 +796,8 @@ if (bts->pcu_sock_path) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); + ho_vty_write(vty, " ", bts->ho); + config_write_bts_model(vty, bts); } @@ -817,19 +840,9 @@ vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); - vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); - vty_out(vty, " handover window rxlev averaging %u%s", - gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxqual averaging %u%s", - gsmnet->handover.win_rxqual_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxlev neighbor averaging %u%s", - gsmnet->handover.win_rxlev_avg_neigh, VTY_NEWLINE); - vty_out(vty, " handover power budget interval %u%s", - gsmnet->handover.pwr_interval, VTY_NEWLINE); - vty_out(vty, " handover power budget hysteresis %u%s", - gsmnet->handover.pwr_hysteresis, VTY_NEWLINE); - vty_out(vty, " handover maximum distance %u%s", - gsmnet->handover.max_distance, VTY_NEWLINE); + + ho_vty_write(vty, " ", gsmnet->ho); + VTY_OUT_TIMER(3101); VTY_OUT_TIMER(3103); VTY_OUT_TIMER(3105); @@ -1498,100 +1511,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -#define HANDOVER_STR "Handover Options\n" - -DEFUN(cfg_net_handover, cfg_net_handover_cmd, - "handover (0|1)", - HANDOVER_STR - "Don't perform in-call handover\n" - "Perform in-call handover\n") -{ - int enable = atoi(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - if (enable && ipacc_rtp_direct) { - vty_out(vty, "%% Cannot enable handover unless RTP Proxy mode " - "is enabled by using the -P command line option%s", - VTY_NEWLINE); - return CMD_WARNING; - } - gsmnet->handover.active = enable; - - return CMD_SUCCESS; -} - -#define HO_WIN_STR HANDOVER_STR "Measurement Window\n" -#define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n" -#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n" -#define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n" -#define HO_AVG_COUNT_STR "Amount to use for Averaging\n" - -DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd, - "handover window rxlev averaging <1-10>", - HO_WIN_RXLEV_STR - "How many RxLev measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd, - "handover window rxqual averaging <1-10>", - HO_WIN_RXQUAL_STR - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxqual_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd, - "handover window rxlev neighbor averaging <1-10>", - HO_WIN_RXLEV_STR "Neighbor\n" - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd, - "handover power budget interval <1-99>", - HO_PBUDGET_STR - "How often to check if we have a better cell (SACCH frames)\n" - "Interval\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_interval = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd, - "handover power budget hysteresis <0-999>", - HO_PBUDGET_STR - "How many dB does a neighbor to be stronger to become a HO candidate\n" - "Hysteresis\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_hysteresis = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd, - "handover maximum distance <0-9999>", - HANDOVER_STR - "How big is the maximum timing advance before HO is forced\n" - "Distance\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.max_distance = atoi(argv[0]); return CMD_SUCCESS; } @@ -4247,13 +4166,6 @@ logging_vty_add_cmds(NULL); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_handover_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_neigh_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_interval_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_hysteresis_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_max_distance_cmd); install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_net_T3103_cmd); install_element(GSMNET_NODE, &cfg_net_T3105_cmd); @@ -4268,6 +4180,7 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + /* See also handover commands added on net level from handover_vty.c */ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -4373,6 +4286,7 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); + /* See also handover commands added on bts level from handover_vty.c */ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); @@ -4411,6 +4325,8 @@ e1inp_vty_init(); osmo_fsm_vty_add_cmds(); + ho_vty_init(); + bsc_vty_init_extra(); return 0; diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c index 09c7eaa..a717653 100644 --- a/src/libbsc/handover_decision.c +++ b/src/libbsc/handover_decision.c @@ -30,8 +30,10 @@ #include #include #include -#include #include + +#include +#include /* Get reference to a neighbor cell on a given BCCH ARFCN */ static struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts, @@ -187,7 +189,7 @@ /* attempt to do a handover */ static int attempt_handover(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; struct neigh_meas_proc *best_cell = NULL; unsigned int best_better_db = 0; int i, rc; @@ -204,10 +206,10 @@ continue; /* caculate average rxlev for this cell over the window */ - avg = neigh_meas_avg(nmp, net->handover.win_rxlev_avg_neigh); + avg = neigh_meas_avg(nmp, ho_get_win_rxlev_avg_neigh(bts->ho)); /* check if hysteresis is fulfilled */ - if (avg < mr->dl.full.rx_lev + net->handover.pwr_hysteresis) + if (avg < mr->dl.full.rx_lev + ho_get_pwr_hysteresis(bts->ho)) continue; better = avg - mr->dl.full.rx_lev; @@ -222,7 +224,7 @@ LOGP(DHO, LOGL_INFO, "%s: Cell on ARFCN %u is better: ", gsm_ts_name(mr->lchan->ts), best_cell->arfcn); - if (!net->handover.active) { + if (!ho_get_active(bts->ho)) { LOGPC(DHO, LOGL_INFO, "Skipping, Handover disabled\n"); return 0; } @@ -248,7 +250,7 @@ * attempt a handover */ static int process_meas_rep(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; enum meas_rep_field dlev, dqual; int av_rxlev; @@ -274,7 +276,7 @@ process_meas_neigh(mr); av_rxlev = get_meas_rep_avg(mr->lchan, dlev, - net->handover.win_rxlev_avg); + ho_get_win_rxlev_avg(bts->ho)); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && @@ -290,11 +292,11 @@ return attempt_handover(mr); /* Distance */ - if (mr->ms_l1.ta > net->handover.max_distance) + if (mr->ms_l1.ta > ho_get_max_distance(bts->ho)) return attempt_handover(mr); /* Power Budget AKA Better Cell */ - if ((mr->nr % net->handover.pwr_interval) == 0) + if ((mr->nr % ho_get_pwr_interval(bts->ho)) == 0) return attempt_handover(mr); return 0; diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c new file mode 100644 index 0000000..efa36ae --- /dev/null +++ b/src/libbsc/handover_vty.c @@ -0,0 +1,130 @@ +#include +#include +#include + +static struct handover_cfg *ho_cfg_from_vty(struct vty *vty) +{ + switch (vty->node) { + case GSMNET_NODE: + return gsmnet_from_vty(vty)->ho; + case BTS_NODE: + OSMO_ASSERT(vty->index); + return ((struct gsm_bts *)vty->index)->ho; + default: + OSMO_ASSERT(false); + } +} + +#define HANDOVER_STR "Handover options\n" +#define HO_WIN_STR HANDOVER_STR "Measurement averaging settings\n" +#define HO_WIN_RXLEV_STR HO_WIN_STR "Received-Level averaging\n" +#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received-Quality averaging\n" +#define HO_POWER_BUDGET_STR HANDOVER_STR "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" +#define HO_AVG_COUNT_STR "Number of values to average over\n" +#define DEFAULT_STR "Use default, remove explicit setting on this node\n" + +#define HO_COMMON_VTY(NAME, CMDSTR, DOCSTR) \ +DEFUN(cfg_ho_##NAME, cfg_ho_##NAME##_cmd, \ + CMDSTR, DOCSTR) \ +{ \ + struct handover_cfg *ho = ho_cfg_from_vty(vty); \ + const char *val = argv[0]; \ + if (!strcmp(val, "default")) \ + ho_clear_##NAME(ho); \ + else \ + ho_set_##NAME(ho, atoi(val)); \ + return CMD_SUCCESS; \ +} + +HO_COMMON_VTY(active, + "handover (0|1|default)", + HANDOVER_STR + "Disable in-call handover\n" + "Enable in-call handover\n" + "Enable/Disable HO: " DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg, + "handover window rxlev averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many RxLev measurements are used for averaging\n" + "RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxqual_avg, + "handover window rxqual averaging (<1-10>|default)", + HO_WIN_RXQUAL_STR + "How many RxQual measurements are used for averaging\n" + "RxQual averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg_neigh, + "handover window rxlev neighbor averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many Neighbor RxLev measurements are used for averaging\n" + "How many Neighbor RxLev measurements are used for averaging\n" + "Neighbor RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(pwr_interval, + "handover power budget interval (<1-99>|default)", + HO_POWER_BUDGET_STR + "How often to check for a better cell (SACCH frames)\n" + "Check for stronger neighbor every N number of SACCH frames\n" + DEFAULT_STR) + +HO_COMMON_VTY(pwr_hysteresis, + "handover power budget hysteresis (<0-999>|default)", + HO_POWER_BUDGET_STR + "How many dBm stronger must a neighbor be to become a HO candidate\n" + "Neighbor's strength difference in dBm\n" + DEFAULT_STR) + +HO_COMMON_VTY(max_distance, + "handover maximum distance (<0-9999>|default)", + HANDOVER_STR + "Timing-Advance (i.e. distance) triggering\n" + "Timing-Advance (i.e. distance) triggering\n" + "Maximum Timing-Advance value before forcing HO\n" + DEFAULT_STR) + +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho) +{ + if (ho_isset_active(ho)) + vty_out(vty, "%shandover %u%s", indent, ho_get_active(ho) ? 1 : 0, VTY_NEWLINE); + if (ho_isset_win_rxlev_avg(ho)) + vty_out(vty, "%shandover window rxlev averaging %u%s", + indent, ho_get_win_rxlev_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxqual_avg(ho)) + vty_out(vty, "%shandover window rxqual averaging %u%s", + indent, ho_get_win_rxqual_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxlev_avg_neigh(ho)) + vty_out(vty, "%shandover window rxlev neighbor averaging %u%s", + indent, ho_get_win_rxlev_avg_neigh(ho), VTY_NEWLINE); + if (ho_isset_pwr_interval(ho)) + vty_out(vty, "%shandover power budget interval %u%s", + indent, ho_get_pwr_interval(ho), VTY_NEWLINE); + if (ho_isset_pwr_hysteresis(ho)) + vty_out(vty, "%shandover power budget hysteresis %u%s", + indent, ho_get_pwr_hysteresis(ho), VTY_NEWLINE); + if (ho_isset_max_distance(ho)) + vty_out(vty, "%shandover maximum distance %u%s", + indent, ho_get_max_distance(ho), VTY_NEWLINE); +} + +static void ho_vty_init_cmds(int parent_node) +{ + install_element(parent_node, &cfg_ho_active_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxqual_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_neigh_cmd); + install_element(parent_node, &cfg_ho_pwr_interval_cmd); + install_element(parent_node, &cfg_ho_pwr_hysteresis_cmd); + install_element(parent_node, &cfg_ho_max_distance_cmd); +} + +void ho_vty_init() +{ + ho_vty_init_cmds(GSMNET_NODE); + ho_vty_init_cmds(BTS_NODE); +} + diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..3f05273 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -21,6 +21,7 @@ #include #include #include +#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -57,13 +58,7 @@ net->T3122 = GSM_T3122_DEFAULT; net->T3141 = GSM_T3141_DEFAULT; - /* default set of handover parameters */ - net->handover.win_rxlev_avg = 10; - net->handover.win_rxqual_avg = 1; - net->handover.win_rxlev_avg_neigh = 10; - net->handover.pwr_interval = 6; - net->handover.pwr_hysteresis = 3; - net->handover.max_distance = 9999; + net->ho = ho_cfg_init(net, NULL); INIT_LLIST_HEAD(&net->bts_list); diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..d82b188 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -26,4 +26,5 @@ socket.c \ talloc_ctx.c \ gsm_subscriber_base.c \ + handover_cfg.c \ $(NULL) diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..e38da14 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -37,6 +37,7 @@ #include #include #include +#include void *tall_bsc_ctx; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index d7c9f3d..a74b4c8 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -33,6 +33,7 @@ #include #include +#include void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { @@ -363,6 +364,8 @@ /* si handling */ bts->bcch_change_mark = 1; + bts->ho = ho_cfg_init(bts, net->ho); + return bts; } diff --git a/src/libcommon/handover_cfg.c b/src/libcommon/handover_cfg.c new file mode 100644 index 0000000..eb41083 --- /dev/null +++ b/src/libcommon/handover_cfg.c @@ -0,0 +1,93 @@ +/* OsmoBSC interface to quagga VTY for handover parameters */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include +#include + +struct handover_cfg { + struct handover_cfg *higher_level_cfg; + + bool has_active; + bool active; + + /* Window parameters in number of SACCH frames */ + bool has_win_rxlev_avg; + unsigned int win_rxlev_avg; + bool has_win_rxqual_avg; + unsigned int win_rxqual_avg; + bool has_win_rxlev_avg_neigh; + unsigned int win_rxlev_avg_neigh; + + /* how often should we check for power budget HO */ + bool has_pwr_interval; + unsigned int pwr_interval; /* SACCH frames */ + bool has_pwr_hysteresis; + unsigned int pwr_hysteresis; /* dBm */ + bool has_max_distance; + unsigned int max_distance; /* TA values */ +}; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg) +{ + struct handover_cfg *ho = talloc_zero(ctx, struct handover_cfg); + OSMO_ASSERT(ho); + ho->higher_level_cfg = higher_level_cfg; + return ho; +} + +#define HO_GETTER_SETTER_DEFS(TYPE, NAME, DEFAULT_VAL) \ +TYPE ho_get_##NAME(struct handover_cfg *ho) \ +{ \ + if (ho->has_##NAME) \ + return ho->NAME; \ + if (ho->higher_level_cfg) \ + return ho_get_##NAME(ho->higher_level_cfg); \ + return DEFAULT_VAL; \ +} \ +\ +void ho_set_##NAME(struct handover_cfg *ho, TYPE value) \ +{ \ + ho->NAME = value; \ + ho->has_##NAME = true; \ +} \ +\ +bool ho_isset_##NAME(struct handover_cfg *ho) \ +{ \ + return ho->has_##NAME; \ +} \ +\ +void ho_clear_##NAME(struct handover_cfg *ho) \ +{ \ + ho->has_##NAME = false; \ +} + +HO_GETTER_SETTER_DEFS(bool, active, false) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg, 10) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxqual_avg, 1) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg_neigh, 10) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_interval, 6) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_hysteresis, 3) +HO_GETTER_SETTER_DEFS(unsigned int, max_distance, 9999) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..d4390af 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,7 @@ $(TESTSUITE) \ vty_test_runner.py \ ctrl_test_runner.py \ + handover_cfg.vty \ $(NULL) TESTSUITE = $(srcdir)/testsuite @@ -45,11 +46,21 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) + $(MAKE) vty-test osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-test U=-u +vty-test: + osmo_verify_transcript_vty.py -v \ + -n OsmoBSC -p 4242 \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + $(U) $(srcdir)/*.vty else python-tests: $(BUILT_SOURCES) echo "Not running python-based tests (determined at configure-time)" diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty new file mode 100644 index 0000000..9dacc36 --- /dev/null +++ b/tests/handover_cfg.vty @@ -0,0 +1,315 @@ +OsmoBSC> show network +... + Handover: Off +... +OsmoBSC> enable + +OsmoBSC# !--- No handover config present +OsmoBSC# show running-config +... +network + network country code 901 + mobile network code 70 + short name OsmoBSC + long name OsmoBSC + auth policy closed + authorized-regexp .* + location updating reject cause 13 + encryption a5 0 + authentication optional + neci 0 + paging any use tch 0 + rrlp mode none + mm info 1 + dyn_ts_allow_tch_f 1 + periodic location update 30 + bts 0 + type sysmobts + band DCS1800 + cell_identity 0 + location_area_code 23 + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + early-classmark-sending-3g allowed + ip.access unit_id 1800 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode automatic + codec-support fr + gprs mode none + no force-combined-si + trx 0 +... + +OsmoBSC# !--- Toggling handover on network level affects 'show network': +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On +... + +OsmoBSC(config-net)# !--- If network level default is 'on', bts level can still override to 'off': +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover 0 +OsmoBSC(config-net-bts)# do show network +... + Handover: Off +... +OsmoBSC(config-net-bts)# exit + +OsmoBSC(config-net)# !--- Create a *second* BTS that is not explicitly 'off': +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-net-bts)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... + +OsmoBSC(config-net-bts)# !--- Add arbitrary handover config item for bts 1: +OsmoBSC(config-net-bts)# handover power budget interval 23 +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# !--- HO is 'on' globally, bts 0 disables it, bts 1 tweaks a param: +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Set global default to 'off', now bts 1 also uses the global default of 'off': +OsmoBSC(config-net)# handover 0 +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 0 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove the global setting, i.e. use the factory default net level, with same effect: +OsmoBSC(config-net)# handover default +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Re-enable net-level handover, but bts 0 remains disabled explicitly +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove explicit setting of bts 0 to also use the global setting: +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover default +OsmoBSC(config-net-bts)# do show network +... + Handover: On +... +OsmoBSC(config-net-bts)# show running-config +... +network +... + handover 1 +... + bts 0 +... + bts 1 +... + handover power budget interval 23 +... + + +OsmoBSC(config-net-bts)# !--- Checking online help +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# list +... + handover (0|1|default) + handover window rxlev averaging (<1-10>|default) + handover window rxqual averaging (<1-10>|default) + handover window rxlev neighbor averaging (<1-10>|default) + handover power budget interval (<1-99>|default) + handover power budget hysteresis (<0-999>|default) + handover maximum distance (<0-9999>|default) +... + +OsmoBSC(config-net)# handover? + handover Handover options + +OsmoBSC(config-net)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node + + +OsmoBSC(config-net)# !--- Same on BTS level +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover? + handover Handover options + +OsmoBSC(config-net-bts)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net-bts)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net-bts)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net-bts)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 06:26:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 Nov 2017 06:26:03 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Instead of putting semantic in a comment, use an enum In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Instead of putting semantic in a comment, use an enum ...................................................................... mobile: Instead of putting semantic in a comment, use an enum The enum was created to understand the different states during the shutdown and find places where it is used. The normal transitions are like. Idle -> Imsi Detach -> L1 Reset -> Done Idle -> L1 Reset -> Done The shutdown can get stuck in case: * Out of memory situation while handling IMSI detach (timeout) * Never receiving l1 reset acknnowledgment. The code could benefit from the move to osmo fsm to deal with proper timeouts. Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 34 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 21b2880..7a935f9 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -54,6 +54,13 @@ int16_t s, rl_fail; }; +enum { + MS_SHUTDOWN_NONE = 0, + MS_SHUTDOWN_IMSI_DETACH = 1, + MS_SHUTDOWN_WAIT_RESET = 2, + MS_SHUTDOWN_COMPL = 3, +}; + /* One Mobilestation for osmocom */ struct osmocom_ms { struct llist_head entity; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 1905010..d28af00 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -96,9 +96,9 @@ set = &ms->settings; /* waiting for reset after shutdown */ - if (ms->shutdown == 2) { + if (ms->shutdown == MS_SHUTDOWN_WAIT_RESET) { LOGP(DMOB, LOGL_NOTICE, "MS '%s' has been resetted\n", ms->name); - ms->shutdown = 3; + ms->shutdown = MS_SHUTDOWN_COMPL; break; } @@ -142,13 +142,13 @@ struct gsm48_mmlayer *mm = &ms->mmlayer; /* if shutdown is already performed */ - if (ms->shutdown >= 2) + if (ms->shutdown >= MS_SHUTDOWN_WAIT_RESET) return 0; if (!force && ms->started) { struct msgb *nmsg; - ms->shutdown = 1; /* going down */ + ms->shutdown = MS_SHUTDOWN_IMSI_DETACH; nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_IMSI_DETACH); if (!nmsg) return -ENOMEM; @@ -168,10 +168,10 @@ lapdm_channel_exit(&ms->lapdm_channel); if (ms->started) { - ms->shutdown = 2; /* being down, wait for reset */ + ms->shutdown = MS_SHUTDOWN_WAIT_RESET; /* being down, wait for reset */ l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); } else { - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; /* being down */ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); @@ -230,7 +230,7 @@ gsm_random_imei(&ms->settings); - ms->shutdown = 0; + ms->shutdown = MS_SHUTDOWN_NONE; ms->started = false; if (!strcmp(ms->settings.imei, "000000000000000")) { @@ -268,7 +268,7 @@ gsm_support_init(ms); gsm_settings_init(ms); - ms->shutdown = 3; /* being down */ + ms->shutdown = MS_SHUTDOWN_COMPL; if (mncc_recv_app) { mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); @@ -298,7 +298,7 @@ ms->mncc_entity.sock_state = NULL; } - if (ms->shutdown == 0 || (ms->shutdown == 1 && force)) { + if (ms->shutdown == MS_SHUTDOWN_NONE || (ms->shutdown == MS_SHUTDOWN_IMSI_DETACH && force)) { rc = mobile_exit(ms, force); if (rc < 0) return rc; @@ -339,9 +339,9 @@ int work = 0; llist_for_each_entry_safe(ms, ms2, &ms_list, entity) { - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) work |= mobile_work(ms); - if (ms->shutdown == 3) { + if (ms->shutdown == MS_SHUTDOWN_COMPL) { if (ms->l2_wq.bfd.fd > -1) { layer2_close(ms); ms->l2_wq.bfd.fd = -1; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 22db859..1b10262 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -633,7 +633,7 @@ LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n"); /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_COMPL) { LOGP(DLSMS, LOGL_ERROR, "Phone is down\n"); gsm411_sms_report(ms, sms, GSM411_RP_CAUSE_MO_TEMP_FAIL); sms_free(sms); diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index ff90faa..ee2c943 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -603,7 +603,7 @@ } /* no running, no transaction */ - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { gsm480_ss_result(ms, "", 0); return -EIO; } diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index d398c76..f1e8109 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -1923,7 +1923,7 @@ struct gsm_trans *trans; int i, rc; - if (!ms->started || ms->shutdown) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { LOGP(DCC, LOGL_NOTICE, "Phone is down!\n"); if (ms->mncc_entity.mncc_recv && msg_type != MNCC_REL_REQ) { struct gsm_mncc rel; diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 4b1db1e..f32d57a 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -1849,7 +1849,7 @@ subscr->sim_valid = 0; /* wait for RR idle and then power off when IMSI is detached */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { if (mm->state == GSM48_MM_ST_MM_IDLE) { mobile_exit(ms, 1); return 0; @@ -1944,7 +1944,7 @@ new_mm_state(mm, GSM48_MM_ST_WAIT_NETWORK_CMD, 0); /* power off */ - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { mobile_exit(ms, 1); return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 3703ac5..d11f625 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -123,7 +123,7 @@ { if (vty_reading) return; - if (ms->shutdown != 0) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; vty_out(vty, "You must restart MS '%s' ('shutdown / no shutdown') for " "change to take effect!%s", ms->name, VTY_NEWLINE); @@ -142,7 +142,7 @@ llist_for_each_entry(ms, &ms_list, entity) { if (!strcmp(ms->name, name)) { - if (ms->shutdown) { + if (ms->shutdown != MS_SHUTDOWN_NONE) { vty_out(vty, "MS '%s' is admin down.%s", name, VTY_NEWLINE); return NULL; @@ -189,9 +189,9 @@ service = ", MM connection active"; vty_out(vty, "MS '%s' is %s%s%s%s", ms->name, - (ms->shutdown) ? "administratively " : "", - (ms->shutdown || !ms->started) ? "down" : "up", - (!ms->shutdown) ? service : "", + (ms->shutdown != MS_SHUTDOWN_NONE) ? "administratively " : "", + (ms->shutdown != MS_SHUTDOWN_NONE || !ms->started) ? "down" : "up", + (ms->shutdown == MS_SHUTDOWN_NONE) ? service : "", VTY_NEWLINE); vty_out(vty, " IMEI: %s%s", set->imei, VTY_NEWLINE); vty_out(vty, " IMEISV: %s%s", set->imeisv, VTY_NEWLINE); @@ -201,7 +201,7 @@ else vty_out(vty, " IMEI generation: fixed%s", VTY_NEWLINE); - if (ms->shutdown) + if (ms->shutdown != MS_SHUTDOWN_NONE) return; if (set->plmn_mode == PLMN_MODE_AUTO) @@ -303,7 +303,7 @@ gsm_subscr_dump(&ms->subscr, print_vty, vty); } else { llist_for_each_entry(ms, &ms_list, entity) { - if (!ms->shutdown) { + if (ms->shutdown == MS_SHUTDOWN_NONE) { gsm_subscr_dump(&ms->subscr, print_vty, vty); vty_out(vty, "%s", VTY_NEWLINE); } @@ -1529,7 +1529,7 @@ (set->test_always) ? "everywhere" : "foreign-country", VTY_NEWLINE); /* no shutdown must be written to config, because shutdown is default */ - vty_out(vty, " %sshutdown%s", (ms->shutdown) ? "" : "no ", + vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2699,7 +2699,7 @@ struct osmocom_ms *ms = vty->index, *tmp; int rc; - if (ms->shutdown != 3) + if (ms->shutdown != MS_SHUTDOWN_COMPL) return CMD_SUCCESS; llist_for_each_entry(tmp, &ms_list, entity) { @@ -2738,7 +2738,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown == 0) + if (ms->shutdown == MS_SHUTDOWN_NONE) mobile_exit(ms, 0); return CMD_SUCCESS; @@ -2749,7 +2749,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= 1) + if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) mobile_exit(ms, 1); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/4909 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 06:26:05 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 Nov 2017 06:26:05 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Change started and shutdown state through function In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Change started and shutdown state through function ...................................................................... mobile: Change started and shutdown state through function Instead of changing the field all over the place, do the state change in a function. This will allow us to emit a notification when things change. It is similar to the lchan_state. Change-Id: I6a0591bb2785232681b23e41368323f16d3c960c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c 2 files changed, 21 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 6162a38..83c07d6 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -1,6 +1,8 @@ #ifndef APP_MOBILE_H #define APP_MOBILE_H +#include + extern char *config_dir; int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), @@ -13,5 +15,8 @@ int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +void mobile_set_started(struct osmocom_ms *ms, bool state); +void mobile_set_shutdown(struct osmocom_ms *ms, int state); + #endif diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index d28af00..c5c84e6 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -131,7 +131,7 @@ gsm322_cs_sendmsg(ms, nmsg); } - ms->started = true; + mobile_set_started(ms, true); } return 0; } @@ -148,7 +148,7 @@ if (!force && ms->started) { struct msgb *nmsg; - ms->shutdown = MS_SHUTDOWN_IMSI_DETACH; + mobile_set_shutdown(ms, MS_SHUTDOWN_IMSI_DETACH); nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_IMSI_DETACH); if (!nmsg) return -ENOMEM; @@ -168,10 +168,10 @@ lapdm_channel_exit(&ms->lapdm_channel); if (ms->started) { - ms->shutdown = MS_SHUTDOWN_WAIT_RESET; /* being down, wait for reset */ + mobile_set_shutdown(ms, MS_SHUTDOWN_WAIT_RESET); /* being down, wait for reset */ l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); } else { - ms->shutdown = MS_SHUTDOWN_COMPL; /* being down */ + mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); /* being down */ } vty_notify(ms, NULL); vty_notify(ms, "Power off!\n"); @@ -230,8 +230,8 @@ gsm_random_imei(&ms->settings); - ms->shutdown = MS_SHUTDOWN_NONE; - ms->started = false; + mobile_set_shutdown(ms, MS_SHUTDOWN_NONE); + mobile_set_started(ms, false); if (!strcmp(ms->settings.imei, "000000000000000")) { LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n", @@ -268,7 +268,7 @@ gsm_support_init(ms); gsm_settings_init(ms); - ms->shutdown = MS_SHUTDOWN_COMPL; + mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); if (mncc_recv_app) { mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); @@ -444,3 +444,12 @@ return 0; } +void mobile_set_started(struct osmocom_ms *ms, bool state) +{ + ms->started = state; +} + +void mobile_set_shutdown(struct osmocom_ms *ms, int state) +{ + ms->shutdown = state; +} -- To view, visit https://gerrit.osmocom.org/4930 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a0591bb2785232681b23e41368323f16d3c960c Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 06:26:05 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 Nov 2017 06:26:05 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Avoid msg_ref going out of sync In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Avoid msg_ref going out of sync ...................................................................... mobile: Avoid msg_ref going out of sync It seemed like msg_ref could go out of sync. In some places we are using sms->msg_ref in other cases we pass it as parameter (e.g. when sending the SMS) or we get it out of the gsm411_rp_hdr. Instead of hardcoding 42 for all messages make it configurable and pass the parameter from the caller. Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 11 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d14e6db..0d0578a 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -11,7 +11,6 @@ uint8_t ud_hdr_ind; uint8_t protocol_id; uint8_t data_coding_scheme; - uint8_t msg_ref; char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes * BCD == 20 bytes string */ time_t time; @@ -28,6 +27,6 @@ struct gsm_sms *sms_from_text(const char *receiver, int dcs, const char *text); int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text); + const char *text, uint8_t msg_ref); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 1b10262..73fad84 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -221,7 +221,7 @@ /* process an incoming TPDU (called from RP-DATA) * return value > 0: RP CAUSE for ERROR; < 0: silent error; 0 = success */ -static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg) +static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg, uint8_t msg_ref) { uint8_t *smsp = msgb_sms(msg); struct gsm_sms *gsms; @@ -296,7 +296,7 @@ LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, " "UserDataLength: 0x%02x, UserData: \"%s\"\n", - sms_mti, gsms->msg_ref, + sms_mti, msg_ref, gsms->protocol_id, gsms->data_coding_scheme, gsms->address, gsms->user_data_len, sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text : @@ -377,7 +377,7 @@ LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, osmo_hexdump(msg->l4h, msg->tail-msg->l4h)); - rc = gsm340_rx_tpdu(trans, msg); + rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); if (rc == 0) return gsm411_send_rp_ack(trans, rph->msg_ref); else if (rc > 0) @@ -528,7 +528,7 @@ /* generate a msgb containing a TPDU derived from struct gsm_sms, * returns total size of TPDU */ -static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms) +static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t msg_ref) { uint8_t *smsp; uint8_t da[12]; /* max len per 03.40 */ @@ -559,7 +559,7 @@ /* generate message ref */ smsp = msgb_put(msg, 1); - *smsp = sms->msg_ref; + *smsp = msg_ref; /* generate destination address */ if (sms->address[0] == '+') @@ -620,12 +620,11 @@ /* Take a SMS in gsm_sms structure and send it. */ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, - struct gsm_sms *sms) + struct gsm_sms *sms, uint8_t msg_ref) { struct msgb *msg; struct gsm_trans *trans; uint8_t *data, *rp_ud_len; - uint8_t msg_ref = 42; int rc; int transaction_id; uint8_t sca[11]; /* max len per 03.40 */ @@ -689,7 +688,7 @@ rp_ud_len = (uint8_t *)msgb_put(msg, 1); /* generate the 03.40 TPDU */ - rc = gsm340_gen_tpdu(msg, sms); + rc = gsm340_gen_tpdu(msg, sms, msg_ref); if (rc < 0) goto error; *rp_ud_len = rc; @@ -703,14 +702,14 @@ /* create and send SMS */ int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, - const char *text) + const char *text, uint8_t msg_ref) { struct gsm_sms *sms = sms_from_text(number, 0, text); if (!sms) return -ENOMEM; - return gsm411_tx_sms_submit(ms, sms_sca, sms); + return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref); } /* diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index d11f625..5a47736 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -947,7 +947,7 @@ if (vty_check_number(vty, number)) return CMD_WARNING; - sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2)); + sms_send(ms, sms_sca, number, argv_concat(argv, argc, 2), 42); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/4911 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 07:01:40 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 Nov 2017 07:01:40 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: osmocomBB: Begin with a manual for the "mobile" application In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: osmocomBB: Begin with a manual for the "mobile" application ...................................................................... osmocomBB: Begin with a manual for the "mobile" application Begin with manual for the layer23 ("mobile") application but focus on the scripting code first. Change-Id: I736f2d61650feac70b6d960811b478639aa71737 --- M Makefile A OsmocomBB/Makefile A OsmocomBB/chapters/scripting.adoc A OsmocomBB/osmocombb-usermanual-docinfo.xml A OsmocomBB/osmocombb-usermanual.adoc 5 files changed, 200 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile b/Makefile index cd1b10e..8261640 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ cd OsmoMSC; $(MAKE) cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) + cd OsmocomBB; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -25,6 +26,7 @@ cd OsmoMSC; $(MAKE) clean cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean + cd OsmocomBB; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -39,6 +41,7 @@ cd OsmoMSC; $(MAKE) upload cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload + cd OsmocomBB; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -55,6 +58,7 @@ cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check cd OsmoSTP; $(MAKE) check + cd OsmocomBB; $(MAKE) check define check_dep_bin @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, please install $(2)."; exit 1; } diff --git a/OsmocomBB/Makefile b/OsmocomBB/Makefile new file mode 100644 index 0000000..9f861a5 --- /dev/null +++ b/OsmocomBB/Makefile @@ -0,0 +1,7 @@ +TOPDIR = .. + +ASCIIDOC = osmocombb-usermanual.adoc +ASCIIDOC_DEPS = chapters/*.adoc +include $(TOPDIR)/build/Makefile.asciidoc.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmocomBB/chapters/scripting.adoc b/OsmocomBB/chapters/scripting.adoc new file mode 100644 index 0000000..8828a72 --- /dev/null +++ b/OsmocomBB/chapters/scripting.adoc @@ -0,0 +1,111 @@ +[[scripting]] +== Scripting using Lua + +The mobile application can be extended using the +https://www.lua.org/manual/5.3/[lua5.3 language]. +To use the scripting facility a script needs to be +configured through the VTY interface and will be +associated to a Mobile Station (MS). The script will +then be able to interact with the specific MS. + +An event based programming model is to be used. This +means that once the script has been loaded it should +register to the wanted events, configure timers and +return. When an event occurs the registered event +handler will be executed. + +The following describes the exported runtime services +to be used in the script. + +=== Logging + +The logging functions allow to generate log messages +for different levels. The log implementatiom is using +the standard Osmocom logging framework which allows to +have multiple log targets, e.g. syslog, file or through +the VTY. + +|======== +|Code |Return | Explanation +|print(...) |void | Print a message with log level 'debug' +|log_debug(...) |void | Print a message with log level 'debug' +|log_notice(...) |void | Print a message with log level 'notice' +|log_error(...) |void | Print a message with log level 'error' +|log_fatal(...) |void | Print a message with log level 'fatal' +|======== + +==== Examples + +---- +Code: +print("Log level 'debug'") +log_debug("Log level 'debug'") +log_notice("Log level 'notice'") +log_error("Log level 'error'") +log_fatal("Log level 'fatal'") + +Output: +\<0011> @script.lua:1 Log level 'debug' +\<0011> @script.lua:2 Log level 'debug' +\<0011> @script.lua:3 Log level 'notice' +\<0011> @script.lua:4 Log level 'error' +\<0011> @script.lua:5 Log level 'fatal' + +---- + +=== Timer class + +The timer allows to invoke a function once after the requested +timeout. The timer creation function will return immediately and +the callback will be called after the timeout and when no other +lua code is executing. The _osmo.timeout_ function should be used +to create a new time, a running timer can be canneled using the _cancel_ +method. + +|======== +|Code |Return |Explanation +|osmo.timeout(timeout, cb)|A new timer|Create a new non-recurring timer. Timeout should be in rounded seconds and cb should be a function. +|timer.cancel() |Void |Cancel the timer, the callback will not be called. +|======== + +==== Examples + +---- +Code: +local timer = osmo.timeout(timeout_in_seconds, call_back) +timer:cancel() +---- + +---- +Code: +local timer = osmo.timeout(3, function() + print("Timeout passed") +end) +print("Configured") + +Output: +\<0011> @script.lua:4 Configured +\<0011> @script.lua:2 Timeout passed +---- + +=== MS class + +The MS singletong provides access to the Mobile Station configuration +the script is associated with. This includes runtime information like +the IMSI, IMEI or functions like start/stop. + +|======== +|Code |Return |Explanation +|osmo.ms().imsi() |string |The IMSI. It might be invalid in case it has not been read from SIM card yet +|osmo.ms().imei() |string |The configured IMEI +|======== +==== Examples + +----- +Code: +local ms = osmo.ms() +print(ms.imei(), ms.imsi()) + +Output: +\<0011> @script.lua:2 126000000000000 +----- diff --git a/OsmocomBB/osmocombb-usermanual-docinfo.xml b/OsmocomBB/osmocombb-usermanual-docinfo.xml new file mode 100644 index 0000000..992a42e --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual-docinfo.xml @@ -0,0 +1,57 @@ + + + 1 + November 2017 + HHPF + + Initial version. + + + + + + + Harald + Welte + hwelte at sysmocom.de + HW + + sysmocom + sysmocom - s.f.m.c. GmbH + Managing Director + + + + Holger + Freyther + hfreyther at sysmocom.de + HHPF + + sysmocom + sysmocom - s.f.m.c. GmbH + Co-Founder + + + + + + 2013-2017 + sysmocom - s.f.m.c. GmbH + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts, + and no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + + + The Asciidoc source code of this manual can be found at + + http://git.osmocom.org/osmo-gsm-manuals/ + + + diff --git a/OsmocomBB/osmocombb-usermanual.adoc b/OsmocomBB/osmocombb-usermanual.adoc new file mode 100644 index 0000000..b405934 --- /dev/null +++ b/OsmocomBB/osmocombb-usermanual.adoc @@ -0,0 +1,21 @@ +OsmocomBB User Manual +===================== +Holger Hans Peter Freyther + + +include::../common/chapters/preface.adoc[] + +include::chapters/scripting.adoc[] + +include::../common/chapters/vty.adoc[] + +include::../common/chapters/logging.adoc[] + + +include::../common/chapters/port_numbers.adoc[] + +include::../common/chapters/bibliography.adoc[] + +include::../common/chapters/glossary.adoc[] + +include::../common/chapters/gfdl.adoc[] -- To view, visit https://gerrit.osmocom.org/4838 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I736f2d61650feac70b6d960811b478639aa71737 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 10:14:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 10:14:22 +0000 Subject: [PATCH] osmo-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg Message-ID: Review at https://gerrit.osmocom.org/5059 examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 --- M doc/examples/osmo-ggsn.cfg 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/59/5059/1 diff --git a/doc/examples/osmo-ggsn.cfg b/doc/examples/osmo-ggsn.cfg index 763e561..8317684 100644 --- a/doc/examples/osmo-ggsn.cfg +++ b/doc/examples/osmo-ggsn.cfg @@ -53,6 +53,7 @@ type-support v6 ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56 ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56 no shutdown apn inet46 @@ -65,6 +66,7 @@ ip ifconfig 176.16.46.0/24 ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56 ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56 no shutdown default-apn internet -- To view, visit https://gerrit.osmocom.org/5059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 10:21:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 10:21:58 +0000 Subject: [PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5024 to look at the new patch set (#5). client: use osmo_strlcpy instead of strncpy simplify \nul termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M tests/mgcp_client/mgcp_client_test.c 4 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/5 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ac86f52..ee8d267 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -201,8 +201,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) @@ -398,7 +397,7 @@ unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf); unsigned int i; - strncpy(strbuf, (const char*)msg->data, l); + osmo_strlcpy(strbuf, (const char*)msg->data, l); for (i = 0; i < sizeof(strbuf); i++) { if (strbuf[i] == '\n' || strbuf[i] == '\r') { strbuf[i] = '\0'; diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e33596d..dcfc2ff 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; @@ -140,7 +141,7 @@ conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; - strcpy(conn->name, name); + osmo_strlcpy(conn->name, name, sizeof(conn->name)); rc = mgcp_alloc_id(endp, conn->id); if (rc < 0) { talloc_free(conn); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index a02b0d1..816f16b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -88,7 +88,7 @@ if (endp->cfg->net_ports.bind_addr) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */ - strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); @@ -96,7 +96,7 @@ /* No specific bind IP is configured for the RTP traffic, so * assume the IP where we listen for incoming MGCP messages * as bind IP */ - strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 5fd59e9..37fe0b8 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -46,14 +46,14 @@ l = strlen(head); msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, head, l); + osmo_strlcpy(data, head, l); data = (char*)msgb_put(msg, 1); *data = '\n'; l = strlen(params); data = (char*)msgb_put(msg, l); - strncpy(data, params, l); + osmo_strlcpy(data, params, l); return msg; } @@ -66,7 +66,7 @@ char *data; msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, str, l); + osmo_strlcpy(data, str, l); return msg; } -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 10:21:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 10:21:58 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#7). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 970 insertions(+), 162 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/7 diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..ac86f52 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +340,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +708,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +778,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index a89d60c..e33596d 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,46 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + /* Generate a connection id that is unique for the current endpoint. + * Technically a counter would be sufficient, but in order to + * be able to find a specific connection in large logfiles and to + * prevent unintentional connections we assign the connection + * identifiers randomly from a reasonable large number space */ + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unique + * for this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_LENGTH); + return 0; + } + } + + LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + ENDPOINT_NUMBER(endp)); + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,22 +118,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -106,7 +141,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 672a8d4..feca8da 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -468,7 +468,10 @@ callid = (const char *)line + 3; break; case 'I': - conn_id = (const char *)line + 3; + /* It is illegal to send a connection identifier + * together with a CRCX, the MGW will assign the + * connection identifier by itself on CRCX */ + return create_err_response(NULL, 523, "CRCX", p->trans); break; case 'M': mode = (const char *)line + 3; @@ -506,13 +509,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +556,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 7d976da..fb99911 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id && strlen(conn_id)) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,18 +555,95 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memset(conn_id, 0, conn_id_len); + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\r') + conn_id[i] = '\0'; + } + + /* A valid conn_id must at least contain one digit, and must + * not exceed a length of 32 digits */ + OSMO_ASSERT(strlen(conn_id) <= 32); + OSMO_ASSERT(strlen(conn_id) > 0); + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -574,6 +652,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -582,7 +661,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -591,11 +670,15 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); if (dummy_packets) @@ -656,7 +739,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -681,11 +764,14 @@ { struct mgcp_config *cfg; int i; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -694,24 +780,30 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg && strcmp(t->name, CRCX)) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -732,6 +824,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -741,12 +834,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -761,7 +858,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -864,7 +961,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -874,7 +971,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1013,6 +1110,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1032,9 +1130,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1092,6 +1191,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1103,85 +1203,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1198,19 +1308,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1223,6 +1335,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1232,9 +1345,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1281,9 +1395,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 7 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 10:21:59 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 10:21:59 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex Message-ID: Review at https://gerrit.osmocom.org/5060 cosmetic: clearly mark endpoint numbers as hex The log prints the endpoint numbers as hexadecimal numbers, but it does not prefix them with "0x". Add "0x" prefixes to all endpoint number outputs in the log Change-Id: I284627de02cd140a894445375e9152ff007a71e6 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c 4 files changed, 83 insertions(+), 83 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/60/5060/1 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index dcfc2ff..ae3f026 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -61,7 +61,7 @@ } } - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + LOGP(DLMGCP, LOGL_ERROR, "endpoint:0x%x, unable to generate a unique connectionIdentifier\n", ENDPOINT_NUMBER(endp)); return -1; diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 9803921..17b1026 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -82,7 +82,7 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x missing connection mode\n", + "endpoint:0x%x missing connection mode\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -101,7 +101,7 @@ conn->mode = MGCP_CONN_LOOPBACK; else { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x unknown connection mode: '%s'\n", + "endpoint:0x%x unknown connection mode: '%s'\n", ENDPOINT_NUMBER(endp), mode); ret = -1; } @@ -113,16 +113,16 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x conn:%s\n", + "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn)); LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x connection mode '%s' %d\n", + "endpoint:0x%x connection mode '%s' %d\n", ENDPOINT_NUMBER(endp), mode, conn->mode); /* Special handling f?r RTP connections */ if (conn->type == MGCP_CONN_TYPE_RTP) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x output_enabled %d\n", + LOGP(DLMGCP, LOGL_DEBUG, "endpoint:0x%x output_enabled %d\n", ENDPOINT_NUMBER(endp), conn->u.rtp.end.output_enabled); } @@ -318,7 +318,7 @@ if (strcmp(endp->callid, callid) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x CallIDs does not match '%s' != '%s'\n", + "endpoint:0x%x CallIDs does not match '%s' != '%s'\n", ENDPOINT_NUMBER(endp), endp->callid, callid); return -1; } @@ -335,7 +335,7 @@ /* Check for null identifiers */ if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (missing)\n", + "endpoint:0x%x invalid ConnectionIdentifier (missing)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -343,7 +343,7 @@ /* Check for empty connection identifiers */ if (strlen(conn_id) == 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (empty)\n", + "endpoint:0x%x invalid ConnectionIdentifier (empty)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -351,7 +351,7 @@ /* Check for over long connection identifiers */ if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + "endpoint:0x%x invalid ConnectionIdentifier (too long) 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -361,7 +361,7 @@ return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + "endpoint:0x%x no connection found under ConnectionIdentifier 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 816f16b..eb44f9b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", + "endpoint:0x%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:0x%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", + "endpoint:0x%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:0x%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -162,8 +162,8 @@ OSMO_ASSERT(conn); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", + "endpoint:0x%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr, @@ -184,7 +184,7 @@ failed: LOGP(DRTP, LOGL_ERROR, - "endpoint:%x Failed to send dummy %s packet.\n", + "endpoint:0x%x Failed to send dummy %s packet.\n", ENDPOINT_NUMBER(endp), was_rtcp ? "RTCP" : "RTP"); return -1; @@ -393,7 +393,7 @@ struct mgcp_rtp_end *dst_end, char *data, int *len, int buf_size) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -407,7 +407,7 @@ struct mgcp_rtp_end *dst_end, struct mgcp_rtp_end *src_end) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -419,7 +419,7 @@ struct mgcp_conn_rtp *conn) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x conn:%s using format defaults\n", + "endpoint:0x%x conn:%s using format defaults\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); *payload_type = conn->end.codec.payload_type; @@ -516,7 +516,7 @@ state->out_stream.last_timestamp = timestamp; state->out_stream.ssrc = ssrc - 1; /* force output SSRC change */ LOGP(DRTP, LOGL_INFO, - "endpoint:%x initializing stream, SSRC: %u timestamp: %u " + "endpoint:0x%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, state->seq_offset, state->packet_duration, @@ -525,14 +525,14 @@ state->packet_duration = rtp_end->codec.rate * 20 / 1000; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x fixed packet duration is not available, " + "endpoint:0x%x fixed packet duration is not available, " "using fixed 20ms instead: %d from %s:%d\n", ENDPOINT_NUMBER(endp), state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } } else if (state->in_stream.ssrc != ssrc) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC changed: %u -> %u " + "endpoint:0x%x SSRC changed: %u -> %u " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, rtp_hdr->ssrc, @@ -561,7 +561,7 @@ rtp_end->force_constant_ssrc -= 1; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC patching enabled, SSRC: %u " + "endpoint:0x%x SSRC patching enabled, SSRC: %u " "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, @@ -619,7 +619,7 @@ #if 0 DEBUGP(DRTP, - "endpoint:%x payload hdr payload %u -> endp payload %u\n", + "endpoint:0x%x payload hdr payload %u -> endp payload %u\n", ENDPOINT_NUMBER(endp), rtp_hdr->payload_type, payload); rtp_hdr->payload_type = payload; #endif @@ -670,16 +670,16 @@ if (is_rtp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTP packet...\n", + "endpoint:0x%x delivering RTP packet...\n", ENDPOINT_NUMBER(endp)); } else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTCP packet...\n", + "endpoint:0x%x delivering RTCP packet...\n", ENDPOINT_NUMBER(endp)); } LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x loop:%d, mode:%d ", + "endpoint:0x%x loop:%d, mode:%d ", ENDPOINT_NUMBER(endp), tcfg->audio_loop, conn_src->conn->mode); if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) LOGPC(DRTP, LOGL_DEBUG, "(loopback)\n"); @@ -695,7 +695,7 @@ if (!rtp_end->output_enabled) { rtp_end->dropped_packets += 1; LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x output disabled, drop to %s %s " + "endpoint:0x%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -718,7 +718,7 @@ mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, buflen); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x process/send to %s %s " + "endpoint:0x%x process/send to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), ntohs(rtp_end->rtp_port), @@ -757,7 +757,7 @@ return nbytes; } else if (!tcfg->omit_rtcp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x send to %s %s rtp_port:%u rtcp_port:%u\n", + "endpoint:0x%x send to %s %s rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), @@ -804,13 +804,13 @@ if (rc < 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to receive packet, errno: %d/%s\n", + "endpoint:0x%x failed to receive packet, errno: %d/%s\n", ENDPOINT_NUMBER(endp), errno, strerror(errno)); return -1; } if (tossed) { - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); } @@ -830,11 +830,11 @@ if (memcmp(&addr->sin_addr, &conn->end.addr, sizeof(addr->sin_addr)) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong address: %s, ", + "endpoint:0x%x data from wrong address: %s, ", ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); LOGPC(DRTP, LOGL_ERROR, "expected: %s\n", inet_ntoa(conn->end.addr)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -846,12 +846,12 @@ if (conn->end.rtp_port != addr->sin_port && conn->end.rtcp_port != addr->sin_port) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong source port: %d, ", + "endpoint:0x%x data from wrong source port: %d, ", ENDPOINT_NUMBER(endp), ntohs(addr->sin_port)); LOGPC(DRTP, LOGL_ERROR, "expected: %d for RTP or %d for RTCP\n", ntohs(conn->end.rtp_port), ntohs(conn->end.rtcp_port)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -868,14 +868,14 @@ if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination IP-address is invalid\n", + "endpoint:0x%x destination IP-address is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } if (conn->end.rtp_port == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination rtp port is invalid\n", + "endpoint:0x%x destination rtp port is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -897,7 +897,7 @@ endp = conn->conn->endp; tcfg = endp->tcfg; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x receiving RTP/RTCP packet...\n", ENDPOINT_NUMBER(endp)); rc = receive_from(endp, fd->fd, addr, buf, buf_size); @@ -905,11 +905,11 @@ return -1; *proto = fd == &conn->end.rtp ? MGCP_PROTO_RTP : MGCP_PROTO_RTCP; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x ", ENDPOINT_NUMBER(endp)); LOGPC(DRTP, LOGL_DEBUG, "receiveing from %s %s %d\n", conn->conn->name, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); /* Check if the origin of the RTP packet seems plausible */ @@ -921,10 +921,10 @@ /* Filter out dummy message */ if (rc == 1 && buf[0] == MGCP_DUMMY_LOAD) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x dummy message received\n", + "endpoint:0x%x dummy message received\n", ENDPOINT_NUMBER(endp)); LOGP(DRTP, LOGL_ERROR, - "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); + "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -948,7 +948,7 @@ struct mgcp_endpoint *endp; endp = conn_src->conn->endp; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x destin conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_dst->conn)); /* Before we try to deliver the packet, we check if the destination @@ -962,7 +962,7 @@ switch (conn_dst->type) { case MGCP_RTP_DEFAULT: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_RTP_DEFAULT, " + "endpoint:0x%x endpoint type is MGCP_RTP_DEFAULT, " "using mgcp_send() to forward data directly\n", ENDPOINT_NUMBER(endp)); return mgcp_send(endp, proto == MGCP_PROTO_RTP, @@ -970,7 +970,7 @@ case MGCP_OSMUX_BSC_NAT: case MGCP_OSMUX_BSC: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_OSMUX_BSC_NAT, " + "endpoint:0x%x endpoint type is MGCP_OSMUX_BSC_NAT, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n", ENDPOINT_NUMBER(endp)); return osmux_xfrm_to_osmux(buf, buf_size, conn_dst); @@ -980,7 +980,7 @@ * be discarded, this should not happen, normally the MGCP type * should be properly set */ LOGP(DRTP, LOGL_ERROR, - "endpoint:%x bad MGCP type -- data discarded!\n", + "endpoint:0x%x bad MGCP type -- data discarded!\n", ENDPOINT_NUMBER(endp)); return -1; @@ -1025,7 +1025,7 @@ /* There is no destination conn, stop here */ if (!conn_dst) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find destination conn\n", + "endpoint:0x%x unable to find destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1033,7 +1033,7 @@ /* The destination conn is not an RTP connection */ if (conn_dst->type != MGCP_CONN_TYPE_RTP) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find suitable destination conn\n", + "endpoint:0x%x unable to find suitable destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1067,7 +1067,7 @@ endp = conn_src->conn->endp; OSMO_ASSERT(endp); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x source conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ @@ -1158,7 +1158,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtp, rtp_end->local_port) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTP port: %s:%d\n", endpno, source_addr, rtp_end->local_port); goto cleanup0; } @@ -1166,7 +1166,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtcp, rtp_end->local_port + 1) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTCP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTCP port: %s:%d\n", endpno, source_addr, rtp_end->local_port + 1); goto cleanup1; } @@ -1178,7 +1178,7 @@ rtp_end->rtp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTP port %d\n", endpno, + "endpoint:0x%x failed to register RTP port %d\n", endpno, rtp_end->local_port); goto cleanup2; } @@ -1186,7 +1186,7 @@ rtp_end->rtcp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTCP port %d\n", endpno, + "endpoint:0x%x failed to register RTCP port %d\n", endpno, rtp_end->local_port + 1); goto cleanup3; } @@ -1222,7 +1222,7 @@ if (end->rtp.fd != -1 || end->rtcp.fd != -1) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x %u was already bound on conn:%s\n", + "endpoint:0x%x %u was already bound on conn:%s\n", ENDPOINT_NUMBER(endp), rtp_port, mgcp_conn_dump(conn->conn)); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index feca8da..a1ecce2 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -534,7 +534,7 @@ * callids match up so that we are sure that this is our call */ if (endp->callid && mgcp_verify_call_id(endp, callid)) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x allready seized by other call (%s)\n", + "CRCX: endpoint:0x%x allready seized by other call (%s)\n", ENDPOINT_NUMBER(endp), endp->callid); if (tcfg->force_realloc) /* This is not our call, toss everything by releasing @@ -560,7 +560,7 @@ _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x unable to allocate RTP connection\n", + "CRCX: endpoint:0x%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; @@ -581,7 +581,7 @@ conn->osmux.state = OSMUX_STATE_NEGOTIATING; } else if (endp->cfg->osmux == OSMUX_USAGE_ONLY) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x osmux only and no osmux offered\n", + "CRCX: endpoint:0x%x osmux only and no osmux offered\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -608,7 +608,7 @@ if (setup_rtp_processing(endp, conn) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x could not start RTP processing!\n", + "CRCX: endpoint:0x%x could not start RTP processing!\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -621,7 +621,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x CRCX rejected by policy\n", + "CRCX: endpoint:0x%x CRCX rejected by policy\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); return create_err_response(endp, 400, "CRCX", p->trans); @@ -637,7 +637,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", + "CRCX: endpoint:0x%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -649,13 +649,13 @@ send_dummy(endp, conn); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x connection successfully created\n", + "CRCX: endpoint:0x%x connection successfully created\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "CRCX", p->trans); error2: mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x unable to create connection resource error\n", + "CRCX: endpoint:0x%x unable to create connection resource error\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, error_code, "CRCX", p->trans); } @@ -680,7 +680,7 @@ if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x endpoint is not holding a connection.\n", + "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -714,7 +714,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "MDCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -723,7 +723,7 @@ mgcp_header_done: if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", + "MDCX: endpoint:0x%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -762,7 +762,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x rejected by policy\n", + "MDCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -771,7 +771,7 @@ case MGCP_POLICY_DEFER: /* stop processing */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x defered by policy\n", + "MDCX: endpoint:0x%x defered by policy\n", ENDPOINT_NUMBER(endp)); return NULL; break; @@ -785,7 +785,7 @@ /* modify */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x modified conn:%s\n", + "MDCX: endpoint:0x%x modified conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); if (p->cfg->change_cb) p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), @@ -801,14 +801,14 @@ goto out_silent; LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x connection successfully modified\n", + "MDCX: endpoint:0x%x connection successfully modified\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "MDCX", p->trans); error3: return create_err_response(endp, error_code, "MDCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -828,12 +828,12 @@ return create_err_response(NULL, error_code, "DLCX", p->trans); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x deleting connection ...\n", + "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x endpoint is not holding a connection.\n", + "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "DLCX", p->trans); } @@ -857,7 +857,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "DLCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -871,7 +871,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x rejected by policy\n", + "DLCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -892,7 +892,7 @@ * RFC3435 Section F.7) */ if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", + "DLCX: endpoint:0x%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); @@ -912,11 +912,11 @@ mgcp_format_stats(stats, sizeof(stats), conn->conn); /* delete connection */ - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x deleting conn:%s\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x deleting conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); mgcp_conn_free(endp, conn_id); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x connection successfully deleted\n", + "DLCX: endpoint:0x%x connection successfully deleted\n", ENDPOINT_NUMBER(endp)); /* When all connections are closed, the endpoint will be released @@ -924,7 +924,7 @@ if (llist_count(&endp->conns) <= 0) { mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_DEBUG, - "DLCX: endpoint:%x endpoint released\n", + "DLCX: endpoint:0x%x endpoint released\n", ENDPOINT_NUMBER(endp)); } @@ -940,7 +940,7 @@ return create_err_response(endp, error_code, "DLCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -1188,7 +1188,7 @@ * \param[in] endp endpoint to release */ void mgcp_release_endp(struct mgcp_endpoint *endp) { - LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:%x\n", + LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", ENDPOINT_NUMBER(endp)); /* Normally this function should only be called wehen -- To view, visit https://gerrit.osmocom.org/5060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I284627de02cd140a894445375e9152ff007a71e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:28:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:28:45 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#3). Fix ctrl command parsing for python3 In python3 we got bytes, not string from the socket so we have to decode it properly before using split(). Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M osmopy/osmo_ipa.py M osmopy/twisted_ipa.py 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/3 diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..b5d11fc 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,12 +231,13 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data, op=None): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ + data = self.rem_header(raw_data).decode('utf-8') (s, i, v) = data.split(' ', 2) if s == self.CTRL_ERR: return None, v diff --git a/osmopy/twisted_ipa.py b/osmopy/twisted_ipa.py index bb8323d..5bc6740 100755 --- a/osmopy/twisted_ipa.py +++ b/osmopy/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:28:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:28:45 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#3). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M osmopy/__init__.py A osmopy/rate_ctr2csv.py M setup.py 4 files changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/3 diff --git a/README b/README index 25be782..64142f9 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +rate_ctr2csv.py - rate counter dumper on top of osmo_ipa Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..bb8cea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -6,6 +6,7 @@ 'osmo_ipa', 'osmo_ctrl', 'soap', + 'rate_ctr2csv', 'twisted_ipa', 'osmo_interact_common', 'osmo_interact_vty', diff --git a/osmopy/rate_ctr2csv.py b/osmopy/rate_ctr2csv.py new file mode 100755 index 0000000..3741212 --- /dev/null +++ b/osmopy/rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index 3e147c4..e74146f 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", "osmopy/soap.py", + "osmopy/rate_ctr2csv.py", "osmopy/osmo_ctrl.py", "osmopy/osmo_ipa.py", "osmopy/twisted_ipa.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:30:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:30:57 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#4). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M osmopy/__init__.py A osmopy/rate_ctr2csv.py M setup.py 4 files changed, 90 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/4 diff --git a/README b/README index 25be782..64142f9 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +rate_ctr2csv.py - rate counter dumper on top of osmo_ipa Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..66dc69d 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,11 +1,12 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl', 'soap', + 'rate_ctr2csv', 'twisted_ipa', 'osmo_interact_common', 'osmo_interact_vty', diff --git a/osmopy/rate_ctr2csv.py b/osmopy/rate_ctr2csv.py new file mode 100755 index 0000000..3741212 --- /dev/null +++ b/osmopy/rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index 3e147c4..e74146f 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["osmopy/osmo_interact_vty.py", "osmopy/osmo_interact_ctrl.py", "osmopy/soap.py", + "osmopy/rate_ctr2csv.py", "osmopy/osmo_ctrl.py", "osmopy/osmo_ipa.py", "osmopy/twisted_ipa.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:36:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 11:36:42 +0000 Subject: python/osmo-python-tests[master]: Fix ctrl command parsing for python3 In-Reply-To: References: Message-ID: Patch Set 3: Did you check that this change is compatible with python2? or we want to drop python2 support? -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:42:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:42:45 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Improve python3 compatibility * use print() * ignore unused exception Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M osmopy/obscvty.py M osmopy/osmo_ctrl.py M osmopy/osmodumpdoc.py M osmopy/osmotestconfig.py M osmopy/osmotestvty.py M osmopy/osmoutil.py 6 files changed, 44 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/2 diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..2963393 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -31,12 +31,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,14 +86,14 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ()) took, self.host, self.port, self.socket, len(VTYInteract.all_sockets)) self.socket.recv(4096) @@ -108,9 +108,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +248,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..752f14a 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -2,7 +2,7 @@ # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * Copyright (C) 2016-2017 sysmocom s.f.m.c. GmbH * * All Rights Reserved * @@ -22,6 +22,7 @@ */ """ +# FIXME: use argparse instead of deprecated optparse from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +31,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +58,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +104,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() diff --git a/osmopy/osmodumpdoc.py b/osmopy/osmodumpdoc.py index 2464b05..796b2b5 100644 --- a/osmopy/osmodumpdoc.py +++ b/osmopy/osmodumpdoc.py @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py index 2132c43..7c0715f 100644 --- a/osmopy/osmotestconfig.py +++ b/osmopy/osmotestconfig.py @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/osmopy/osmotestvty.py b/osmopy/osmotestvty.py index e513c05..52c5f22 100644 --- a/osmopy/osmotestvty.py +++ b/osmopy/osmotestvty.py @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..86c7e3d 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -30,10 +30,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +65,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +80,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:42:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:42:45 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py Message-ID: Review at https://gerrit.osmocom.org/5061 Use python3 for osmo_ctrl.py It's a standalone script illustrating the use of ctrl protocol from python. Since it's not used as a library and nothing depends on it, we can safely switch to python3. Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 --- M osmopy/osmo_ctrl.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/61/5061/1 diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 752f14a..b8a6c94 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* -- To view, visit https://gerrit.osmocom.org/5061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 11:46:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 11:46:05 +0000 Subject: python/osmo-python-tests[master]: Fix ctrl command parsing for python3 In-Reply-To: References: Message-ID: Patch Set 3: This particular function won't work in python2 but it's not used from python2 code anyway so it should be ok. Overall, I'd like to drop python2 of course but that's for some time in future when we have implemented tests - see OS#2684. -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 13:25:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 13:25:20 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding Message-ID: Review at https://gerrit.osmocom.org/5062 Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 7 files changed, 113 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/1 diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h index a2d4115..39b701f 100644 --- a/include/osmocom/coding/gsm0503_coding.h +++ b/include/osmocom/coding/gsm0503_coding.h @@ -63,6 +63,9 @@ int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total); +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic); +int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t bsic); + int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic); int gsm0503_rach_decode(uint8_t *ra, const sbit_t *burst, uint8_t bsic); diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5213dc5..59701d4 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -2822,13 +2822,60 @@ * b(0) = MSB of PLMN colour code * b(5) = LSB of BS colour code */ -static int rach_apply_bsic(ubit_t *d, uint8_t bsic) +static inline void rach_apply_bsic(ubit_t *d, uint8_t bsic, uint8_t start) { int i; /* Apply it */ for (i = 0; i < 6; i++) - d[8 + i] ^= ((bsic >> (5 - i)) & 1); + d[start + i] ^= ((bsic >> (5 - i)) & 1); +} + +/*! Decode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] ra output buffer for RACH data + * \param[in] burst Input burst data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error (e.g. CRC error) */ +int gsm0503_rach_ext_decode(uint16_t *ra11, const sbit_t *burst, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + int rv; + + osmo_conv_decode(&gsm0503_ext_rach, burst, conv); + + rach_apply_bsic(conv, bsic, 11); + + rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + if (rv) + return -1; + + osmo_ubit2pbit_ext(ra, 0, conv, 0, 11, 1); + + *ra11 = osmo_load16le(ra); + + return 0; +} + +/*! Encode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] burst Caller-allocated output burst buffer + * \param[in] ra Input RACH data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error */ +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra11, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + + osmo_store16le(ra11, ra); + + osmo_pbit2ubit_ext(conv, 0, ra, 0, 11, 1); + + osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + + rach_apply_bsic(conv, bsic, 11); + + osmo_conv_encode(&gsm0503_ext_rach, conv, burst); return 0; } @@ -2845,7 +2892,7 @@ osmo_conv_decode(&gsm0503_rach, burst, conv); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); if (rv) @@ -2869,7 +2916,7 @@ osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); osmo_conv_encode(&gsm0503_rach, conv, burst); diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map index dbb53de..95953cf 100644 --- a/src/coding/libosmocoding.map +++ b/src/coding/libosmocoding.map @@ -108,6 +108,8 @@ gsm0503_tch_afs_decode; gsm0503_tch_ahs_encode; gsm0503_tch_ahs_decode; +gsm0503_rach_ext_encode; +gsm0503_rach_ext_decode; gsm0503_rach_encode; gsm0503_rach_decode; gsm0503_sch_encode; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a72db52..51cd9b3 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -97,6 +97,7 @@ gsm0503_xcch; gsm0503_rach; +gsm0503_ext_rach; gsm0503_sch; gsm0503_cs2; gsm0503_cs3; diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..e6b25be 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -150,6 +150,38 @@ printd("\n"); } +static void test_rach_ext(uint8_t bsic, uint16_t ra) +{ + uint16_t result; + ubit_t bursts_u[36]; + sbit_t bursts_s[36]; + + /* Encode L2 message */ + printd("Encoding: %02x\n", ra); + gsm0503_rach_ext_encode(bursts_u, ra, bsic); + + /* Prepare soft-bits */ + ubits2sbits(bursts_u, bursts_s, 36); + + printd("U-Bits:\n"); + printd("%s\n", osmo_hexdump(bursts_u, 36)); + + printd("S-Bits:\n"); + printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + + /* Destroy some bits */ + memset(bursts_s + 9, 0, 8); + + /* Decode, correcting errors */ + gsm0503_rach_ext_decode(&result, bursts_s, bsic); + printd("Decoded: %02x\n", result); + + if (ra != result) + printf("FAIL [RACH ext]: encoded %u != %u decoded\n", ra, result); + + printd("\n"); +} + static void test_sch(uint8_t *info) { uint8_t result[4]; @@ -464,6 +496,12 @@ test_rach(0x1a, i); } + for (i = 0; i < 2048; i++) { + test_rach_ext(0x3f, i); + test_rach_ext(0x00, i); + test_rach_ext(0x1a, i); + } + for (i = 0; i < len_l2; i++) test_sch(test_l2[i]); diff --git a/tests/conv/conv_gsm0503_test.ok b/tests/conv/conv_gsm0503_test.ok index e6e2572..ad618a8 100644 --- a/tests/conv/conv_gsm0503_test.ok +++ b/tests/conv/conv_gsm0503_test.ok @@ -14,6 +14,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: gsm0503_ext_rach +[.] Input length : ret = 17 exp = 17 -> OK +[.] Output length : ret = 36 exp = 36 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: gsm0503_sch [.] Input length : ret = 35 exp = 35 -> OK [.] Output length : ret = 78 exp = 78 -> OK diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index 279bd3a..77b9ece 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -1,5 +1,5 @@ #!/usr/bin/python2 - +# -*- coding: utf-8 -*- from conv_gen import ConvolutionalCode from conv_gen import poly @@ -49,6 +49,15 @@ description = ["RACH convolutional code"] ), + # Extended RACH definition from 3GPP TS 45.003 ?5.3.2 + ConvolutionalCode( + 17, + shared_polys["xcch"], + puncture = [ 0, 2, 5, 37, 39, 41, -1 ], + name = "ext_rach", + description = ["Extended RACH (11 bit) convolutional code"] + ), + # SCH definition ConvolutionalCode( 35, -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 13:38:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 13:38:14 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#3). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 7 files changed, 113 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/3 diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h index a2d4115..39b701f 100644 --- a/include/osmocom/coding/gsm0503_coding.h +++ b/include/osmocom/coding/gsm0503_coding.h @@ -63,6 +63,9 @@ int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total); +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic); +int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t bsic); + int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic); int gsm0503_rach_decode(uint8_t *ra, const sbit_t *burst, uint8_t bsic); diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index cacc612..6e31575 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -2824,13 +2824,60 @@ * b(0) = MSB of PLMN colour code * b(5) = LSB of BS colour code */ -static int rach_apply_bsic(ubit_t *d, uint8_t bsic) +static inline void rach_apply_bsic(ubit_t *d, uint8_t bsic, uint8_t start) { int i; /* Apply it */ for (i = 0; i < 6; i++) - d[8 + i] ^= ((bsic >> (5 - i)) & 1); + d[start + i] ^= ((bsic >> (5 - i)) & 1); +} + +/*! Decode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] ra output buffer for RACH data + * \param[in] burst Input burst data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error (e.g. CRC error) */ +int gsm0503_rach_ext_decode(uint16_t *ra11, const sbit_t *burst, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + int rv; + + osmo_conv_decode(&gsm0503_ext_rach, burst, conv); + + rach_apply_bsic(conv, bsic, 11); + + rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + if (rv) + return -1; + + osmo_ubit2pbit_ext(ra, 0, conv, 0, 11, 1); + + *ra11 = osmo_load16le(ra); + + return 0; +} + +/*! Encode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] burst Caller-allocated output burst buffer + * \param[in] ra Input RACH data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error */ +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra11, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + + osmo_store16le(ra11, ra); + + osmo_pbit2ubit_ext(conv, 0, ra, 0, 11, 1); + + osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + + rach_apply_bsic(conv, bsic, 11); + + osmo_conv_encode(&gsm0503_ext_rach, conv, burst); return 0; } @@ -2847,7 +2894,7 @@ osmo_conv_decode(&gsm0503_rach, burst, conv); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); if (rv) @@ -2871,7 +2918,7 @@ osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); osmo_conv_encode(&gsm0503_rach, conv, burst); diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map index dbb53de..95953cf 100644 --- a/src/coding/libosmocoding.map +++ b/src/coding/libosmocoding.map @@ -108,6 +108,8 @@ gsm0503_tch_afs_decode; gsm0503_tch_ahs_encode; gsm0503_tch_ahs_decode; +gsm0503_rach_ext_encode; +gsm0503_rach_ext_decode; gsm0503_rach_encode; gsm0503_rach_decode; gsm0503_sch_encode; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a72db52..51cd9b3 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -97,6 +97,7 @@ gsm0503_xcch; gsm0503_rach; +gsm0503_ext_rach; gsm0503_sch; gsm0503_cs2; gsm0503_cs3; diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..4afeb1e 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -150,6 +150,38 @@ printd("\n"); } +static void test_rach_ext(uint8_t bsic, uint16_t ra) +{ + uint16_t result = 3000; /* Max ext. RA is 2^11 = 2048 */ + ubit_t bursts_u[36]; + sbit_t bursts_s[36]; + + /* Encode L2 message */ + printd("Encoding: %02x\n", ra); + gsm0503_rach_ext_encode(bursts_u, ra, bsic); + + /* Prepare soft-bits */ + ubits2sbits(bursts_u, bursts_s, 36); + + printd("U-Bits:\n"); + printd("%s\n", osmo_hexdump(bursts_u, 36)); + + printd("S-Bits:\n"); + printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + + /* Destroy some bits */ + memset(bursts_s + 9, 0, 8); + + /* Decode, correcting errors */ + gsm0503_rach_ext_decode(&result, bursts_s, bsic); + printd("Decoded: %02x\n", result); + + if (ra != result) + printf("FAIL [RACH ext]: encoded %u != %u decoded\n", ra, result); + + printd("\n"); +} + static void test_sch(uint8_t *info) { uint8_t result[4]; @@ -464,6 +496,12 @@ test_rach(0x1a, i); } + for (i = 0; i < 2048; i++) { + test_rach_ext(0x3f, i); + test_rach_ext(0x00, i); + test_rach_ext(0x1a, i); + } + for (i = 0; i < len_l2; i++) test_sch(test_l2[i]); diff --git a/tests/conv/conv_gsm0503_test.ok b/tests/conv/conv_gsm0503_test.ok index e6e2572..ad618a8 100644 --- a/tests/conv/conv_gsm0503_test.ok +++ b/tests/conv/conv_gsm0503_test.ok @@ -14,6 +14,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: gsm0503_ext_rach +[.] Input length : ret = 17 exp = 17 -> OK +[.] Output length : ret = 36 exp = 36 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: gsm0503_sch [.] Input length : ret = 35 exp = 35 -> OK [.] Output length : ret = 78 exp = 78 -> OK diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index 279bd3a..77b9ece 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -1,5 +1,5 @@ #!/usr/bin/python2 - +# -*- coding: utf-8 -*- from conv_gen import ConvolutionalCode from conv_gen import poly @@ -49,6 +49,15 @@ description = ["RACH convolutional code"] ), + # Extended RACH definition from 3GPP TS 45.003 ?5.3.2 + ConvolutionalCode( + 17, + shared_polys["xcch"], + puncture = [ 0, 2, 5, 37, 39, 41, -1 ], + name = "ext_rach", + description = ["Extended RACH (11 bit) convolutional code"] + ), + # SCH definition ConvolutionalCode( 35, -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 14:00:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 14:00:24 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#4). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 7 files changed, 113 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/4 diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h index a2d4115..39b701f 100644 --- a/include/osmocom/coding/gsm0503_coding.h +++ b/include/osmocom/coding/gsm0503_coding.h @@ -63,6 +63,9 @@ int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total); +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic); +int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t bsic); + int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic); int gsm0503_rach_decode(uint8_t *ra, const sbit_t *burst, uint8_t bsic); diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index cacc612..6e31575 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -2824,13 +2824,60 @@ * b(0) = MSB of PLMN colour code * b(5) = LSB of BS colour code */ -static int rach_apply_bsic(ubit_t *d, uint8_t bsic) +static inline void rach_apply_bsic(ubit_t *d, uint8_t bsic, uint8_t start) { int i; /* Apply it */ for (i = 0; i < 6; i++) - d[8 + i] ^= ((bsic >> (5 - i)) & 1); + d[start + i] ^= ((bsic >> (5 - i)) & 1); +} + +/*! Decode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] ra output buffer for RACH data + * \param[in] burst Input burst data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error (e.g. CRC error) */ +int gsm0503_rach_ext_decode(uint16_t *ra11, const sbit_t *burst, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + int rv; + + osmo_conv_decode(&gsm0503_ext_rach, burst, conv); + + rach_apply_bsic(conv, bsic, 11); + + rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + if (rv) + return -1; + + osmo_ubit2pbit_ext(ra, 0, conv, 0, 11, 1); + + *ra11 = osmo_load16le(ra); + + return 0; +} + +/*! Encode the Extended (11-bit) RACH according to 3GPP TS 45.003 + * \param[out] burst Caller-allocated output burst buffer + * \param[in] ra Input RACH data + * \param[in] bsic BSIC used in this cell + * \returns 0 on success; negative on error */ +int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra11, uint8_t bsic) +{ + ubit_t conv[17]; + uint8_t ra[2]; + + osmo_store16le(ra11, ra); + + osmo_pbit2ubit_ext(conv, 0, ra, 0, 11, 1); + + osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 11, conv + 11); + + rach_apply_bsic(conv, bsic, 11); + + osmo_conv_encode(&gsm0503_ext_rach, conv, burst); return 0; } @@ -2847,7 +2894,7 @@ osmo_conv_decode(&gsm0503_rach, burst, conv); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); rv = osmo_crc8gen_check_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); if (rv) @@ -2871,7 +2918,7 @@ osmo_crc8gen_set_bits(&gsm0503_rach_crc6, conv, 8, conv + 8); - rach_apply_bsic(conv, bsic); + rach_apply_bsic(conv, bsic, 8); osmo_conv_encode(&gsm0503_rach, conv, burst); diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map index dbb53de..95953cf 100644 --- a/src/coding/libosmocoding.map +++ b/src/coding/libosmocoding.map @@ -108,6 +108,8 @@ gsm0503_tch_afs_decode; gsm0503_tch_ahs_encode; gsm0503_tch_ahs_decode; +gsm0503_rach_ext_encode; +gsm0503_rach_ext_decode; gsm0503_rach_encode; gsm0503_rach_decode; gsm0503_sch_encode; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a72db52..51cd9b3 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -97,6 +97,7 @@ gsm0503_xcch; gsm0503_rach; +gsm0503_ext_rach; gsm0503_sch; gsm0503_cs2; gsm0503_cs3; diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 32b8953..86c683d 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -129,6 +129,38 @@ printd("\n"); } +static void test_rach_ext(uint8_t bsic, uint16_t ra) +{ + uint16_t result = 3000; /* Max ext. RA is 2^11 = 2048 */ + ubit_t bursts_u[36]; + sbit_t bursts_s[36]; + + /* Encode L2 message */ + printd("Encoding: %02x\n", ra); + gsm0503_rach_ext_encode(bursts_u, ra, bsic); + + /* Prepare soft-bits */ + osmo_ubit2sbit(bursts_s, bursts_u, 36); + + printd("U-Bits:\n"); + printd("%s\n", osmo_hexdump(bursts_u, 36)); + + printd("S-Bits:\n"); + printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + + /* Destroy some bits */ + memset(bursts_s + 9, 0, 8); + + /* Decode, correcting errors */ + gsm0503_rach_ext_decode(&result, bursts_s, bsic); + printd("Decoded: %02x\n", result); + + if (ra != result) + printf("FAIL [RACH ext]: encoded %u != %u decoded\n", ra, result); + + printd("\n"); +} + static void test_sch(uint8_t *info) { uint8_t result[4]; @@ -443,6 +475,12 @@ test_rach(0x1a, i); } + for (i = 0; i < 2048; i++) { + test_rach_ext(0x3f, i); + test_rach_ext(0x00, i); + test_rach_ext(0x1a, i); + } + for (i = 0; i < len_l2; i++) test_sch(test_l2[i]); diff --git a/tests/conv/conv_gsm0503_test.ok b/tests/conv/conv_gsm0503_test.ok index e6e2572..ad618a8 100644 --- a/tests/conv/conv_gsm0503_test.ok +++ b/tests/conv/conv_gsm0503_test.ok @@ -14,6 +14,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: gsm0503_ext_rach +[.] Input length : ret = 17 exp = 17 -> OK +[.] Output length : ret = 36 exp = 36 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: gsm0503_sch [.] Input length : ret = 35 exp = 35 -> OK [.] Output length : ret = 78 exp = 78 -> OK diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index 279bd3a..77b9ece 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -1,5 +1,5 @@ #!/usr/bin/python2 - +# -*- coding: utf-8 -*- from conv_gen import ConvolutionalCode from conv_gen import poly @@ -49,6 +49,15 @@ description = ["RACH convolutional code"] ), + # Extended RACH definition from 3GPP TS 45.003 ?5.3.2 + ConvolutionalCode( + 17, + shared_polys["xcch"], + puncture = [ 0, 2, 5, 37, 39, 41, -1 ], + name = "ext_rach", + description = ["Extended RACH (11 bit) convolutional code"] + ), + # SCH definition ConvolutionalCode( 35, -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 14:00:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 14:00:27 +0000 Subject: [PATCH] libosmocore[master]: Cleanup coding test Message-ID: Review at https://gerrit.osmocom.org/5063 Cleanup coding test Remove duplicate code - use function from libosmocore (and link to it). Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 --- M tests/Makefile.am M tests/coding/coding_test.c 2 files changed, 7 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/5063/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index e11092d..c609d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -165,7 +165,7 @@ socket_socket_test_SOURCES = socket/socket_test.c coding_coding_test_SOURCES = coding/coding_test.c -coding_coding_test_LDADD = \ +coding_coding_test_LDADD = $(LDADD) \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..32b8953 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -40,27 +40,6 @@ /* set condition to 1, to show debugging */ #define printd if (0) printf -static int ubits2sbits(ubit_t *ubits, sbit_t *sbits, int count) -{ - int i; - - for (i = 0; i < count; i++) { - if (*ubits == 0x23) { - ubits++; - sbits++; - continue; - } - - if ((*ubits++) & 1) { - *sbits++ = -127; - } else { - *sbits++ = 127; - } - } - - return count; -} - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -73,7 +52,7 @@ gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), @@ -130,7 +109,7 @@ gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 36); + osmo_ubit2sbit(bursts_s, bursts_u, 36); printd("U-Bits:\n"); printd("%s\n", osmo_hexdump(bursts_u, 36)); @@ -165,7 +144,7 @@ gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 78); + osmo_ubit2sbit(bursts_s, bursts_u, 78); printd("U-Bits:\n"); printd("%s\n", osmo_hexdump(bursts_u, 78)); @@ -201,7 +180,7 @@ gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 8); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); printd("U-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), @@ -287,7 +266,7 @@ gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 6); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); printd("U-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), @@ -371,7 +350,7 @@ gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 14:05:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 14:05:15 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: bsc_vty: Fix trailing whitespace Message-ID: Review at https://gerrit.osmocom.org/5064 cosmetic: bsc_vty: Fix trailing whitespace Change-Id: I7089062285c40ec11af479c98b43d1d407397c82 --- M src/libbsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/5064/1 diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 71c2cef..331007f 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -609,7 +609,7 @@ else vty_out(vty, " radio-link-timeout %d%s", gsm_bts_get_radio_link_timeout(bts), VTY_NEWLINE); - + vty_out(vty, " channel allocator %s%s", bts->chan_alloc_reverse ? "descending" : "ascending", VTY_NEWLINE); @@ -1447,7 +1447,7 @@ } bts = gsm_bts_num(net, bts_nr); bts_paging_dump_vty(vty, bts); - + return CMD_SUCCESS; } for (bts_nr = 0; bts_nr < net->num_bts; bts_nr++) { -- To view, visit https://gerrit.osmocom.org/5064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7089062285c40ec11af479c98b43d1d407397c82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 14:05:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 14:05:15 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: bsc_vty: Document bvci reserved values Message-ID: Review at https://gerrit.osmocom.org/5065 cosmetic: bsc_vty: Document bvci reserved values Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a --- M src/libbsc/bsc_vty.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/65/5065/1 diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 331007f..a0efe78 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -2384,6 +2384,7 @@ "GPRS BSSGP VC Identifier\n" "GPRS BSSGP VC Identifier") { + /* ETSI TS 101 343: values 0 and 1 are reserved for signalling and PTM */ struct gsm_bts *bts = vty->index; if (bts->gprs.mode == BTS_GPRS_NONE) { -- To view, visit https://gerrit.osmocom.org/5065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5008 to look at the new patch set (#2). OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/08/5008/2 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index d9ffd6e..90eeb40 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsOctphy(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -33,6 +34,7 @@ lac = None cellid = None proc_bts = None + _pcu = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -55,6 +57,11 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -165,6 +172,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -176,6 +187,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5011 to look at the new patch set (#2). suites: gprs: Introduce suite with ping test Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus we don't test sending data yet here, but at least we can already test pdp context activation. This test will be extended to run ping once we support setting up the GPRS data plane in osmo-gsm-tester. Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b --- M example/resources.conf A suites/gprs/ping.py A suites/gprs/suite.conf 3 files changed, 63 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/5011/2 diff --git a/example/resources.conf b/example/resources.conf index d503a48..26e1d80 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -7,6 +7,8 @@ - addr: 10.42.42.5 - addr: 10.42.42.6 - addr: 10.42.42.7 +- addr: 10.42.42.8 +- addr: 10.42.42.9 bts: - label: sysmoBTS 1002 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py new file mode 100755 index 0000000..3a0eb3a --- /dev/null +++ b/suites/gprs/ping.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +hlr = suite.hlr() +bts = suite.bts() +pcu = bts.pcu() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() +stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) +ms = suite.modem() + +bsc.bts_add(bts) +sgsn.bts_add(bts) + +print('start network...') +hlr.start() +stp.start() +ggsn.start() +sgsn.start() +msc.start() +mgcpgw.start() +mgw_bsc.start() +bsc.start() + +bts.start() +pcu.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) +ms.attach() + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('waiting for modems to attach to data services...') +wait(ms.is_attached) +ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) +# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) +# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) +# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v4) diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf new file mode 100644 index 0000000..1590b7d --- /dev/null +++ b/suites/gprs/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn + bts: + - times: 1 + modem: + - times: 1 + features: + - gprs -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoGgsn class In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5001 to look at the new patch set (#2). Add OsmoGgsn class Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 --- A src/osmo_gsm_tester/osmo_ggsn.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl 3 files changed, 169 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/5001/2 diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py new file mode 100644 index 0000000..c11353c --- /dev/null +++ b/src/osmo_gsm_tester/osmo_ggsn.py @@ -0,0 +1,89 @@ +# osmo_gsm_tester: specifics for running an openggsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoGgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + + def __init__(self, suite_run, ip_address): + super().__init__(log.C_RUN, 'osmo-ggsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-ggsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-ggsn'))) + + binary = inst.child('bin', 'osmo-ggsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-ggsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(ggsn=config.get_defaults('ggsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(ggsn=dict(ip_address=self.ip_address))) + config.overlay(values, dict(ggsn=dict(statedir=self.run_dir.new_dir('statedir')))) + + self.dbg('GGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-ggsn.cfg', values) + self.dbg(r) + f.write(r) + + def conf_for_client(self): + return dict(ggsn=dict(ip_address=self.ip_address)) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 2d04937..8c1d38d 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme class Timeout(Exception): pass @@ -230,6 +230,11 @@ ip_address = self.ip_address() return osmo_hlr.OsmoHlr(self, ip_address) + def ggsn(self, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_ggsn.OsmoGgsn(self, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl new file mode 100644 index 0000000..1ee19d1 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl @@ -0,0 +1,74 @@ +! +! OpenGGSN (0.94.1-adac) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level ip info + logging level tun info + logging level ggsn info + logging level sgsn notice + logging level icmp6 notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib notice + logging level lsms notice + logging level lctrl notice + logging level lgtp info + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice + logging level lmgcp notice + logging level all debug +! +stats interval 5 +! +line vty + no login +! +ggsn ggsn0 + gtp state-dir ${ggsn.statedir} + gtp bind-ip ${ggsn.ip_address.addr} + apn internet + gtpu-mode tun + tun-device tun4 + type-support v4 + ip prefix dynamic 176.16.222.0/24 + ip dns 0 8.8.8.8 + ip dns 1 8.8.8.4 + ip ifconfig 176.16.222.1/24 + no shutdown + apn inet6 + gtpu-mode tun + tun-device tun6 + type-support v6 + ipv6 prefix dynamic fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 + ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + no shutdown + apn inet46 + gtpu-mode tun + tun-device tun46 + type-support v4v6 + ip prefix dynamic 176.16.46.0/24 + ip dns 0 192.168.100.1 + ip dns 1 8.8.8.8 + ip ifconfig 176.16.46.0/24 + ipv6 prefix dynamic fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 + ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + no shutdown + default-apn internet + no shutdown ggsn -- To view, visit https://gerrit.osmocom.org/5001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoSgsn class In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5002 to look at the new patch set (#2). Add OsmoSgsn class Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb --- A src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl 3 files changed, 112 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/5002/2 diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py new file mode 100644 index 0000000..7a9c5ff --- /dev/null +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -0,0 +1,94 @@ +# osmo_gsm_tester: specifics for running an osmo-sgsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoSgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + hlr = None + ggsn = None + + def __init__(self, suite_run, hlr, ggsn, ip_address): + super().__init__(log.C_RUN, 'osmo-sgsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.hlr = hlr + self.ggsn = ggsn + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-sgsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-sgsn'))) + + binary = inst.child('bin', 'osmo-sgsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-sgsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(sgsn=config.get_defaults('sgsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(sgsn=dict(ip_address=self.ip_address))) + config.overlay(values, self.hlr.conf_for_client()) + config.overlay(values, self.ggsn.conf_for_client()) + + self.dbg('SGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-sgsn.cfg', values) + self.dbg(r) + f.write(r) + + def conf_for_client(self): + return dict(sgsn=dict(ip_address=self.ip_address)) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 8c1d38d..0d5f97a 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, modem, esme class Timeout(Exception): pass @@ -235,6 +235,11 @@ ip_address = self.ip_address() return osmo_ggsn.OsmoGgsn(self, ip_address) + def sgsn(self, hlr, ggsn, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_sgsn.OsmoSgsn(self, hlr, ggsn, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl index 4955983..9faf316 100644 --- a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl @@ -2,13 +2,21 @@ ! Osmocom SGSN configuration ! ! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level all debug line vty no login -! sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.1 + gtp local-ip ${sgsn.ip_address.addr} + ggsn 0 remote-ip ${ggsn.ip_address.addr} ggsn 0 gtp-version 1 + auth-policy remote + gsup remote-ip ${hlr.ip_address.addr} + gsup remote-port 4222 ! ns timer tns-block 3 @@ -18,7 +26,7 @@ timer tns-test 30 timer tns-alive 3 timer tns-alive-retries 10 - encapsulation udp local-ip 127.0.0.1 + encapsulation udp local-ip ${sgsn.ip_address.addr} encapsulation udp local-port 23000 encapsulation framerelay-gre enabled 0 ! -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5003 to look at the new patch set (#2). Add class OsmoPcuSysmo Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 --- A src/osmo_gsm_tester/pcu_sysmo.py A src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl 2 files changed, 143 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/5003/2 diff --git a/src/osmo_gsm_tester/pcu_sysmo.py b/src/osmo_gsm_tester/pcu_sysmo.py new file mode 100644 index 0000000..e601ad3 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_sysmo.py @@ -0,0 +1,131 @@ +# osmo_gsm_tester: specifics for running a osmo-pcu for sysmoBTS +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +from . import log, config, util, template, process, event_loop + +class OsmoPcuSysmo(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + remote_inst = None + remote_env = None + remote_dir = None + sysmobts = None + + REMOTE_DIR = '/osmo-gsm-tester-pcu' + PCU_SYSMO_BIN = 'osmo-pcu' + PCU_SYSMO_CFG = 'osmo-pcu-sysmo.cfg' + + def __init__(self, suite_run, sysmobts, conf): + super().__init__(log.C_RUN, self.PCU_SYSMO_BIN) + self.suite_run = suite_run + self.sysmobts = sysmobts + self.conf = conf + self.remote_env = {} + self.remote_user = 'root' + + def start(self): + self.log('Waiting for bts to be ready...') + # othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" + event_loop.wait(self, self.sysmobts.ready_for_pcu) + + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu-sysmo'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', OsmoPcuSysmo.PCU_SYSMO_BIN): + raise log.Error('No osmo-pcu-sysmo binary in', self.inst) + + self.remote_dir = util.Dir(OsmoPcuSysmo.REMOTE_DIR) + self.remote_inst = util.Dir(self.remote_dir.child(os.path.basename(str(self.inst)))) + + self.run_remote('rm-remote-dir', ('test', '!', '-d', OsmoPcuSysmo.REMOTE_DIR, '||', 'rm', '-rf', OsmoPcuSysmo.REMOTE_DIR)) + self.run_remote('mk-remote-dir', ('mkdir', '-p', OsmoPcuSysmo.REMOTE_DIR)) + self.run_local('scp-inst-to-sysmobts', + ('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), str(self.remote_inst)))) + + remote_run_dir = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_BIN) + self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) + + remote_config_file = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.run_local('scp-cfg-to-sysmobts', + ('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), remote_config_file))) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', OsmoPcuSysmo.PCU_SYSMO_BIN) + self.launch_remote(OsmoPcuSysmo.PCU_SYSMO_BIN, + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.sysmobts.bsc.addr()), + remote_cwd=remote_run_dir) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.sysmobts.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_pcu_sysmo': config.get_defaults('osmo_pcu_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu_sysmo': { + 'pcu_socket_path': self.sysmobts.pcu_socket_path() + } + }) + config.overlay(values, { 'osmo_pcu_sysmo': self.conf }) + + self.dbg('OSMO-PCU-SYSMO CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcuSysmo.PCU_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl new file mode 100644 index 0000000..632bc27 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl @@ -0,0 +1,12 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug +pcu + pcu-socket ${osmo_pcu_sysmo.pcu_socket_path} + flow-control-interval 10 + cs 2 + alloc-algorithm dynamic + alpha 0 + gamma 0 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5004 to look at the new patch set (#2). Add OsmoPcu class Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 --- A src/osmo_gsm_tester/pcu_osmo.py M src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl 2 files changed, 98 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/5004/2 diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py new file mode 100644 index 0000000..f2f00e8 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_osmo.py @@ -0,0 +1,92 @@ +# osmo_gsm_tester: specifics for running an osmo-pcu +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoPcu(log.Origin): + suite_run = None + run_dir = None + inst = None + env = None + + BIN_PCU = 'osmo-pcu' + PCU_OSMO_CFG = 'osmo-pcu.cfg' + + def __init__(self, suite_run, bts, conf): + super().__init__(log.C_RUN, OsmoPcu.BIN_PCU) + self.suite_run = suite_run + self.bts = bts + self.conf = conf + self.env = {} + + def start(self): + self.log('Waiting for bts to be ready...') + # othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" + event_loop.wait(self, self.bts.ready_for_pcu) + + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.launch_process(OsmoPcu.BIN_PCU, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bts.bsc.addr()) + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcu.PCU_OSMO_CFG) + self.dbg(config_file=self.config_file) + + values = dict(osmo_pcu=config.get_defaults('osmo_pcu')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu': { + 'pcu_socket_path': self.bts.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_pcu': self.conf }) + + self.dbg('OSMO-PCU CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcu.PCU_OSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl index b88e6e7..02382c2 100644 --- a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl @@ -1,4 +1,10 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug pcu + pcu-socket ${osmo_pcu.pcu_socket_path} flow-control-interval 10 cs 2 alloc-algorithm dynamic -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5006 to look at the new patch set (#2). OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/2 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..70aa2b9 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 1b21e63..43afa40 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,7 +61,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..f3b1830 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si + % else: gprs mode none + % endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5007 to look at the new patch set (#2). OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn Change-Id: I777835345355538a945599fb088630af63dc9140 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/07/5007/2 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index d30c1ee..19c99d9 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsTrx(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -33,6 +34,7 @@ lac = None cellid = None proc_bts = None + _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -55,6 +57,11 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -143,6 +150,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -154,6 +165,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resource: next_lac: Avoid using LAC 0 Message-ID: Review at https://gerrit.osmocom.org/5066 resource: next_lac: Avoid using LAC 0 Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f --- M src/osmo_gsm_tester/resource.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/66/5066/1 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 746aae0..8412d6a 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -211,7 +211,8 @@ return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) def next_lac(self, origin): - return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + # LAC=0 has special meaning (MS detached), avoid it + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) -- To view, visit https://gerrit.osmocom.org/5066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add ready_for_pcu API Message-ID: Review at https://gerrit.osmocom.org/5067 bts_*: Add ready_for_pcu API This is required to start osmo-pcu after osmo-bts is already setup and activated. Otherwise osmo-pcu ends after connecting to socket with: "pcu_l1_if.cpp:416 BTS not available" Change-Id: I7209589f60bda63094336e417638906be5e273c4 --- M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl 6 files changed, 32 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/67/5067/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index bc93a3a..d9ffd6e 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,6 +32,7 @@ values = None lac = None cellid = None + proc_bts = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -83,10 +84,9 @@ self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) - self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', '-c', os.path.abspath(self.config_file), '-i', self.bsc.addr(), '-t', str(self.num_trx())) - #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1') self.suite_run.poll() def launch_process(self, binary_name, *args): @@ -168,6 +168,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index a964169..d30c1ee 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,6 +32,7 @@ pcu_sk_tmp_dir = None lac = None cellid = None + proc_bts = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -92,10 +93,9 @@ raise RuntimeError('No lib/ in %r' % self.inst) self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', + self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', '-c', os.path.abspath(self.config_file), '-i', self.bsc.addr()) - #self.launch_process(OsmoBtsTrx.BIN_PCU, '-r', '1') self.suite_run.poll() def launch_process(self, binary_name, *args): @@ -146,6 +146,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index fc546ae..1a7b139 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,6 +31,7 @@ remote_dir = None lac = None cellid = None + proc_bts = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -76,11 +77,11 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + self.proc_bts = self.launch_remote('osmo-bts-sysmo', + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()), + remote_cwd=remote_run_dir) def cleanup(self): pass @@ -105,6 +106,7 @@ proc = self._process_remote(name, popen_args, remote_cwd) self.suite_run.remember_to_stop(proc) proc.launch() + return proc def run_local(self, name, popen_args): run_dir = self.run_dir.new_dir(name) @@ -153,6 +155,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl index 13cdb1d..906e7b9 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl @@ -9,6 +9,8 @@ logging level rll debug logging level rr debug logging level rsl debug + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! %for phy in osmo_bts_octphy.phy_list: diff --git a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl index 69f7ac1..c9dde86 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl @@ -9,6 +9,8 @@ logging level rll debug logging level rr debug logging level rsl debug + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! phy 0 instance 0 diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl index c316e62..1931e9b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl @@ -12,6 +12,8 @@ logging level l1c info logging level l1p error logging level trx info + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! phy 0 osmotrx ip local ${osmo_bts_trx.trx_local_ip} -- To view, visit https://gerrit.osmocom.org/5067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7209589f60bda63094336e417638906be5e273c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:07:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:07:51 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values Message-ID: Review at https://gerrit.osmocom.org/5068 bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 8 files changed, 70 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/68/5068/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 19c99d9..f49a253 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 43afa40..57b0dbf 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -63,9 +63,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -77,7 +77,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -85,7 +85,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index f3b1830..f0295ba 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:09:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:09:25 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: I pushed the changing RAC/BVCI/NSEI/NSVCI values in config in another commit after this one: https://gerrit.osmocom.org/#/c/5068 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:19:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:19:45 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 80 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/68/5068/2 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 70aa2b9..2ea8cc0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -51,9 +51,9 @@ ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts0 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts0 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts0 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts0 gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 @@ -122,9 +122,9 @@ ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts1 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts1 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -136,7 +136,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts1 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -144,7 +144,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts1 gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 314dd8d..f4f1bd5 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,7 +22,9 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'routing_area_code': 'val_bts.routing_area_code', 'cell_identity': 'val_bts.cell_identity', + 'bvci': 'val_bts.bvci', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 19c99d9..f49a253 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 43afa40..57b0dbf 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -63,9 +63,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -77,7 +77,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -85,7 +85,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index f3b1830..f0295ba 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:31:33 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:31:33 +0000 Subject: osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/4669/2/OsmoGSMTester/chapters/config.adoc File OsmoGSMTester/chapters/config.adoc: Line 73: no longer reserved. > on second thought, not sure if we need to spend effort describing each and Indeed, I think having those three make sense as a description but other last_used_*_.state are not needed. -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:34:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:34:03 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4667 to look at the new patch set (#5). OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/67/4667/5 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..a56c4ad 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,61 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +This dir contains scenario configuration files. + +Scenarios define constraints to serve the resource requests of a 'suite.conf', +to select specific resources from the general resource pool specified in 'resources.conf'. + +All 'times' attributes are expanded before matching. For example, if a 'suite.conf' +requests two BTS, we may enforce that both BTS should be of type 'osmo-bts-sysmo' in +these ways: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that remaining +resources have no restrictions to be taken into consideration. + +To apply restrictions only on the second resource, the first element can be left +emtpy, like: + +---- +resources: + bts: + - {} + - type: osmo-bts-sysmo +---- + +On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any number of +such scenario configurations can be combined in the form: + +---- +:[+[+...]] +---- + +e.g. + +---- +my_suite:sysmo+tch_f+amr +---- + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:35:14 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 15:35:14 +0000 Subject: [PATCH] osmo-bsc[master]: auth: remove obsolete VTY commands Message-ID: Review at https://gerrit.osmocom.org/5069 auth: remove obsolete VTY commands Authentication is no longer done in the BSC, the variables that set the authentication policy and the IMSI regex have no longer any effect. Remove auth policy and authorized-regexp Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c 7 files changed, 0 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/5069/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 69f8ab7..60338d2 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -8,8 +8,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - auth policy closed - authorized-regexp .* location updating reject cause 13 encryption a5 0 authentication optional diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 59e7090..f9f5ba6 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -7,8 +7,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - auth policy closed - authorized-regexp .* location updating reject cause 13 encryption a5 0 authentication optional diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b9427b8..845e714 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -369,9 +369,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm_auth_policy auth_policy; - regex_t authorized_regexp; - char *authorized_reg_str; enum gsm48_reject_value reject_cause; int a5_encryption; bool authentication_required; diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index fa8c477..1874200 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -477,14 +477,6 @@ return -EINVAL; } - if (bts->network->auth_policy == GSM_AUTH_POLICY_ACCEPT_ALL && - !bts->si_common.rach_control.cell_bar) - LOGP(DNM, LOGL_ERROR, "\nWARNING: You are running an 'accept-all' " - "network on a BTS that is not barred. This " - "configuration is likely to interfere with production " - "GSM networks and should only be used in a RF " - "shielded environment such as a faraday cage!\n\n"); - /* Control Channel Description is set from vty/config */ /* T3212 is set from vty/config */ diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 71c2cef..cd18e3a 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -171,10 +171,6 @@ net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s", - gsm_auth_policy_name(net->auth_policy)); - if (net->authorized_reg_str) - vty_out(vty, ", authorized regexp: %s", net->authorized_reg_str); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); @@ -803,9 +799,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); - if (gsmnet->authorized_reg_str) - vty_out(vty, " authorized-regexp %s%s", gsmnet->authorized_reg_str, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 16d51a1..b3037c6 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -44,14 +44,8 @@ { struct gsm_network *net; - const char *default_regexp = ".*"; - net = talloc_zero(ctx, struct gsm_network); if (!net) - return NULL; - - if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, - &default_regexp) != 0) return NULL; net->country_code = country_code; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 040aa15..51f16c4 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -103,40 +103,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_auth_policy, - cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|regexp|token)", - "Authentication (not cryptographic)\n" - "Set the GSM network authentication policy\n" - "Require the MS to be activated in HLR\n" - "Accept all MS, whether in HLR or not\n" - "Use regular expression for IMSI authorization decision\n" - "Use SMS-token based authentication\n") -{ - enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->auth_policy = policy; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, - "authorized-regexp REGEXP", - "Set regexp for IMSI which will be used for authorization decision\n" - "Regular expression, IMSIs matching it are allowed to use the network\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, - &gsmnet->authorized_reg_str, argc, argv) != 0) { - vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", - argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - - return CMD_SUCCESS; -} - DEFUN(cfg_net_reject_cause, cfg_net_reject_cause_cmd, "location updating reject cause <2-111>", @@ -329,8 +295,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); - install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_authentication_cmd); -- To view, visit https://gerrit.osmocom.org/5069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:42:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:42:20 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: ofono_client: Discover modem path from imsi ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/2696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I602604d25f51b24d87877bc8ac798525b7be61dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 15:45:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 15:45:42 +0000 Subject: osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support In-Reply-To: References: Message-ID: Patch Set 7: Description on how should the ARFCN resources be handled can be found in https://osmocom.org/issues/2230#note-6 Closing this patch as the new implementation needed is described there. -- To view, visit https://gerrit.osmocom.org/3731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:13:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:13:39 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#5). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 8 files changed, 30,831 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/5 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:13:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:13:39 +0000 Subject: [PATCH] libosmocore[master]: Cleanup coding test In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5063 to look at the new patch set (#2). Cleanup coding test * remove duplicate code: use function from libosmocore * use utility function to dump ubits * reformat for easier reading * link against libosmocore Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 --- M tests/Makefile.am M tests/coding/coding_test.c 2 files changed, 53 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/5063/2 diff --git a/tests/Makefile.am b/tests/Makefile.am index e11092d..c609d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -165,7 +165,7 @@ socket_socket_test_SOURCES = socket/socket_test.c coding_coding_test_SOURCES = coding/coding_test.c -coding_coding_test_LDADD = \ +coding_coding_test_LDADD = $(LDADD) \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..c0f0d4b 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -40,27 +40,6 @@ /* set condition to 1, to show debugging */ #define printd if (0) printf -static int ubits2sbits(ubit_t *ubits, sbit_t *sbits, int count) -{ - int i; - - for (i = 0; i < count; i++) { - if (*ubits == 0x23) { - ubits++; - sbits++; - continue; - } - - if ((*ubits++) & 1) { - *sbits++ = -127; - } else { - *sbits++ = 127; - } - } - - return count; -} - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -73,21 +52,17 @@ gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -130,10 +105,9 @@ gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 36); + osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 36)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); printd("S-Bits:\n"); printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); @@ -165,10 +139,9 @@ gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 78); + osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 78)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); printd("S-Bits:\n"); printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); @@ -201,33 +174,25 @@ gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 8); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 696, 57), - bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 812, 57), - bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 812, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -287,27 +252,21 @@ gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 6); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -371,21 +330,17 @@ gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:13:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:13:44 +0000 Subject: [PATCH] libosmocore[master]: Enable debug output for coding test Message-ID: Review at https://gerrit.osmocom.org/5070 Enable debug output for coding test Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 --- M tests/coding/coding_test.c M tests/coding/coding_test.ok 2 files changed, 5,062 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/5070/1 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index c0f0d4b..212c9fa 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,9 +37,6 @@ abort(); \ } -/* set condition to 1, to show debugging */ -#define printd if (0) printf - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -48,35 +45,35 @@ int n_errors, n_bits_total; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, 23)); + printf("Encoding: %s\n", osmo_hexdump(l2, 23)); gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -84,14 +81,14 @@ /* Decode, correcting errors */ gsm0503_xcch_decode(result, bursts_s, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, 23)); + printf("Decoded: %s\n", osmo_hexdump(result, 23)); printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); ASSERT_TRUE(n_bits_total == 456); ASSERT_TRUE(!memcmp(l2, result, 23)); - printd("\n"); + printf("\n"); } static void test_rach(uint8_t bsic, uint8_t ra) @@ -101,27 +98,27 @@ sbit_t bursts_s[36]; /* Encode L2 message */ - printd("Encoding: %02x\n", ra); + printf("Encoding: %02x\n", ra); gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printf("S-Bits:\n"); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); /* Decode, correcting errors */ gsm0503_rach_decode(&result, bursts_s, bsic); - printd("Decoded: %02x\n", result); + printf("Decoded: %02x\n", result); ASSERT_TRUE(ra == result); - printd("\n"); + printf("\n"); } static void test_sch(uint8_t *info) @@ -135,27 +132,27 @@ result[3] = 0; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(info, 4)); + printf("Encoding: %s\n", osmo_hexdump(info, 4)); gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printf("S-Bits:\n"); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); /* Decode, correcting errors */ gsm0503_sch_decode(result, bursts_s); - printd("Decoded: %s\n", osmo_hexdump(result, 4)); + printf("Decoded: %s\n", osmo_hexdump(result, 4)); ASSERT_TRUE(!memcmp(info, result, 4)); - printd("\n"); + printf("\n"); } static void test_fr(uint8_t *speech, int len) @@ -170,55 +167,55 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -226,14 +223,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_fr_decode(result, bursts_s, 1, len == 31, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_hr(uint8_t *speech, int len) @@ -248,45 +245,45 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -294,14 +291,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_hr_decode(result, bursts_s, 0, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_pdtch(uint8_t *l2, int len) @@ -326,47 +323,47 @@ } /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, len)); + printf("Encoding: %s\n", osmo_hexdump(l2, len)); gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(l2, result, len)); - printd("\n"); + printf("\n"); } uint8_t test_l2[][23] = { diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok index 5030e4d..1af4ef3 100644 --- a/tests/coding/coding_test.ok +++ b/tests/coding/coding_test.ok @@ -1,21 +1,4963 @@ +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000010000100000000100000000000000000000101000010000001 01 01 010000100000010000001000000101000010100000000000001000000 +000000010010000000010000000010000001000010100001000000000 01 01 000000100000010000101000000000000000000001000000000001000 +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +S-Bits: +81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 00 +U-Bits: 000000000000000000000000000000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011101001101001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011010000101110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 00 + +Encoding: 01 +U-Bits: 110100111100000000111010100000110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011010011001001110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011101010001110001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 01 + +Encoding: 02 +U-Bits: 001101001111000000001110101000001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011100111000001001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011011110000110110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 02 + +Encoding: 03 +U-Bits: 111001110011000000110100001000111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011011101100001111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011100100100110000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 03 + +Encoding: 04 +U-Bits: 000011010011110000000011101010000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011101010000011000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011010011000100111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 04 + +Encoding: 05 +U-Bits: 110111101111110000111001001010110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011010000100011110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011101001100100001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 05 + +Encoding: 06 +U-Bits: 001110011100110000001101000010001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011100100101011001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011011101101100110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 06 + +Encoding: 07 +U-Bits: 111010100000110000110111100010111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011011110001011111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011100111001100000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 07 + +Encoding: 08 +U-Bits: 000000110100111111100100011111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100001101110110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100110100110001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 08 + +Encoding: 09 +U-Bits: 110100001000111111011110111111000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100110111010110000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100001110010001111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 09 + +Encoding: 0a +U-Bits: 001101111011111111101010110111111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100000011011110111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100111010011001000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0a + +Encoding: 0b +U-Bits: 111001000111111111010000010111001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100111001111110001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100000000111001110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 0b + +Encoding: 0c +U-Bits: 000011100111001111100111110101110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100001110011100110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100110111011011001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 0c + +Encoding: 0d +U-Bits: 110111011011001111011101010101000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100110100111100000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100001101111011111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 0d + +Encoding: 0e +U-Bits: 001110101000001111101001011101111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100000000110100111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100111001110011000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 0e + +Encoding: 0f +U-Bits: 111010010100001111010011111101001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100111010010100001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100000011010011110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 0f + +Encoding: 10 +U-Bits: 000000001101001111111001000111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100010000101110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100101001101001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 10 + +Encoding: 11 +U-Bits: 110100110001001111000011100111001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100101010001110001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100010011001001110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 11 + +Encoding: 12 +U-Bits: 001101000010001111110111101111110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100011110000110110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100100111000001001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 12 + +Encoding: 13 +U-Bits: 111001111110001111001101001111000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100100100100110000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100011101100001111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 13 + +Encoding: 14 +U-Bits: 000011011110111111111010101101111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100010011000100111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100101010000011000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 14 + +Encoding: 15 +U-Bits: 110111100010111111000000001101001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100101001100100001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100010000100011110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 15 + +Encoding: 16 +U-Bits: 001110010001111111110100000101110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100011101101100110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100100100101011001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 16 + +Encoding: 17 +U-Bits: 111010101101111111001110100101000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100100111001100000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100011110001011111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 17 + +Encoding: 18 +U-Bits: 000000111001110000011101011000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011110100110001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011001101110110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 18 + +Encoding: 19 +U-Bits: 110100000101110000100111111000111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011001110010001111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011110111010110000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 19 + +Encoding: 1a +U-Bits: 001101110110110000010011110000000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011111010011001000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011000011011110111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 1a + +Encoding: 1b +U-Bits: 111001001010110000101001010000110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011000000111001110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011111001111110001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 1b + +Encoding: 1c +U-Bits: 000011101010000000011110110010001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011110111011011001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011001110011100110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1c + +Encoding: 1d +U-Bits: 110111010110000000100100010010111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011001101111011111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011110100111100000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1d + +Encoding: 1e +U-Bits: 001110100101000000010000011010000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011111001110011000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011000000110100111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 1e + +Encoding: 1f +U-Bits: 111010011001000000101010111010110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011000011010011110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011111010010100001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 1f + +Encoding: 20 +U-Bits: 000000000011010011111110010001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000010111111000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000101110111111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 20 + +Encoding: 21 +U-Bits: 110100111111010011000100110001001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000101101011000001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000010100011111110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 21 + +Encoding: 22 +U-Bits: 001101001100010011110000111001110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000011001010000110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000100000010111001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 22 + +Encoding: 23 +U-Bits: 111001110000010011001010011001000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000100011110000000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 23 + +Encoding: 24 +U-Bits: 000011010000100011111101111011111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000010100010010111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000101101010101000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 24 + +Encoding: 25 +U-Bits: 110111101100100011000111011011001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000101110110010001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000010111110101110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 25 + +Encoding: 26 +U-Bits: 001110011111100011110011010011110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000011010111010110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000100011111101001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 26 + +Encoding: 27 +U-Bits: 111010100011100011001001110011000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000100000011010000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000011001011101111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 27 + +Encoding: 28 +U-Bits: 000000110111101100011010001110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111110011100111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111001010100000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 28 + +Encoding: 29 +U-Bits: 110100001011101100100000101110111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111001001000111111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111110000000000000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 29 + +Encoding: 2a +U-Bits: 001101111000101100010100100110000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111111101001111000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111000100001000111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 2a + +Encoding: 2b +U-Bits: 111001000100101100101110000110110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111000111101111110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111111110101000001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2b + +Encoding: 2c +U-Bits: 000011100100011100011001100100001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111110000001101001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111001001001010110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 2c + +Encoding: 2d +U-Bits: 110111011000011100100011000100111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111001010101101111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111110011101010000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2d + +Encoding: 2e +U-Bits: 001110101011011100010111001100000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111111110100101000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111000111100010111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 2e + +Encoding: 2f +U-Bits: 111010010111011100101101101100110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111000100000101110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111111101000010001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 2f + +Encoding: 30 +U-Bits: 000000001110011100000111010110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111101110111111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111010111111000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 30 + +Encoding: 31 +U-Bits: 110100110010011100111101110110110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111010100011111110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111101101011000001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 31 + +Encoding: 32 +U-Bits: 001101000001011100001001111110001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111100000010111001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111011001010000110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 32 + +Encoding: 33 +U-Bits: 111001111101011100110011011110111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111100011110000000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 33 + +Encoding: 34 +U-Bits: 000011011101101100000100111100000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111101101010101000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111010100010010111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 34 + +Encoding: 35 +U-Bits: 110111100001101100111110011100110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111010111110101110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111101110110010001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 35 + +Encoding: 36 +U-Bits: 001110010010101100001010010100001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111100011111101001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111011010111010110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 36 + +Encoding: 37 +U-Bits: 111010101110101100110000110100111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111011001011101111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111100000011010000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 37 + +Encoding: 38 +U-Bits: 000000111010100011100011001001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000001010100000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000110011100111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 38 + +Encoding: 39 +U-Bits: 110100000110100011011001101001000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000110000000000000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000001001000111111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 39 + +Encoding: 3a +U-Bits: 001101110101100011101101100001111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000000100001000111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000111101001111000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3a + +Encoding: 3b +U-Bits: 111001001001100011010111000001001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000111110101000001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000000111101111110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 3b + +Encoding: 3c +U-Bits: 000011101001010011100000100011110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000001001001010110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000110000001101001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 3c + +Encoding: 3d +U-Bits: 110111010101010011011010000011000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000110011101010000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000001010101101111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 3d + +Encoding: 3e +U-Bits: 001110100110010011101110001011111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000000111100010111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000111110100101000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 3e + +Encoding: 3f +U-Bits: 111010011010010011010100101011001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000111101000010001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000000100000101110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 3f + +Encoding: 40 +U-Bits: 000000000000110111011011000001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100110010101000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100001011101111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 40 + +Encoding: 41 +U-Bits: 110100111100110111100001100001111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100001000001000111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100110001001111000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 41 + +Encoding: 42 +U-Bits: 001101001111110111010101101001000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100111100000000000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100000101000111111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 42 + +Encoding: 43 +U-Bits: 111001110011110111101111001001110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100000110100000110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100111111100111001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 43 + +Encoding: 44 +U-Bits: 000011010011000111011000101011001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100110001000010001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100001000000101110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 44 + +Encoding: 45 +U-Bits: 110111101111000111100010001011111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100001011100010111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100110010100101000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 45 + +Encoding: 46 +U-Bits: 001110011100000111010110000011000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100111111101010000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100000110101101111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 46 + +Encoding: 47 +U-Bits: 111010100000000111101100100011110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100000101001010110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100111100001101001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 47 + +Encoding: 48 +U-Bits: 000000110100001000111111011110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011010110110111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011101111110000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 48 + +Encoding: 49 +U-Bits: 110100001000001000000101111110001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011101100010111001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011010101010000110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 49 + +Encoding: 4a +U-Bits: 001101111011001000110001110110110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011011000011111110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011100001011000001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4a + +Encoding: 4b +U-Bits: 111001000111001000001011010110000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011100010111111000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011011011111000111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 4b + +Encoding: 4c +U-Bits: 000011100111111000111100110100111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011010101011101111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011101100011010000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4c + +Encoding: 4d +U-Bits: 110111011011111000000110010100001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011101111111101001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011010110111010110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 4d + +Encoding: 4e +U-Bits: 001110101000111000110010011100110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011011011110101110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011100010110010001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 4e + +Encoding: 4f +U-Bits: 111010010100111000001000111100000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011100001010101000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011011000010010111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 4f + +Encoding: 50 +U-Bits: 000000001101111000100010000110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011001011101111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011110010101000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 50 + +Encoding: 51 +U-Bits: 110100110001111000011000100110000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011110001001111000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011001000001000111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 51 + +Encoding: 52 +U-Bits: 001101000010111000101100101110111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011000101000111111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011111100000000000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 52 + +Encoding: 53 +U-Bits: 111001111110111000010110001110001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011111111100111001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011000110100000110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 53 + +Encoding: 54 +U-Bits: 000011011110001000100001101100110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011001000000101110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011110001000010001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 54 + +Encoding: 55 +U-Bits: 110111100010001000011011001100000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011110010100101000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011001011100010111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 55 + +Encoding: 56 +U-Bits: 001110010001001000101111000100111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011000110101101111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011111111101010000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 56 + +Encoding: 57 +U-Bits: 111010101101001000010101100100001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011111100001101001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011000101001010110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 57 + +Encoding: 58 +U-Bits: 000000111001000111000110011001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100101111110000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100010110110111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 58 + +Encoding: 59 +U-Bits: 110100000101000111111100111001110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100010101010000110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100101100010111001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 59 + +Encoding: 5a +U-Bits: 001101110110000111001000110001001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100100001011000001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100011000011111110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 5a + +Encoding: 5b +U-Bits: 111001001010000111110010010001111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100011011111000111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100100010111111000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5b + +Encoding: 5c +U-Bits: 000011101010110111000101110011000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100101100011010000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100010101011101111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 5c + +Encoding: 5d +U-Bits: 110111010110110111111111010011110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100010110111010110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100101111111101001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 5d + +Encoding: 5e +U-Bits: 001110100101110111001011011011001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100100010110010001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100011011110101110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 5e + +Encoding: 5f +U-Bits: 111010011001110111110001111011111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100011000010010111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100100001010101000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 5f + +Encoding: 60 +U-Bits: 000000000011100100100101010000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111001100111001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111110101111110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 60 + +Encoding: 61 +U-Bits: 110100111111100100011111110000000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111110110011001000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111001111011110111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 61 + +Encoding: 62 +U-Bits: 001101001100100100101011111000111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111000010010001111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111111011010110000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 62 + +Encoding: 63 +U-Bits: 111001110000100100010001011000001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111111000110001001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111000001110110110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 63 + +Encoding: 64 +U-Bits: 000011010000010100100110111010110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111001111010011110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111110110010100001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 64 + +Encoding: 65 +U-Bits: 110111101100010100011100011010000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111110101110011000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111001100110100111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 65 + +Encoding: 66 +U-Bits: 001110011111010100101000010010111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111000001111011111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111111000111100000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 66 + +Encoding: 67 +U-Bits: 111010100011010100010010110010001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111111011011011001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111000010011100110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 67 + +Encoding: 68 +U-Bits: 000000110111011011000001001111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000101000100110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000010001100001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 68 + +Encoding: 69 +U-Bits: 110100001011011011111011101111110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000010010000110110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000101011000001001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 69 + +Encoding: 6a +U-Bits: 001101111000011011001111100111001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000100110001110001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000011111001001110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 6a + +Encoding: 6b +U-Bits: 111001000100011011110101000111111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000011100101110111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000100101101001000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6b + +Encoding: 6c +U-Bits: 000011100100101011000010100101000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000101011001100000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000010010001011111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 6c + +Encoding: 6d +U-Bits: 110111011000101011111000000101110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000010001101100110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000101000101011001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 6d + +Encoding: 6e +U-Bits: 001110101011101011001100001101001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000100101100100001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000011100100011110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 6e + +Encoding: 6f +U-Bits: 111010010111101011110110101101111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000011111000100111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000100110000011000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 6f + +Encoding: 70 +U-Bits: 000000001110101011011100010111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000110101111110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000001100111001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 70 + +Encoding: 71 +U-Bits: 110100110010101011100110110111111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000001111011110111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000110110011001000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 71 + +Encoding: 72 +U-Bits: 001101000001101011010010111111000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000111011010110000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000000010010001111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 72 + +Encoding: 73 +U-Bits: 111001111101101011101000011111110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000000001110110110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000111000110001001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 73 + +Encoding: 74 +U-Bits: 000011011101011011011111111101001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000110110010100001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000001111010011110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 74 + +Encoding: 75 +U-Bits: 110111100001011011100101011101111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000001100110100111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000110101110011000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 75 + +Encoding: 76 +U-Bits: 001110010010011011010001010101000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000111000111100000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000000001111011111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 76 + +Encoding: 77 +U-Bits: 111010101110011011101011110101110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000000010011100110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000111011011011001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 77 + +Encoding: 78 +U-Bits: 000000111010010100111000001000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111010001100001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111101000100110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 78 + +Encoding: 79 +U-Bits: 110100000110010100000010101000001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111101011000001001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111010010000110110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 79 + +Encoding: 7a +U-Bits: 001101110101010100110110100000110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111011111001001110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111100110001110001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 7a + +Encoding: 7b +U-Bits: 111001001001010100001100000000000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111100101101001000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111011100101110111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 7b + +Encoding: 7c +U-Bits: 000011101001100100111011100010111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111010010001011111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111101011001100000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7c + +Encoding: 7d +U-Bits: 110111010101100100000001000010001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111101000101011001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111010001101100110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7d + +Encoding: 7e +U-Bits: 001110100110100100110101001010110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111011100100011110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111100101100100001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 7e + +Encoding: 7f +U-Bits: 111010011010100100001111101010000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111100110000011000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111011111000100111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 7f + +Encoding: 80 +U-Bits: 000000000000001110010010010101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101111011111100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101000010111011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 80 + +Encoding: 81 +U-Bits: 110100111100001110101000110101110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101000001011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101111000011011001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 81 + +Encoding: 82 +U-Bits: 001101001111001110011100111101001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101110101010100001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101001100010011110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 82 + +Encoding: 83 +U-Bits: 111001110011001110100110011101111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101001111110100111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101110110110011000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 83 + +Encoding: 84 +U-Bits: 000011010011111110010001111111000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101111000010110000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101000001010001111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 84 + +Encoding: 85 +U-Bits: 110111101111111110101011011111110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101000010110110110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101111011110001001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 85 + +Encoding: 86 +U-Bits: 001110011100111110011111010111001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101110110111110001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101001111111001110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 86 + +Encoding: 87 +U-Bits: 111010100000111110100101110111111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101001100011110111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101110101011001000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 87 + +Encoding: 88 +U-Bits: 000000110100110001110110001010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010011111100011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010100110100100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 88 + +Encoding: 89 +U-Bits: 110100001000110001001100101010000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010100101000011000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010011100000100111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 89 + +Encoding: 8a +U-Bits: 001101111011110001111000100010111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010010001001011111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010101000001100000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8a + +Encoding: 8b +U-Bits: 111001000111110001000010000010001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010101011101011001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010010010101100110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8b + +Encoding: 8c +U-Bits: 000011100111000001110101100000110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010011100001001110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010100101001110001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 8c + +Encoding: 8d +U-Bits: 110111011011000001001111000000000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010100110101001000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010011111101110111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 8d + +Encoding: 8e +U-Bits: 001110101000000001111011001000111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010010010100001111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010101011100110000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 8e + +Encoding: 8f +U-Bits: 111010010100000001000001101000001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010101000000001001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010010001000110110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 8f + +Encoding: 90 +U-Bits: 000000001101000001101011010010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010000010111011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010111011111100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 90 + +Encoding: 91 +U-Bits: 110100110001000001010001110010001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010111000011011001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010000001011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 91 + +Encoding: 92 +U-Bits: 001101000010000001100101111010110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010001100010011110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010110101010100001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 92 + +Encoding: 93 +U-Bits: 111001111110000001011111011010000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010110110110011000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010001111110100111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 93 + +Encoding: 94 +U-Bits: 000011011110110001101000111000111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010000001010001111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010111000010110000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 94 + +Encoding: 95 +U-Bits: 110111100010110001010010011000001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010111011110001001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010000010110110110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 95 + +Encoding: 96 +U-Bits: 001110010001110001100110010000110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010001111111001110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010110110111110001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 96 + +Encoding: 97 +U-Bits: 111010101101110001011100110000000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010110101011001000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010001100011110111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 97 + +Encoding: 98 +U-Bits: 000000111001111110001111001101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101100110100100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101011111100011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 98 + +Encoding: 99 +U-Bits: 110100000101111110110101101101111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101011100000100111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101100101000011000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 99 + +Encoding: 9a +U-Bits: 001101110110111110000001100101000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101101000001100000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101010001001011111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 9a + +Encoding: 9b +U-Bits: 111001001010111110111011000101110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101010010101100110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101101011101011001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 9b + +Encoding: 9c +U-Bits: 000011101010001110001100100111001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101100101001110001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101011100001001110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 9c + +Encoding: 9d +U-Bits: 110111010110001110110110000111111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101011111101110111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101100110101001000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9d + +Encoding: 9e +U-Bits: 001110100101001110000010001111000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101101011100110000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101010010100001111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 9e + +Encoding: 9f +U-Bits: 111010011001001110111000101111110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101010001000110110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101101000000001001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 9f + +Encoding: a0 +U-Bits: 000000000011011101101100000100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110000101101101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110111100101010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: a0 + +Encoding: a1 +U-Bits: 110100111111011101010110100100001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110111111001101001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110000110001010110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: a1 + +Encoding: a2 +U-Bits: 001101001100011101100010101100110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110001011000101110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110110010000010001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a2 + +Encoding: a3 +U-Bits: 111001110000011101011000001100000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110110001100101000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110001000100010111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a3 + +Encoding: a4 +U-Bits: 000011010000101101101111101110111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110000110000111111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110111111000000000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a4 + +Encoding: a5 +U-Bits: 110111101100101101010101001110001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110111100100111001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110000101100000110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: a5 + +Encoding: a6 +U-Bits: 001110011111101101100001000110110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110001000101111110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110110001101000001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: a6 + +Encoding: a7 +U-Bits: 111010100011101101011011100110000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110110010001111000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110001011001000111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: a7 + +Encoding: a8 +U-Bits: 000000110111100010001000011011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001100001110010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001011000110101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a8 + +Encoding: a9 +U-Bits: 110100001011100010110010111011111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001011011010010111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001100010010101000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a9 + +Encoding: aa +U-Bits: 001101111000100010000110110011000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001101111011010000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001010110011101111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: aa + +Encoding: ab +U-Bits: 111001000100100010111100010011110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001010101111010110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001101100111101001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ab + +Encoding: ac +U-Bits: 000011100100010010001011110001001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001100010011000001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001011011011111110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: ac + +Encoding: ad +U-Bits: 110111011000010010110001010001111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001011000111000111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001100001111111000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ad + +Encoding: ae +U-Bits: 001110101011010010000101011001000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001101100110000000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001010101110111111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: ae + +Encoding: af +U-Bits: 111010010111010010111111111001110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: af + +Encoding: af +U-Bits: 111010010111010001010110010000110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: af + +Encoding: af +U-Bits: 111010010111010001101111010111001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: af + +Encoding: b0 +U-Bits: 000000001110010010010101000011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001111100101010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001000101101101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: b0 + +Encoding: b1 +U-Bits: 110100110010010010101111100011110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001000110001010110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001111111001101001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: b1 + +Encoding: b2 +U-Bits: 001101000001010010011011101011001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001110010000010001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001001011000101110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b2 + +Encoding: b3 +U-Bits: 111001111101010010100001001011111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001001000100010111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001110001100101000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b3 + +Encoding: b4 +U-Bits: 000011011101100010010110101001000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001111111000000000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001000110000111111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: b4 + +Encoding: b5 +U-Bits: 110111100001100010101100001001110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001000101100000110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001111100100111001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: b5 + +Encoding: b6 +U-Bits: 001110010010100010011000000001001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001110001101000001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001001000101111110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: b6 + +Encoding: b7 +U-Bits: 111010101110100010100010100001111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001001011001000111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001110010001111000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: b7 + +Encoding: b8 +U-Bits: 000000111010101101110001011100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110011000110101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110100001110010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b8 + +Encoding: b9 +U-Bits: 110100000110101101001011111100000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110100010010101000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110011011010010111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b9 + +Encoding: ba +U-Bits: 001101110101101101111111110100111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110010110011101111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110101111011010000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: ba + +Encoding: bb +U-Bits: 111001001001101101000101010100001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110101100111101001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110010101111010110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: bb + +Encoding: bc +U-Bits: 000011101001011101110010110110110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110011011011111110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110100010011000001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: bc + +Encoding: bd +U-Bits: 110111010101011101001000010110000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110100001111111000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110011000111000111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: bd + +Encoding: be +U-Bits: 001110100110011101111100011110111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: be + +Encoding: be +U-Bits: 001110100110011110010101110111111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: be + +Encoding: be +U-Bits: 001110100110011110101100110000000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: be + +Encoding: bf +U-Bits: 111010011010011101000110111110001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110101111010111001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110010110010000110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: bf + +Encoding: c0 +U-Bits: 000000000000111001001001010100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010100000111101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010011001111010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: c0 + +Encoding: c1 +U-Bits: 110100111100111001110011110100111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010011010011101111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010100011011010000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: c1 + +Encoding: c2 +U-Bits: 001101001111111001000111111100000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010101110010101000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010010111010010111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c2 + +Encoding: c3 +U-Bits: 111001110011111001111101011100110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010010100110101110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010101101110010001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c3 + +Encoding: c4 +U-Bits: 000011010011001001001010111110001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010100011010111001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010011010010000110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: c4 + +Encoding: c5 +U-Bits: 110111101111001001110000011110111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010011001110111111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010100000110000000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c5 + +Encoding: c6 +U-Bits: 001110011100001001000100010110000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010101101111111000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010010100111000111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: c6 + +Encoding: c7 +U-Bits: 111010100000001001111110110110110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010010111011111110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010101110011000001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: c7 + +Encoding: c8 +U-Bits: 000000110100000110101101001011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101000100100010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101111101100101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c8 + +Encoding: c9 +U-Bits: 110100001000000110010111101011001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101111110000010001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101000111000101110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c9 + +Encoding: ca +U-Bits: 001101111011000110100011100011110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101001010001010110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101110011001101001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ca + +Encoding: cb +U-Bits: 111001000111000110011001000011000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101110000101010000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101001001101101111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: cb + +Encoding: cc +U-Bits: 000011100111110110101110100001111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101000111001000111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101111110001111000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: cc + +Encoding: cd +U-Bits: 110111011011110110010100000001001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101111101101000001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101000100101111110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: cd + +Encoding: ce +U-Bits: 001110101000110110100000001001110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101001001100000110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101110000100111001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: ce + +Encoding: cf +U-Bits: 111010010100110110011010101001000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101110011000000000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101001010000111111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: cf + +Encoding: d0 +U-Bits: 000000001101110110110000010011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101011001111010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101100000111101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: d0 + +Encoding: d1 +U-Bits: 110100110001110110001010110011000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101100011011010000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101011010011101111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: d1 + +Encoding: d2 +U-Bits: 001101000010110110111110111011111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101010111010010111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101101110010101000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d2 + +Encoding: d3 +U-Bits: 111001111110110110000100011011001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101101101110010001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101010100110101110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d3 + +Encoding: d4 +U-Bits: 000011011110000110110011111001110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101011010010000110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101100011010111001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: d4 + +Encoding: d5 +U-Bits: 110111100010000110001001011001000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101100000110000000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101011001110111111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: d5 + +Encoding: d6 +U-Bits: 001110010001000110111101010001111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101010100111000111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101101101111111000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: d6 + +Encoding: d7 +U-Bits: 111010101101000110000111110001001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101101110011000001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101010111011111110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: d7 + +Encoding: d8 +U-Bits: 000000111001001001010100001100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010111101100101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010000100100010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d8 + +Encoding: d9 +U-Bits: 110100000101001001101110101100110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010000111000101110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010111110000010001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d9 + +Encoding: da +U-Bits: 001101110110001001011010100100001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: da + +Encoding: da +U-Bits: 001101110110001010110011001101001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: da + +Encoding: da +U-Bits: 001101110110001010001010001010110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: da + +Encoding: db +U-Bits: 111001001010001001100000000100111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: db + +Encoding: db +U-Bits: 111001001010001010001001101101111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: db + +Encoding: db +U-Bits: 111001001010001010110000101010000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: db + +Encoding: dc +U-Bits: 000011101010111001010111100110000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010111110001111000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010000111001000111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: dc + +Encoding: dd +U-Bits: 110111010110111001101101000110110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010000100101111110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010111101101000001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: dd + +Encoding: de +U-Bits: 001110100101111001011001001110001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: de + +Encoding: de +U-Bits: 001110100101111010110000100111001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: de + +Encoding: de +U-Bits: 001110100101111010001001100000110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: de + +Encoding: df +U-Bits: 111010011001111001100011101110111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: df + +Encoding: df +U-Bits: 111010011001111010001010000111111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: df + +Encoding: df +U-Bits: 111010011001111010110011000000000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: df + +Encoding: e0 +U-Bits: 000000000011101010110111000101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001011110101100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001100111101011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: e0 + +Encoding: e1 +U-Bits: 110100111111101010001101100101000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001100100001100000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001011101001011111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: e1 + +Encoding: e2 +U-Bits: 001101001100101010111001101101111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001010000000100111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001101001000011000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e2 + +Encoding: e3 +U-Bits: 111001110000101010000011001101001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001101010100100001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001010011100011110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e3 + +Encoding: e4 +U-Bits: 000011010000011010110100101111110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001011101000110110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001100100000001001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: e4 + +Encoding: e5 +U-Bits: 110111101100011010001110001111000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001100111100110000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001011110100001111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: e5 + +Encoding: e6 +U-Bits: 001110011111011010111010000111111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001010011101110111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001101010101001000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: e6 + +Encoding: e7 +U-Bits: 111010100011011010000000100111001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001101001001110001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001010000001001110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: e7 + +Encoding: e8 +U-Bits: 000000110111010101010011011010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110111010110011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110000011110100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e8 + +Encoding: e9 +U-Bits: 110100001011010101101001111010110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110000000010011110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110111001010100001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e9 + +Encoding: ea +U-Bits: 001101111000010101011101110010001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110110100011011001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110001101011100110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: ea + +Encoding: eb +U-Bits: 111001000100010101100111010010111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110001110111011111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110110111111100000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: eb + +Encoding: ec +U-Bits: 000011100100100101010000110000000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110111001011001000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110000000011110111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: ec + +Encoding: ed +U-Bits: 110111011000100101101010010000110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110000011111001110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110111010111110001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: ed + +Encoding: ee +U-Bits: 001110101011100101011110011000001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110110111110001001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110001110110110110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: ee + +Encoding: ef +U-Bits: 111010010111100101100100111000111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110001101010001111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110110100010110000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ef + +Encoding: f0 +U-Bits: 000000001110100101001110000010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110100111101011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110011110101100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: f0 + +Encoding: f1 +U-Bits: 110100110010100101110100100010111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110011101001011111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110100100001100000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f1 + +Encoding: f2 +U-Bits: 001101000001100101000000101010000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110101001000011000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110010000000100111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f2 + +Encoding: f3 +U-Bits: 111001111101100101111010001010110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110010011100011110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110101010100100001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f3 + +Encoding: f4 +U-Bits: 000011011101010101001101101000001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110100100000001001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110011101000110110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: f4 + +Encoding: f5 +U-Bits: 110111100001010101110111001000111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110011110100001111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110100111100110000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: f5 + +Encoding: f6 +U-Bits: 001110010010010101000011000000000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110101010101001000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110010011101110111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: f6 + +Encoding: f7 +U-Bits: 111010101110010101111001100000110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110010000001001110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110101001001110001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: f7 + +Encoding: f8 +U-Bits: 000000111010011010101010011101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001000011110100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001111010110011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f8 + +Encoding: f9 +U-Bits: 110100000110011010010000111101001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001111001010100001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001000000010011110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f9 + +Encoding: fa +U-Bits: 001101110101011010100100110101110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001001101011100110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001110100011011001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: fa + +Encoding: fb +U-Bits: 111001001001011010011110010101000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001110111111100000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001001110111011111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: fb + +Encoding: fc +U-Bits: 000011101001101010101001110111111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001000000011110111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001111001011001000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: fc + +Encoding: fd +U-Bits: 110111010101101010010011010111001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001111010111110001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001000011111001110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: fd + +Encoding: fe +U-Bits: 001110100110101010100111011111110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001001110110110110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001110111110001001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: fe + +Encoding: ff +U-Bits: 111010011010101010011101111111000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001110100010110000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001001101010001111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ff + +Encoding: 03 03 01 00 +U-Bits: 111001110011000011100111001100001101001111000000000011010000011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 03 03 01 00 + +Encoding: a3 af 5f 00 +U-Bits: 111001110000011101010110011101000101011010011101111111111010011001001110001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a3 af 5f 00 + +Encoding: 01 02 03 00 +U-Bits: 110100111100000000110100111100001110011100110000000011101010001101011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 02 03 00 + +Encoding: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 +U-Bits: +0E1E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E0E1E0E0E0E0E0E1E1E1E1E0 23 00 E0E0E0E1E1E1E1E0E1E1E1E0E1E0E0E0E0E1E0E1E0E0E0E0E1E1E0E0E +1E0E1E0E1E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E0E0E1E1E0E0E1 23 00 E1E1E1E0E1E0E0E1E0E0E0E1E0E0E0E0E1E0E0E0E0E1E0E0E1E1E0E1E +1E1E1E0E0E1E0E1E1E0E0E0E0E1E1E1E1E0E0E1E0E0E1E1E1E0E0E0E0 23 00 E1E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E0E1E0E1E0E0E1E1E0E0E0E1E +0E0E0E0E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E1E0E0E0E1E1E0E0 23 00 E1E0E1E0E0E1E1E0E0E1E0E0E0E0E1E1E0E0E0E1E0E0E0E0E0E0E1E1E +E0E0E1E0E1E0E1E0E1E0E0E0E1E1E1E1E0E0E1E0E1E0E0E0E0E1E0E1E 00 23 0E1E1E0E0E0E1E1E1E1E1E1E1E0E1E1E1E1E1E1E1E1E0E1E0E1E1E0E0 +E1E0E1E0E1E0E1E1E0E1E1E0E0E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E 00 23 0E1E0E1E1E1E1E0E1E1E0E1E1E1E0E1E0E0E0E1E0E0E0E1E0E1E0E1E1 +E1E0E0E1E1E0E1E1E0E0E0E1E1E1E1E0E1E1E0E1E0E0E0E0E0E1E1E1E 00 23 0E1E0E1E1E0E0E0E1E0E1E0E1E1E0E0E0E1E1E0E1E0E1E1E1E1E0E1E0 +E0E1E0E1E1E0E1E0E0E1E1E0E0E0E1E1E1E1E1E0E0E1E1E0E1E1E0E0E 00 23 1E0E0E0E0E1E0E0E1E1E1E1E1E0E1E0E1E1E0E1E1E1E0E0E1E0E0E1E1 +S-Bits: +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 +81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 +81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 +Decoded: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e +U-Bits: +0E1E1E0E0E0E0E0E1E0E0E0E1E0E0E1E1E1E1E0E0E0E1E1E1E1E1E0E0 23 00 E0E0E1E0E0E0E1E1E0E1E1E0E0E0E1E0E0E0E1E0E0E1E1E1E0E0E0E0E +1E0E0E0E1E0E1E1E1E0E0E1E1E1E1E1E0E0E0E1E0E0E0E1E0E1E0E1E1 23 00 E0E1E0E1E0E1E1E0E0E0E0E0E1E1E0E1E1E0E0E1E0E1E0E1E0E0E0E1E +0E1E0E1E1E0E0E0E0E1E0E0E1E0E0E0E1E0E0E0E1E0E1E1E1E1E1E0E0 23 00 E0E0E0E0E0E0E0E1E0E1E0E0E0E0E0E1E1E0E0E0E1E1E0E0E0E0E0E0E +0E1E0E0E1E0E0E1E1E0E0E0E1E0E0E1E0E1E1E0E0E0E1E1E0E1E1E0E1 23 00 E1E0E0E1E0E1E1E0E0E0E0E0E0E1E0E1E0E0E0E0E0E0E1E0E1E0E1E1E +E0E1E0E0E0E0E1E0E1E1E0E1E0E0E1E0E1E0E1E1E1E1E1E0E0E0E1E0E 00 23 1E1E0E0E0E1E1E0E1E0E0E0E0E1E1E1E1E0E0E0E0E1E1E1E0E0E0E0E1 +E0E1E0E0E0E0E1E0E1E0E1E1E1E1E0E0E0E0E1E0E1E1E0E0E1E0E1E1E 00 23 1E0E0E1E0E1E0E1E1E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E1E0E0E0E0 +E0E0E1E1E0E0E0E0E0E0E0E0E1E1E0E1E1E1E1E1E1E0E0E0E0E0E0E0E 00 23 0E1E0E1E1E0E0E0E0E1E0E0E0E1E0E1E0E0E0E1E1E1E0E1E0E0E0E0E1 +E1E0E0E1E1E1E0E0E0E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E1E0E0E0E 00 23 1E1E0E0E0E1E0E1E0E0E0E0E1E1E0E0E0E0E0E1E1E1E1E0E1E0E0E1E0 +S-Bits: +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f +Decoded: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E1E1E0 23 01 E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0 23 01 E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E 01 23 0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0 +E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E 01 23 0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f +81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +0E1E0E1E1E0E0E1E0E1E1E1E1E0E1E0E0E1E1E0E1E1E0E0E1E0E0E0E0 23 01 E1E1E1E0E1E0E1E0E0E0E0E0E1E1E1E0E1E1E1E1E0E0E0E1E1E0E1E1E +1E0E0E1E0E1E1E1E0E0E1E0E1E1E0E0E1E1E0E1E1E0E0E0E1E1E0E0E1 23 01 E0E1E1E0E0E1E0E0E1E1E1E1E0E0E0E0E0E0E1E1E1E1E0E0E0E1E1E1E +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +E0E0E1E1E1E0E1E0E1E1E0E1E0E0E1E1E1E0E0E0E0E1E0E0E0E0E0E1E 01 23 1E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E0E0E0E1E0E0E0E0E1E1E1E0E0 +E1E1E1E1E1E0E1E0E1E0E0E1E0E0E1E1E0E0E0E1E1E1E1E1E1E1E1E1E 01 23 0E1E0E1E1E1E1E1E1E0E1E0E1E0E1E1E0E1E0E0E1E0E0E1E1E0E0E0E1 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 +81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f +81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +0E0E0E0E0E0E1E0E1E0E1E0E0E1E1E1E1E1E1E1E1E0E1E0E1E0E0E1E1 23 01 E1E1E1E1E1E0E1E0E1E0E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E1E0E0E +1E0E0E1E1E0E0E0E0E0E0E0E1E0E1E0E0E1E0E1E1E1E1E1E1E0E0E1E0 23 01 E1E1E0E1E1E1E1E1E1E1E1E1E0E0E1E1E0E1E0E0E0E0E0E0E1E1E1E0E +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E1E0E0E1E1E0E 01 23 0E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E0E0E0E1E1E0 +E0E1E0E0E1E1E0E1E0E0E1E1E1E1E1E1E0E1E0E0E1E0E0E0E0E1E1E1E 01 23 1E0E1E0E0E1E1E0E0E0E0E1E1E1E1E1E0E1E1E0E0E1E1E0E0E1E1E1E1 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee +U-Bits: +0E1E0E0E1E0E0E1E1E0E1E0E0E0E0E0E0E0E0E1E1E0E0E1E1E1E1E1E1 23 00 E1E1E1E1E1E0E1E1E1E0E0E1E0E1E1E1E0E0E1E0E0E1E1E1E1E0E0E0E +0E1E1E0E0E0E0E1E0E1E1E1E0E0E1E1E0E0E1E0E1E0E1E0E0E0E1E0E1 23 00 E0E0E0E1E1E1E1E1E0E1E1E1E0E0E0E0E1E1E1E0E0E1E1E0E1E1E1E0E +E0E0E0E1E1E1E1E1E0E1E0E0E1E1E0E0E1E0E1E0E0E1E1E0E0E0E0E0E 00 23 0E0E0E1E0E1E0E1E0E0E1E1E0E1E0E0E0E1E1E1E0E0E0E0E1E0E1E0E1 +E1E0E0E1E1E1E1E1E1E0E0E1E1E1E0E0E0E1E1E1E1E1E1E1E1E0E1E1E 00 23 0E0E1E0E1E0E0E0E1E0E0E1E1E0E1E1E1E1E0E1E1E0E1E0E0E1E0E1E1 +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +S-Bits: +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +Decoded: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +001001111100011001111011100011010110100010110000100000010 01 01 111101000100010000001000011101100101011100000001111011010 +110101110110111001001001101001011010001111010101111101011 01 01 001101101011101011011101100010100010010111010010100101011 +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 7f 81 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 81 7f +81 81 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +000100000101110110011100001111111010111111011100100101101 01 01 010111010110111011001110000010101000001110101100010110100 +100100101101000100000101110111010011001011101010100101110 01 01 110110010111110101010111101011110011100000101000011111101 +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f +81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f +U-Bits: +101011101110011001100000010010001100001011100000000011100 01 01 001110000110001110001011000001001001001010010111110000010 +000011100010110001011101000111011011110111101011100101100 00 00 010101010010111111101011000110101010110111000111010011011 +000101111111110000011110110000011000000100110001101000110 01 00 011010011010010010110000010100001100110000110110110011011 +011110100011000011100010100011101110001110110110011011111 00 00 000111100011100011010001101110010111011111010111110110011 +S-Bits: +81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f +7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 81 +7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 +7f 81 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 +U-Bits: +100010111000001100000000001101001000000000101100111011001 00 00 101110010011001000110010000011100101000011110001101100001 +001011110100100101010101111111110011111011111110001101001 01 00 011010010110101000111110001100110011101101111000100101110 +110001101010001000010101011111101011000111010110110011110 00 00 101001101100011001101100110110000101000001000001011000110 +011100001010000100100101001000110110100111000000101110000 00 01 111100110000011001001100110100111101011010011110100010011 +S-Bits: +81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 +7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f +81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f +7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 +U-Bits: +100010100101111101110101011001010100000101001001011011000 00 00 001000000000001100000110001011010111110101110101001100010 +010101000000101010101011110000010101000100000011010001101 00 01 010111110101110101010111011111100111010011010000111110111 +010111100101110011111100101110001010100110000010100000100 00 01 010111101110101111110011110101111101110100011000101111111 +011110100110000011110100111111101111111111111010101110000 01 00 001010101010101010101010111010110110000000100000101001011 +S-Bits: +81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f +7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 81 81 +7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 +7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111110100100011100101010000100110000110101111110000000010 01 01 010000000110100010010111101011000000110000111100000100001 +111000110100110110001000010011101000000010100010101101000 00 00 100001001010111000011000100011000111100001110100010000010 +001011000100011010100000101110100010010010001011110101001 01 00 000110000011000100011000100101000100001000000100101001011 +101001001100101001110101101010101000000110100010000010101 00 00 010100101110010001000011011100010000111000010010100110010 +S-Bits: +81 81 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 +81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f +7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111010000001011110000011000110101000110100010000001000010 00 00 100001011000101110010100001001110000100010010101001010000 +101000110001001010001000010100000010000100100000110001011 01 00 110001101000110100000010100011010010100001000101000010111 +101011000101001000100100001000001100000111000011010000010 00 00 010110001011010001000010001001000010101001010000000011100 +001000010100100001010001001000110100010100001101010010101 00 01 000000101111000000100011010100010010110101000010001111000 +S-Bits: +81 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f +81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 +81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f +7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000000001000000000000010010000000000100000000000001000 00 00 000000000000100000000000001000000000000010010000000000100 +101010000001000000000000010010101000000100000000010000011 00 01 010100000000100000000000001001010000000011000000000000110 +101000000000000000000000000000000000000010101001000000101 00 01 010000000001000000000000000000000000000001010100000000010 +100000000010101000000000000000000000000000000000000010000 01 00 000000000100000000000001010101000000010101010000000001010 +S-Bits: +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f +81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f +81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + Success -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:49:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:49:38 +0000 Subject: [PATCH] libosmocore[master]: coding test: move bit dump into functions Message-ID: Review at https://gerrit.osmocom.org/5071 coding test: move bit dump into functions Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b --- M tests/coding/coding_test.c 1 file changed, 48 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/5071/1 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 212c9fa..51bdf0b 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,6 +37,46 @@ abort(); \ } +#define DUMP_U_AT(b, x, u) do { \ + printf("%s %02x %02x ", osmo_ubit_dump(b + x, 57), b[57 + x], b[58 + x]); \ + printf("%s\n", osmo_ubit_dump(b + 59 + x, 57)); \ + if (u <= x) \ + return; \ + } while(0) + +#define DUMP_S_AT(b, x, u) do { \ + printf("%s %02x %02x ", osmo_hexdump(b + x, 57), b[57 + x], b[58 + x]); \ + printf("%s\n", osmo_hexdump(b + 59 + x, 57)); \ + if (u <= x) \ + return; \ + } while(0) + +inline void dump_ubits(ubit_t *bursts_u, unsigned until) +{ + printf("U-Bits:\n"); + DUMP_U_AT(bursts_u, 0, until); + DUMP_U_AT(bursts_u, 116, until); + DUMP_U_AT(bursts_u, 232, until); + DUMP_U_AT(bursts_u, 348, until); + DUMP_U_AT(bursts_u, 464, until); + DUMP_U_AT(bursts_u, 580, until); + DUMP_U_AT(bursts_u, 696, until); + DUMP_U_AT(bursts_u, 812, until); +} + +inline void dump_sbits(uint8_t *bursts_s, unsigned until) +{ + printf("S-Bits:\n"); + DUMP_S_AT(bursts_s, 0, until); + DUMP_S_AT(bursts_s, 116, until); + DUMP_S_AT(bursts_s, 232, until); + DUMP_S_AT(bursts_s, 348, until); + DUMP_S_AT(bursts_s, 464, until); + DUMP_S_AT(bursts_s, 580, until); + DUMP_S_AT(bursts_s, 696, until); + DUMP_S_AT(bursts_s, 812, until); +} + static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -50,30 +90,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + dump_ubits(bursts_u, 348); + dump_sbits((uint8_t *)bursts_s, 348); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -173,49 +191,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), - (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), - (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), - (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), - (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + dump_ubits(bursts_u, 812); + dump_sbits((uint8_t *)bursts_s, 812); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -251,39 +228,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), - (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), - (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + dump_ubits(bursts_u, 580); + dump_sbits((uint8_t *)bursts_s, 580); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -329,29 +275,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + dump_ubits(bursts_u, 348); + dump_sbits((uint8_t *)bursts_s, 348); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, -- To view, visit https://gerrit.osmocom.org/5071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:55:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:55:03 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#7). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 8 files changed, 30,832 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/7 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:56:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:56:15 +0000 Subject: [PATCH] libosmocore[master]: coding test: cosmetic cleanup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5063 to look at the new patch set (#3). coding test: cosmetic cleanup * remove duplicate code: use function from libosmocore * use utility function to dump ubits * reformat for easier reading * link against libosmocore Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 --- M tests/Makefile.am M tests/coding/coding_test.c 2 files changed, 53 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/5063/3 diff --git a/tests/Makefile.am b/tests/Makefile.am index e11092d..c609d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -165,7 +165,7 @@ socket_socket_test_SOURCES = socket/socket_test.c coding_coding_test_SOURCES = coding/coding_test.c -coding_coding_test_LDADD = \ +coding_coding_test_LDADD = $(LDADD) \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..c0f0d4b 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -40,27 +40,6 @@ /* set condition to 1, to show debugging */ #define printd if (0) printf -static int ubits2sbits(ubit_t *ubits, sbit_t *sbits, int count) -{ - int i; - - for (i = 0; i < count; i++) { - if (*ubits == 0x23) { - ubits++; - sbits++; - continue; - } - - if ((*ubits++) & 1) { - *sbits++ = -127; - } else { - *sbits++ = 127; - } - } - - return count; -} - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -73,21 +52,17 @@ gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -130,10 +105,9 @@ gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 36); + osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 36)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); printd("S-Bits:\n"); printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); @@ -165,10 +139,9 @@ gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 78); + osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 78)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); printd("S-Bits:\n"); printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); @@ -201,33 +174,25 @@ gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 8); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 696, 57), - bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 812, 57), - bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 812, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -287,27 +252,21 @@ gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 6); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -371,21 +330,17 @@ gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 16:56:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 16:56:51 +0000 Subject: [PATCH] libosmocore[master]: coding test: enable debug output In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5070 to look at the new patch set (#2). coding test: enable debug output Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 --- M tests/coding/coding_test.c M tests/coding/coding_test.ok 2 files changed, 5,062 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/5070/2 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index c0f0d4b..212c9fa 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,9 +37,6 @@ abort(); \ } -/* set condition to 1, to show debugging */ -#define printd if (0) printf - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -48,35 +45,35 @@ int n_errors, n_bits_total; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, 23)); + printf("Encoding: %s\n", osmo_hexdump(l2, 23)); gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -84,14 +81,14 @@ /* Decode, correcting errors */ gsm0503_xcch_decode(result, bursts_s, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, 23)); + printf("Decoded: %s\n", osmo_hexdump(result, 23)); printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); ASSERT_TRUE(n_bits_total == 456); ASSERT_TRUE(!memcmp(l2, result, 23)); - printd("\n"); + printf("\n"); } static void test_rach(uint8_t bsic, uint8_t ra) @@ -101,27 +98,27 @@ sbit_t bursts_s[36]; /* Encode L2 message */ - printd("Encoding: %02x\n", ra); + printf("Encoding: %02x\n", ra); gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printf("S-Bits:\n"); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); /* Decode, correcting errors */ gsm0503_rach_decode(&result, bursts_s, bsic); - printd("Decoded: %02x\n", result); + printf("Decoded: %02x\n", result); ASSERT_TRUE(ra == result); - printd("\n"); + printf("\n"); } static void test_sch(uint8_t *info) @@ -135,27 +132,27 @@ result[3] = 0; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(info, 4)); + printf("Encoding: %s\n", osmo_hexdump(info, 4)); gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printf("S-Bits:\n"); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); /* Decode, correcting errors */ gsm0503_sch_decode(result, bursts_s); - printd("Decoded: %s\n", osmo_hexdump(result, 4)); + printf("Decoded: %s\n", osmo_hexdump(result, 4)); ASSERT_TRUE(!memcmp(info, result, 4)); - printd("\n"); + printf("\n"); } static void test_fr(uint8_t *speech, int len) @@ -170,55 +167,55 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -226,14 +223,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_fr_decode(result, bursts_s, 1, len == 31, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_hr(uint8_t *speech, int len) @@ -248,45 +245,45 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -294,14 +291,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_hr_decode(result, bursts_s, 0, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_pdtch(uint8_t *l2, int len) @@ -326,47 +323,47 @@ } /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, len)); + printf("Encoding: %s\n", osmo_hexdump(l2, len)); gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(l2, result, len)); - printd("\n"); + printf("\n"); } uint8_t test_l2[][23] = { diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok index 5030e4d..1af4ef3 100644 --- a/tests/coding/coding_test.ok +++ b/tests/coding/coding_test.ok @@ -1,21 +1,4963 @@ +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000010000100000000100000000000000000000101000010000001 01 01 010000100000010000001000000101000010100000000000001000000 +000000010010000000010000000010000001000010100001000000000 01 01 000000100000010000101000000000000000000001000000000001000 +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +S-Bits: +81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 00 +U-Bits: 000000000000000000000000000000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011101001101001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011010000101110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 00 + +Encoding: 01 +U-Bits: 110100111100000000111010100000110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011010011001001110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011101010001110001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 01 + +Encoding: 02 +U-Bits: 001101001111000000001110101000001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011100111000001001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011011110000110110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 02 + +Encoding: 03 +U-Bits: 111001110011000000110100001000111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011011101100001111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011100100100110000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 03 + +Encoding: 04 +U-Bits: 000011010011110000000011101010000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011101010000011000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011010011000100111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 04 + +Encoding: 05 +U-Bits: 110111101111110000111001001010110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011010000100011110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011101001100100001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 05 + +Encoding: 06 +U-Bits: 001110011100110000001101000010001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011100100101011001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011011101101100110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 06 + +Encoding: 07 +U-Bits: 111010100000110000110111100010111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011011110001011111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011100111001100000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 07 + +Encoding: 08 +U-Bits: 000000110100111111100100011111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100001101110110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100110100110001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 08 + +Encoding: 09 +U-Bits: 110100001000111111011110111111000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100110111010110000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100001110010001111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 09 + +Encoding: 0a +U-Bits: 001101111011111111101010110111111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100000011011110111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100111010011001000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0a + +Encoding: 0b +U-Bits: 111001000111111111010000010111001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100111001111110001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100000000111001110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 0b + +Encoding: 0c +U-Bits: 000011100111001111100111110101110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100001110011100110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100110111011011001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 0c + +Encoding: 0d +U-Bits: 110111011011001111011101010101000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100110100111100000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100001101111011111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 0d + +Encoding: 0e +U-Bits: 001110101000001111101001011101111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100000000110100111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100111001110011000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 0e + +Encoding: 0f +U-Bits: 111010010100001111010011111101001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100111010010100001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100000011010011110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 0f + +Encoding: 10 +U-Bits: 000000001101001111111001000111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100010000101110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100101001101001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 10 + +Encoding: 11 +U-Bits: 110100110001001111000011100111001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100101010001110001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100010011001001110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 11 + +Encoding: 12 +U-Bits: 001101000010001111110111101111110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100011110000110110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100100111000001001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 12 + +Encoding: 13 +U-Bits: 111001111110001111001101001111000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100100100100110000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100011101100001111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 13 + +Encoding: 14 +U-Bits: 000011011110111111111010101101111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100010011000100111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100101010000011000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 14 + +Encoding: 15 +U-Bits: 110111100010111111000000001101001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100101001100100001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100010000100011110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 15 + +Encoding: 16 +U-Bits: 001110010001111111110100000101110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100011101101100110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100100100101011001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 16 + +Encoding: 17 +U-Bits: 111010101101111111001110100101000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100100111001100000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100011110001011111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 17 + +Encoding: 18 +U-Bits: 000000111001110000011101011000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011110100110001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011001101110110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 18 + +Encoding: 19 +U-Bits: 110100000101110000100111111000111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011001110010001111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011110111010110000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 19 + +Encoding: 1a +U-Bits: 001101110110110000010011110000000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011111010011001000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011000011011110111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 1a + +Encoding: 1b +U-Bits: 111001001010110000101001010000110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011000000111001110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011111001111110001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 1b + +Encoding: 1c +U-Bits: 000011101010000000011110110010001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011110111011011001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011001110011100110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1c + +Encoding: 1d +U-Bits: 110111010110000000100100010010111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011001101111011111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011110100111100000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1d + +Encoding: 1e +U-Bits: 001110100101000000010000011010000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011111001110011000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011000000110100111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 1e + +Encoding: 1f +U-Bits: 111010011001000000101010111010110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011000011010011110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011111010010100001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 1f + +Encoding: 20 +U-Bits: 000000000011010011111110010001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000010111111000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000101110111111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 20 + +Encoding: 21 +U-Bits: 110100111111010011000100110001001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000101101011000001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000010100011111110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 21 + +Encoding: 22 +U-Bits: 001101001100010011110000111001110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000011001010000110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000100000010111001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 22 + +Encoding: 23 +U-Bits: 111001110000010011001010011001000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000100011110000000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 23 + +Encoding: 24 +U-Bits: 000011010000100011111101111011111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000010100010010111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000101101010101000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 24 + +Encoding: 25 +U-Bits: 110111101100100011000111011011001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000101110110010001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000010111110101110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 25 + +Encoding: 26 +U-Bits: 001110011111100011110011010011110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000011010111010110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000100011111101001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 26 + +Encoding: 27 +U-Bits: 111010100011100011001001110011000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000100000011010000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000011001011101111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 27 + +Encoding: 28 +U-Bits: 000000110111101100011010001110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111110011100111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111001010100000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 28 + +Encoding: 29 +U-Bits: 110100001011101100100000101110111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111001001000111111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111110000000000000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 29 + +Encoding: 2a +U-Bits: 001101111000101100010100100110000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111111101001111000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111000100001000111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 2a + +Encoding: 2b +U-Bits: 111001000100101100101110000110110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111000111101111110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111111110101000001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2b + +Encoding: 2c +U-Bits: 000011100100011100011001100100001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111110000001101001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111001001001010110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 2c + +Encoding: 2d +U-Bits: 110111011000011100100011000100111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111001010101101111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111110011101010000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2d + +Encoding: 2e +U-Bits: 001110101011011100010111001100000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111111110100101000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111000111100010111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 2e + +Encoding: 2f +U-Bits: 111010010111011100101101101100110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111000100000101110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111111101000010001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 2f + +Encoding: 30 +U-Bits: 000000001110011100000111010110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111101110111111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111010111111000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 30 + +Encoding: 31 +U-Bits: 110100110010011100111101110110110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111010100011111110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111101101011000001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 31 + +Encoding: 32 +U-Bits: 001101000001011100001001111110001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111100000010111001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111011001010000110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 32 + +Encoding: 33 +U-Bits: 111001111101011100110011011110111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111100011110000000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 33 + +Encoding: 34 +U-Bits: 000011011101101100000100111100000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111101101010101000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111010100010010111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 34 + +Encoding: 35 +U-Bits: 110111100001101100111110011100110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111010111110101110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111101110110010001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 35 + +Encoding: 36 +U-Bits: 001110010010101100001010010100001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111100011111101001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111011010111010110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 36 + +Encoding: 37 +U-Bits: 111010101110101100110000110100111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111011001011101111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111100000011010000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 37 + +Encoding: 38 +U-Bits: 000000111010100011100011001001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000001010100000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000110011100111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 38 + +Encoding: 39 +U-Bits: 110100000110100011011001101001000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000110000000000000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000001001000111111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 39 + +Encoding: 3a +U-Bits: 001101110101100011101101100001111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000000100001000111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000111101001111000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3a + +Encoding: 3b +U-Bits: 111001001001100011010111000001001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000111110101000001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000000111101111110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 3b + +Encoding: 3c +U-Bits: 000011101001010011100000100011110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000001001001010110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000110000001101001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 3c + +Encoding: 3d +U-Bits: 110111010101010011011010000011000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000110011101010000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000001010101101111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 3d + +Encoding: 3e +U-Bits: 001110100110010011101110001011111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000000111100010111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000111110100101000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 3e + +Encoding: 3f +U-Bits: 111010011010010011010100101011001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000111101000010001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000000100000101110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 3f + +Encoding: 40 +U-Bits: 000000000000110111011011000001001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100110010101000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100001011101111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 40 + +Encoding: 41 +U-Bits: 110100111100110111100001100001111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100001000001000111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100110001001111000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 41 + +Encoding: 42 +U-Bits: 001101001111110111010101101001000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100111100000000000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100000101000111111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 42 + +Encoding: 43 +U-Bits: 111001110011110111101111001001110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100000110100000110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100111111100111001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 43 + +Encoding: 44 +U-Bits: 000011010011000111011000101011001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100110001000010001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100001000000101110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 44 + +Encoding: 45 +U-Bits: 110111101111000111100010001011111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100001011100010111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100110010100101000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 45 + +Encoding: 46 +U-Bits: 001110011100000111010110000011000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100111111101010000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100000110101101111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 46 + +Encoding: 47 +U-Bits: 111010100000000111101100100011110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100000101001010110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100111100001101001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 47 + +Encoding: 48 +U-Bits: 000000110100001000111111011110111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011010110110111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011101111110000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 48 + +Encoding: 49 +U-Bits: 110100001000001000000101111110001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011101100010111001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011010101010000110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 49 + +Encoding: 4a +U-Bits: 001101111011001000110001110110110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011011000011111110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011100001011000001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4a + +Encoding: 4b +U-Bits: 111001000111001000001011010110000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011100010111111000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011011011111000111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 4b + +Encoding: 4c +U-Bits: 000011100111111000111100110100111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011010101011101111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011101100011010000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4c + +Encoding: 4d +U-Bits: 110111011011111000000110010100001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011101111111101001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011010110111010110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 4d + +Encoding: 4e +U-Bits: 001110101000111000110010011100110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011011011110101110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011100010110010001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 4e + +Encoding: 4f +U-Bits: 111010010100111000001000111100000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011100001010101000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011011000010010111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 4f + +Encoding: 50 +U-Bits: 000000001101111000100010000110110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011001011101111110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011110010101000001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 50 + +Encoding: 51 +U-Bits: 110100110001111000011000100110000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011110001001111000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011001000001000111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 51 + +Encoding: 52 +U-Bits: 001101000010111000101100101110111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011000101000111111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011111100000000000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 52 + +Encoding: 53 +U-Bits: 111001111110111000010110001110001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011111111100111001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011000110100000110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 53 + +Encoding: 54 +U-Bits: 000011011110001000100001101100110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011001000000101110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011110001000010001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 54 + +Encoding: 55 +U-Bits: 110111100010001000011011001100000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011110010100101000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011001011100010111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 55 + +Encoding: 56 +U-Bits: 001110010001001000101111000100111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011000110101101111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011111111101010000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 56 + +Encoding: 57 +U-Bits: 111010101101001000010101100100001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011111100001101001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011000101001010110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 57 + +Encoding: 58 +U-Bits: 000000111001000111000110011001000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100101111110000000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100010110110111111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 58 + +Encoding: 59 +U-Bits: 110100000101000111111100111001110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100010101010000110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100101100010111001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 59 + +Encoding: 5a +U-Bits: 001101110110000111001000110001001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100100001011000001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100011000011111110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 5a + +Encoding: 5b +U-Bits: 111001001010000111110010010001111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100011011111000111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100100010111111000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5b + +Encoding: 5c +U-Bits: 000011101010110111000101110011000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100101100011010000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100010101011101111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 5c + +Encoding: 5d +U-Bits: 110111010110110111111111010011110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100010110111010110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100101111111101001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 5d + +Encoding: 5e +U-Bits: 001110100101110111001011011011001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100100010110010001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100011011110101110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 5e + +Encoding: 5f +U-Bits: 111010011001110111110001111011111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100011000010010111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100100001010101000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 5f + +Encoding: 60 +U-Bits: 000000000011100100100101010000110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111001100111001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111110101111110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 60 + +Encoding: 61 +U-Bits: 110100111111100100011111110000000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111110110011001000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111001111011110111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 61 + +Encoding: 62 +U-Bits: 001101001100100100101011111000111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111000010010001111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111111011010110000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 62 + +Encoding: 63 +U-Bits: 111001110000100100010001011000001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111111000110001001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111000001110110110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 63 + +Encoding: 64 +U-Bits: 000011010000010100100110111010110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111001111010011110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111110110010100001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 64 + +Encoding: 65 +U-Bits: 110111101100010100011100011010000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111110101110011000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111001100110100111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 65 + +Encoding: 66 +U-Bits: 001110011111010100101000010010111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111000001111011111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111111000111100000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 66 + +Encoding: 67 +U-Bits: 111010100011010100010010110010001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111111011011011001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111000010011100110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 67 + +Encoding: 68 +U-Bits: 000000110111011011000001001111000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000101000100110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000010001100001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 68 + +Encoding: 69 +U-Bits: 110100001011011011111011101111110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000010010000110110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000101011000001001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 69 + +Encoding: 6a +U-Bits: 001101111000011011001111100111001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000100110001110001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000011111001001110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 6a + +Encoding: 6b +U-Bits: 111001000100011011110101000111111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000011100101110111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000100101101001000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6b + +Encoding: 6c +U-Bits: 000011100100101011000010100101000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000101011001100000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000010010001011111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 6c + +Encoding: 6d +U-Bits: 110111011000101011111000000101110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000010001101100110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000101000101011001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 6d + +Encoding: 6e +U-Bits: 001110101011101011001100001101001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000100101100100001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000011100100011110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 6e + +Encoding: 6f +U-Bits: 111010010111101011110110101101111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000011111000100111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000100110000011000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 6f + +Encoding: 70 +U-Bits: 000000001110101011011100010111001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000110101111110001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000001100111001110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 70 + +Encoding: 71 +U-Bits: 110100110010101011100110110111111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000001111011110111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000110110011001000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 71 + +Encoding: 72 +U-Bits: 001101000001101011010010111111000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000111011010110000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000000010010001111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 72 + +Encoding: 73 +U-Bits: 111001111101101011101000011111110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000000001110110110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000111000110001001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 73 + +Encoding: 74 +U-Bits: 000011011101011011011111111101001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000110110010100001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000001111010011110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 74 + +Encoding: 75 +U-Bits: 110111100001011011100101011101111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000001100110100111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000110101110011000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 75 + +Encoding: 76 +U-Bits: 001110010010011011010001010101000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000111000111100000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000000001111011111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 76 + +Encoding: 77 +U-Bits: 111010101110011011101011110101110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000000010011100110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000111011011011001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 77 + +Encoding: 78 +U-Bits: 000000111010010100111000001000111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111010001100001111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111101000100110000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 78 + +Encoding: 79 +U-Bits: 110100000110010100000010101000001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111101011000001001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111010010000110110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 79 + +Encoding: 7a +U-Bits: 001101110101010100110110100000110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111011111001001110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111100110001110001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 7a + +Encoding: 7b +U-Bits: 111001001001010100001100000000000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111100101101001000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111011100101110111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 7b + +Encoding: 7c +U-Bits: 000011101001100100111011100010111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111010010001011111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111101011001100000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7c + +Encoding: 7d +U-Bits: 110111010101100100000001000010001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111101000101011001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111010001101100110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7d + +Encoding: 7e +U-Bits: 001110100110100100110101001010110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111011100100011110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111100101100100001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 7e + +Encoding: 7f +U-Bits: 111010011010100100001111101010000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111100110000011000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111011111000100111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 7f + +Encoding: 80 +U-Bits: 000000000000001110010010010101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101111011111100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101000010111011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 80 + +Encoding: 81 +U-Bits: 110100111100001110101000110101110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101000001011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101111000011011001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 81 + +Encoding: 82 +U-Bits: 001101001111001110011100111101001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101110101010100001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101001100010011110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 82 + +Encoding: 83 +U-Bits: 111001110011001110100110011101111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101001111110100111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101110110110011000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 83 + +Encoding: 84 +U-Bits: 000011010011111110010001111111000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101111000010110000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101000001010001111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 84 + +Encoding: 85 +U-Bits: 110111101111111110101011011111110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101000010110110110011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101111011110001001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 85 + +Encoding: 86 +U-Bits: 001110011100111110011111010111001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101110110111110001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101001111111001110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 86 + +Encoding: 87 +U-Bits: 111010100000111110100101110111111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101001100011110111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101110101011001000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 87 + +Encoding: 88 +U-Bits: 000000110100110001110110001010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010011111100011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010100110100100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 88 + +Encoding: 89 +U-Bits: 110100001000110001001100101010000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010100101000011000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010011100000100111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 89 + +Encoding: 8a +U-Bits: 001101111011110001111000100010111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010010001001011111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010101000001100000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8a + +Encoding: 8b +U-Bits: 111001000111110001000010000010001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010101011101011001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010010010101100110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8b + +Encoding: 8c +U-Bits: 000011100111000001110101100000110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010011100001001110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010100101001110001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 8c + +Encoding: 8d +U-Bits: 110111011011000001001111000000000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010100110101001000011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010011111101110111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 8d + +Encoding: 8e +U-Bits: 001110101000000001111011001000111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010010010100001111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010101011100110000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 8e + +Encoding: 8f +U-Bits: 111010010100000001000001101000001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010101000000001001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010010001000110110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 8f + +Encoding: 90 +U-Bits: 000000001101000001101011010010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010000010111011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010111011111100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 90 + +Encoding: 91 +U-Bits: 110100110001000001010001110010001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010111000011011001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010000001011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 91 + +Encoding: 92 +U-Bits: 001101000010000001100101111010110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010001100010011110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010110101010100001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 92 + +Encoding: 93 +U-Bits: 111001111110000001011111011010000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010110110110011000000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010001111110100111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 93 + +Encoding: 94 +U-Bits: 000011011110110001101000111000111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010000001010001111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010111000010110000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 94 + +Encoding: 95 +U-Bits: 110111100010110001010010011000001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010111011110001001111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010000010110110110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 95 + +Encoding: 96 +U-Bits: 001110010001110001100110010000110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010001111111001110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010110110111110001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 96 + +Encoding: 97 +U-Bits: 111010101101110001011100110000000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010110101011001000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010001100011110111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 97 + +Encoding: 98 +U-Bits: 000000111001111110001111001101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101100110100100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101011111100011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 98 + +Encoding: 99 +U-Bits: 110100000101111110110101101101111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101011100000100111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101100101000011000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 99 + +Encoding: 9a +U-Bits: 001101110110111110000001100101000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101101000001100000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101010001001011111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 9a + +Encoding: 9b +U-Bits: 111001001010111110111011000101110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101010010101100110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101101011101011001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 9b + +Encoding: 9c +U-Bits: 000011101010001110001100100111001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101100101001110001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101011100001001110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 9c + +Encoding: 9d +U-Bits: 110111010110001110110110000111111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101011111101110111111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101100110101001000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9d + +Encoding: 9e +U-Bits: 001110100101001110000010001111000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101101011100110000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101010010100001111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 9e + +Encoding: 9f +U-Bits: 111010011001001110111000101111110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101010001000110110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101101000000001001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 9f + +Encoding: a0 +U-Bits: 000000000011011101101100000100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110000101101101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110111100101010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: a0 + +Encoding: a1 +U-Bits: 110100111111011101010110100100001100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110111111001101001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110000110001010110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: a1 + +Encoding: a2 +U-Bits: 001101001100011101100010101100110000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110001011000101110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110110010000010001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a2 + +Encoding: a3 +U-Bits: 111001110000011101011000001100000000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110110001100101000011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110001000100010111111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a3 + +Encoding: a4 +U-Bits: 000011010000101101101111101110111111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110000110000111111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110111111000000000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a4 + +Encoding: a5 +U-Bits: 110111101100101101010101001110001111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110111100100111001100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110000101100000110000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: a5 + +Encoding: a6 +U-Bits: 001110011111101101100001000110110011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110001000101111110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110110001101000001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: a6 + +Encoding: a7 +U-Bits: 111010100011101101011011100110000011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110110010001111000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110001011001000111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: a7 + +Encoding: a8 +U-Bits: 000000110111100010001000011011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001100001110010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001011000110101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a8 + +Encoding: a9 +U-Bits: 110100001011100010110010111011111100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001011011010010111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001100010010101000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a9 + +Encoding: aa +U-Bits: 001101111000100010000110110011000000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001101111011010000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001010110011101111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: aa + +Encoding: ab +U-Bits: 111001000100100010111100010011110000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001010101111010110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001101100111101001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ab + +Encoding: ac +U-Bits: 000011100100010010001011110001001111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001100010011000001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001011011011111110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: ac + +Encoding: ad +U-Bits: 110111011000010010110001010001111111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001011000111000111100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001100001111111000000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ad + +Encoding: ae +U-Bits: 001110101011010010000101011001000011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001101100110000000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001010101110111111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: ae + +Encoding: af +U-Bits: 111010010111010010111111111001110011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: af + +Encoding: af +U-Bits: 111010010111010001010110010000110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: af + +Encoding: af +U-Bits: 111010010111010001101111010111001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: af + +Encoding: b0 +U-Bits: 000000001110010010010101000011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001111100101010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001000101101101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: b0 + +Encoding: b1 +U-Bits: 110100110010010010101111100011110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001000110001010110011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001111111001101001111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: b1 + +Encoding: b2 +U-Bits: 001101000001010010011011101011001100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001110010000010001111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001001011000101110011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b2 + +Encoding: b3 +U-Bits: 111001111101010010100001001011111100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001001000100010111111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001110001100101000011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b3 + +Encoding: b4 +U-Bits: 000011011101100010010110101001000011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001111111000000000000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001000110000111111100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: b4 + +Encoding: b5 +U-Bits: 110111100001100010101100001001110011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001000101100000110000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001111100100111001100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: b5 + +Encoding: b6 +U-Bits: 001110010010100010011000000001001111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001110001101000001100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001001000101111110000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: b6 + +Encoding: b7 +U-Bits: 111010101110100010100010100001111111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001001011001000111100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001110010001111000000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: b7 + +Encoding: b8 +U-Bits: 000000111010101101110001011100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110011000110101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110100001110010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b8 + +Encoding: b9 +U-Bits: 110100000110101101001011111100000000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110100010010101000011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110011011010010111111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b9 + +Encoding: ba +U-Bits: 001101110101101101111111110100111100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110010110011101111111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110101111011010000011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: ba + +Encoding: bb +U-Bits: 111001001001101101000101010100001100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110101100111101001111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110010101111010110011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: bb + +Encoding: bc +U-Bits: 000011101001011101110010110110110011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110011011011111110000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110100010011000001100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: bc + +Encoding: bd +U-Bits: 110111010101011101001000010110000011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110100001111111000000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110011000111000111100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: bd + +Encoding: be +U-Bits: 001110100110011101111100011110111111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: be + +Encoding: be +U-Bits: 001110100110011110010101110111111100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: be + +Encoding: be +U-Bits: 001110100110011110101100110000000000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: be + +Encoding: bf +U-Bits: 111010011010011101000110111110001111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110101111010111001100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110010110010000110000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: bf + +Encoding: c0 +U-Bits: 000000000000111001001001010100001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010100000111101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010011001111010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: c0 + +Encoding: c1 +U-Bits: 110100111100111001110011110100111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010011010011101111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010100011011010000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: c1 + +Encoding: c2 +U-Bits: 001101001111111001000111111100000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010101110010101000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010010111010010111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c2 + +Encoding: c3 +U-Bits: 111001110011111001111101011100110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010010100110101110011 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010101101110010001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c3 + +Encoding: c4 +U-Bits: 000011010011001001001010111110001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010100011010111001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010011010010000110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: c4 + +Encoding: c5 +U-Bits: 110111101111001001110000011110111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010011001110111111100 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010100000110000000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c5 + +Encoding: c6 +U-Bits: 001110011100001001000100010110000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010101101111111000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010010100111000111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: c6 + +Encoding: c7 +U-Bits: 111010100000001001111110110110110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010010111011111110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010101110011000001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: c7 + +Encoding: c8 +U-Bits: 000000110100000110101101001011111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101000100100010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101111101100101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c8 + +Encoding: c9 +U-Bits: 110100001000000110010111101011001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101111110000010001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101000111000101110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c9 + +Encoding: ca +U-Bits: 001101111011000110100011100011110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101001010001010110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101110011001101001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ca + +Encoding: cb +U-Bits: 111001000111000110011001000011000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101110000101010000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101001001101101111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: cb + +Encoding: cc +U-Bits: 000011100111110110101110100001111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101000111001000111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101111110001111000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: cc + +Encoding: cd +U-Bits: 110111011011110110010100000001001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101111101101000001100 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101000100101111110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: cd + +Encoding: ce +U-Bits: 001110101000110110100000001001110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101001001100000110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101110000100111001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: ce + +Encoding: cf +U-Bits: 111010010100110110011010101001000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101110011000000000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101001010000111111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: cf + +Encoding: d0 +U-Bits: 000000001101110110110000010011110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101011001111010110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101100000111101001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: d0 + +Encoding: d1 +U-Bits: 110100110001110110001010110011000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101100011011010000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101011010011101111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: d1 + +Encoding: d2 +U-Bits: 001101000010110110111110111011111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101010111010010111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101101110010101000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d2 + +Encoding: d3 +U-Bits: 111001111110110110000100011011001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101101101110010001111 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101010100110101110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d3 + +Encoding: d4 +U-Bits: 000011011110000110110011111001110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101011010010000110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101100011010111001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: d4 + +Encoding: d5 +U-Bits: 110111100010000110001001011001000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101100000110000000000 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101011001110111111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: d5 + +Encoding: d6 +U-Bits: 001110010001000110111101010001111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101010100111000111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101101101111111000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: d6 + +Encoding: d7 +U-Bits: 111010101101000110000111110001001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101101110011000001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101010111011111110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: d7 + +Encoding: d8 +U-Bits: 000000111001001001010100001100000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010111101100101000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010000100100010111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d8 + +Encoding: d9 +U-Bits: 110100000101001001101110101100110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010000111000101110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010111110000010001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d9 + +Encoding: da +U-Bits: 001101110110001001011010100100001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: da + +Encoding: da +U-Bits: 001101110110001010110011001101001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: da + +Encoding: da +U-Bits: 001101110110001010001010001010110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: da + +Encoding: db +U-Bits: 111001001010001001100000000100111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: db + +Encoding: db +U-Bits: 111001001010001010001001101101111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: db + +Encoding: db +U-Bits: 111001001010001010110000101010000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: db + +Encoding: dc +U-Bits: 000011101010111001010111100110000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010111110001111000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010000111001000111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: dc + +Encoding: dd +U-Bits: 110111010110111001101101000110110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010000100101111110000 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010111101101000001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: dd + +Encoding: de +U-Bits: 001110100101111001011001001110001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: de + +Encoding: de +U-Bits: 001110100101111010110000100111001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: de + +Encoding: de +U-Bits: 001110100101111010001001100000110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: de + +Encoding: df +U-Bits: 111010011001111001100011101110111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: df + +Encoding: df +U-Bits: 111010011001111010001010000111111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: df + +Encoding: df +U-Bits: 111010011001111010110011000000000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: df + +Encoding: e0 +U-Bits: 000000000011101010110111000101110011 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001011110101100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001100111101011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: e0 + +Encoding: e1 +U-Bits: 110100111111101010001101100101000011 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001100100001100000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001011101001011111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: e1 + +Encoding: e2 +U-Bits: 001101001100101010111001101101111111 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001010000000100111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001101001000011000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e2 + +Encoding: e3 +U-Bits: 111001110000101010000011001101001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001101010100100001100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001010011100011110000 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e3 + +Encoding: e4 +U-Bits: 000011010000011010110100101111110000 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001011101000110110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001100100000001001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: e4 + +Encoding: e5 +U-Bits: 110111101100011010001110001111000000 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001100111100110000011 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001011110100001111111 +S-Bits: +81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: e5 + +Encoding: e6 +U-Bits: 001110011111011010111010000111111100 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001010011101110111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001101010101001000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: e6 + +Encoding: e7 +U-Bits: 111010100011011010000000100111001100 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001101001001110001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001010000001001110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: e7 + +Encoding: e8 +U-Bits: 000000110111010101010011011010000011 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110111010110011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110000011110100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e8 + +Encoding: e9 +U-Bits: 110100001011010101101001111010110011 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110000000010011110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110111001010100001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e9 + +Encoding: ea +U-Bits: 001101111000010101011101110010001111 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110110100011011001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110001101011100110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: ea + +Encoding: eb +U-Bits: 111001000100010101100111010010111111 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110001110111011111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110110111111100000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: eb + +Encoding: ec +U-Bits: 000011100100100101010000110000000000 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110111001011001000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110000000011110111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: ec + +Encoding: ed +U-Bits: 110111011000100101101010010000110000 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110000011111001110011 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110111010111110001111 +S-Bits: +81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: ed + +Encoding: ee +U-Bits: 001110101011100101011110011000001100 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110110111110001001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110001110110110110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: ee + +Encoding: ef +U-Bits: 111010010111100101100100111000111100 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110001101010001111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110110100010110000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ef + +Encoding: f0 +U-Bits: 000000001110100101001110000010001111 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110100111101011001100 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110011110101100110000 +S-Bits: +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: f0 + +Encoding: f1 +U-Bits: 110100110010100101110100100010111111 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110011101001011111100 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110100100001100000000 +S-Bits: +81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f1 + +Encoding: f2 +U-Bits: 001101000001100101000000101010000011 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110101001000011000000 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110010000000100111100 +S-Bits: +7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f2 + +Encoding: f3 +U-Bits: 111001111101100101111010001010110011 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110010011100011110000 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110101010100100001100 +S-Bits: +81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f3 + +Encoding: f4 +U-Bits: 000011011101010101001101101000001100 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110100100000001001111 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110011101000110110011 +S-Bits: +7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: f4 + +Encoding: f5 +U-Bits: 110111100001010101110111001000111100 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110011110100001111111 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110100111100110000011 +S-Bits: +81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: f5 + +Encoding: f6 +U-Bits: 001110010010010101000011000000000000 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110101010101001000011 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110010011101110111111 +S-Bits: +7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: f6 + +Encoding: f7 +U-Bits: 111010101110010101111001100000110000 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110010000001001110011 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110101001001110001111 +S-Bits: +81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: f7 + +Encoding: f8 +U-Bits: 000000111010011010101010011101111111 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001000011110100111100 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001111010110011000000 +S-Bits: +7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f8 + +Encoding: f9 +U-Bits: 110100000110011010010000111101001111 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001111001010100001100 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001000000010011110000 +S-Bits: +81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f9 + +Encoding: fa +U-Bits: 001101110101011010100100110101110011 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001001101011100110000 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001110100011011001100 +S-Bits: +7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: fa + +Encoding: fb +U-Bits: 111001001001011010011110010101000011 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001110111111100000000 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001001110111011111100 +S-Bits: +81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: fb + +Encoding: fc +U-Bits: 000011101001101010101001110111111100 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001000000011110111111 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001111001011001000011 +S-Bits: +7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: fc + +Encoding: fd +U-Bits: 110111010101101010010011010111001100 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001111010111110001111 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001000011111001110011 +S-Bits: +81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: fd + +Encoding: fe +U-Bits: 001110100110101010100111011111110000 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001001110110110110011 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001110111110001001111 +S-Bits: +7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: fe + +Encoding: ff +U-Bits: 111010011010101010011101111111000000 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001110100010110000011 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001001101010001111111 +S-Bits: +81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ff + +Encoding: 03 03 01 00 +U-Bits: 111001110011000011100111001100001101001111000000000011010000011010110111111100 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 03 03 01 00 + +Encoding: a3 af 5f 00 +U-Bits: 111001110000011101010110011101000101011010011101111111111010011001001110001111 +S-Bits: +81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a3 af 5f 00 + +Encoding: 01 02 03 00 +U-Bits: 110100111100000000110100111100001110011100110000000011101010001101011100110000 +S-Bits: +81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 02 03 00 + +Encoding: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 +U-Bits: +0E1E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E0E1E0E0E0E0E0E1E1E1E1E0 23 00 E0E0E0E1E1E1E1E0E1E1E1E0E1E0E0E0E0E1E0E1E0E0E0E0E1E1E0E0E +1E0E1E0E1E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E0E0E1E1E0E0E1 23 00 E1E1E1E0E1E0E0E1E0E0E0E1E0E0E0E0E1E0E0E0E0E1E0E0E1E1E0E1E +1E1E1E0E0E1E0E1E1E0E0E0E0E1E1E1E1E0E0E1E0E0E1E1E1E0E0E0E0 23 00 E1E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E0E1E0E1E0E0E1E1E0E0E0E1E +0E0E0E0E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E1E0E0E0E1E1E0E0 23 00 E1E0E1E0E0E1E1E0E0E1E0E0E0E0E1E1E0E0E0E1E0E0E0E0E0E0E1E1E +E0E0E1E0E1E0E1E0E1E0E0E0E1E1E1E1E0E0E1E0E1E0E0E0E0E1E0E1E 00 23 0E1E1E0E0E0E1E1E1E1E1E1E1E0E1E1E1E1E1E1E1E1E0E1E0E1E1E0E0 +E1E0E1E0E1E0E1E1E0E1E1E0E0E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E 00 23 0E1E0E1E1E1E1E0E1E1E0E1E1E1E0E1E0E0E0E1E0E0E0E1E0E1E0E1E1 +E1E0E0E1E1E0E1E1E0E0E0E1E1E1E1E0E1E1E0E1E0E0E0E0E0E1E1E1E 00 23 0E1E0E1E1E0E0E0E1E0E1E0E1E1E0E0E0E1E1E0E1E0E1E1E1E1E0E1E0 +E0E1E0E1E1E0E1E0E0E1E1E0E0E0E1E1E1E1E1E0E0E1E1E0E1E1E0E0E 00 23 1E0E0E0E0E1E0E0E1E1E1E1E1E0E1E0E1E1E0E1E1E1E0E0E1E0E0E1E1 +S-Bits: +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 +81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 +81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 +Decoded: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e +U-Bits: +0E1E1E0E0E0E0E0E1E0E0E0E1E0E0E1E1E1E1E0E0E0E1E1E1E1E1E0E0 23 00 E0E0E1E0E0E0E1E1E0E1E1E0E0E0E1E0E0E0E1E0E0E1E1E1E0E0E0E0E +1E0E0E0E1E0E1E1E1E0E0E1E1E1E1E1E0E0E0E1E0E0E0E1E0E1E0E1E1 23 00 E0E1E0E1E0E1E1E0E0E0E0E0E1E1E0E1E1E0E0E1E0E1E0E1E0E0E0E1E +0E1E0E1E1E0E0E0E0E1E0E0E1E0E0E0E1E0E0E0E1E0E1E1E1E1E1E0E0 23 00 E0E0E0E0E0E0E0E1E0E1E0E0E0E0E0E1E1E0E0E0E1E1E0E0E0E0E0E0E +0E1E0E0E1E0E0E1E1E0E0E0E1E0E0E1E0E1E1E0E0E0E1E1E0E1E1E0E1 23 00 E1E0E0E1E0E1E1E0E0E0E0E0E0E1E0E1E0E0E0E0E0E0E1E0E1E0E1E1E +E0E1E0E0E0E0E1E0E1E1E0E1E0E0E1E0E1E0E1E1E1E1E1E0E0E0E1E0E 00 23 1E1E0E0E0E1E1E0E1E0E0E0E0E1E1E1E1E0E0E0E0E1E1E1E0E0E0E0E1 +E0E1E0E0E0E0E1E0E1E0E1E1E1E1E0E0E0E0E1E0E1E1E0E0E1E0E1E1E 00 23 1E0E0E1E0E1E0E1E1E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E1E0E0E0E0 +E0E0E1E1E0E0E0E0E0E0E0E0E1E1E0E1E1E1E1E1E1E0E0E0E0E0E0E0E 00 23 0E1E0E1E1E0E0E0E0E1E0E0E0E1E0E1E0E0E0E1E1E1E0E1E0E0E0E0E1 +E1E0E0E1E1E1E0E0E0E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E1E0E0E0E 00 23 1E1E0E0E0E1E0E1E0E0E0E0E1E1E0E0E0E0E0E1E1E1E1E0E1E0E0E1E0 +S-Bits: +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f +Decoded: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E1E1E0 23 01 E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0 23 01 E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E 01 23 0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0 +E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E 01 23 0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f +81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +0E1E0E1E1E0E0E1E0E1E1E1E1E0E1E0E0E1E1E0E1E1E0E0E1E0E0E0E0 23 01 E1E1E1E0E1E0E1E0E0E0E0E0E1E1E1E0E1E1E1E1E0E0E0E1E1E0E1E1E +1E0E0E1E0E1E1E1E0E0E1E0E1E1E0E0E1E1E0E1E1E0E0E0E1E1E0E0E1 23 01 E0E1E1E0E0E1E0E0E1E1E1E1E0E0E0E0E0E0E1E1E1E1E0E0E0E1E1E1E +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +E0E0E1E1E1E0E1E0E1E1E0E1E0E0E1E1E1E0E0E0E0E1E0E0E0E0E0E1E 01 23 1E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E0E0E0E1E0E0E0E0E1E1E1E0E0 +E1E1E1E1E1E0E1E0E1E0E0E1E0E0E1E1E0E0E0E1E1E1E1E1E1E1E1E1E 01 23 0E1E0E1E1E1E1E1E1E0E1E0E1E0E1E1E0E1E0E0E1E0E0E1E1E0E0E0E1 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 +81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f +81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +0E0E0E0E0E0E1E0E1E0E1E0E0E1E1E1E1E1E1E1E1E0E1E0E1E0E0E1E1 23 01 E1E1E1E1E1E0E1E0E1E0E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E1E0E0E +1E0E0E1E1E0E0E0E0E0E0E0E1E0E1E0E0E1E0E1E1E1E1E1E1E0E0E1E0 23 01 E1E1E0E1E1E1E1E1E1E1E1E1E0E0E1E1E0E1E0E0E0E0E0E0E1E1E1E0E +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E1E0E0E1E1E0E 01 23 0E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E0E0E0E1E1E0 +E0E1E0E0E1E1E0E1E0E0E1E1E1E1E1E1E0E1E0E0E1E0E0E0E0E1E1E1E 01 23 1E0E1E0E0E1E1E0E0E0E0E1E1E1E1E1E0E1E1E0E0E1E1E0E0E1E1E1E1 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee +U-Bits: +0E1E0E0E1E0E0E1E1E0E1E0E0E0E0E0E0E0E0E1E1E0E0E1E1E1E1E1E1 23 00 E1E1E1E1E1E0E1E1E1E0E0E1E0E1E1E1E0E0E1E0E0E1E1E1E1E0E0E0E +0E1E1E0E0E0E0E1E0E1E1E1E0E0E1E1E0E0E1E0E1E0E1E0E0E0E1E0E1 23 00 E0E0E0E1E1E1E1E1E0E1E1E1E0E0E0E0E1E1E1E0E0E1E1E0E1E1E1E0E +E0E0E0E1E1E1E1E1E0E1E0E0E1E1E0E0E1E0E1E0E0E1E1E0E0E0E0E0E 00 23 0E0E0E1E0E1E0E1E0E0E1E1E0E1E0E0E0E1E1E1E0E0E0E0E1E0E1E0E1 +E1E0E0E1E1E1E1E1E1E0E0E1E1E1E0E0E0E1E1E1E1E1E1E1E1E0E1E1E 00 23 0E0E1E0E1E0E0E0E1E0E0E1E1E0E1E1E1E1E0E1E1E0E1E0E0E1E0E1E1 +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +S-Bits: +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +Decoded: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +001001111100011001111011100011010110100010110000100000010 01 01 111101000100010000001000011101100101011100000001111011010 +110101110110111001001001101001011010001111010101111101011 01 01 001101101011101011011101100010100010010111010010100101011 +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 7f 81 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 81 7f +81 81 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +000100000101110110011100001111111010111111011100100101101 01 01 010111010110111011001110000010101000001110101100010110100 +100100101101000100000101110111010011001011101010100101110 01 01 110110010111110101010111101011110011100000101000011111101 +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f +81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f +U-Bits: +101011101110011001100000010010001100001011100000000011100 01 01 001110000110001110001011000001001001001010010111110000010 +000011100010110001011101000111011011110111101011100101100 00 00 010101010010111111101011000110101010110111000111010011011 +000101111111110000011110110000011000000100110001101000110 01 00 011010011010010010110000010100001100110000110110110011011 +011110100011000011100010100011101110001110110110011011111 00 00 000111100011100011010001101110010111011111010111110110011 +S-Bits: +81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f +7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 81 +7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 +7f 81 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 +U-Bits: +100010111000001100000000001101001000000000101100111011001 00 00 101110010011001000110010000011100101000011110001101100001 +001011110100100101010101111111110011111011111110001101001 01 00 011010010110101000111110001100110011101101111000100101110 +110001101010001000010101011111101011000111010110110011110 00 00 101001101100011001101100110110000101000001000001011000110 +011100001010000100100101001000110110100111000000101110000 00 01 111100110000011001001100110100111101011010011110100010011 +S-Bits: +81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 +7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f +81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f +7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 +U-Bits: +100010100101111101110101011001010100000101001001011011000 00 00 001000000000001100000110001011010111110101110101001100010 +010101000000101010101011110000010101000100000011010001101 00 01 010111110101110101010111011111100111010011010000111110111 +010111100101110011111100101110001010100110000010100000100 00 01 010111101110101111110011110101111101110100011000101111111 +011110100110000011110100111111101111111111111010101110000 01 00 001010101010101010101010111010110110000000100000101001011 +S-Bits: +81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f +7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 81 81 +7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 +7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111110100100011100101010000100110000110101111110000000010 01 01 010000000110100010010111101011000000110000111100000100001 +111000110100110110001000010011101000000010100010101101000 00 00 100001001010111000011000100011000111100001110100010000010 +001011000100011010100000101110100010010010001011110101001 01 00 000110000011000100011000100101000100001000000100101001011 +101001001100101001110101101010101000000110100010000010101 00 00 010100101110010001000011011100010000111000010010100110010 +S-Bits: +81 81 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 +81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f +7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111010000001011110000011000110101000110100010000001000010 00 00 100001011000101110010100001001110000100010010101001010000 +101000110001001010001000010100000010000100100000110001011 01 00 110001101000110100000010100011010010100001000101000010111 +101011000101001000100100001000001100000111000011010000010 00 00 010110001011010001000010001001000010101001010000000011100 +001000010100100001010001001000110100010100001101010010101 00 01 000000101111000000100011010100010010110101000010001111000 +S-Bits: +81 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f +81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 +81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f +7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000000001000000000000010010000000000100000000000001000 00 00 000000000000100000000000001000000000000010010000000000100 +101010000001000000000000010010101000000100000000010000011 00 01 010100000000100000000000001001010000000011000000000000110 +101000000000000000000000000000000000000010101001000000101 00 01 010000000001000000000000000000000000000001010100000000010 +100000000010101000000000000000000000000000000000000010000 01 00 000000000100000000000001010101000000010101010000000001010 +S-Bits: +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f +81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f +81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + Success -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:09:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:09:57 +0000 Subject: [PATCH] libosmocore[master]: coding test: cosmetic cleanup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5063 to look at the new patch set (#4). coding test: cosmetic cleanup * remove duplicate code: use function from libosmocore * use utility function to dump ubits * reformat for easier reading * link against libosmocore Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 --- M tests/Makefile.am M tests/coding/coding_test.c 2 files changed, 55 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/5063/4 diff --git a/tests/Makefile.am b/tests/Makefile.am index e11092d..c609d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -165,7 +165,7 @@ socket_socket_test_SOURCES = socket/socket_test.c coding_coding_test_SOURCES = coding/coding_test.c -coding_coding_test_LDADD = \ +coding_coding_test_LDADD = $(LDADD) \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..6c1bd84 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -40,27 +40,6 @@ /* set condition to 1, to show debugging */ #define printd if (0) printf -static int ubits2sbits(ubit_t *ubits, sbit_t *sbits, int count) -{ - int i; - - for (i = 0; i < count; i++) { - if (*ubits == 0x23) { - ubits++; - sbits++; - continue; - } - - if ((*ubits++) & 1) { - *sbits++ = -127; - } else { - *sbits++ = 127; - } - } - - return count; -} - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -73,21 +52,17 @@ gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -130,13 +105,11 @@ gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 36); + osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 36)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); @@ -165,13 +138,11 @@ gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 78); + osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 78)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); @@ -201,33 +172,25 @@ gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 8); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 696, 57), - bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 812, 57), - bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 812, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -287,27 +250,21 @@ gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 6); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -371,21 +328,17 @@ gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:09:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:09:57 +0000 Subject: [PATCH] libosmocore[master]: coding test: enable debug output In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5070 to look at the new patch set (#3). coding test: enable debug output Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 --- M tests/coding/coding_test.c M tests/coding/coding_test.ok 2 files changed, 4,289 insertions(+), 121 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/5070/3 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 6c1bd84..a495b9a 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,9 +37,6 @@ abort(); \ } -/* set condition to 1, to show debugging */ -#define printd if (0) printf - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -48,35 +45,35 @@ int n_errors, n_bits_total; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, 23)); + printf("Encoding: %s\n", osmo_hexdump(l2, 23)); gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -84,14 +81,14 @@ /* Decode, correcting errors */ gsm0503_xcch_decode(result, bursts_s, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, 23)); + printf("Decoded: %s\n", osmo_hexdump(result, 23)); printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); ASSERT_TRUE(n_bits_total == 456); ASSERT_TRUE(!memcmp(l2, result, 23)); - printd("\n"); + printf("\n"); } static void test_rach(uint8_t bsic, uint8_t ra) @@ -101,26 +98,26 @@ sbit_t bursts_s[36]; /* Encode L2 message */ - printd("Encoding: %02x\n", ra); + printf("Encoding: %02x\n", ra); gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printf("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); /* Decode, correcting errors */ gsm0503_rach_decode(&result, bursts_s, bsic); - printd("Decoded: %02x\n", result); + printf("Decoded: %02x\n", result); ASSERT_TRUE(ra == result); - printd("\n"); + printf("\n"); } static void test_sch(uint8_t *info) @@ -134,26 +131,26 @@ result[3] = 0; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(info, 4)); + printf("Encoding: %s\n", osmo_hexdump(info, 4)); gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printf("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); /* Decode, correcting errors */ gsm0503_sch_decode(result, bursts_s); - printd("Decoded: %s\n", osmo_hexdump(result, 4)); + printf("Decoded: %s\n", osmo_hexdump(result, 4)); ASSERT_TRUE(!memcmp(info, result, 4)); - printd("\n"); + printf("\n"); } static void test_fr(uint8_t *speech, int len) @@ -168,55 +165,55 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -224,14 +221,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_fr_decode(result, bursts_s, 1, len == 31, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_hr(uint8_t *speech, int len) @@ -246,45 +243,45 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -292,14 +289,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_hr_decode(result, bursts_s, 0, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_pdtch(uint8_t *l2, int len) @@ -324,47 +321,47 @@ } /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, len)); + printf("Encoding: %s\n", osmo_hexdump(l2, len)); gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(l2, result, len)); - printd("\n"); + printf("\n"); } uint8_t test_l2[][23] = { diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok index 5030e4d..619f038 100644 --- a/tests/coding/coding_test.ok +++ b/tests/coding/coding_test.ok @@ -1,21 +1,4192 @@ +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000010000100000000100000000000000000000101000010000001 01 01 010000100000010000001000000101000010100000000000001000000 +000000010010000000010000000010000001000010100001000000000 01 01 000000100000010000101000000000000000000001000000000001000 +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +S-Bits: +81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 00 +U-Bits: 000000000000000000000000000000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011101001101001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011010000101110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 00 + +Encoding: 01 +U-Bits: 110100111100000000111010100000110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011010011001001110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011101010001110001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 01 + +Encoding: 02 +U-Bits: 001101001111000000001110101000001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011100111000001001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011011110000110110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 02 + +Encoding: 03 +U-Bits: 111001110011000000110100001000111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011011101100001111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011100100100110000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 03 + +Encoding: 04 +U-Bits: 000011010011110000000011101010000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011101010000011000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011010011000100111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 04 + +Encoding: 05 +U-Bits: 110111101111110000111001001010110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011010000100011110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011101001100100001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 05 + +Encoding: 06 +U-Bits: 001110011100110000001101000010001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011100100101011001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011011101101100110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 06 + +Encoding: 07 +U-Bits: 111010100000110000110111100010111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011011110001011111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011100111001100000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 07 + +Encoding: 08 +U-Bits: 000000110100111111100100011111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100001101110110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100110100110001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 08 + +Encoding: 09 +U-Bits: 110100001000111111011110111111000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100110111010110000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100001110010001111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 09 + +Encoding: 0a +U-Bits: 001101111011111111101010110111111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100000011011110111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100111010011001000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0a + +Encoding: 0b +U-Bits: 111001000111111111010000010111001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100111001111110001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100000000111001110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 0b + +Encoding: 0c +U-Bits: 000011100111001111100111110101110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100001110011100110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100110111011011001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 0c + +Encoding: 0d +U-Bits: 110111011011001111011101010101000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100110100111100000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100001101111011111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 0d + +Encoding: 0e +U-Bits: 001110101000001111101001011101111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100000000110100111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100111001110011000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 0e + +Encoding: 0f +U-Bits: 111010010100001111010011111101001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100111010010100001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100000011010011110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 0f + +Encoding: 10 +U-Bits: 000000001101001111111001000111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100010000101110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100101001101001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 10 + +Encoding: 11 +U-Bits: 110100110001001111000011100111001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100101010001110001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100010011001001110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 11 + +Encoding: 12 +U-Bits: 001101000010001111110111101111110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100011110000110110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100100111000001001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 12 + +Encoding: 13 +U-Bits: 111001111110001111001101001111000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100100100100110000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100011101100001111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 13 + +Encoding: 14 +U-Bits: 000011011110111111111010101101111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100010011000100111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100101010000011000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 14 + +Encoding: 15 +U-Bits: 110111100010111111000000001101001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100101001100100001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100010000100011110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 15 + +Encoding: 16 +U-Bits: 001110010001111111110100000101110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100011101101100110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100100100101011001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 16 + +Encoding: 17 +U-Bits: 111010101101111111001110100101000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100100111001100000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100011110001011111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 17 + +Encoding: 18 +U-Bits: 000000111001110000011101011000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011110100110001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011001101110110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 18 + +Encoding: 19 +U-Bits: 110100000101110000100111111000111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011001110010001111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011110111010110000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 19 + +Encoding: 1a +U-Bits: 001101110110110000010011110000000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011111010011001000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011000011011110111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 1a + +Encoding: 1b +U-Bits: 111001001010110000101001010000110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011000000111001110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011111001111110001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 1b + +Encoding: 1c +U-Bits: 000011101010000000011110110010001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011110111011011001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011001110011100110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1c + +Encoding: 1d +U-Bits: 110111010110000000100100010010111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011001101111011111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011110100111100000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1d + +Encoding: 1e +U-Bits: 001110100101000000010000011010000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011111001110011000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011000000110100111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 1e + +Encoding: 1f +U-Bits: 111010011001000000101010111010110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011000011010011110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011111010010100001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 1f + +Encoding: 20 +U-Bits: 000000000011010011111110010001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000010111111000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000101110111111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 20 + +Encoding: 21 +U-Bits: 110100111111010011000100110001001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000101101011000001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000010100011111110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 21 + +Encoding: 22 +U-Bits: 001101001100010011110000111001110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000011001010000110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000100000010111001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 22 + +Encoding: 23 +U-Bits: 111001110000010011001010011001000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000100011110000000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 23 + +Encoding: 24 +U-Bits: 000011010000100011111101111011111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000010100010010111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000101101010101000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 24 + +Encoding: 25 +U-Bits: 110111101100100011000111011011001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000101110110010001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000010111110101110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 25 + +Encoding: 26 +U-Bits: 001110011111100011110011010011110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000011010111010110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000100011111101001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 26 + +Encoding: 27 +U-Bits: 111010100011100011001001110011000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000100000011010000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000011001011101111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 27 + +Encoding: 28 +U-Bits: 000000110111101100011010001110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111110011100111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111001010100000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 28 + +Encoding: 29 +U-Bits: 110100001011101100100000101110111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111001001000111111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111110000000000000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 29 + +Encoding: 2a +U-Bits: 001101111000101100010100100110000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111111101001111000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111000100001000111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 2a + +Encoding: 2b +U-Bits: 111001000100101100101110000110110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111000111101111110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111111110101000001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2b + +Encoding: 2c +U-Bits: 000011100100011100011001100100001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111110000001101001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111001001001010110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 2c + +Encoding: 2d +U-Bits: 110111011000011100100011000100111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111001010101101111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111110011101010000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2d + +Encoding: 2e +U-Bits: 001110101011011100010111001100000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111111110100101000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111000111100010111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 2e + +Encoding: 2f +U-Bits: 111010010111011100101101101100110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111000100000101110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111111101000010001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 2f + +Encoding: 30 +U-Bits: 000000001110011100000111010110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111101110111111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111010111111000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 30 + +Encoding: 31 +U-Bits: 110100110010011100111101110110110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111010100011111110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111101101011000001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 31 + +Encoding: 32 +U-Bits: 001101000001011100001001111110001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111100000010111001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111011001010000110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 32 + +Encoding: 33 +U-Bits: 111001111101011100110011011110111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111100011110000000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 33 + +Encoding: 34 +U-Bits: 000011011101101100000100111100000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111101101010101000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111010100010010111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 34 + +Encoding: 35 +U-Bits: 110111100001101100111110011100110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111010111110101110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111101110110010001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 35 + +Encoding: 36 +U-Bits: 001110010010101100001010010100001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111100011111101001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111011010111010110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 36 + +Encoding: 37 +U-Bits: 111010101110101100110000110100111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111011001011101111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111100000011010000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 37 + +Encoding: 38 +U-Bits: 000000111010100011100011001001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000001010100000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000110011100111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 38 + +Encoding: 39 +U-Bits: 110100000110100011011001101001000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000110000000000000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000001001000111111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 39 + +Encoding: 3a +U-Bits: 001101110101100011101101100001111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000000100001000111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000111101001111000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3a + +Encoding: 3b +U-Bits: 111001001001100011010111000001001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000111110101000001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000000111101111110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 3b + +Encoding: 3c +U-Bits: 000011101001010011100000100011110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000001001001010110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000110000001101001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 3c + +Encoding: 3d +U-Bits: 110111010101010011011010000011000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000110011101010000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000001010101101111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 3d + +Encoding: 3e +U-Bits: 001110100110010011101110001011111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000000111100010111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000111110100101000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 3e + +Encoding: 3f +U-Bits: 111010011010010011010100101011001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000111101000010001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000000100000101110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 3f + +Encoding: 40 +U-Bits: 000000000000110111011011000001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100110010101000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100001011101111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 40 + +Encoding: 41 +U-Bits: 110100111100110111100001100001111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100001000001000111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100110001001111000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 41 + +Encoding: 42 +U-Bits: 001101001111110111010101101001000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100111100000000000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100000101000111111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 42 + +Encoding: 43 +U-Bits: 111001110011110111101111001001110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100000110100000110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100111111100111001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 43 + +Encoding: 44 +U-Bits: 000011010011000111011000101011001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100110001000010001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100001000000101110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 44 + +Encoding: 45 +U-Bits: 110111101111000111100010001011111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100001011100010111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100110010100101000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 45 + +Encoding: 46 +U-Bits: 001110011100000111010110000011000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100111111101010000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100000110101101111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 46 + +Encoding: 47 +U-Bits: 111010100000000111101100100011110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100000101001010110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100111100001101001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 47 + +Encoding: 48 +U-Bits: 000000110100001000111111011110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011010110110111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011101111110000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 48 + +Encoding: 49 +U-Bits: 110100001000001000000101111110001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011101100010111001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011010101010000110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 49 + +Encoding: 4a +U-Bits: 001101111011001000110001110110110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011011000011111110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011100001011000001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4a + +Encoding: 4b +U-Bits: 111001000111001000001011010110000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011100010111111000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011011011111000111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 4b + +Encoding: 4c +U-Bits: 000011100111111000111100110100111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011010101011101111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011101100011010000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4c + +Encoding: 4d +U-Bits: 110111011011111000000110010100001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011101111111101001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011010110111010110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 4d + +Encoding: 4e +U-Bits: 001110101000111000110010011100110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011011011110101110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011100010110010001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 4e + +Encoding: 4f +U-Bits: 111010010100111000001000111100000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011100001010101000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011011000010010111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 4f + +Encoding: 50 +U-Bits: 000000001101111000100010000110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011001011101111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011110010101000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 50 + +Encoding: 51 +U-Bits: 110100110001111000011000100110000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011110001001111000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011001000001000111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 51 + +Encoding: 52 +U-Bits: 001101000010111000101100101110111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011000101000111111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011111100000000000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 52 + +Encoding: 53 +U-Bits: 111001111110111000010110001110001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011111111100111001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011000110100000110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 53 + +Encoding: 54 +U-Bits: 000011011110001000100001101100110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011001000000101110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011110001000010001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 54 + +Encoding: 55 +U-Bits: 110111100010001000011011001100000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011110010100101000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011001011100010111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 55 + +Encoding: 56 +U-Bits: 001110010001001000101111000100111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011000110101101111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011111111101010000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 56 + +Encoding: 57 +U-Bits: 111010101101001000010101100100001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011111100001101001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011000101001010110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 57 + +Encoding: 58 +U-Bits: 000000111001000111000110011001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100101111110000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100010110110111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 58 + +Encoding: 59 +U-Bits: 110100000101000111111100111001110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100010101010000110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100101100010111001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 59 + +Encoding: 5a +U-Bits: 001101110110000111001000110001001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100100001011000001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100011000011111110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 5a + +Encoding: 5b +U-Bits: 111001001010000111110010010001111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100011011111000111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100100010111111000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5b + +Encoding: 5c +U-Bits: 000011101010110111000101110011000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100101100011010000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100010101011101111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 5c + +Encoding: 5d +U-Bits: 110111010110110111111111010011110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100010110111010110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100101111111101001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 5d + +Encoding: 5e +U-Bits: 001110100101110111001011011011001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100100010110010001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100011011110101110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 5e + +Encoding: 5f +U-Bits: 111010011001110111110001111011111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100011000010010111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100100001010101000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 5f + +Encoding: 60 +U-Bits: 000000000011100100100101010000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111001100111001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111110101111110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 60 + +Encoding: 61 +U-Bits: 110100111111100100011111110000000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111110110011001000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111001111011110111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 61 + +Encoding: 62 +U-Bits: 001101001100100100101011111000111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111000010010001111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111111011010110000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 62 + +Encoding: 63 +U-Bits: 111001110000100100010001011000001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111111000110001001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111000001110110110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 63 + +Encoding: 64 +U-Bits: 000011010000010100100110111010110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111001111010011110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111110110010100001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 64 + +Encoding: 65 +U-Bits: 110111101100010100011100011010000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111110101110011000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111001100110100111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 65 + +Encoding: 66 +U-Bits: 001110011111010100101000010010111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111000001111011111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111111000111100000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 66 + +Encoding: 67 +U-Bits: 111010100011010100010010110010001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111111011011011001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111000010011100110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 67 + +Encoding: 68 +U-Bits: 000000110111011011000001001111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000101000100110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000010001100001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 68 + +Encoding: 69 +U-Bits: 110100001011011011111011101111110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000010010000110110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000101011000001001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 69 + +Encoding: 6a +U-Bits: 001101111000011011001111100111001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000100110001110001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000011111001001110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 6a + +Encoding: 6b +U-Bits: 111001000100011011110101000111111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000011100101110111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000100101101001000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6b + +Encoding: 6c +U-Bits: 000011100100101011000010100101000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000101011001100000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000010010001011111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 6c + +Encoding: 6d +U-Bits: 110111011000101011111000000101110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000010001101100110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000101000101011001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 6d + +Encoding: 6e +U-Bits: 001110101011101011001100001101001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000100101100100001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000011100100011110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 6e + +Encoding: 6f +U-Bits: 111010010111101011110110101101111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000011111000100111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000100110000011000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 6f + +Encoding: 70 +U-Bits: 000000001110101011011100010111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000110101111110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000001100111001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 70 + +Encoding: 71 +U-Bits: 110100110010101011100110110111111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000001111011110111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000110110011001000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 71 + +Encoding: 72 +U-Bits: 001101000001101011010010111111000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000111011010110000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000000010010001111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 72 + +Encoding: 73 +U-Bits: 111001111101101011101000011111110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000000001110110110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000111000110001001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 73 + +Encoding: 74 +U-Bits: 000011011101011011011111111101001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000110110010100001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000001111010011110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 74 + +Encoding: 75 +U-Bits: 110111100001011011100101011101111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000001100110100111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000110101110011000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 75 + +Encoding: 76 +U-Bits: 001110010010011011010001010101000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000111000111100000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000000001111011111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 76 + +Encoding: 77 +U-Bits: 111010101110011011101011110101110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000000010011100110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000111011011011001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 77 + +Encoding: 78 +U-Bits: 000000111010010100111000001000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111010001100001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111101000100110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 78 + +Encoding: 79 +U-Bits: 110100000110010100000010101000001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111101011000001001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111010010000110110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 79 + +Encoding: 7a +U-Bits: 001101110101010100110110100000110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111011111001001110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111100110001110001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 7a + +Encoding: 7b +U-Bits: 111001001001010100001100000000000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111100101101001000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111011100101110111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 7b + +Encoding: 7c +U-Bits: 000011101001100100111011100010111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111010010001011111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111101011001100000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7c + +Encoding: 7d +U-Bits: 110111010101100100000001000010001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111101000101011001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111010001101100110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7d + +Encoding: 7e +U-Bits: 001110100110100100110101001010110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111011100100011110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111100101100100001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 7e + +Encoding: 7f +U-Bits: 111010011010100100001111101010000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111100110000011000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111011111000100111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 7f + +Encoding: 80 +U-Bits: 000000000000001110010010010101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101111011111100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101000010111011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 80 + +Encoding: 81 +U-Bits: 110100111100001110101000110101110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101000001011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101111000011011001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 81 + +Encoding: 82 +U-Bits: 001101001111001110011100111101001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101110101010100001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101001100010011110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 82 + +Encoding: 83 +U-Bits: 111001110011001110100110011101111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101001111110100111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101110110110011000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 83 + +Encoding: 84 +U-Bits: 000011010011111110010001111111000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101111000010110000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101000001010001111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 84 + +Encoding: 85 +U-Bits: 110111101111111110101011011111110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101000010110110110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101111011110001001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 85 + +Encoding: 86 +U-Bits: 001110011100111110011111010111001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101110110111110001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101001111111001110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 86 + +Encoding: 87 +U-Bits: 111010100000111110100101110111111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101001100011110111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101110101011001000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 87 + +Encoding: 88 +U-Bits: 000000110100110001110110001010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010011111100011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010100110100100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 88 + +Encoding: 89 +U-Bits: 110100001000110001001100101010000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010100101000011000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010011100000100111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 89 + +Encoding: 8a +U-Bits: 001101111011110001111000100010111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010010001001011111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010101000001100000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8a + +Encoding: 8b +U-Bits: 111001000111110001000010000010001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010101011101011001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010010010101100110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8b + +Encoding: 8c +U-Bits: 000011100111000001110101100000110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010011100001001110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010100101001110001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 8c + +Encoding: 8d +U-Bits: 110111011011000001001111000000000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010100110101001000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010011111101110111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 8d + +Encoding: 8e +U-Bits: 001110101000000001111011001000111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010010010100001111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010101011100110000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 8e + +Encoding: 8f +U-Bits: 111010010100000001000001101000001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010101000000001001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010010001000110110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 8f + +Encoding: 90 +U-Bits: 000000001101000001101011010010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010000010111011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010111011111100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 90 + +Encoding: 91 +U-Bits: 110100110001000001010001110010001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010111000011011001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010000001011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 91 + +Encoding: 92 +U-Bits: 001101000010000001100101111010110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010001100010011110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010110101010100001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 92 + +Encoding: 93 +U-Bits: 111001111110000001011111011010000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010110110110011000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010001111110100111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 93 + +Encoding: 94 +U-Bits: 000011011110110001101000111000111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010000001010001111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010111000010110000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 94 + +Encoding: 95 +U-Bits: 110111100010110001010010011000001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010111011110001001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010000010110110110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 95 + +Encoding: 96 +U-Bits: 001110010001110001100110010000110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010001111111001110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010110110111110001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 96 + +Encoding: 97 +U-Bits: 111010101101110001011100110000000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010110101011001000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010001100011110111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 97 + +Encoding: 98 +U-Bits: 000000111001111110001111001101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101100110100100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101011111100011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 98 + +Encoding: 99 +U-Bits: 110100000101111110110101101101111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101011100000100111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101100101000011000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 99 + +Encoding: 9a +U-Bits: 001101110110111110000001100101000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101101000001100000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101010001001011111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 9a + +Encoding: 9b +U-Bits: 111001001010111110111011000101110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101010010101100110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101101011101011001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 9b + +Encoding: 9c +U-Bits: 000011101010001110001100100111001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101100101001110001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101011100001001110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 9c + +Encoding: 9d +U-Bits: 110111010110001110110110000111111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101011111101110111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101100110101001000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9d + +Encoding: 9e +U-Bits: 001110100101001110000010001111000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101101011100110000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101010010100001111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 9e + +Encoding: 9f +U-Bits: 111010011001001110111000101111110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101010001000110110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101101000000001001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 9f + +Encoding: a0 +U-Bits: 000000000011011101101100000100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110000101101101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110111100101010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: a0 + +Encoding: a1 +U-Bits: 110100111111011101010110100100001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110111111001101001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110000110001010110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: a1 + +Encoding: a2 +U-Bits: 001101001100011101100010101100110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110001011000101110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110110010000010001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a2 + +Encoding: a3 +U-Bits: 111001110000011101011000001100000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110110001100101000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110001000100010111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a3 + +Encoding: a4 +U-Bits: 000011010000101101101111101110111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110000110000111111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110111111000000000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a4 + +Encoding: a5 +U-Bits: 110111101100101101010101001110001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110111100100111001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110000101100000110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: a5 + +Encoding: a6 +U-Bits: 001110011111101101100001000110110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110001000101111110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110110001101000001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: a6 + +Encoding: a7 +U-Bits: 111010100011101101011011100110000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110110010001111000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110001011001000111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: a7 + +Encoding: a8 +U-Bits: 000000110111100010001000011011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001100001110010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001011000110101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a8 + +Encoding: a9 +U-Bits: 110100001011100010110010111011111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001011011010010111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001100010010101000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a9 + +Encoding: aa +U-Bits: 001101111000100010000110110011000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001101111011010000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001010110011101111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: aa + +Encoding: ab +U-Bits: 111001000100100010111100010011110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001010101111010110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001101100111101001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ab + +Encoding: ac +U-Bits: 000011100100010010001011110001001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001100010011000001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001011011011111110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: ac + +Encoding: ad +U-Bits: 110111011000010010110001010001111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001011000111000111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001100001111111000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ad + +Encoding: ae +U-Bits: 001110101011010010000101011001000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001101100110000000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001010101110111111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: ae + +Encoding: af +U-Bits: 111010010111010010111111111001110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: af + +Encoding: af +U-Bits: 111010010111010001010110010000110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: af + +Encoding: af +U-Bits: 111010010111010001101111010111001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: af + +Encoding: b0 +U-Bits: 000000001110010010010101000011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001111100101010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001000101101101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: b0 + +Encoding: b1 +U-Bits: 110100110010010010101111100011110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001000110001010110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001111111001101001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: b1 + +Encoding: b2 +U-Bits: 001101000001010010011011101011001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001110010000010001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001001011000101110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b2 + +Encoding: b3 +U-Bits: 111001111101010010100001001011111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001001000100010111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001110001100101000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b3 + +Encoding: b4 +U-Bits: 000011011101100010010110101001000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001111111000000000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001000110000111111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: b4 + +Encoding: b5 +U-Bits: 110111100001100010101100001001110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001000101100000110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001111100100111001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: b5 + +Encoding: b6 +U-Bits: 001110010010100010011000000001001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001110001101000001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001001000101111110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: b6 + +Encoding: b7 +U-Bits: 111010101110100010100010100001111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001001011001000111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001110010001111000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: b7 + +Encoding: b8 +U-Bits: 000000111010101101110001011100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110011000110101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110100001110010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b8 + +Encoding: b9 +U-Bits: 110100000110101101001011111100000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110100010010101000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110011011010010111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b9 + +Encoding: ba +U-Bits: 001101110101101101111111110100111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110010110011101111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110101111011010000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: ba + +Encoding: bb +U-Bits: 111001001001101101000101010100001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110101100111101001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110010101111010110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: bb + +Encoding: bc +U-Bits: 000011101001011101110010110110110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110011011011111110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110100010011000001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: bc + +Encoding: bd +U-Bits: 110111010101011101001000010110000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110100001111111000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110011000111000111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: bd + +Encoding: be +U-Bits: 001110100110011101111100011110111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: be + +Encoding: be +U-Bits: 001110100110011110010101110111111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: be + +Encoding: be +U-Bits: 001110100110011110101100110000000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: be + +Encoding: bf +U-Bits: 111010011010011101000110111110001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110101111010111001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110010110010000110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: bf + +Encoding: c0 +U-Bits: 000000000000111001001001010100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010100000111101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010011001111010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: c0 + +Encoding: c1 +U-Bits: 110100111100111001110011110100111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010011010011101111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010100011011010000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: c1 + +Encoding: c2 +U-Bits: 001101001111111001000111111100000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010101110010101000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010010111010010111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c2 + +Encoding: c3 +U-Bits: 111001110011111001111101011100110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010010100110101110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010101101110010001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c3 + +Encoding: c4 +U-Bits: 000011010011001001001010111110001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010100011010111001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010011010010000110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: c4 + +Encoding: c5 +U-Bits: 110111101111001001110000011110111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010011001110111111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010100000110000000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c5 + +Encoding: c6 +U-Bits: 001110011100001001000100010110000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010101101111111000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010010100111000111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: c6 + +Encoding: c7 +U-Bits: 111010100000001001111110110110110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010010111011111110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010101110011000001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: c7 + +Encoding: c8 +U-Bits: 000000110100000110101101001011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101000100100010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101111101100101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c8 + +Encoding: c9 +U-Bits: 110100001000000110010111101011001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101111110000010001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101000111000101110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c9 + +Encoding: ca +U-Bits: 001101111011000110100011100011110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101001010001010110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101110011001101001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ca + +Encoding: cb +U-Bits: 111001000111000110011001000011000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101110000101010000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101001001101101111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: cb + +Encoding: cc +U-Bits: 000011100111110110101110100001111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101000111001000111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101111110001111000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: cc + +Encoding: cd +U-Bits: 110111011011110110010100000001001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101111101101000001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101000100101111110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: cd + +Encoding: ce +U-Bits: 001110101000110110100000001001110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101001001100000110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101110000100111001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: ce + +Encoding: cf +U-Bits: 111010010100110110011010101001000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101110011000000000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101001010000111111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: cf + +Encoding: d0 +U-Bits: 000000001101110110110000010011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101011001111010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101100000111101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: d0 + +Encoding: d1 +U-Bits: 110100110001110110001010110011000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101100011011010000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101011010011101111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: d1 + +Encoding: d2 +U-Bits: 001101000010110110111110111011111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101010111010010111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101101110010101000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d2 + +Encoding: d3 +U-Bits: 111001111110110110000100011011001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101101101110010001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101010100110101110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d3 + +Encoding: d4 +U-Bits: 000011011110000110110011111001110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101011010010000110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101100011010111001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: d4 + +Encoding: d5 +U-Bits: 110111100010000110001001011001000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101100000110000000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101011001110111111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: d5 + +Encoding: d6 +U-Bits: 001110010001000110111101010001111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101010100111000111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101101101111111000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: d6 + +Encoding: d7 +U-Bits: 111010101101000110000111110001001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101101110011000001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101010111011111110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: d7 + +Encoding: d8 +U-Bits: 000000111001001001010100001100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010111101100101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010000100100010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d8 + +Encoding: d9 +U-Bits: 110100000101001001101110101100110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010000111000101110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010111110000010001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d9 + +Encoding: da +U-Bits: 001101110110001001011010100100001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: da + +Encoding: da +U-Bits: 001101110110001010110011001101001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: da + +Encoding: da +U-Bits: 001101110110001010001010001010110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: da + +Encoding: db +U-Bits: 111001001010001001100000000100111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: db + +Encoding: db +U-Bits: 111001001010001010001001101101111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: db + +Encoding: db +U-Bits: 111001001010001010110000101010000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: db + +Encoding: dc +U-Bits: 000011101010111001010111100110000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010111110001111000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010000111001000111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: dc + +Encoding: dd +U-Bits: 110111010110111001101101000110110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010000100101111110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010111101101000001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: dd + +Encoding: de +U-Bits: 001110100101111001011001001110001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: de + +Encoding: de +U-Bits: 001110100101111010110000100111001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: de + +Encoding: de +U-Bits: 001110100101111010001001100000110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: de + +Encoding: df +U-Bits: 111010011001111001100011101110111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: df + +Encoding: df +U-Bits: 111010011001111010001010000111111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: df + +Encoding: df +U-Bits: 111010011001111010110011000000000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: df + +Encoding: e0 +U-Bits: 000000000011101010110111000101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001011110101100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001100111101011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: e0 + +Encoding: e1 +U-Bits: 110100111111101010001101100101000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001100100001100000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001011101001011111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: e1 + +Encoding: e2 +U-Bits: 001101001100101010111001101101111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001010000000100111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001101001000011000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e2 + +Encoding: e3 +U-Bits: 111001110000101010000011001101001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001101010100100001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001010011100011110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e3 + +Encoding: e4 +U-Bits: 000011010000011010110100101111110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001011101000110110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001100100000001001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: e4 + +Encoding: e5 +U-Bits: 110111101100011010001110001111000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001100111100110000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001011110100001111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: e5 + +Encoding: e6 +U-Bits: 001110011111011010111010000111111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001010011101110111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001101010101001000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: e6 + +Encoding: e7 +U-Bits: 111010100011011010000000100111001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001101001001110001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001010000001001110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: e7 + +Encoding: e8 +U-Bits: 000000110111010101010011011010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110111010110011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110000011110100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e8 + +Encoding: e9 +U-Bits: 110100001011010101101001111010110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110000000010011110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110111001010100001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e9 + +Encoding: ea +U-Bits: 001101111000010101011101110010001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110110100011011001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110001101011100110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: ea + +Encoding: eb +U-Bits: 111001000100010101100111010010111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110001110111011111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110110111111100000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: eb + +Encoding: ec +U-Bits: 000011100100100101010000110000000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110111001011001000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110000000011110111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: ec + +Encoding: ed +U-Bits: 110111011000100101101010010000110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110000011111001110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110111010111110001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: ed + +Encoding: ee +U-Bits: 001110101011100101011110011000001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110110111110001001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110001110110110110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: ee + +Encoding: ef +U-Bits: 111010010111100101100100111000111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110001101010001111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110110100010110000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ef + +Encoding: f0 +U-Bits: 000000001110100101001110000010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110100111101011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110011110101100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: f0 + +Encoding: f1 +U-Bits: 110100110010100101110100100010111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110011101001011111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110100100001100000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f1 + +Encoding: f2 +U-Bits: 001101000001100101000000101010000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110101001000011000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110010000000100111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f2 + +Encoding: f3 +U-Bits: 111001111101100101111010001010110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110010011100011110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110101010100100001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f3 + +Encoding: f4 +U-Bits: 000011011101010101001101101000001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110100100000001001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110011101000110110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: f4 + +Encoding: f5 +U-Bits: 110111100001010101110111001000111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110011110100001111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110100111100110000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: f5 + +Encoding: f6 +U-Bits: 001110010010010101000011000000000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110101010101001000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110010011101110111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: f6 + +Encoding: f7 +U-Bits: 111010101110010101111001100000110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110010000001001110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110101001001110001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: f7 + +Encoding: f8 +U-Bits: 000000111010011010101010011101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001000011110100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001111010110011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f8 + +Encoding: f9 +U-Bits: 110100000110011010010000111101001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001111001010100001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001000000010011110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f9 + +Encoding: fa +U-Bits: 001101110101011010100100110101110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001001101011100110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001110100011011001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: fa + +Encoding: fb +U-Bits: 111001001001011010011110010101000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001110111111100000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001001110111011111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: fb + +Encoding: fc +U-Bits: 000011101001101010101001110111111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001000000011110111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001111001011001000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: fc + +Encoding: fd +U-Bits: 110111010101101010010011010111001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001111010111110001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001000011111001110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: fd + +Encoding: fe +U-Bits: 001110100110101010100111011111110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001001110110110110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001110111110001001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: fe + +Encoding: ff +U-Bits: 111010011010101010011101111111000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001110100010110000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001001101010001111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ff + +Encoding: 03 03 01 00 +U-Bits: 111001110011000011100111001100001101001111000000000011010000011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 03 03 01 00 + +Encoding: a3 af 5f 00 +U-Bits: 111001110000011101010110011101000101011010011101111111111010011001001110001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a3 af 5f 00 + +Encoding: 01 02 03 00 +U-Bits: 110100111100000000110100111100001110011100110000000011101010001101011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 02 03 00 + +Encoding: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 +U-Bits: +0E1E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E0E1E0E0E0E0E0E1E1E1E1E0 23 00 E0E0E0E1E1E1E1E0E1E1E1E0E1E0E0E0E0E1E0E1E0E0E0E0E1E1E0E0E +1E0E1E0E1E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E0E0E1E1E0E0E1 23 00 E1E1E1E0E1E0E0E1E0E0E0E1E0E0E0E0E1E0E0E0E0E1E0E0E1E1E0E1E +1E1E1E0E0E1E0E1E1E0E0E0E0E1E1E1E1E0E0E1E0E0E1E1E1E0E0E0E0 23 00 E1E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E0E1E0E1E0E0E1E1E0E0E0E1E +0E0E0E0E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E1E0E0E0E1E1E0E0 23 00 E1E0E1E0E0E1E1E0E0E1E0E0E0E0E1E1E0E0E0E1E0E0E0E0E0E0E1E1E +E0E0E1E0E1E0E1E0E1E0E0E0E1E1E1E1E0E0E1E0E1E0E0E0E0E1E0E1E 00 23 0E1E1E0E0E0E1E1E1E1E1E1E1E0E1E1E1E1E1E1E1E1E0E1E0E1E1E0E0 +E1E0E1E0E1E0E1E1E0E1E1E0E0E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E 00 23 0E1E0E1E1E1E1E0E1E1E0E1E1E1E0E1E0E0E0E1E0E0E0E1E0E1E0E1E1 +E1E0E0E1E1E0E1E1E0E0E0E1E1E1E1E0E1E1E0E1E0E0E0E0E0E1E1E1E 00 23 0E1E0E1E1E0E0E0E1E0E1E0E1E1E0E0E0E1E1E0E1E0E1E1E1E1E0E1E0 +E0E1E0E1E1E0E1E0E0E1E1E0E0E0E1E1E1E1E1E0E0E1E1E0E1E1E0E0E 00 23 1E0E0E0E0E1E0E0E1E1E1E1E1E0E1E0E1E1E0E1E1E1E0E0E1E0E0E1E1 +S-Bits: +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 +81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 +81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 +Decoded: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e +U-Bits: +0E1E1E0E0E0E0E0E1E0E0E0E1E0E0E1E1E1E1E0E0E0E1E1E1E1E1E0E0 23 00 E0E0E1E0E0E0E1E1E0E1E1E0E0E0E1E0E0E0E1E0E0E1E1E1E0E0E0E0E +1E0E0E0E1E0E1E1E1E0E0E1E1E1E1E1E0E0E0E1E0E0E0E1E0E1E0E1E1 23 00 E0E1E0E1E0E1E1E0E0E0E0E0E1E1E0E1E1E0E0E1E0E1E0E1E0E0E0E1E +0E1E0E1E1E0E0E0E0E1E0E0E1E0E0E0E1E0E0E0E1E0E1E1E1E1E1E0E0 23 00 E0E0E0E0E0E0E0E1E0E1E0E0E0E0E0E1E1E0E0E0E1E1E0E0E0E0E0E0E +0E1E0E0E1E0E0E1E1E0E0E0E1E0E0E1E0E1E1E0E0E0E1E1E0E1E1E0E1 23 00 E1E0E0E1E0E1E1E0E0E0E0E0E0E1E0E1E0E0E0E0E0E0E1E0E1E0E1E1E +E0E1E0E0E0E0E1E0E1E1E0E1E0E0E1E0E1E0E1E1E1E1E1E0E0E0E1E0E 00 23 1E1E0E0E0E1E1E0E1E0E0E0E0E1E1E1E1E0E0E0E0E1E1E1E0E0E0E0E1 +E0E1E0E0E0E0E1E0E1E0E1E1E1E1E0E0E0E0E1E0E1E1E0E0E1E0E1E1E 00 23 1E0E0E1E0E1E0E1E1E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E1E0E0E0E0 +E0E0E1E1E0E0E0E0E0E0E0E0E1E1E0E1E1E1E1E1E1E0E0E0E0E0E0E0E 00 23 0E1E0E1E1E0E0E0E0E1E0E0E0E1E0E1E0E0E0E1E1E1E0E1E0E0E0E0E1 +E1E0E0E1E1E1E0E0E0E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E1E0E0E0E 00 23 1E1E0E0E0E1E0E1E0E0E0E0E1E1E0E0E0E0E0E1E1E1E1E0E1E0E0E1E0 +S-Bits: +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f +Decoded: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E1E1E0 23 01 E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0 23 01 E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E 01 23 0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0 +E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E 01 23 0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f +81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +0E1E0E1E1E0E0E1E0E1E1E1E1E0E1E0E0E1E1E0E1E1E0E0E1E0E0E0E0 23 01 E1E1E1E0E1E0E1E0E0E0E0E0E1E1E1E0E1E1E1E1E0E0E0E1E1E0E1E1E +1E0E0E1E0E1E1E1E0E0E1E0E1E1E0E0E1E1E0E1E1E0E0E0E1E1E0E0E1 23 01 E0E1E1E0E0E1E0E0E1E1E1E1E0E0E0E0E0E0E1E1E1E1E0E0E0E1E1E1E +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +E0E0E1E1E1E0E1E0E1E1E0E1E0E0E1E1E1E0E0E0E0E1E0E0E0E0E0E1E 01 23 1E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E0E0E0E1E0E0E0E0E1E1E1E0E0 +E1E1E1E1E1E0E1E0E1E0E0E1E0E0E1E1E0E0E0E1E1E1E1E1E1E1E1E1E 01 23 0E1E0E1E1E1E1E1E1E0E1E0E1E0E1E1E0E1E0E0E1E0E0E1E1E0E0E0E1 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 +81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f +81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +0E0E0E0E0E0E1E0E1E0E1E0E0E1E1E1E1E1E1E1E1E0E1E0E1E0E0E1E1 23 01 E1E1E1E1E1E0E1E0E1E0E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E1E0E0E +1E0E0E1E1E0E0E0E0E0E0E0E1E0E1E0E0E1E0E1E1E1E1E1E1E0E0E1E0 23 01 E1E1E0E1E1E1E1E1E1E1E1E1E0E0E1E1E0E1E0E0E0E0E0E0E1E1E1E0E +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E1E0E0E1E1E0E 01 23 0E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E0E0E0E1E1E0 +E0E1E0E0E1E1E0E1E0E0E1E1E1E1E1E1E0E1E0E0E1E0E0E0E0E1E1E1E 01 23 1E0E1E0E0E1E1E0E0E0E0E1E1E1E1E1E0E1E1E0E0E1E1E0E0E1E1E1E1 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee +U-Bits: +0E1E0E0E1E0E0E1E1E0E1E0E0E0E0E0E0E0E0E1E1E0E0E1E1E1E1E1E1 23 00 E1E1E1E1E1E0E1E1E1E0E0E1E0E1E1E1E0E0E1E0E0E1E1E1E1E0E0E0E +0E1E1E0E0E0E0E1E0E1E1E1E0E0E1E1E0E0E1E0E1E0E1E0E0E0E1E0E1 23 00 E0E0E0E1E1E1E1E1E0E1E1E1E0E0E0E0E1E1E1E0E0E1E1E0E1E1E1E0E +E0E0E0E1E1E1E1E1E0E1E0E0E1E1E0E0E1E0E1E0E0E1E1E0E0E0E0E0E 00 23 0E0E0E1E0E1E0E1E0E0E1E1E0E1E0E0E0E1E1E1E0E0E0E0E1E0E1E0E1 +E1E0E0E1E1E1E1E1E1E0E0E1E1E1E0E0E0E1E1E1E1E1E1E1E1E0E1E1E 00 23 0E0E1E0E1E0E0E0E1E0E0E1E1E0E1E1E1E1E0E1E1E0E1E0E0E1E0E1E1 +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +S-Bits: +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +Decoded: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +001001111100011001111011100011010110100010110000100000010 01 01 111101000100010000001000011101100101011100000001111011010 +110101110110111001001001101001011010001111010101111101011 01 01 001101101011101011011101100010100010010111010010100101011 +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 7f 81 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 81 7f +81 81 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +000100000101110110011100001111111010111111011100100101101 01 01 010111010110111011001110000010101000001110101100010110100 +100100101101000100000101110111010011001011101010100101110 01 01 110110010111110101010111101011110011100000101000011111101 +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f +81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f +U-Bits: +101011101110011001100000010010001100001011100000000011100 01 01 001110000110001110001011000001001001001010010111110000010 +000011100010110001011101000111011011110111101011100101100 00 00 010101010010111111101011000110101010110111000111010011011 +000101111111110000011110110000011000000100110001101000110 01 00 011010011010010010110000010100001100110000110110110011011 +011110100011000011100010100011101110001110110110011011111 00 00 000111100011100011010001101110010111011111010111110110011 +S-Bits: +81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f +7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 81 +7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 +7f 81 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 +U-Bits: +100010111000001100000000001101001000000000101100111011001 00 00 101110010011001000110010000011100101000011110001101100001 +001011110100100101010101111111110011111011111110001101001 01 00 011010010110101000111110001100110011101101111000100101110 +110001101010001000010101011111101011000111010110110011110 00 00 101001101100011001101100110110000101000001000001011000110 +011100001010000100100101001000110110100111000000101110000 00 01 111100110000011001001100110100111101011010011110100010011 +S-Bits: +81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 +7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f +81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f +7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 +U-Bits: +100010100101111101110101011001010100000101001001011011000 00 00 001000000000001100000110001011010111110101110101001100010 +010101000000101010101011110000010101000100000011010001101 00 01 010111110101110101010111011111100111010011010000111110111 +010111100101110011111100101110001010100110000010100000100 00 01 010111101110101111110011110101111101110100011000101111111 +011110100110000011110100111111101111111111111010101110000 01 00 001010101010101010101010111010110110000000100000101001011 +S-Bits: +81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f +7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 81 81 +7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 +7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111110100100011100101010000100110000110101111110000000010 01 01 010000000110100010010111101011000000110000111100000100001 +111000110100110110001000010011101000000010100010101101000 00 00 100001001010111000011000100011000111100001110100010000010 +001011000100011010100000101110100010010010001011110101001 01 00 000110000011000100011000100101000100001000000100101001011 +101001001100101001110101101010101000000110100010000010101 00 00 010100101110010001000011011100010000111000010010100110010 +S-Bits: +81 81 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 +81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f +7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111010000001011110000011000110101000110100010000001000010 00 00 100001011000101110010100001001110000100010010101001010000 +101000110001001010001000010100000010000100100000110001011 01 00 110001101000110100000010100011010010100001000101000010111 +101011000101001000100100001000001100000111000011010000010 00 00 010110001011010001000010001001000010101001010000000011100 +001000010100100001010001001000110100010100001101010010101 00 01 000000101111000000100011010100010010110101000010001111000 +S-Bits: +81 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f +81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 +81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f +7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000000001000000000000010010000000000100000000000001000 00 00 000000000000100000000000001000000000000010010000000000100 +101010000001000000000000010010101000000100000000010000011 00 01 010100000000100000000000001001010000000011000000000000110 +101000000000000000000000000000000000000010101001000000101 00 01 010000000001000000000000000000000000000001010100000000010 +100000000010101000000000000000000000000000000000000010000 01 00 000000000100000000000001010101000000010101010000000001010 +S-Bits: +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f +81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f +81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + Success -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:16:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:16:42 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#9). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 8 files changed, 30,831 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/9 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:17:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 17:17:38 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4964 to look at the new patch set (#4). mgcp: use mgw assigned connection identifiers osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2648 Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/4964/4 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index dd26d40..df18524 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -20,6 +20,8 @@ #pragma once +#include + /* MGCP state handler context (fsm etc..) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ @@ -28,6 +30,10 @@ /* RTP endpoint number */ uint16_t rtp_endpoint; + /* RTP connection identifiers */ + char conn_id_bts[MGCP_CONN_ID_LENGTH]; + char conn_id_net[MGCP_CONN_ID_LENGTH]; + /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 0f35a46..a7d1f94 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,9 +31,6 @@ #include #include -#define CONN_ID_BTS 1 -#define CONN_ID_NET 2 - #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -201,10 +198,8 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, .conn_mode = MGCP_CONN_LOOPBACK }; if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= @@ -249,6 +244,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_bts, r->head.conn_id, sizeof(mgcp_ctx->conn_id_bts)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with CI: %s\n", mgcp_ctx->conn_id_bts); rc = mgcp_response_parse_params(r); if (rc) { @@ -364,7 +363,7 @@ .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = lchan->abis_ip.bound_port @@ -484,10 +483,9 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_NET, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = addr, .audio_port = port @@ -538,6 +536,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_net, r->head.conn_id, sizeof(mgcp_ctx->conn_id_net)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with CI: %s\n", mgcp_ctx->conn_id_net); rc = mgcp_response_parse_params(r); if (rc) { @@ -683,7 +685,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = ho_lchan->abis_ip.bound_port}; -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:17:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 17:17:39 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: use hexadecimal digits in endpoint names Message-ID: Review at https://gerrit.osmocom.org/5072 mgcp: use hexadecimal digits in endpoint names The current implementation of osmo-mgw parses the numerical digit inside the endpoint name as hexadecimal number. also use hexadecimal numbers in endpoint names. Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5072/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f0c31df..0f35a46 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -39,7 +39,7 @@ #define MGCP_BSS_TIMEOUT 4 /* in seconds */ #define MGCP_BSS_TIMEOUT_TIMER_NR 2 -#define MGCP_ENDPOINT_FORMAT "%i at mgw" +#define MGCP_ENDPOINT_FORMAT "%x at mgw" /* Some internal cause codes to indicate fault * condition inside the FSM */ -- To view, visit https://gerrit.osmocom.org/5072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:17:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 17:17:39 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: do not fail silently on snprintf() Message-ID: Review at https://gerrit.osmocom.org/5073 mgcp: do not fail silently on snprintf() The snprintf() that is used to compose the fsm name on an assignment request may cause a silent failure. The buffer is large enough to take the string under all circumstances. If snprintf() fails, this would mean we have some other serious problem. use OSMO_ASSERT in case the snprintf() fails, so the failure gets noticed. Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/73/5073/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index be6c7de..81a4093 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -1015,8 +1015,7 @@ OSMO_ASSERT(mgcp); OSMO_ASSERT(conn); - if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) - return NULL; + OSMO_ASSERT(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) < sizeof(name)); /* Register the fsm description (if not already done) */ if (fsm_registered == false) { -- To view, visit https://gerrit.osmocom.org/5073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:17:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 17:17:39 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: remove duplicate logging Message-ID: Review at https://gerrit.osmocom.org/5074 cosmetic: remove duplicate logging The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06 --- M src/libcommon-cs/a_reset.c 1 file changed, 2 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/74/5074/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 5e45b09..797f8e5 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -38,23 +38,10 @@ ST_CONN, /* We have a confirmed connection */ }; -static const struct value_string fsm_state_names[] = { - {ST_DISC, "ST_DISC (disconnected)"}, - {ST_CONN, "ST_CONN (connected)"}, - {0, NULL}, -}; - enum fsm_evt { EV_RESET_ACK, /* got reset acknowlegement from remote end */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ -}; - -static const struct value_string fsm_evt_names[] = { - {EV_RESET_ACK, "EV_RESET_ACK"}, - {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, - {EV_N_CONNECT, "EV_N_CONNECT"}, - {0, NULL}, }; /* Disconnected state */ @@ -63,9 +50,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); OSMO_ASSERT(reset->fsm); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n"); reset->conn_loss_counter = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); @@ -76,9 +61,6 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: @@ -100,8 +82,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; OSMO_ASSERT(reset->fsm); - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET message...\n"); reset->cb(reset->priv); @@ -153,7 +134,6 @@ reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,8 +152,6 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/5074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:17:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 28 Nov 2017 17:17:39 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: cosmetic fixups Message-ID: Review at https://gerrit.osmocom.org/5075 mgcp: cosmetic fixups - use unique enum/struct fsm struct names - use macro to shift bits in FSM description - use OSMO_STRINGIFY to generate the state names - remove duplicate logging of states and events - remove unnecessary space in log strings - prefix hexadecimal enpoint ids with - remove unnecessary log messages - rename bsc_mgcp_cause_codes_str to bsc_mgcp_cause_codes_names Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 39 insertions(+), 105 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5075/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 478d499..f5efa95 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,6 +31,8 @@ #include #include +#define S(x) (1 << (x)) + #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -40,7 +42,7 @@ /* Some internal cause codes to indicate fault * condition inside the FSM */ -enum int_cause_code { +enum bsc_mgcp_cause_code { MGCP_ERR_MGW_FAIL, MGCP_ERR_MGW_INVAL_RESP, MGCP_ERR_MGW_TX_FAIL, @@ -53,7 +55,7 @@ /* Human readable respresentation of the faul codes, * will be displayed by handle_error() */ -static const struct value_string int_cause_codes_str[] = { +static const struct value_string bsc_mgcp_cause_codes_names[] = { {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, @@ -76,19 +78,7 @@ ST_HALT }; -static const struct value_string fsm_bsc_mgcp_state_names[] = { - {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, - {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, - {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, - {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, - {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, - {ST_CALL, "ST_CALL (call in progress)"}, - {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, - {ST_HALT, "ST_HALT (destroy state machine)"}, - {0, NULL} -}; - -enum fsm_evt { +enum bsc_mgcp_fsm_evt { /* Initial event: start off the state machine */ EV_INIT, @@ -128,24 +118,11 @@ EV_MDCX_BTS_HO_RESP, }; -static const struct value_string fsm_evt_names[] = { - {EV_INIT, "EV_INIT (start state machine, send CRCX for BTS)"}, - {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, - {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, - {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, - {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, - {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, - {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, - {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, - {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, - {0, NULL} -}; - /* A general error handler function. On error we still have an interest to * remove a half open connection (if possible). This function will execute * a controlled jump to the DLCX phase. From there, the FSM will then just * continue like the call were ended normally */ -static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum bsc_mgcp_cause_code cause) { struct osmo_fsm_inst *fi; @@ -153,10 +130,8 @@ fi = mgcp_ctx->fsm; OSMO_ASSERT(fi); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", - get_value_string(int_cause_codes_str, cause)); + get_value_string(bsc_mgcp_cause_codes_names, cause)); /* Set the VM into the state where it waits for the call end */ osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); @@ -185,14 +160,11 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - rtp_endpoint = mgcp_client_next_endpoint(mgcp); mgcp_ctx->rtp_endpoint = rtp_endpoint; LOGPFSML(fi, LOGL_DEBUG, - "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/BTS: creating connection for the BTS side on MGW endpoint:0x%x...\n", rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -210,7 +182,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -281,9 +252,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_CRCX_BTS_RESP: break; @@ -327,9 +295,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_ASS_COMPLETE: break; @@ -343,16 +308,12 @@ lchan = mgcp_ctx->lchan; OSMO_ASSERT(lchan); - LOGPFSML(fi, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); - rtp_endpoint = mgcp_ctx->rtp_endpoint; - - LOGPFSML(fi, LOGL_DEBUG, - "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); LOGPFSML(fi, LOGL_DEBUG, - "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + "MDCX/BTS: completing connection for the BTS side on MGW endpoint:0x%x, BTS expects RTP input on address %s:%u\n", + rtp_endpoint, inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -374,7 +335,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -449,9 +409,6 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_MDCX_BTS_RESP: break; @@ -463,7 +420,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(fi, LOGL_DEBUG, - "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/NET: creating connection for the NET side on MGW endpoint:0x%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE @@ -503,7 +460,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -552,7 +508,8 @@ return; } - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", + r->audio_ip, r->audio_port); /* Store address */ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; @@ -571,10 +528,6 @@ struct gsm_lchan *lchan; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_CRCX_NET_RESP: @@ -621,7 +574,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + "DLCX: removing connection for the BTS and NET side on MGW endpoint:0x%x...\n", rtp_endpoint); /* We now relase the endpoint back to the pool in order to allow * other connections to use this endpoint */ @@ -642,7 +595,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -676,13 +628,10 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); - addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), - ho_lchan->abis_ip.bound_port); + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:0x%x, new BTS expects RTP input on address %s:%u\n\n", + rtp_endpoint, inet_ntoa(addr), ho_lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -703,7 +652,6 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); OSMO_ASSERT(msg); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -719,9 +667,6 @@ struct mgcp_ctx *mgcp_ctx = data; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_TEARDOWN: @@ -764,9 +709,6 @@ struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_MDCX_BTS_HO_RESP: @@ -837,9 +779,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - /* Send pending sigtran message */ if (mgcp_ctx->resp) { LOGPFSML(fi, LOGL_DEBUG, "sending pending sigtran response message...\n"); @@ -864,9 +803,6 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_ERROR, "timeout (T%i) in state %s, attempting graceful teardown...\n", - fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); - /* Ensure that no sigtran response, is present. Otherwiese we might try * to send a sigtran response when the sccp connection is already freed. */ mgcp_ctx->resp = NULL; @@ -875,7 +811,6 @@ /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ - LOGPFSML(fi, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); @@ -902,18 +837,18 @@ /* Startup state machine, send CRCX to BTS. */ [ST_CRCX_BTS] = { - .in_event_mask = (1 << EV_INIT), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_PROC), - .name = "ST_CRCX_BTS", + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASSIGN_PROC), + .name = OSMO_STRINGIFY(ST_CRCX_BTS), .action = fsm_crcx_bts_cb, }, /* When the CRCX response for the BTS side is received, then * proceed the assignment on the BSS side. */ [ST_ASSIGN_PROC] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), - .name = "ST_ASSIGN_PROC", + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_BTS_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_BTS), + .name = OSMO_STRINGIFY(ST_ASSIGN_PROC), .action = fsm_proc_assignmnent_req_cb, }, @@ -922,9 +857,9 @@ * update the connections with the actual PORT/IP where the * BTS expects the RTP input. */ [ST_MDCX_BTS] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), - .name = "ST_MDCX_BTS", + .in_event_mask = S(EV_TEARDOWN) | S(EV_ASS_COMPLETE), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_NET), + .name = OSMO_STRINGIFY(ST_MDCX_BTS), .action = fsm_mdcx_bts_cb, }, @@ -932,9 +867,9 @@ * directly proceed with sending the CRCX command to connect the * network side. This is done in one phase (no MDCX needed). */ [ST_CRCX_NET] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), - .name = "ST_CRCX_NET", + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_BTS_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASSIGN_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_NET), .action = fsm_crcx_net_cb, }, @@ -942,9 +877,9 @@ * send the assignment complete message via the A-Interface and * enter wait state in order to wait for the end of the call. */ [ST_ASSIGN_COMPL] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), - .name = "ST_ASSIGN_COMPL", + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_NET_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_ASSIGN_COMPL), .action = fsm_send_assignment_complete, }, @@ -953,9 +888,9 @@ * go for an extra MDCX to update the connection and land in * this state again when done. */ [ST_CALL] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), - .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), - .name = "ST_CALL", + .in_event_mask = S(EV_TEARDOWN) | S(EV_HANDOVER), + .out_state_mask = S(ST_HALT) | S(ST_MDCX_BTS_HO), + .name = OSMO_STRINGIFY(ST_CALL), .action = fsm_active_call_cb, }, @@ -963,18 +898,18 @@ * MDCX is received, then go back to ST_CALL and wait for the * call end */ [ST_MDCX_BTS_HO] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), - .name = "ST_MDCX_BTS_HO", + .in_event_mask = S(EV_TEARDOWN) | S(EV_HANDOVER) | S(EV_MDCX_BTS_HO_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_BTS_HO), .action = fsm_complete_handover, }, /* When the MGW confirms that the connections are terminated, * then halt the state machine. */ [ST_HALT] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), .out_state_mask = 0, - .name = "ST_HALT", + .name = OSMO_STRINGIFY(ST_HALT), .action = fsm_halt_cb, }, }; @@ -1023,7 +958,6 @@ mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); OSMO_ASSERT(mgcp_ctx->fsm); mgcp_ctx->fsm->priv = mgcp_ctx; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); mgcp_ctx->mgcp = mgcp; mgcp_ctx->conn = conn; mgcp_ctx->chan_mode = chan_mode; -- To view, visit https://gerrit.osmocom.org/5075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:24:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:24:04 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#10). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 8 files changed, 30,831 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/10 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:32:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:32:39 +0000 Subject: osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:34:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:34:13 +0000 Subject: osmo-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:34:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 17:34:58 +0000 Subject: osmo-ci[master]: jenkins docker: remove smalltalk things In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:45:30 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 17:45:30 +0000 Subject: libosmocore[master]: coding test: cosmetic cleanup In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 (2 comments) https://gerrit.osmocom.org/#/c/5063/4//COMMIT_MSG Commit Message: PS4, Line 9: * remove duplicate code: use function from libosmocore : * use utility function to dump ubits For me, both points mean the same. The second one should be enough. https://gerrit.osmocom.org/#/c/5063/4/tests/coding/coding_test.c File tests/coding/coding_test.c: Line 33: #define ASSERT_TRUE(rc) \ Since the library is linked against libosmocore, I think it makes sense to use OSMO_ASSERT instead of this construction. -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:47:01 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 17:47:01 +0000 Subject: libosmocore[master]: coding test: enable debug output In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 17:59:23 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 17:59:23 +0000 Subject: libosmocore[master]: coding test: move bit dump into functions In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:05:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:05:27 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: rate_ctr: clarify ctrl interface Message-ID: Review at https://gerrit.osmocom.org/5076 rate_ctr: clarify ctrl interface Clarify introspection over ctrl interface and request for individual rate counter. Change-Id: I3d258aaafc381644be2f16b51e4dc655c1fb9b26 --- M common/chapters/control_if.adoc 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/76/5076/1 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index 5e72fe4..c4d38d7 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -147,7 +147,8 @@ |=== |Name|Access|Value|Comment |counter.*|RO||Get counter value. -|rate_ctr.*|RO||Get rate counter value. +|rate_ctr.*|RO||Get list of rate counter groups. +|rate_ctr.IN.GN.GI.name|RO||Get value for interval IN of rate counter name which belong to group named GN with index GI. |=== Those read-only variables allow to get value of arbitrary @@ -162,6 +163,8 @@ In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. +The list of available groups can be obtained by requesting "+rate_ctr.*+" variable. + The rate counter group name have to be prefixed with interval specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" or "*abs*" for absolute value. -- To view, visit https://gerrit.osmocom.org/5076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d258aaafc381644be2f16b51e4dc655c1fb9b26 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:20:22 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 18:20:22 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 10: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/5062/10/include/osmocom/coding/gsm0503_coding.h File include/osmocom/coding/gsm0503_coding.h: Line 66: int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic); I would prefer to keep the coding API similar for both 8-bit and 11-bit RACH. Like in case of the gsm0503_rach_encode(): ... const uint16_t *ra11 ... Line 67: int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t bsic); Here also would be better to rename 'ra' to 'ra11'. https://gerrit.osmocom.org/#/c/5062/10/tests/coding/coding_test.c File tests/coding/coding_test.c: Line 165: if (ra != result) May we use OSMO_ASSERT here? -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:28:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:28:45 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 10: (1 comment) https://gerrit.osmocom.org/#/c/5062/10/include/osmocom/coding/gsm0503_coding.h File include/osmocom/coding/gsm0503_coding.h: Line 66: int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic); > I would prefer to keep the coding API similar for both 8-bit ACK -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:29:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:29:29 +0000 Subject: libosmocore[master]: coding test: cosmetic cleanup In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:30:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:30:40 +0000 Subject: libosmocore[master]: coding test: enable debug output In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:31:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:31:04 +0000 Subject: libosmocore[master]: coding test: move bit dump into functions In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:31:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:31:31 +0000 Subject: osmo-gsm-manuals[master]: rate_ctr: clarify ctrl interface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d258aaafc381644be2f16b51e4dc655c1fb9b26 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:31:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 Nov 2017 18:31:33 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: rate_ctr: clarify ctrl interface In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rate_ctr: clarify ctrl interface ...................................................................... rate_ctr: clarify ctrl interface Clarify introspection over ctrl interface and request for individual rate counter. Change-Id: I3d258aaafc381644be2f16b51e4dc655c1fb9b26 --- M common/chapters/control_if.adoc 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index 5e72fe4..c4d38d7 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -147,7 +147,8 @@ |=== |Name|Access|Value|Comment |counter.*|RO||Get counter value. -|rate_ctr.*|RO||Get rate counter value. +|rate_ctr.*|RO||Get list of rate counter groups. +|rate_ctr.IN.GN.GI.name|RO||Get value for interval IN of rate counter name which belong to group named GN with index GI. |=== Those read-only variables allow to get value of arbitrary @@ -162,6 +163,8 @@ In the example above, "+bsc+" is the rate counter group name and "+0+" is its index. It is possible to obtain all the rate counters in a given group by requesting "+rate_ctr.per_sec.bsc.*+" variable. +The list of available groups can be obtained by requesting "+rate_ctr.*+" variable. + The rate counter group name have to be prefixed with interval specification which can be any of "*per_sec*", "*per_min*", "*per_hour*", "*per_day*" or "*abs*" for absolute value. -- To view, visit https://gerrit.osmocom.org/5076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d258aaafc381644be2f16b51e4dc655c1fb9b26 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:33:59 +0000 Subject: [MERGED] libosmocore[master]: coding test: move bit dump into functions In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: coding test: move bit dump into functions ...................................................................... coding test: move bit dump into functions Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b --- M tests/coding/coding_test.c 1 file changed, 48 insertions(+), 123 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index a495b9a..9a8cdb3 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,6 +37,46 @@ abort(); \ } +#define DUMP_U_AT(b, x, u) do { \ + printf("%s %02x %02x ", osmo_ubit_dump(b + x, 57), b[57 + x], b[58 + x]); \ + printf("%s\n", osmo_ubit_dump(b + 59 + x, 57)); \ + if (u <= x) \ + return; \ + } while(0) + +#define DUMP_S_AT(b, x, u) do { \ + printf("%s %02x %02x ", osmo_hexdump(b + x, 57), b[57 + x], b[58 + x]); \ + printf("%s\n", osmo_hexdump(b + 59 + x, 57)); \ + if (u <= x) \ + return; \ + } while(0) + +inline void dump_ubits(ubit_t *bursts_u, unsigned until) +{ + printf("U-Bits:\n"); + DUMP_U_AT(bursts_u, 0, until); + DUMP_U_AT(bursts_u, 116, until); + DUMP_U_AT(bursts_u, 232, until); + DUMP_U_AT(bursts_u, 348, until); + DUMP_U_AT(bursts_u, 464, until); + DUMP_U_AT(bursts_u, 580, until); + DUMP_U_AT(bursts_u, 696, until); + DUMP_U_AT(bursts_u, 812, until); +} + +inline void dump_sbits(uint8_t *bursts_s, unsigned until) +{ + printf("S-Bits:\n"); + DUMP_S_AT(bursts_s, 0, until); + DUMP_S_AT(bursts_s, 116, until); + DUMP_S_AT(bursts_s, 232, until); + DUMP_S_AT(bursts_s, 348, until); + DUMP_S_AT(bursts_s, 464, until); + DUMP_S_AT(bursts_s, 580, until); + DUMP_S_AT(bursts_s, 696, until); + DUMP_S_AT(bursts_s, 812, until); +} + static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -50,30 +90,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + dump_ubits(bursts_u, 348); + dump_sbits((uint8_t *)bursts_s, 348); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -171,49 +189,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), - (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), - (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), - (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), - (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + dump_ubits(bursts_u, 812); + dump_sbits((uint8_t *)bursts_s, 812); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -249,39 +226,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), - (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), - (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + dump_ubits(bursts_u, 580); + dump_sbits((uint8_t *)bursts_s, 580); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -327,29 +273,8 @@ /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printf("U-Bits:\n"); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - - printf("S-Bits:\n"); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), - (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), - (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), - (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), - (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + dump_ubits(bursts_u, 348); + dump_sbits((uint8_t *)bursts_s, 348); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, -- To view, visit https://gerrit.osmocom.org/5071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:33:59 +0000 Subject: [MERGED] libosmocore[master]: coding test: enable debug output In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: coding test: enable debug output ...................................................................... coding test: enable debug output Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 --- M tests/coding/coding_test.c M tests/coding/coding_test.ok 2 files changed, 4,289 insertions(+), 121 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 6c1bd84..a495b9a 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -37,9 +37,6 @@ abort(); \ } -/* set condition to 1, to show debugging */ -#define printd if (0) printf - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -48,35 +45,35 @@ int n_errors, n_bits_total; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, 23)); + printf("Encoding: %s\n", osmo_hexdump(l2, 23)); gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Destroy some bits */ memset(bursts_s, 0, 30); @@ -84,14 +81,14 @@ /* Decode, correcting errors */ gsm0503_xcch_decode(result, bursts_s, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, 23)); + printf("Decoded: %s\n", osmo_hexdump(result, 23)); printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); ASSERT_TRUE(n_bits_total == 456); ASSERT_TRUE(!memcmp(l2, result, 23)); - printd("\n"); + printf("\n"); } static void test_rach(uint8_t bsic, uint8_t ra) @@ -101,26 +98,26 @@ sbit_t bursts_s[36]; /* Encode L2 message */ - printd("Encoding: %02x\n", ra); + printf("Encoding: %02x\n", ra); gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printf("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); /* Decode, correcting errors */ gsm0503_rach_decode(&result, bursts_s, bsic); - printd("Decoded: %02x\n", result); + printf("Decoded: %02x\n", result); ASSERT_TRUE(ra == result); - printd("\n"); + printf("\n"); } static void test_sch(uint8_t *info) @@ -134,26 +131,26 @@ result[3] = 0; /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(info, 4)); + printf("Encoding: %s\n", osmo_hexdump(info, 4)); gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); + printf("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printf("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); /* Decode, correcting errors */ gsm0503_sch_decode(result, bursts_s); - printd("Decoded: %s\n", osmo_hexdump(result, 4)); + printf("Decoded: %s\n", osmo_hexdump(result, 4)); ASSERT_TRUE(!memcmp(info, result, 4)); - printd("\n"); + printf("\n"); } static void test_fr(uint8_t *speech, int len) @@ -168,55 +165,55 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 696, 57), (uint8_t)bursts_s[57 + 696], (uint8_t)bursts_s[58 + 696]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 696, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 812, 57), (uint8_t)bursts_s[57 + 812], (uint8_t)bursts_s[58 + 812]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 812, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -224,14 +221,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_fr_decode(result, bursts_s, 1, len == 31, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_hr(uint8_t *speech, int len) @@ -246,45 +243,45 @@ memset(bursts_s, 0, sizeof(bursts_s)); /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(speech, len)); + printf("Encoding: %s\n", osmo_hexdump(speech, len)); gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 464, 57), (uint8_t)bursts_s[57 + 464], (uint8_t)bursts_s[58 + 464]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 464, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 580, 57), (uint8_t)bursts_s[57 + 580], (uint8_t)bursts_s[58 + 580]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 580, 57)); /* Destroy some bits */ memset(bursts_s + 6, 0, 20); @@ -292,14 +289,14 @@ /* Decode, correcting errors */ rc = gsm0503_tch_hr_decode(result, bursts_s, 0, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(speech, result, len)); - printd("\n"); + printf("\n"); } static void test_pdtch(uint8_t *l2, int len) @@ -324,47 +321,47 @@ } /* Encode L2 message */ - printd("Encoding: %s\n", osmo_hexdump(l2, len)); + printf("Encoding: %s\n", osmo_hexdump(l2, len)); gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); - printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printf("U-Bits:\n"); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printf("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); - printd("S-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), + printf("S-Bits:\n"); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), (uint8_t)bursts_s[57], (uint8_t)bursts_s[58]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 116, 57), (uint8_t)bursts_s[57 + 116], (uint8_t)bursts_s[58 + 116]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 116, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 232, 57), (uint8_t)bursts_s[57 + 232], (uint8_t)bursts_s[58 + 232]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 232, 57)); + printf("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s + 348, 57), (uint8_t)bursts_s[57 + 348], (uint8_t)bursts_s[58 + 348]); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); + printf("%s\n", osmo_hexdump((uint8_t *)bursts_s + 59 + 348, 57)); /* Decode */ rc = gsm0503_pdtch_decode(result, bursts_s, NULL, &n_errors, &n_bits_total); - printd("Decoded: %s\n", osmo_hexdump(result, len)); + printf("Decoded: %s\n", osmo_hexdump(result, len)); printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); ASSERT_TRUE(rc == len); ASSERT_TRUE(!memcmp(l2, result, len)); - printd("\n"); + printf("\n"); } uint8_t test_l2[][23] = { diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok index 5030e4d..619f038 100644 --- a/tests/coding/coding_test.ok +++ b/tests/coding/coding_test.ok @@ -1,21 +1,4192 @@ +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000010000100000000100000000000000000000101000010000001 01 01 010000100000010000001000000101000010100000000000001000000 +000000010010000000010000000010000001000010100001000000000 01 01 000000100000010000101000000000000000000001000000000001000 +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +S-Bits: +81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 xcch_decode: n_errors=60 n_bits_total=456 ber=0.13 + +Encoding: 00 +U-Bits: 000000000000000000000000000000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011101001101001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 00 + +Encoding: 00 +U-Bits: 000000000000000011010000101110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 00 + +Encoding: 01 +U-Bits: 110100111100000000111010100000110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011010011001001110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 01 + +Encoding: 01 +U-Bits: 110100111100000011101010001110001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 01 + +Encoding: 02 +U-Bits: 001101001111000000001110101000001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011100111000001001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 02 + +Encoding: 02 +U-Bits: 001101001111000011011110000110110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 02 + +Encoding: 03 +U-Bits: 111001110011000000110100001000111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011011101100001111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 03 + +Encoding: 03 +U-Bits: 111001110011000011100100100110000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 03 + +Encoding: 04 +U-Bits: 000011010011110000000011101010000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011101010000011000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 04 + +Encoding: 04 +U-Bits: 000011010011110011010011000100111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 04 + +Encoding: 05 +U-Bits: 110111101111110000111001001010110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011010000100011110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 05 + +Encoding: 05 +U-Bits: 110111101111110011101001100100001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 05 + +Encoding: 06 +U-Bits: 001110011100110000001101000010001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011100100101011001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 06 + +Encoding: 06 +U-Bits: 001110011100110011011101101100110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 06 + +Encoding: 07 +U-Bits: 111010100000110000110111100010111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011011110001011111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 07 + +Encoding: 07 +U-Bits: 111010100000110011100111001100000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 07 + +Encoding: 08 +U-Bits: 000000110100111111100100011111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100001101110110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 08 + +Encoding: 08 +U-Bits: 000000110100111100110100110001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 08 + +Encoding: 09 +U-Bits: 110100001000111111011110111111000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100110111010110000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 09 + +Encoding: 09 +U-Bits: 110100001000111100001110010001111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 09 + +Encoding: 0a +U-Bits: 001101111011111111101010110111111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100000011011110111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 0a + +Encoding: 0a +U-Bits: 001101111011111100111010011001000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0a + +Encoding: 0b +U-Bits: 111001000111111111010000010111001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100111001111110001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 0b + +Encoding: 0b +U-Bits: 111001000111111100000000111001110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 0b + +Encoding: 0c +U-Bits: 000011100111001111100111110101110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100001110011100110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 0c + +Encoding: 0c +U-Bits: 000011100111001100110111011011001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 0c + +Encoding: 0d +U-Bits: 110111011011001111011101010101000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100110100111100000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 0d + +Encoding: 0d +U-Bits: 110111011011001100001101111011111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 0d + +Encoding: 0e +U-Bits: 001110101000001111101001011101111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100000000110100111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 0e + +Encoding: 0e +U-Bits: 001110101000001100111001110011000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 0e + +Encoding: 0f +U-Bits: 111010010100001111010011111101001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100111010010100001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 0f + +Encoding: 0f +U-Bits: 111010010100001100000011010011110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 0f + +Encoding: 10 +U-Bits: 000000001101001111111001000111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100010000101110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 10 + +Encoding: 10 +U-Bits: 000000001101001100101001101001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 10 + +Encoding: 11 +U-Bits: 110100110001001111000011100111001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100101010001110001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 11 + +Encoding: 11 +U-Bits: 110100110001001100010011001001110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 11 + +Encoding: 12 +U-Bits: 001101000010001111110111101111110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100011110000110110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 12 + +Encoding: 12 +U-Bits: 001101000010001100100111000001001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 12 + +Encoding: 13 +U-Bits: 111001111110001111001101001111000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100100100100110000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 13 + +Encoding: 13 +U-Bits: 111001111110001100011101100001111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 13 + +Encoding: 14 +U-Bits: 000011011110111111111010101101111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100010011000100111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 14 + +Encoding: 14 +U-Bits: 000011011110111100101010000011000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 14 + +Encoding: 15 +U-Bits: 110111100010111111000000001101001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100101001100100001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 15 + +Encoding: 15 +U-Bits: 110111100010111100010000100011110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 15 + +Encoding: 16 +U-Bits: 001110010001111111110100000101110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100011101101100110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 16 + +Encoding: 16 +U-Bits: 001110010001111100100100101011001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 16 + +Encoding: 17 +U-Bits: 111010101101111111001110100101000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100100111001100000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 17 + +Encoding: 17 +U-Bits: 111010101101111100011110001011111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 17 + +Encoding: 18 +U-Bits: 000000111001110000011101011000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011110100110001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 18 + +Encoding: 18 +U-Bits: 000000111001110011001101110110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 18 + +Encoding: 19 +U-Bits: 110100000101110000100111111000111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011001110010001111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 19 + +Encoding: 19 +U-Bits: 110100000101110011110111010110000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 19 + +Encoding: 1a +U-Bits: 001101110110110000010011110000000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011111010011001000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 1a + +Encoding: 1a +U-Bits: 001101110110110011000011011110111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 1a + +Encoding: 1b +U-Bits: 111001001010110000101001010000110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011000000111001110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 1b + +Encoding: 1b +U-Bits: 111001001010110011111001111110001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 1b + +Encoding: 1c +U-Bits: 000011101010000000011110110010001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011110111011011001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 1c + +Encoding: 1c +U-Bits: 000011101010000011001110011100110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 1c + +Encoding: 1d +U-Bits: 110111010110000000100100010010111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011001101111011111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 1d + +Encoding: 1d +U-Bits: 110111010110000011110100111100000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 1d + +Encoding: 1e +U-Bits: 001110100101000000010000011010000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011111001110011000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 1e + +Encoding: 1e +U-Bits: 001110100101000011000000110100111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 1e + +Encoding: 1f +U-Bits: 111010011001000000101010111010110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011000011010011110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 1f + +Encoding: 1f +U-Bits: 111010011001000011111010010100001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 1f + +Encoding: 20 +U-Bits: 000000000011010011111110010001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000010111111000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 20 + +Encoding: 20 +U-Bits: 000000000011010000101110111111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 20 + +Encoding: 21 +U-Bits: 110100111111010011000100110001001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000101101011000001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 21 + +Encoding: 21 +U-Bits: 110100111111010000010100011111110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 21 + +Encoding: 22 +U-Bits: 001101001100010011110000111001110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000011001010000110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 22 + +Encoding: 22 +U-Bits: 001101001100010000100000010111001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 22 + +Encoding: 23 +U-Bits: 111001110000010011001010011001000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000100011110000000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 23 + +Encoding: 23 +U-Bits: 111001110000010000011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 23 + +Encoding: 24 +U-Bits: 000011010000100011111101111011111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000010100010010111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 24 + +Encoding: 24 +U-Bits: 000011010000100000101101010101000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 24 + +Encoding: 25 +U-Bits: 110111101100100011000111011011001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000101110110010001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 25 + +Encoding: 25 +U-Bits: 110111101100100000010111110101110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 25 + +Encoding: 26 +U-Bits: 001110011111100011110011010011110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000011010111010110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 26 + +Encoding: 26 +U-Bits: 001110011111100000100011111101001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 26 + +Encoding: 27 +U-Bits: 111010100011100011001001110011000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000100000011010000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 27 + +Encoding: 27 +U-Bits: 111010100011100000011001011101111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 27 + +Encoding: 28 +U-Bits: 000000110111101100011010001110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111110011100111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 28 + +Encoding: 28 +U-Bits: 000000110111101111001010100000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 28 + +Encoding: 29 +U-Bits: 110100001011101100100000101110111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111001001000111111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 29 + +Encoding: 29 +U-Bits: 110100001011101111110000000000000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 29 + +Encoding: 2a +U-Bits: 001101111000101100010100100110000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111111101001111000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 2a + +Encoding: 2a +U-Bits: 001101111000101111000100001000111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 2a + +Encoding: 2b +U-Bits: 111001000100101100101110000110110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111000111101111110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 2b + +Encoding: 2b +U-Bits: 111001000100101111111110101000001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2b + +Encoding: 2c +U-Bits: 000011100100011100011001100100001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111110000001101001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 2c + +Encoding: 2c +U-Bits: 000011100100011111001001001010110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 2c + +Encoding: 2d +U-Bits: 110111011000011100100011000100111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111001010101101111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 2d + +Encoding: 2d +U-Bits: 110111011000011111110011101010000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 2d + +Encoding: 2e +U-Bits: 001110101011011100010111001100000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111111110100101000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 2e + +Encoding: 2e +U-Bits: 001110101011011111000111100010111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 2e + +Encoding: 2f +U-Bits: 111010010111011100101101101100110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111000100000101110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 2f + +Encoding: 2f +U-Bits: 111010010111011111111101000010001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 2f + +Encoding: 30 +U-Bits: 000000001110011100000111010110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111101110111111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 30 + +Encoding: 30 +U-Bits: 000000001110011111010111111000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 30 + +Encoding: 31 +U-Bits: 110100110010011100111101110110110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111010100011111110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 31 + +Encoding: 31 +U-Bits: 110100110010011111101101011000001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 31 + +Encoding: 32 +U-Bits: 001101000001011100001001111110001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111100000010111001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 32 + +Encoding: 32 +U-Bits: 001101000001011111011001010000110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 32 + +Encoding: 33 +U-Bits: 111001111101011100110011011110111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 33 + +Encoding: 33 +U-Bits: 111001111101011111100011110000000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 33 + +Encoding: 34 +U-Bits: 000011011101101100000100111100000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111101101010101000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 34 + +Encoding: 34 +U-Bits: 000011011101101111010100010010111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 34 + +Encoding: 35 +U-Bits: 110111100001101100111110011100110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111010111110101110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 35 + +Encoding: 35 +U-Bits: 110111100001101111101110110010001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 35 + +Encoding: 36 +U-Bits: 001110010010101100001010010100001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111100011111101001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 36 + +Encoding: 36 +U-Bits: 001110010010101111011010111010110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 36 + +Encoding: 37 +U-Bits: 111010101110101100110000110100111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111011001011101111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 37 + +Encoding: 37 +U-Bits: 111010101110101111100000011010000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 37 + +Encoding: 38 +U-Bits: 000000111010100011100011001001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000001010100000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 38 + +Encoding: 38 +U-Bits: 000000111010100000110011100111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 38 + +Encoding: 39 +U-Bits: 110100000110100011011001101001000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000110000000000000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 39 + +Encoding: 39 +U-Bits: 110100000110100000001001000111111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 39 + +Encoding: 3a +U-Bits: 001101110101100011101101100001111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000000100001000111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 3a + +Encoding: 3a +U-Bits: 001101110101100000111101001111000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3a + +Encoding: 3b +U-Bits: 111001001001100011010111000001001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000111110101000001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 3b + +Encoding: 3b +U-Bits: 111001001001100000000111101111110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 3b + +Encoding: 3c +U-Bits: 000011101001010011100000100011110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000001001001010110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 3c + +Encoding: 3c +U-Bits: 000011101001010000110000001101001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 3c + +Encoding: 3d +U-Bits: 110111010101010011011010000011000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000110011101010000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 3d + +Encoding: 3d +U-Bits: 110111010101010000001010101101111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 3d + +Encoding: 3e +U-Bits: 001110100110010011101110001011111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000000111100010111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 3e + +Encoding: 3e +U-Bits: 001110100110010000111110100101000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 3e + +Encoding: 3f +U-Bits: 111010011010010011010100101011001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000111101000010001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 3f + +Encoding: 3f +U-Bits: 111010011010010000000100000101110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 3f + +Encoding: 40 +U-Bits: 000000000000110111011011000001001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100110010101000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 40 + +Encoding: 40 +U-Bits: 000000000000110100001011101111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 40 + +Encoding: 41 +U-Bits: 110100111100110111100001100001111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100001000001000111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 41 + +Encoding: 41 +U-Bits: 110100111100110100110001001111000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 41 + +Encoding: 42 +U-Bits: 001101001111110111010101101001000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100111100000000000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 42 + +Encoding: 42 +U-Bits: 001101001111110100000101000111111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 42 + +Encoding: 43 +U-Bits: 111001110011110111101111001001110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100000110100000110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 43 + +Encoding: 43 +U-Bits: 111001110011110100111111100111001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 43 + +Encoding: 44 +U-Bits: 000011010011000111011000101011001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100110001000010001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 44 + +Encoding: 44 +U-Bits: 000011010011000100001000000101110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 44 + +Encoding: 45 +U-Bits: 110111101111000111100010001011111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100001011100010111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 45 + +Encoding: 45 +U-Bits: 110111101111000100110010100101000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 45 + +Encoding: 46 +U-Bits: 001110011100000111010110000011000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100111111101010000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 46 + +Encoding: 46 +U-Bits: 001110011100000100000110101101111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 46 + +Encoding: 47 +U-Bits: 111010100000000111101100100011110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100000101001010110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 47 + +Encoding: 47 +U-Bits: 111010100000000100111100001101001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 47 + +Encoding: 48 +U-Bits: 000000110100001000111111011110111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011010110110111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 48 + +Encoding: 48 +U-Bits: 000000110100001011101111110000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 48 + +Encoding: 49 +U-Bits: 110100001000001000000101111110001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011101100010111001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 49 + +Encoding: 49 +U-Bits: 110100001000001011010101010000110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 49 + +Encoding: 4a +U-Bits: 001101111011001000110001110110110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011011000011111110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 4a + +Encoding: 4a +U-Bits: 001101111011001011100001011000001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4a + +Encoding: 4b +U-Bits: 111001000111001000001011010110000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011100010111111000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 4b + +Encoding: 4b +U-Bits: 111001000111001011011011111000111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 4b + +Encoding: 4c +U-Bits: 000011100111111000111100110100111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011010101011101111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 4c + +Encoding: 4c +U-Bits: 000011100111111011101100011010000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 4c + +Encoding: 4d +U-Bits: 110111011011111000000110010100001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011101111111101001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 4d + +Encoding: 4d +U-Bits: 110111011011111011010110111010110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 4d + +Encoding: 4e +U-Bits: 001110101000111000110010011100110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011011011110101110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 4e + +Encoding: 4e +U-Bits: 001110101000111011100010110010001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 4e + +Encoding: 4f +U-Bits: 111010010100111000001000111100000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011100001010101000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 4f + +Encoding: 4f +U-Bits: 111010010100111011011000010010111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 4f + +Encoding: 50 +U-Bits: 000000001101111000100010000110110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011001011101111110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 50 + +Encoding: 50 +U-Bits: 000000001101111011110010101000001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 50 + +Encoding: 51 +U-Bits: 110100110001111000011000100110000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011110001001111000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 51 + +Encoding: 51 +U-Bits: 110100110001111011001000001000111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 51 + +Encoding: 52 +U-Bits: 001101000010111000101100101110111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011000101000111111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 52 + +Encoding: 52 +U-Bits: 001101000010111011111100000000000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 52 + +Encoding: 53 +U-Bits: 111001111110111000010110001110001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011111111100111001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 53 + +Encoding: 53 +U-Bits: 111001111110111011000110100000110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 53 + +Encoding: 54 +U-Bits: 000011011110001000100001101100110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011001000000101110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 54 + +Encoding: 54 +U-Bits: 000011011110001011110001000010001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 54 + +Encoding: 55 +U-Bits: 110111100010001000011011001100000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011110010100101000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 55 + +Encoding: 55 +U-Bits: 110111100010001011001011100010111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 55 + +Encoding: 56 +U-Bits: 001110010001001000101111000100111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011000110101101111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 56 + +Encoding: 56 +U-Bits: 001110010001001011111111101010000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 56 + +Encoding: 57 +U-Bits: 111010101101001000010101100100001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011111100001101001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 57 + +Encoding: 57 +U-Bits: 111010101101001011000101001010110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 57 + +Encoding: 58 +U-Bits: 000000111001000111000110011001000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100101111110000000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 58 + +Encoding: 58 +U-Bits: 000000111001000100010110110111111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 58 + +Encoding: 59 +U-Bits: 110100000101000111111100111001110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100010101010000110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 59 + +Encoding: 59 +U-Bits: 110100000101000100101100010111001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 59 + +Encoding: 5a +U-Bits: 001101110110000111001000110001001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100100001011000001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 5a + +Encoding: 5a +U-Bits: 001101110110000100011000011111110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 5a + +Encoding: 5b +U-Bits: 111001001010000111110010010001111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100011011111000111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 5b + +Encoding: 5b +U-Bits: 111001001010000100100010111111000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5b + +Encoding: 5c +U-Bits: 000011101010110111000101110011000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100101100011010000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 5c + +Encoding: 5c +U-Bits: 000011101010110100010101011101111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 5c + +Encoding: 5d +U-Bits: 110111010110110111111111010011110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100010110111010110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 5d + +Encoding: 5d +U-Bits: 110111010110110100101111111101001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 5d + +Encoding: 5e +U-Bits: 001110100101110111001011011011001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100100010110010001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 5e + +Encoding: 5e +U-Bits: 001110100101110100011011110101110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 5e + +Encoding: 5f +U-Bits: 111010011001110111110001111011111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100011000010010111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 5f + +Encoding: 5f +U-Bits: 111010011001110100100001010101000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 5f + +Encoding: 60 +U-Bits: 000000000011100100100101010000110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111001100111001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 60 + +Encoding: 60 +U-Bits: 000000000011100111110101111110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 60 + +Encoding: 61 +U-Bits: 110100111111100100011111110000000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111110110011001000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 61 + +Encoding: 61 +U-Bits: 110100111111100111001111011110111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 61 + +Encoding: 62 +U-Bits: 001101001100100100101011111000111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111000010010001111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 62 + +Encoding: 62 +U-Bits: 001101001100100111111011010110000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 62 + +Encoding: 63 +U-Bits: 111001110000100100010001011000001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111111000110001001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 63 + +Encoding: 63 +U-Bits: 111001110000100111000001110110110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 63 + +Encoding: 64 +U-Bits: 000011010000010100100110111010110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111001111010011110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 64 + +Encoding: 64 +U-Bits: 000011010000010111110110010100001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 64 + +Encoding: 65 +U-Bits: 110111101100010100011100011010000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111110101110011000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 65 + +Encoding: 65 +U-Bits: 110111101100010111001100110100111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 65 + +Encoding: 66 +U-Bits: 001110011111010100101000010010111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111000001111011111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 66 + +Encoding: 66 +U-Bits: 001110011111010111111000111100000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 66 + +Encoding: 67 +U-Bits: 111010100011010100010010110010001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111111011011011001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 67 + +Encoding: 67 +U-Bits: 111010100011010111000010011100110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 67 + +Encoding: 68 +U-Bits: 000000110111011011000001001111000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000101000100110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 68 + +Encoding: 68 +U-Bits: 000000110111011000010001100001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 68 + +Encoding: 69 +U-Bits: 110100001011011011111011101111110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000010010000110110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 69 + +Encoding: 69 +U-Bits: 110100001011011000101011000001001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 69 + +Encoding: 6a +U-Bits: 001101111000011011001111100111001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000100110001110001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 6a + +Encoding: 6a +U-Bits: 001101111000011000011111001001110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 6a + +Encoding: 6b +U-Bits: 111001000100011011110101000111111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000011100101110111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 6b + +Encoding: 6b +U-Bits: 111001000100011000100101101001000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6b + +Encoding: 6c +U-Bits: 000011100100101011000010100101000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000101011001100000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 6c + +Encoding: 6c +U-Bits: 000011100100101000010010001011111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 6c + +Encoding: 6d +U-Bits: 110111011000101011111000000101110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000010001101100110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 6d + +Encoding: 6d +U-Bits: 110111011000101000101000101011001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 6d + +Encoding: 6e +U-Bits: 001110101011101011001100001101001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000100101100100001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 6e + +Encoding: 6e +U-Bits: 001110101011101000011100100011110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 6e + +Encoding: 6f +U-Bits: 111010010111101011110110101101111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000011111000100111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 6f + +Encoding: 6f +U-Bits: 111010010111101000100110000011000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 6f + +Encoding: 70 +U-Bits: 000000001110101011011100010111001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000110101111110001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 70 + +Encoding: 70 +U-Bits: 000000001110101000001100111001110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 70 + +Encoding: 71 +U-Bits: 110100110010101011100110110111111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000001111011110111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 71 + +Encoding: 71 +U-Bits: 110100110010101000110110011001000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 71 + +Encoding: 72 +U-Bits: 001101000001101011010010111111000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000111011010110000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 72 + +Encoding: 72 +U-Bits: 001101000001101000000010010001111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 72 + +Encoding: 73 +U-Bits: 111001111101101011101000011111110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000000001110110110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 73 + +Encoding: 73 +U-Bits: 111001111101101000111000110001001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 73 + +Encoding: 74 +U-Bits: 000011011101011011011111111101001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000110110010100001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 74 + +Encoding: 74 +U-Bits: 000011011101011000001111010011110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 74 + +Encoding: 75 +U-Bits: 110111100001011011100101011101111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000001100110100111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 75 + +Encoding: 75 +U-Bits: 110111100001011000110101110011000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 75 + +Encoding: 76 +U-Bits: 001110010010011011010001010101000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000111000111100000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 76 + +Encoding: 76 +U-Bits: 001110010010011000000001111011111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 76 + +Encoding: 77 +U-Bits: 111010101110011011101011110101110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000000010011100110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 77 + +Encoding: 77 +U-Bits: 111010101110011000111011011011001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 77 + +Encoding: 78 +U-Bits: 000000111010010100111000001000111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111010001100001111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 78 + +Encoding: 78 +U-Bits: 000000111010010111101000100110000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 78 + +Encoding: 79 +U-Bits: 110100000110010100000010101000001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111101011000001001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 79 + +Encoding: 79 +U-Bits: 110100000110010111010010000110110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 79 + +Encoding: 7a +U-Bits: 001101110101010100110110100000110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111011111001001110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 7a + +Encoding: 7a +U-Bits: 001101110101010111100110001110001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 7a + +Encoding: 7b +U-Bits: 111001001001010100001100000000000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111100101101001000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 7b + +Encoding: 7b +U-Bits: 111001001001010111011100101110111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 7b + +Encoding: 7c +U-Bits: 000011101001100100111011100010111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111010010001011111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 7c + +Encoding: 7c +U-Bits: 000011101001100111101011001100000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 7c + +Encoding: 7d +U-Bits: 110111010101100100000001000010001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111101000101011001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 7d + +Encoding: 7d +U-Bits: 110111010101100111010001101100110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 7d + +Encoding: 7e +U-Bits: 001110100110100100110101001010110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111011100100011110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 7e + +Encoding: 7e +U-Bits: 001110100110100111100101100100001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 7e + +Encoding: 7f +U-Bits: 111010011010100100001111101010000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111100110000011000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 7f + +Encoding: 7f +U-Bits: 111010011010100111011111000100111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 7f + +Encoding: 80 +U-Bits: 000000000000001110010010010101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101111011111100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 80 + +Encoding: 80 +U-Bits: 000000000000001101000010111011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 80 + +Encoding: 81 +U-Bits: 110100111100001110101000110101110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101000001011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 81 + +Encoding: 81 +U-Bits: 110100111100001101111000011011001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 81 + +Encoding: 82 +U-Bits: 001101001111001110011100111101001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101110101010100001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 82 + +Encoding: 82 +U-Bits: 001101001111001101001100010011110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 82 + +Encoding: 83 +U-Bits: 111001110011001110100110011101111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101001111110100111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 83 + +Encoding: 83 +U-Bits: 111001110011001101110110110011000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 83 + +Encoding: 84 +U-Bits: 000011010011111110010001111111000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101111000010110000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 84 + +Encoding: 84 +U-Bits: 000011010011111101000001010001111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 84 + +Encoding: 85 +U-Bits: 110111101111111110101011011111110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101000010110110110011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 85 + +Encoding: 85 +U-Bits: 110111101111111101111011110001001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 85 + +Encoding: 86 +U-Bits: 001110011100111110011111010111001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101110110111110001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 86 + +Encoding: 86 +U-Bits: 001110011100111101001111111001110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 86 + +Encoding: 87 +U-Bits: 111010100000111110100101110111111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101001100011110111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 87 + +Encoding: 87 +U-Bits: 111010100000111101110101011001000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 87 + +Encoding: 88 +U-Bits: 000000110100110001110110001010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010011111100011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 88 + +Encoding: 88 +U-Bits: 000000110100110010100110100100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 88 + +Encoding: 89 +U-Bits: 110100001000110001001100101010000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010100101000011000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 89 + +Encoding: 89 +U-Bits: 110100001000110010011100000100111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 89 + +Encoding: 8a +U-Bits: 001101111011110001111000100010111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010010001001011111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 8a + +Encoding: 8a +U-Bits: 001101111011110010101000001100000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8a + +Encoding: 8b +U-Bits: 111001000111110001000010000010001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010101011101011001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 8b + +Encoding: 8b +U-Bits: 111001000111110010010010101100110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8b + +Encoding: 8c +U-Bits: 000011100111000001110101100000110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010011100001001110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 8c + +Encoding: 8c +U-Bits: 000011100111000010100101001110001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 8c + +Encoding: 8d +U-Bits: 110111011011000001001111000000000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010100110101001000011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 8d + +Encoding: 8d +U-Bits: 110111011011000010011111101110111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 8d + +Encoding: 8e +U-Bits: 001110101000000001111011001000111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010010010100001111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 8e + +Encoding: 8e +U-Bits: 001110101000000010101011100110000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 8e + +Encoding: 8f +U-Bits: 111010010100000001000001101000001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010101000000001001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 8f + +Encoding: 8f +U-Bits: 111010010100000010010001000110110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 8f + +Encoding: 90 +U-Bits: 000000001101000001101011010010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010000010111011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 90 + +Encoding: 90 +U-Bits: 000000001101000010111011111100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 90 + +Encoding: 91 +U-Bits: 110100110001000001010001110010001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010111000011011001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 91 + +Encoding: 91 +U-Bits: 110100110001000010000001011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 91 + +Encoding: 92 +U-Bits: 001101000010000001100101111010110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010001100010011110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 92 + +Encoding: 92 +U-Bits: 001101000010000010110101010100001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 92 + +Encoding: 93 +U-Bits: 111001111110000001011111011010000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010110110110011000000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 93 + +Encoding: 93 +U-Bits: 111001111110000010001111110100111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 93 + +Encoding: 94 +U-Bits: 000011011110110001101000111000111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010000001010001111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 94 + +Encoding: 94 +U-Bits: 000011011110110010111000010110000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 94 + +Encoding: 95 +U-Bits: 110111100010110001010010011000001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010111011110001001111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 95 + +Encoding: 95 +U-Bits: 110111100010110010000010110110110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 95 + +Encoding: 96 +U-Bits: 001110010001110001100110010000110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010001111111001110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 96 + +Encoding: 96 +U-Bits: 001110010001110010110110111110001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 96 + +Encoding: 97 +U-Bits: 111010101101110001011100110000000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010110101011001000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 97 + +Encoding: 97 +U-Bits: 111010101101110010001100011110111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: 97 + +Encoding: 98 +U-Bits: 000000111001111110001111001101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101100110100100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: 98 + +Encoding: 98 +U-Bits: 000000111001111101011111100011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: 98 + +Encoding: 99 +U-Bits: 110100000101111110110101101101111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101011100000100111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: 99 + +Encoding: 99 +U-Bits: 110100000101111101100101000011000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: 99 + +Encoding: 9a +U-Bits: 001101110110111110000001100101000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101101000001100000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: 9a + +Encoding: 9a +U-Bits: 001101110110111101010001001011111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: 9a + +Encoding: 9b +U-Bits: 111001001010111110111011000101110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101010010101100110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 9b + +Encoding: 9b +U-Bits: 111001001010111101101011101011001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: 9b + +Encoding: 9c +U-Bits: 000011101010001110001100100111001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101100101001110001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: 9c + +Encoding: 9c +U-Bits: 000011101010001101011100001001110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: 9c + +Encoding: 9d +U-Bits: 110111010110001110110110000111111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101011111101110111111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: 9d + +Encoding: 9d +U-Bits: 110111010110001101100110101001000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: 9d + +Encoding: 9e +U-Bits: 001110100101001110000010001111000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101101011100110000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: 9e + +Encoding: 9e +U-Bits: 001110100101001101010010100001111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: 9e + +Encoding: 9f +U-Bits: 111010011001001110111000101111110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101010001000110110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: 9f + +Encoding: 9f +U-Bits: 111010011001001101101000000001001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: 9f + +Encoding: a0 +U-Bits: 000000000011011101101100000100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110000101101101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: a0 + +Encoding: a0 +U-Bits: 000000000011011110111100101010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: a0 + +Encoding: a1 +U-Bits: 110100111111011101010110100100001100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110111111001101001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: a1 + +Encoding: a1 +U-Bits: 110100111111011110000110001010110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: a1 + +Encoding: a2 +U-Bits: 001101001100011101100010101100110000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110001011000101110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a2 + +Encoding: a2 +U-Bits: 001101001100011110110010000010001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a2 + +Encoding: a3 +U-Bits: 111001110000011101011000001100000000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110110001100101000011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a3 + +Encoding: a3 +U-Bits: 111001110000011110001000100010111111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a3 + +Encoding: a4 +U-Bits: 000011010000101101101111101110111111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110000110000111111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: a4 + +Encoding: a4 +U-Bits: 000011010000101110111111000000000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: a4 + +Encoding: a5 +U-Bits: 110111101100101101010101001110001111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110111100100111001100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: a5 + +Encoding: a5 +U-Bits: 110111101100101110000101100000110000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: a5 + +Encoding: a6 +U-Bits: 001110011111101101100001000110110011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110001000101111110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: a6 + +Encoding: a6 +U-Bits: 001110011111101110110001101000001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: a6 + +Encoding: a7 +U-Bits: 111010100011101101011011100110000011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110110010001111000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: a7 + +Encoding: a7 +U-Bits: 111010100011101110001011001000111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: a7 + +Encoding: a8 +U-Bits: 000000110111100010001000011011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001100001110010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: a8 + +Encoding: a8 +U-Bits: 000000110111100001011000110101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: a8 + +Encoding: a9 +U-Bits: 110100001011100010110010111011111100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001011011010010111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: a9 + +Encoding: a9 +U-Bits: 110100001011100001100010010101000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: a9 + +Encoding: aa +U-Bits: 001101111000100010000110110011000000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001101111011010000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: aa + +Encoding: aa +U-Bits: 001101111000100001010110011101111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: aa + +Encoding: ab +U-Bits: 111001000100100010111100010011110000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001010101111010110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ab + +Encoding: ab +U-Bits: 111001000100100001101100111101001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ab + +Encoding: ac +U-Bits: 000011100100010010001011110001001111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001100010011000001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ac + +Encoding: ac +U-Bits: 000011100100010001011011011111110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: ac + +Encoding: ad +U-Bits: 110111011000010010110001010001111111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001011000111000111100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ad + +Encoding: ad +U-Bits: 110111011000010001100001111111000000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ad + +Encoding: ae +U-Bits: 001110101011010010000101011001000011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001101100110000000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ae + +Encoding: ae +U-Bits: 001110101011010001010101110111111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: ae + +Encoding: af +U-Bits: 111010010111010010111111111001110011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: af + +Encoding: af +U-Bits: 111010010111010001010110010000110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: af + +Encoding: af +U-Bits: 111010010111010001101111010111001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: af + +Encoding: b0 +U-Bits: 000000001110010010010101000011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001111100101010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: b0 + +Encoding: b0 +U-Bits: 000000001110010001000101101101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: b0 + +Encoding: b1 +U-Bits: 110100110010010010101111100011110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001000110001010110011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: b1 + +Encoding: b1 +U-Bits: 110100110010010001111111001101001111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: b1 + +Encoding: b2 +U-Bits: 001101000001010010011011101011001100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001110010000010001111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b2 + +Encoding: b2 +U-Bits: 001101000001010001001011000101110011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b2 + +Encoding: b3 +U-Bits: 111001111101010010100001001011111100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001001000100010111111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b3 + +Encoding: b3 +U-Bits: 111001111101010001110001100101000011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b3 + +Encoding: b4 +U-Bits: 000011011101100010010110101001000011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001111111000000000000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b4 + +Encoding: b4 +U-Bits: 000011011101100001000110000111111100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: b4 + +Encoding: b5 +U-Bits: 110111100001100010101100001001110011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001000101100000110000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: b5 + +Encoding: b5 +U-Bits: 110111100001100001111100100111001100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: b5 + +Encoding: b6 +U-Bits: 001110010010100010011000000001001111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001110001101000001100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: b6 + +Encoding: b6 +U-Bits: 001110010010100001001000101111110000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: b6 + +Encoding: b7 +U-Bits: 111010101110100010100010100001111111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001001011001000111100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: b7 + +Encoding: b7 +U-Bits: 111010101110100001110010001111000000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: b7 + +Encoding: b8 +U-Bits: 000000111010101101110001011100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110011000110101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: b8 + +Encoding: b8 +U-Bits: 000000111010101110100001110010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: b8 + +Encoding: b9 +U-Bits: 110100000110101101001011111100000000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110100010010101000011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: b9 + +Encoding: b9 +U-Bits: 110100000110101110011011010010111111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: b9 + +Encoding: ba +U-Bits: 001101110101101101111111110100111100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110010110011101111111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: ba + +Encoding: ba +U-Bits: 001101110101101110101111011010000011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: ba + +Encoding: bb +U-Bits: 111001001001101101000101010100001100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110101100111101001111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: bb + +Encoding: bb +U-Bits: 111001001001101110010101111010110011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: bb + +Encoding: bc +U-Bits: 000011101001011101110010110110110011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110011011011111110000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: bc + +Encoding: bc +U-Bits: 000011101001011110100010011000001100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: bc + +Encoding: bd +U-Bits: 110111010101011101001000010110000011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110100001111111000000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: bd + +Encoding: bd +U-Bits: 110111010101011110011000111000111100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: bd + +Encoding: be +U-Bits: 001110100110011101111100011110111111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: be + +Encoding: be +U-Bits: 001110100110011110010101110111111100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: be + +Encoding: be +U-Bits: 001110100110011110101100110000000000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: be + +Encoding: bf +U-Bits: 111010011010011101000110111110001111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110101111010111001100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: bf + +Encoding: bf +U-Bits: 111010011010011110010110010000110000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: bf + +Encoding: c0 +U-Bits: 000000000000111001001001010100001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010100000111101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: c0 + +Encoding: c0 +U-Bits: 000000000000111010011001111010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: c0 + +Encoding: c1 +U-Bits: 110100111100111001110011110100111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010011010011101111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: c1 + +Encoding: c1 +U-Bits: 110100111100111010100011011010000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: c1 + +Encoding: c2 +U-Bits: 001101001111111001000111111100000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010101110010101000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c2 + +Encoding: c2 +U-Bits: 001101001111111010010111010010111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c2 + +Encoding: c3 +U-Bits: 111001110011111001111101011100110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010010100110101110011 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c3 + +Encoding: c3 +U-Bits: 111001110011111010101101110010001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c3 + +Encoding: c4 +U-Bits: 000011010011001001001010111110001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010100011010111001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: c4 + +Encoding: c4 +U-Bits: 000011010011001010011010010000110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: c4 + +Encoding: c5 +U-Bits: 110111101111001001110000011110111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010011001110111111100 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: c5 + +Encoding: c5 +U-Bits: 110111101111001010100000110000000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: c5 + +Encoding: c6 +U-Bits: 001110011100001001000100010110000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010101101111111000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: c6 + +Encoding: c6 +U-Bits: 001110011100001010010100111000111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: c6 + +Encoding: c7 +U-Bits: 111010100000001001111110110110110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010010111011111110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: c7 + +Encoding: c7 +U-Bits: 111010100000001010101110011000001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: c7 + +Encoding: c8 +U-Bits: 000000110100000110101101001011111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101000100100010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: c8 + +Encoding: c8 +U-Bits: 000000110100000101111101100101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: c8 + +Encoding: c9 +U-Bits: 110100001000000110010111101011001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101111110000010001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: c9 + +Encoding: c9 +U-Bits: 110100001000000101000111000101110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: c9 + +Encoding: ca +U-Bits: 001101111011000110100011100011110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101001010001010110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: ca + +Encoding: ca +U-Bits: 001101111011000101110011001101001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: ca + +Encoding: cb +U-Bits: 111001000111000110011001000011000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101110000101010000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: cb + +Encoding: cb +U-Bits: 111001000111000101001001101101111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: cb + +Encoding: cc +U-Bits: 000011100111110110101110100001111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101000111001000111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: cc + +Encoding: cc +U-Bits: 000011100111110101111110001111000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: cc + +Encoding: cd +U-Bits: 110111011011110110010100000001001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101111101101000001100 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: cd + +Encoding: cd +U-Bits: 110111011011110101000100101111110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: cd + +Encoding: ce +U-Bits: 001110101000110110100000001001110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101001001100000110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ce + +Encoding: ce +U-Bits: 001110101000110101110000100111001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: ce + +Encoding: cf +U-Bits: 111010010100110110011010101001000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101110011000000000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: cf + +Encoding: cf +U-Bits: 111010010100110101001010000111111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: cf + +Encoding: d0 +U-Bits: 000000001101110110110000010011110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101011001111010110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: d0 + +Encoding: d0 +U-Bits: 000000001101110101100000111101001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: d0 + +Encoding: d1 +U-Bits: 110100110001110110001010110011000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101100011011010000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: d1 + +Encoding: d1 +U-Bits: 110100110001110101011010011101111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: d1 + +Encoding: d2 +U-Bits: 001101000010110110111110111011111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101010111010010111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d2 + +Encoding: d2 +U-Bits: 001101000010110101101110010101000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d2 + +Encoding: d3 +U-Bits: 111001111110110110000100011011001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101101101110010001111 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d3 + +Encoding: d3 +U-Bits: 111001111110110101010100110101110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d3 + +Encoding: d4 +U-Bits: 000011011110000110110011111001110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101011010010000110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: d4 + +Encoding: d4 +U-Bits: 000011011110000101100011010111001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: d4 + +Encoding: d5 +U-Bits: 110111100010000110001001011001000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101100000110000000000 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d5 + +Encoding: d5 +U-Bits: 110111100010000101011001110111111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: d5 + +Encoding: d6 +U-Bits: 001110010001000110111101010001111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101010100111000111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: d6 + +Encoding: d6 +U-Bits: 001110010001000101101101111111000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: d6 + +Encoding: d7 +U-Bits: 111010101101000110000111110001001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101101110011000001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: d7 + +Encoding: d7 +U-Bits: 111010101101000101010111011111110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: d7 + +Encoding: d8 +U-Bits: 000000111001001001010100001100000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010111101100101000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: d8 + +Encoding: d8 +U-Bits: 000000111001001010000100100010111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: d8 + +Encoding: d9 +U-Bits: 110100000101001001101110101100110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010000111000101110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: d9 + +Encoding: d9 +U-Bits: 110100000101001010111110000010001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: d9 + +Encoding: da +U-Bits: 001101110110001001011010100100001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: da + +Encoding: da +U-Bits: 001101110110001010110011001101001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: da + +Encoding: da +U-Bits: 001101110110001010001010001010110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: da + +Encoding: db +U-Bits: 111001001010001001100000000100111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: db + +Encoding: db +U-Bits: 111001001010001010001001101101111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: db + +Encoding: db +U-Bits: 111001001010001010110000101010000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: db + +Encoding: dc +U-Bits: 000011101010111001010111100110000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010111110001111000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: dc + +Encoding: dc +U-Bits: 000011101010111010000111001000111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: dc + +Encoding: dd +U-Bits: 110111010110111001101101000110110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010000100101111110000 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: dd + +Encoding: dd +U-Bits: 110111010110111010111101101000001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: dd + +Encoding: de +U-Bits: 001110100101111001011001001110001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: de + +Encoding: de +U-Bits: 001110100101111010110000100111001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: de + +Encoding: de +U-Bits: 001110100101111010001001100000110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: de + +Encoding: df +U-Bits: 111010011001111001100011101110111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: df + +Encoding: df +U-Bits: 111010011001111010001010000111111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: df + +Encoding: df +U-Bits: 111010011001111010110011000000000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: df + +Encoding: e0 +U-Bits: 000000000011101010110111000101110011 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001011110101100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: e0 + +Encoding: e0 +U-Bits: 000000000011101001100111101011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: e0 + +Encoding: e1 +U-Bits: 110100111111101010001101100101000011 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001100100001100000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: e1 + +Encoding: e1 +U-Bits: 110100111111101001011101001011111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: e1 + +Encoding: e2 +U-Bits: 001101001100101010111001101101111111 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001010000000100111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e2 + +Encoding: e2 +U-Bits: 001101001100101001101001000011000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e2 + +Encoding: e3 +U-Bits: 111001110000101010000011001101001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001101010100100001100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e3 + +Encoding: e3 +U-Bits: 111001110000101001010011100011110000 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e3 + +Encoding: e4 +U-Bits: 000011010000011010110100101111110000 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001011101000110110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: e4 + +Encoding: e4 +U-Bits: 000011010000011001100100000001001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: e4 + +Encoding: e5 +U-Bits: 110111101100011010001110001111000000 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001100111100110000011 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: e5 + +Encoding: e5 +U-Bits: 110111101100011001011110100001111111 +S-Bits: 81 81 7f 81 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: e5 + +Encoding: e6 +U-Bits: 001110011111011010111010000111111100 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 7f +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001010011101110111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: e6 + +Encoding: e6 +U-Bits: 001110011111011001101010101001000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: e6 + +Encoding: e7 +U-Bits: 111010100011011010000000100111001100 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001101001001110001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: e7 + +Encoding: e7 +U-Bits: 111010100011011001010000001001110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: e7 + +Encoding: e8 +U-Bits: 000000110111010101010011011010000011 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110111010110011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: e8 + +Encoding: e8 +U-Bits: 000000110111010110000011110100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: e8 + +Encoding: e9 +U-Bits: 110100001011010101101001111010110011 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110000000010011110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: e9 + +Encoding: e9 +U-Bits: 110100001011010110111001010100001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: e9 + +Encoding: ea +U-Bits: 001101111000010101011101110010001111 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110110100011011001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: ea + +Encoding: ea +U-Bits: 001101111000010110001101011100110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: ea + +Encoding: eb +U-Bits: 111001000100010101100111010010111111 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110001110111011111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: eb + +Encoding: eb +U-Bits: 111001000100010110110111111100000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 81 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: eb + +Encoding: ec +U-Bits: 000011100100100101010000110000000000 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110111001011001000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: ec + +Encoding: ec +U-Bits: 000011100100100110000000011110111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: ec + +Encoding: ed +U-Bits: 110111011000100101101010010000110000 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110000011111001110011 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: ed + +Encoding: ed +U-Bits: 110111011000100110111010111110001111 +S-Bits: 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: ed + +Encoding: ee +U-Bits: 001110101011100101011110011000001100 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110110111110001001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: ee + +Encoding: ee +U-Bits: 001110101011100110001110110110110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: ee + +Encoding: ef +U-Bits: 111010010111100101100100111000111100 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110001101010001111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ef + +Encoding: ef +U-Bits: 111010010111100110110100010110000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ef + +Encoding: f0 +U-Bits: 000000001110100101001110000010001111 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110100111101011001100 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: f0 + +Encoding: f0 +U-Bits: 000000001110100110011110101100110000 +S-Bits: 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: f0 + +Encoding: f1 +U-Bits: 110100110010100101110100100010111111 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 81 81 +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110011101001011111100 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 7f 7f +Decoded: f1 + +Encoding: f1 +U-Bits: 110100110010100110100100001100000000 +S-Bits: 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f1 + +Encoding: f2 +U-Bits: 001101000001100101000000101010000011 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110101001000011000000 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f2 + +Encoding: f2 +U-Bits: 001101000001100110010000000100111100 +S-Bits: 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f2 + +Encoding: f3 +U-Bits: 111001111101100101111010001010110011 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110010011100011110000 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f3 + +Encoding: f3 +U-Bits: 111001111101100110101010100100001100 +S-Bits: 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f3 + +Encoding: f4 +U-Bits: 000011011101010101001101101000001100 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110100100000001001111 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: f4 + +Encoding: f4 +U-Bits: 000011011101010110011101000110110011 +S-Bits: 7f 7f 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: f4 + +Encoding: f5 +U-Bits: 110111100001010101110111001000111100 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110011110100001111111 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: f5 + +Encoding: f5 +U-Bits: 110111100001010110100111100110000011 +S-Bits: 81 81 7f 81 81 81 81 7f 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: f5 + +Encoding: f6 +U-Bits: 001110010010010101000011000000000000 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110101010101001000011 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: f6 + +Encoding: f6 +U-Bits: 001110010010010110010011101110111111 +S-Bits: 7f 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 +Decoded: f6 + +Encoding: f7 +U-Bits: 111010101110010101111001100000110000 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110010000001001110011 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: f7 + +Encoding: f7 +U-Bits: 111010101110010110101001001110001111 +S-Bits: 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: f7 + +Encoding: f8 +U-Bits: 000000111010011010101010011101111111 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001000011110100111100 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 7f 7f +Decoded: f8 + +Encoding: f8 +U-Bits: 000000111010011001111010110011000000 +S-Bits: 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f +Decoded: f8 + +Encoding: f9 +U-Bits: 110100000110011010010000111101001111 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001111001010100001100 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f +Decoded: f9 + +Encoding: f9 +U-Bits: 110100000110011001000000010011110000 +S-Bits: 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f +Decoded: f9 + +Encoding: fa +U-Bits: 001101110101011010100100110101110011 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001001101011100110000 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: fa + +Encoding: fa +U-Bits: 001101110101011001110100011011001100 +S-Bits: 7f 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 7f +Decoded: fa + +Encoding: fb +U-Bits: 111001001001011010011110010101000011 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001110111111100000000 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f +Decoded: fb + +Encoding: fb +U-Bits: 111001001001011001001110111011111100 +S-Bits: 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f +Decoded: fb + +Encoding: fc +U-Bits: 000011101001101010101001110111111100 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001000000011110111111 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 81 81 81 81 +Decoded: fc + +Encoding: fc +U-Bits: 000011101001101001111001011001000011 +S-Bits: 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 81 7f 81 81 7f 7f 81 7f 7f 7f 7f 81 81 +Decoded: fc + +Encoding: fd +U-Bits: 110111010101101010010011010111001100 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001111010111110001111 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: fd + +Encoding: fd +U-Bits: 110111010101101001000011111001110011 +S-Bits: 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 81 7f 7f 81 81 +Decoded: fd + +Encoding: fe +U-Bits: 001110100110101010100111011111110000 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001001110110110110011 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 +Decoded: fe + +Encoding: fe +U-Bits: 001110100110101001110111110001001111 +S-Bits: 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 7f 7f 81 7f 7f 81 81 81 81 +Decoded: fe + +Encoding: ff +U-Bits: 111010011010101010011101111111000000 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001110100010110000011 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 81 +Decoded: ff + +Encoding: ff +U-Bits: 111010011010101001001101010001111111 +S-Bits: 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 81 81 +Decoded: ff + +Encoding: 03 03 01 00 +U-Bits: 111001110011000011100111001100001101001111000000000011010000011010110111111100 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f +Decoded: 03 03 01 00 + +Encoding: a3 af 5f 00 +U-Bits: 111001110000011101010110011101000101011010011101111111111010011001001110001111 +S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 81 81 81 81 +Decoded: a3 af 5f 00 + +Encoding: 01 02 03 00 +U-Bits: 110100111100000000110100111100001110011100110000000011101010001101011100110000 +S-Bits: 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f +Decoded: 01 02 03 00 + +Encoding: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 +U-Bits: +0E1E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E0E1E0E0E0E0E0E1E1E1E1E0 23 00 E0E0E0E1E1E1E1E0E1E1E1E0E1E0E0E0E0E1E0E1E0E0E0E0E1E1E0E0E +1E0E1E0E1E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E0E0E1E1E0E0E1 23 00 E1E1E1E0E1E0E0E1E0E0E0E1E0E0E0E0E1E0E0E0E0E1E0E0E1E1E0E1E +1E1E1E0E0E1E0E1E1E0E0E0E0E1E1E1E1E0E0E1E0E0E1E1E1E0E0E0E0 23 00 E1E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E0E1E0E1E0E0E1E1E0E0E0E1E +0E0E0E0E0E1E0E1E0E1E1E1E0E1E1E0E1E0E1E0E0E1E0E0E0E1E1E0E0 23 00 E1E0E1E0E0E1E1E0E0E1E0E0E0E0E1E1E0E0E0E1E0E0E0E0E0E0E1E1E +E0E0E1E0E1E0E1E0E1E0E0E0E1E1E1E1E0E0E1E0E1E0E0E0E0E1E0E1E 00 23 0E1E1E0E0E0E1E1E1E1E1E1E1E0E1E1E1E1E1E1E1E1E0E1E0E1E1E0E0 +E1E0E1E0E1E0E1E1E0E1E1E0E0E0E0E1E0E1E0E1E0E0E0E0E0E1E0E0E 00 23 0E1E0E1E1E1E1E0E1E1E0E1E1E1E0E1E0E0E0E1E0E0E0E1E0E1E0E1E1 +E1E0E0E1E1E0E1E1E0E0E0E1E1E1E1E0E1E1E0E1E0E0E0E0E0E1E1E1E 00 23 0E1E0E1E1E0E0E0E1E0E1E0E1E1E0E0E0E1E1E0E1E0E1E1E1E1E0E1E0 +E0E1E0E1E1E0E1E0E0E1E1E0E0E0E1E1E1E1E1E0E0E1E1E0E1E1E0E0E 00 23 1E0E0E0E0E1E0E0E1E1E1E1E1E0E1E0E1E1E0E1E1E1E0E0E1E0E0E1E1 +S-Bits: +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 +81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 +81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 +Decoded: d0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e +U-Bits: +0E1E1E0E0E0E0E0E1E0E0E0E1E0E0E1E1E1E1E0E0E0E1E1E1E1E1E0E0 23 00 E0E0E1E0E0E0E1E1E0E1E1E0E0E0E1E0E0E0E1E0E0E1E1E1E0E0E0E0E +1E0E0E0E1E0E1E1E1E0E0E1E1E1E1E1E0E0E0E1E0E0E0E1E0E1E0E1E1 23 00 E0E1E0E1E0E1E1E0E0E0E0E0E1E1E0E1E1E0E0E1E0E1E0E1E0E0E0E1E +0E1E0E1E1E0E0E0E0E1E0E0E1E0E0E0E1E0E0E0E1E0E1E1E1E1E1E0E0 23 00 E0E0E0E0E0E0E0E1E0E1E0E0E0E0E0E1E1E0E0E0E1E1E0E0E0E0E0E0E +0E1E0E0E1E0E0E1E1E0E0E0E1E0E0E1E0E1E1E0E0E0E1E1E0E1E1E0E1 23 00 E1E0E0E1E0E1E1E0E0E0E0E0E0E1E0E1E0E0E0E0E0E0E1E0E1E0E1E1E +E0E1E0E0E0E0E1E0E1E1E0E1E0E0E1E0E1E0E1E1E1E1E1E0E0E0E1E0E 00 23 1E1E0E0E0E1E1E0E1E0E0E0E0E1E1E1E1E0E0E0E0E1E1E1E0E0E0E0E1 +E0E1E0E0E0E0E1E0E1E0E1E1E1E1E0E0E0E0E1E0E1E1E0E0E1E0E1E1E 00 23 1E0E0E1E0E1E0E1E1E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E1E0E0E0E0 +E0E0E1E1E0E0E0E0E0E0E0E0E1E1E0E1E1E1E1E1E1E0E0E0E0E0E0E0E 00 23 0E1E0E1E1E0E0E0E0E1E0E0E0E1E0E1E0E0E0E1E1E1E0E1E0E0E0E0E1 +E1E0E0E1E1E1E0E0E0E0E1E1E0E0E0E0E0E1E0E0E0E1E1E1E1E0E0E0E 00 23 1E1E0E0E0E1E0E1E0E0E0E0E1E1E0E0E0E0E0E1E1E1E1E0E1E0E0E1E0 +S-Bits: +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f +Decoded: c0 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e tch_fr_decode: n_errors=8 n_bits_total=378 ber=0.02 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E1E1E0 23 01 E0E0E0E0E1E1E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E0E +0E0E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0 23 01 E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E 01 23 0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0 +E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E 01 23 0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f +81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +0E1E0E1E1E0E0E1E0E1E1E1E1E0E1E0E0E1E1E0E1E1E0E0E1E0E0E0E0 23 01 E1E1E1E0E1E0E1E0E0E0E0E0E1E1E1E0E1E1E1E1E0E0E0E1E1E0E1E1E +1E0E0E1E0E1E1E1E0E0E1E0E1E1E0E0E1E1E0E1E1E0E0E0E1E1E0E0E1 23 01 E0E1E1E0E0E1E0E0E1E1E1E1E0E0E0E0E0E0E1E1E1E1E0E0E0E1E1E1E +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +E0E0E1E1E1E0E1E0E1E1E0E1E0E0E1E1E1E0E0E0E0E1E0E0E0E0E0E1E 01 23 1E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E0E0E0E1E0E0E0E0E1E1E1E0E0 +E1E1E1E1E1E0E1E0E1E0E0E1E0E0E1E1E0E0E0E1E1E1E1E1E1E1E1E1E 01 23 0E1E0E1E1E1E1E1E1E0E1E0E1E0E1E1E0E1E0E0E1E0E0E1E1E0E0E0E1 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 +81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f +81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +0E0E0E0E0E0E1E0E1E0E1E0E0E1E1E1E1E1E1E1E1E0E1E0E1E0E0E1E1 23 01 E1E1E1E1E1E0E1E0E1E0E1E0E0E0E0E0E0E0E0E1E0E0E1E0E1E1E0E0E +1E0E0E1E1E0E0E0E0E0E0E0E1E0E1E0E0E1E0E1E1E1E1E1E1E0E0E1E0 23 01 E1E1E0E1E1E1E1E1E1E1E1E1E0E0E1E1E0E1E0E0E0E0E0E0E1E1E1E0E +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E1E0E0E1E1E0E 01 23 0E0E1E0E0E1E1E1E1E0E1E1E0E0E1E1E1E0E0E1E1E1E1E0E0E0E1E1E0 +E0E1E0E0E1E1E0E1E0E0E1E1E1E1E1E1E0E1E0E0E1E0E0E0E0E1E1E1E 01 23 1E0E1E0E0E1E1E0E0E0E0E1E1E1E1E1E0E1E1E0E0E1E1E0E0E1E1E1E1 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f +81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_fr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee +U-Bits: +0E1E0E0E1E0E0E1E1E0E1E0E0E0E0E0E0E0E0E1E1E0E0E1E1E1E1E1E1 23 00 E1E1E1E1E1E0E1E1E1E0E0E1E0E1E1E1E0E0E1E0E0E1E1E1E1E0E0E0E +0E1E1E0E0E0E0E1E0E1E1E1E0E0E1E1E0E0E1E0E1E0E1E0E0E0E1E0E1 23 00 E0E0E0E1E1E1E1E1E0E1E1E1E0E0E0E0E1E1E1E0E0E1E1E0E1E1E1E0E +E0E0E0E1E1E1E1E1E0E1E0E0E1E1E0E0E1E0E1E0E0E1E1E0E0E0E0E0E 00 23 0E0E0E1E0E1E0E1E0E0E1E1E0E1E0E0E0E1E1E1E0E0E0E0E1E0E1E0E1 +E1E0E0E1E1E1E1E1E1E0E0E1E1E1E0E0E0E1E1E1E1E1E1E1E1E0E1E1E 00 23 0E0E1E0E1E0E0E0E1E0E0E1E1E0E1E1E1E1E0E1E1E0E1E0E0E1E0E1E1 +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 23 23 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +S-Bits: +7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 +81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 +Decoded: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 + +Encoding: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +1E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E1E1E0E0E0E0E0E1 23 01 E1E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E +0E0E0E0E0E1E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0 23 01 E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E +000000000010000000010000100000000000001010000101000010100 01 01 001000000101000000001001010000000000000100000010100001000 +010100000010000000000000100000010000000000000000000010000 01 01 000010010000000010000001000000001000000000001000000000000 +E0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E0E0E0E0E0E0E0E1E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E0E1E0E0E0E0E0E0E1E1E0E0E0E0E0E0E1E0E0E0 +E0E0E0E1E0E0E0E0E0E1E0E0E0E0E0E0E0E1E0E0E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E0E0E0E0E0E1E1E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 +S-Bits: +81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 +7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f +7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f +Decoded: 03 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +1E0E0E1E1E0E0E0E0E0E1E0E0E1E1E1E1E0E1E0E0E1E1E0E0E0E0E0E0 23 01 E0E0E0E0E0E1E0E0E0E1E1E0E0E0E0E1E0E0E1E1E1E0E0E0E0E0E0E0E +0E1E1E0E0E0E0E1E1E0E0E0E1E1E0E0E1E0E1E1E1E1E0E0E1E0E1E1E1 23 01 E0E0E0E0E1E1E1E1E1E0E0E1E0E0E0E1E0E1E1E0E1E0E1E1E0E0E1E1E +001001111100011001111011100011010110100010110000100000010 01 01 111101000100010000001000011101100101011100000001111011010 +110101110110111001001001101001011010001111010101111101011 01 01 001101101011101011011101100010100010010111010010100101011 +E0E1E1E1E0E1E1E0E1E0E0E0E0E1E0E1E1E1E0E1E0E1E0E0E1E0E1E1E 01 23 0E1E1E1E0E0E1E1E0E1E0E1E1E1E1E0E1E1E0E1E0E1E1E1E1E1E0E0E0 +E0E0E0E1E1E1E0E0E1E1E1E0E0E0E1E1E0E1E0E1E0E0E0E1E0E0E0E0E 01 23 0E0E0E1E1E0E0E1E1E1E0E1E0E0E1E1E0E0E1E0E0E1E1E1E0E1E1E0E0 +S-Bits: +81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 +7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 +7f 7f 81 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 81 7f +81 81 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 7f 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 +81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f +81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f +Decoded: a3 af 5f 00 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +1E1E1E1E0E0E0E0E0E0E0E1E1E1E0E0E0E0E0E1E0E1E0E0E0E0E1E1E0 23 01 E1E1E1E1E0E0E1E1E1E1E1E0E0E1E0E0E0E0E1E1E1E1E1E1E1E0E0E1E +0E1E1E1E1E0E0E0E0E0E0E1E0E1E0E0E1E1E1E1E1E1E1E1E1E0E0E0E1 23 01 E1E0E0E0E0E0E0E0E0E0E1E1E0E1E1E0E0E0E0E1E1E1E1E1E0E0E0E0E +000100000101110110011100001111111010111111011100100101101 01 01 010111010110111011001110000010101000001110101100010110100 +100100101101000100000101110111010011001011101010100101110 01 01 110110010111110101010111101011110011100000101000011111101 +E1E0E1E1E0E1E1E0E0E1E0E0E1E0E1E0E1E1E0E1E1E0E0E1E0E0E1E0E 01 23 1E0E1E0E1E0E1E0E0E1E1E0E0E0E1E0E1E0E1E0E1E1E0E0E1E0E0E1E0 +E0E1E0E1E0E1E0E1E0E1E0E1E1E0E0E1E1E0E1E0E1E0E1E1E1E0E1E0E 01 23 0E1E0E0E0E0E1E0E1E0E0E0E1E1E0E0E1E1E1E0E1E0E1E0E1E0E1E1E0 +S-Bits: +81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 81 81 +7f 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 +7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f +81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 81 81 7f +81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 81 81 7f +Decoded: 01 02 03 00 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 tch_hr_decode: n_errors=10 n_bits_total=456 ber=0.02 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 +U-Bits: +100101111001010011001000001110111100100110011000010001010 01 01 001010000001111000110110001010011010011101101010100000000 +101010010101101011000100001001011101101110100001100010101 01 01 000000001101011111000011000010110011110101111111101010010 +001001110100011001111111100011010111101010110100100000010 01 01 110111000100010000101000011001100101001000000011111111000 +100100110110111001001001101000011110001111000101111101011 01 01 000101111010101001011000100010000011000011010010100001011 +S-Bits: +81 7f 7f 81 7f 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 81 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f +81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 81 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 7f 81 81 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 7f 81 7f +7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 81 81 7f 7f 7f +81 7f 7f 81 7f 7f 81 81 7f 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f +U-Bits: +101011101110011001100000010010001100001011100000000011100 01 01 001110000110001110001011000001001001001010010111110000010 +000011100010110001011101000111011011110111101011100101100 00 00 010101010010111111101011000110101010110111000111010011011 +000101111111110000011110110000011000000100110001101000110 01 00 011010011010010010110000010100001100110000110110110011011 +011110100011000011100010100011101110001110110110011011111 00 00 000111100011100011010001101110010111011111010111110110011 +S-Bits: +81 7f 81 7f 81 81 81 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 7f +7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 81 81 81 81 7f 81 7f 81 81 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 81 +7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 +7f 81 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 +U-Bits: +100010111000001100000000001101001000000000101100111011001 00 00 101110010011001000110010000011100101000011110001101100001 +001011110100100101010101111111110011111011111110001101001 01 00 011010010110101000111110001100110011101101111000100101110 +110001101010001000010101011111101011000111010110110011110 00 00 101001101100011001101100110110000101000001000001011000110 +011100001010000100100101001000110110100111000000101110000 00 01 111100110000011001001100110100111101011010011110100010011 +S-Bits: +81 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 7f 7f 81 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 +7f 7f 81 7f 81 81 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 81 81 81 81 81 7f 81 81 81 81 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 81 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 81 81 81 7f 81 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f +81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 81 81 81 81 7f 7f 7f 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 81 7f +7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 81 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 +U-Bits: +100010100101111101110101011001010100000101001001011011000 00 00 001000000000001100000110001011010111110101110101001100010 +010101000000101010101011110000010101000100000011010001101 00 01 010111110101110101010111011111100111010011010000111110111 +010111100101110011111100101110001010100110000010100000100 00 01 010111101110101111110011110101111101110100011000101111111 +011110100110000011110100111111101111111111111010101110000 01 00 001010101010101010101010111010110110000000100000101001011 +S-Bits: +81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 81 7f 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 81 7f +7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 7f 81 81 81 +7f 81 7f 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 81 81 81 81 81 81 7f 7f 81 7f 81 81 81 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 81 81 81 7f 81 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 81 81 81 81 +7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 81 81 81 81 81 7f 81 81 81 81 81 81 81 81 81 81 81 81 81 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 7f 81 81 81 7f 81 7f 81 81 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f 5f c6 36 43 44 03 d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 +U-Bits: +111011100001111000010010111001000101001111000001010011101 01 01 110111110010100101110100100110001010110111110101111000100 +001110111011000100010011110000011010111001101111100101001 01 01 011000101000100010001101111101001010100111011101100010110 +000000001111110110011100001111111010110111011100100101101 01 01 010101010010111011101110000010101000011111101110010011100 +110100100101000000000101110110000111001011111010101101110 01 01 110110010111110101010011111011010010110000100000011111101 +S-Bits: +81 81 81 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 7f 7f 7f 81 7f 7f +7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 81 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f +7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 81 81 81 81 81 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 7f 81 81 7f 81 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 81 81 7f 81 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 81 81 7f 7f 81 7f 7f 81 81 81 7f 7f +81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 81 7f 81 81 81 7f 81 81 81 81 7f 81 81 7f 7f 81 7f 81 81 81 81 81 7f 81 7f 81 7f 81 7f 7f 81 81 81 81 81 7f 81 81 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 81 81 81 81 81 7f 81 +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111110100100011100101010000100110000110101111110000000010 01 01 010000000110100010010111101011000000110000111100000100001 +111000110100110110001000010011101000000010100010101101000 00 00 100001001010111000011000100011000111100001110100010000010 +001011000100011010100000101110100010010010001011110101001 01 00 000110000011000100011000100101000100001000000100101001011 +101001001100101001110101101010101000000110100010000010101 00 00 010100101110010001000011011100010000111000010010100110010 +S-Bits: +81 81 81 81 81 7f 81 7f 7f 81 7f 7f 7f 81 81 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 81 81 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 +81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 81 81 81 7f 7f 7f 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f +7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 +81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=132 n_bits_total=588 ber=0.22 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +111010000001011110000011000110101000110100010000001000010 00 00 100001011000101110010100001001110000100010010101001010000 +101000110001001010001000010100000010000100100000110001011 01 00 110001101000110100000010100011010010100001000101000010111 +101011000101001000100100001000001100000111000011010000010 00 00 010110001011010001000010001001000010101001010000000011100 +001000010100100001010001001000110100010100001101010010101 00 01 000000101111000000100011010100010010110101000010001111000 +S-Bits: +81 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f +81 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 81 81 81 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 +81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f +7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=220 n_bits_total=676 ber=0.33 + +Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +U-Bits: +100000000001000000000000010010000000000100000000000001000 00 00 000000000000100000000000001000000000000010010000000000100 +101010000001000000000000010010101000000100000000010000011 00 01 010100000000100000000000001001010000000011000000000000110 +101000000000000000000000000000000000000010101001000000101 00 01 010000000001000000000000000000000000000001010100000000010 +100000000010101000000000000000000000000000000000000010000 01 00 000000000100000000000001010101000000010101010000000001010 +S-Bits: +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f +81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f +81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f +81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 7f 81 7f +Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 pdtch_decode: n_errors=0 n_bits_total=444 ber=0.00 + Success -- To view, visit https://gerrit.osmocom.org/5070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:33:59 +0000 Subject: [MERGED] libosmocore[master]: coding test: cosmetic cleanup In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: coding test: cosmetic cleanup ...................................................................... coding test: cosmetic cleanup * remove duplicate code: use function from libosmocore * use utility function to dump ubits * reformat for easier reading * link against libosmocore Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 --- M tests/Makefile.am M tests/coding/coding_test.c 2 files changed, 55 insertions(+), 102 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index e11092d..c609d6a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -165,7 +165,7 @@ socket_socket_test_SOURCES = socket/socket_test.c coding_coding_test_SOURCES = coding/coding_test.c -coding_coding_test_LDADD = \ +coding_coding_test_LDADD = $(LDADD) \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/codec/libosmocodec.la \ $(top_builddir)/src/coding/libosmocoding.la diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a00f0d..6c1bd84 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -40,27 +40,6 @@ /* set condition to 1, to show debugging */ #define printd if (0) printf -static int ubits2sbits(ubit_t *ubits, sbit_t *sbits, int count) -{ - int i; - - for (i = 0; i < count; i++) { - if (*ubits == 0x23) { - ubits++; - sbits++; - continue; - } - - if ((*ubits++) & 1) { - *sbits++ = -127; - } else { - *sbits++ = 127; - } - } - - return count; -} - static void test_xcch(uint8_t *l2) { uint8_t result[23]; @@ -73,21 +52,17 @@ gsm0503_xcch_encode(bursts_u, l2); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -130,13 +105,11 @@ gsm0503_rach_encode(bursts_u, &ra, bsic); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 36); + osmo_ubit2sbit(bursts_s, bursts_u, 36); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 36)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 36)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); + printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 36)); /* Destroy some bits */ memset(bursts_s + 6, 0, 8); @@ -165,13 +138,11 @@ gsm0503_sch_encode(bursts_u, info); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 78); + osmo_ubit2sbit(bursts_s, bursts_u, 78); - printd("U-Bits:\n"); - printd("%s\n", osmo_hexdump(bursts_u, 78)); + printd("U-Bits: %s\n", osmo_ubit_dump(bursts_u, 78)); - printd("S-Bits:\n"); - printd("%s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); + printd("S-Bits: %s\n", osmo_hexdump((uint8_t *)bursts_s, 78)); /* Destroy some bits */ memset(bursts_s + 6, 0, 10); @@ -201,33 +172,25 @@ gsm0503_tch_fr_encode(bursts_u, speech, len, 1); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 8); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 8); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 696, 57), - bursts_u[57 + 696], bursts_u[58 + 696]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 696, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 812, 57), - bursts_u[57 + 812], bursts_u[58 + 812]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 812, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 696, 57), bursts_u[57 + 696], bursts_u[58 + 696]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 696, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 812, 57), bursts_u[57 + 812], bursts_u[58 + 812]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 812, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -287,27 +250,21 @@ gsm0503_tch_hr_encode(bursts_u, speech, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 6); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 6); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 464, 57), - bursts_u[57 + 464], bursts_u[58 + 464]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 464, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 580, 57), - bursts_u[57 + 580], bursts_u[58 + 580]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 580, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 464, 57), bursts_u[57 + 464], bursts_u[58 + 464]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 464, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 580, 57), bursts_u[57 + 580], bursts_u[58 + 580]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 580, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), @@ -371,21 +328,17 @@ gsm0503_pdtch_encode(bursts_u, l2, len); /* Prepare soft-bits */ - ubits2sbits(bursts_u, bursts_s, 116 * 4); + osmo_ubit2sbit(bursts_s, bursts_u, 116 * 4); printd("U-Bits:\n"); - printd("%s %02x %02x ", osmo_hexdump(bursts_u, 57), - bursts_u[57], bursts_u[58]); - printd("%s\n", osmo_hexdump(bursts_u + 59, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 116, 57), - bursts_u[57 + 116], bursts_u[58 + 116]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 116, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 232, 57), - bursts_u[57 + 232], bursts_u[58 + 232]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 232, 57)); - printd("%s %02x %02x ", osmo_hexdump(bursts_u + 348, 57), - bursts_u[57 + 348], bursts_u[58 + 348]); - printd("%s\n", osmo_hexdump(bursts_u + 59 + 348, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u, 57), bursts_u[57], bursts_u[58]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 116, 57), bursts_u[57 + 116], bursts_u[58 + 116]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 116, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 232, 57), bursts_u[57 + 232], bursts_u[58 + 232]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 232, 57)); + printd("%s %02x %02x ", osmo_ubit_dump(bursts_u + 348, 57), bursts_u[57 + 348], bursts_u[58 + 348]); + printd("%s\n", osmo_ubit_dump(bursts_u + 59 + 348, 57)); printd("S-Bits:\n"); printd("%s %02x %02x ", osmo_hexdump((uint8_t *)bursts_s, 57), -- To view, visit https://gerrit.osmocom.org/5063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 18:44:54 +0000 Subject: [PATCH] osmo-sgsn[master]: Replace '.' in counter names with ':' Message-ID: Review at https://gerrit.osmocom.org/5077 Replace '.' in counter names with ':' '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Ie7734cc42151581897d220b445984448ceb57aed --- M src/gprs/gprs_sgsn.c 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/77/5077/1 diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 5eff404..768d953 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -65,21 +65,21 @@ LLIST_HEAD(sgsn_pdp_ctxts); static const struct rate_ctr_desc mmctx_ctr_description[] = { - { "sign.packets.in", "Signalling Messages ( In)" }, - { "sign.packets.out", "Signalling Messages (Out)" }, - { "udata.packets.in", "User Data Messages ( In)" }, - { "udata.packets.out", "User Data Messages (Out)" }, - { "udata.bytes.in", "User Data Bytes ( In)" }, - { "udata.bytes.out", "User Data Bytes (Out)" }, + { "sign:packets:in", "Signalling Messages ( In)" }, + { "sign:packets:out", "Signalling Messages (Out)" }, + { "udata:packets:in", "User Data Messages ( In)" }, + { "udata:packets:out", "User Data Messages (Out)" }, + { "udata:bytes:in", "User Data Bytes ( In)" }, + { "udata:bytes:out", "User Data Bytes (Out)" }, { "pdp_ctx_act", "PDP Context Activations " }, { "suspend", "SUSPEND Count " }, - { "paging.ps", "Paging Packet Switched " }, - { "paging.cs", "Paging Circuit Switched " }, + { "paging:ps", "Paging Packet Switched " }, + { "paging:cs", "Paging Circuit Switched " }, { "ra_update", "Routing Area Update " }, }; static const struct rate_ctr_group_desc mmctx_ctrg_desc = { - .group_name_prefix = "sgsn.mmctx", + .group_name_prefix = "sgsn:mmctx", .group_description = "SGSN MM Context Statistics", .num_ctr = ARRAY_SIZE(mmctx_ctr_description), .ctr_desc = mmctx_ctr_description, @@ -87,14 +87,14 @@ }; static const struct rate_ctr_desc pdpctx_ctr_description[] = { - { "udata.packets.in", "User Data Messages ( In)" }, - { "udata.packets.out", "User Data Messages (Out)" }, - { "udata.bytes.in", "User Data Bytes ( In)" }, - { "udata.bytes.out", "User Data Bytes (Out)" }, + { "udata:packets:in", "User Data Messages ( In)" }, + { "udata:packets:out", "User Data Messages (Out)" }, + { "udata:bytes:in", "User Data Bytes ( In)" }, + { "udata:bytes:out", "User Data Bytes (Out)" }, }; static const struct rate_ctr_group_desc pdpctx_ctrg_desc = { - .group_name_prefix = "sgsn.pdpctx", + .group_name_prefix = "sgsn:pdpctx", .group_description = "SGSN PDP Context Statistics", .num_ctr = ARRAY_SIZE(pdpctx_ctr_description), .ctr_desc = pdpctx_ctr_description, -- To view, visit https://gerrit.osmocom.org/5077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7734cc42151581897d220b445984448ceb57aed Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:49:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:49:59 +0000 Subject: [PATCH] libosmocore[master]: coding test: use OSMO_ASSERT Message-ID: Review at https://gerrit.osmocom.org/5078 coding test: use OSMO_ASSERT Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe --- M tests/coding/coding_test.c 1 file changed, 10 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/5078/1 diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 17a95f4..c3c2da0 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -30,13 +30,6 @@ #include -#define ASSERT_TRUE(rc) \ - if (!(rc)) { \ - printf("Assert failed in %s:%d.\n", \ - __FILE__, __LINE__); \ - abort(); \ - } - #define DUMP_U_AT(b, x, u) do { \ printf("%s %02x %02x ", osmo_ubit_dump(b + x, 57), b[57 + x], b[58 + x]); \ printf("%s\n", osmo_ubit_dump(b + 59 + x, 57)); \ @@ -103,8 +96,8 @@ printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); - ASSERT_TRUE(n_bits_total == 456); - ASSERT_TRUE(!memcmp(l2, result, 23)); + OSMO_ASSERT(n_bits_total == 456); + OSMO_ASSERT(!memcmp(l2, result, 23)); printf("\n"); } @@ -133,7 +126,7 @@ gsm0503_rach_decode(&result, bursts_s, bsic); printf("Decoded: %02x\n", result); - ASSERT_TRUE(ra == result); + OSMO_ASSERT(ra == result); printf("\n"); } @@ -196,7 +189,7 @@ gsm0503_sch_decode(result, bursts_s); printf("Decoded: %s\n", osmo_hexdump(result, 4)); - ASSERT_TRUE(!memcmp(info, result, 4)); + OSMO_ASSERT(!memcmp(info, result, 4)); printf("\n"); } @@ -232,8 +225,8 @@ printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(speech, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(speech, result, len)); printf("\n"); } @@ -269,8 +262,8 @@ printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(speech, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(speech, result, len)); printf("\n"); } @@ -313,8 +306,8 @@ printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(l2, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(l2, result, len)); printf("\n"); } -- To view, visit https://gerrit.osmocom.org/5078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Nov 28 18:55:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 18:55:56 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 10: I'd like to use similar API as well. Which way is better: 1) change gsm0503_rach_encode() to match gsm0503_rach_ext_encode()? 2) change gsm0503_rach_ext_encode() to match gsm0503_rach_encode()? 3) add wrapper with (bool is_11bit) parameter? I don't know of code using gsm0503_rach_encode() and api with pointer just to pass single byte looks gnarly so I'd rather go for 1 or 3. -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 19:08:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 28 Nov 2017 19:08:49 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 10: > May we use OSMO_ASSERT here? We may but we shouldn't: assert tells us nothing except that the test has somehow failed. By printing we immediately got useful logs which saves time in case of using jenkins check via gerrit or if there're multiple failures, which would be masked by 1st error triggering assert. -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 19:09:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 Nov 2017 19:09:00 +0000 Subject: [PATCH] osmo-sgsn[master]: tests: Fix selection of python version Message-ID: Review at https://gerrit.osmocom.org/5079 tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f --- M configure.ac M tests/Makefile.am M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/79/5079/1 diff --git a/configure.ac b/configure.ac index 9a6f963..a1dbce5 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then - AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 10bb916..3cd8bff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -56,8 +56,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index 7c64f48..e9d73ff --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py old mode 100644 new mode 100755 index 9b8c560..eeb151c --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/5079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Nov 28 19:12:07 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 19:12:07 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 10: > 2) change gsm0503_rach_ext_encode() to match gsm0503_rach_encode()? The second way is the safest. Personally, I prefer it. > I don't know of code using gsm0503_rach_encode() At least it's used in my project - OsmocomBB/trxcon. -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Nov 28 19:13:30 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 Nov 2017 19:13:30 +0000 Subject: libosmocore[master]: coding test: use OSMO_ASSERT In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 03:48:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 03:48:15 +0000 Subject: [PATCH] libosmocore[master]: logging: Extend the LOGPSRC macro to put cont in it as well Message-ID: Review at https://gerrit.osmocom.org/5080 logging: Extend the LOGPSRC macro to put cont in it as well For the lua console printing I need to print several values with continuation but also specify the filename. Add a "C" for continue and forward arguments. Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e --- M include/osmocom/core/logging.h 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/5080/1 diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 86a6977..922cbf6 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -71,12 +71,28 @@ * \param[in] args variable argument list */ #define LOGPSRC(ss, level, caller_file, caller_line, fmt, args...) \ + LOGPSRCC(ss, level, caller_file, caller_line, 0, fmt, ##args) + +/*! Log through the Osmocom logging framework with explicit source. + * If caller_file is passed as NULL, __BASE_FILE__ and __LINE__ are used + * instead of caller_file and caller_line (so that this macro here defines + * both cases in the same place, and to catch cases where callers fail to pass + * a non-null filename string). + * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) + * \param[in] level logging level (e.g. \ref LOGL_NOTICE) + * \param[in] caller_file caller's source file string (e.g. __BASE_FILE__) + * \param[in] caller_line caller's source line nr (e.g. __LINE__) + * \param[in] cont continuation (1) or new line (0) + * \param[in] fmt format string + * \param[in] args variable argument list + */ +#define LOGPSRCC(ss, level, caller_file, caller_line, cont, fmt, args...) \ do { \ if (log_check_level(ss, level)) {\ if (caller_file) \ - logp2(ss, level, caller_file, caller_line, 0, fmt, ##args); \ + logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ else \ - logp2(ss, level, __BASE_FILE__, __LINE__, 0, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ }\ } while(0) -- To view, visit https://gerrit.osmocom.org/5080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:19:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 11:19:46 +0000 Subject: [PATCH] osmo-bsc[master]: OML: consider administrative state when reporting Message-ID: Review at https://gerrit.osmocom.org/5081 OML: consider administrative state when reporting Report state as degraded if BTS or any of its TRX are administratively locked. Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Related: OS#2486 --- M include/osmocom/bsc/abis_nm.h M src/libbsc/abis_nm.c M src/libbsc/bts_ipaccess_nanobts.c 3 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/5081/1 diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index e25cb4f..b0cb166 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -162,7 +162,7 @@ const char *ipacc_testres_name(uint8_t res); /* Functions calling into other code parts */ -bool all_trx_rsl_connected(const struct gsm_bts *bts); +bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts); int nm_is_running(struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index b7391a1..295cefd 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -683,13 +683,18 @@ return 0; } -bool all_trx_rsl_connected(const struct gsm_bts *bts) +bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts) { const struct gsm_bts_trx *trx; + if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) + return false; } return true; diff --git a/src/libbsc/bts_ipaccess_nanobts.c b/src/libbsc/bts_ipaccess_nanobts.c index 9e273f5..03bb708 100644 --- a/src/libbsc/bts_ipaccess_nanobts.c +++ b/src/libbsc/bts_ipaccess_nanobts.c @@ -50,7 +50,7 @@ static char *get_oml_status(const struct gsm_bts *bts) { if (bts->oml_link) - return all_trx_rsl_connected(bts) ? "connected" : "degraded"; + return all_trx_rsl_connected_unlocked(bts) ? "connected" : "degraded"; return "disconnected"; } -- To view, visit https://gerrit.osmocom.org/5081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:27:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 11:27:25 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC Message-ID: Review at https://gerrit.osmocom.org/5082 cosmetic: remove obsolete ROLE_BSC It's leftover from the time when gsm_data_shared.* was actually shared with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it entirely and make working with gsm_data_shared.h slightly easier. Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data_shared.c 3 files changed, 0 insertions(+), 117 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/82/5082/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b9427b8..75109e3 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -218,7 +218,6 @@ }; -#define ROLE_BSC #include "gsm_data_shared.h" diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 04669e2..37f7976 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -19,11 +19,6 @@ #include #include - -#ifndef ROLE_BSC -#include -#endif - #include #include @@ -251,7 +246,6 @@ uint8_t rtp_payload; uint8_t rtp_payload2; uint8_t speech_mode; -#ifdef ROLE_BSC struct rtp_socket *rtp_socket; /* info we need to postpone the AoIP @@ -263,16 +257,12 @@ uint8_t speech_mode; bool valid; } ass_compl; -#else - struct osmo_rtp_socket *rtp_socket; -#endif } abis_ip; uint8_t rqd_ta; char *name; -#ifdef ROLE_BSC struct osmo_timer_list T3101; struct osmo_timer_list T3109; struct osmo_timer_list T3111; @@ -300,88 +290,6 @@ struct gsm48_req_ref *rqd_ref; uint8_t rqd_ta; } dyn; -#else - /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23. - * Currently we don't share these headers so this is a magic number. */ - struct llist_head sapi_cmds; - uint8_t sapis_dl[23]; - uint8_t sapis_ul[23]; - struct lapdm_channel lapdm_ch; - struct llist_head dl_tch_queue; - struct { - /* bitmask of all SI that are present/valid in si_buf */ - uint32_t valid; - uint32_t last; - /* buffers where we put the pre-computed SI: - SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */ - sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM]; - } si; - struct { - uint8_t flags; - /* RSL measurment result number, 0 at lchan_act */ - uint8_t res_nr; - /* current Tx power level of the BTS */ - uint8_t bts_tx_pwr; - /* number of measurements stored in array below */ - uint8_t num_ul_meas; - struct bts_ul_meas uplink[MAX_NUM_UL_MEAS]; - /* last L1 header from the MS */ - uint8_t l1_info[2]; - struct gsm_meas_rep_unidir ul_res; - } meas; - struct { - struct amr_multirate_conf amr_mr; - struct { - struct osmo_fsm_inst *dl_amr_fsm; - /* TCH cache */ - uint8_t cache[20]; - /* FACCH cache */ - uint8_t facch[GSM_MACBLOCK_LEN]; - uint8_t len; - uint32_t fn; - bool is_update; - /* set for each SID frame to detect talkspurt for codecs - without explicit ONSET event */ - bool ul_sid; - /* indicates if DTXd was active during DL measurement - period */ - bool dl_active; - } dtx; - uint8_t last_cmr; - uint32_t last_fn; - } tch; - - /* 3GPP TS 48.058 ? 9.3.37: [0; 255] ok, -1 means invalid*/ - int16_t ms_t_offs; - /* 3GPP TS 45.010 ? 1.2 round trip propagation delay (in symbols) or -1 */ - int16_t p_offs; - - /* BTS-side ciphering state (rx only, bi-directional, ...) */ - uint8_t ciph_state; - uint8_t ciph_ns; - uint8_t loopback; - struct { - uint8_t active; - uint8_t ref; - /* T3105: PHYS INF retransmission */ - struct osmo_timer_list t3105; - /* counts up to Ny1 */ - unsigned int phys_info_count; - } ho; - /* S counter for link loss */ - int s; - /* Kind of the release/activation. E.g. RSL or PCU */ - int rel_act_kind; - /* RTP header Marker bit to indicate beginning of speech after pause */ - bool rtp_tx_marker; - /* power handling */ - struct { - uint8_t current; - uint8_t fixed; - } ms_power_ctrl; - - struct msgb *pending_rel_ind_msg; -#endif }; enum { @@ -464,15 +372,6 @@ uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ - -#ifndef ROLE_BSC - struct trx_power_params power_params; - int ms_power_control; - - struct { - void *l1h; - } role_bts; -#endif union { struct { @@ -847,7 +746,6 @@ int force_combined_si; int bcch_change_mark; -#ifdef ROLE_BSC /* Abis NM queue */ struct llist_head abis_queue; int abis_nm_pend; @@ -909,7 +807,6 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; -#endif /* ROLE_BSC */ void *role; }; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 84a71cb..b001562 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -271,9 +271,6 @@ name = gsm_lchan_name_compute(lchan); lchan->name = talloc_strdup(trx, name); -#ifndef ROLE_BSC - INIT_LLIST_HEAD(&lchan->sapi_cmds); -#endif } } @@ -679,17 +676,7 @@ break; default: case GSM_PCHAN_CCCH: -#ifdef ROLE_BSC OSMO_ASSERT(lchan_nr == 0); -#else - /* - * FIXME: On octphy and litecell, we hit above assertion (see - * Max's comment at https://gerrit.osmocom.org/589 ); disabled - * for BTS until this is clarified; remove the #ifdef when it - * is fixed. - */ -#warning "fix caller that passes lchan_nr != 0" -#endif cbits = 0x10; break; } -- To view, visit https://gerrit.osmocom.org/5082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:41:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:41:58 +0000 Subject: osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:42:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:42:30 +0000 Subject: osmo-bsc[master]: OML: consider administrative state when reporting In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:42:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:42:50 +0000 Subject: libosmocore[master]: logging: Extend the LOGPSRC macro to put cont in it as well In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:43:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:43:06 +0000 Subject: osmo-sgsn[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:43:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:43:17 +0000 Subject: osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie7734cc42151581897d220b445984448ceb57aed Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:43:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 11:43:21 +0000 Subject: [MERGED] osmo-bsc[master]: OML: consider administrative state when reporting In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: OML: consider administrative state when reporting ...................................................................... OML: consider administrative state when reporting Report state as degraded if BTS or any of its TRX are administratively locked. Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Related: OS#2486 --- M include/osmocom/bsc/abis_nm.h M src/libbsc/abis_nm.c M src/libbsc/bts_ipaccess_nanobts.c 3 files changed, 8 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index e25cb4f..b0cb166 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -162,7 +162,7 @@ const char *ipacc_testres_name(uint8_t res); /* Functions calling into other code parts */ -bool all_trx_rsl_connected(const struct gsm_bts *bts); +bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts); int nm_is_running(struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index b7391a1..295cefd 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -683,13 +683,18 @@ return 0; } -bool all_trx_rsl_connected(const struct gsm_bts *bts) +bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts) { const struct gsm_bts_trx *trx; + if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) + return false; } return true; diff --git a/src/libbsc/bts_ipaccess_nanobts.c b/src/libbsc/bts_ipaccess_nanobts.c index 9e273f5..03bb708 100644 --- a/src/libbsc/bts_ipaccess_nanobts.c +++ b/src/libbsc/bts_ipaccess_nanobts.c @@ -50,7 +50,7 @@ static char *get_oml_status(const struct gsm_bts *bts) { if (bts->oml_link) - return all_trx_rsl_connected(bts) ? "connected" : "degraded"; + return all_trx_rsl_connected_unlocked(bts) ? "connected" : "degraded"; return "disconnected"; } -- To view, visit https://gerrit.osmocom.org/5081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:43:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 11:43:21 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: remove obsolete ROLE_BSC In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: cosmetic: remove obsolete ROLE_BSC ...................................................................... cosmetic: remove obsolete ROLE_BSC It's leftover from the time when gsm_data_shared.* was actually shared with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it entirely and make working with gsm_data_shared.h slightly easier. Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data_shared.c 3 files changed, 0 insertions(+), 117 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index b9427b8..75109e3 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -218,7 +218,6 @@ }; -#define ROLE_BSC #include "gsm_data_shared.h" diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 04669e2..37f7976 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -19,11 +19,6 @@ #include #include - -#ifndef ROLE_BSC -#include -#endif - #include #include @@ -251,7 +246,6 @@ uint8_t rtp_payload; uint8_t rtp_payload2; uint8_t speech_mode; -#ifdef ROLE_BSC struct rtp_socket *rtp_socket; /* info we need to postpone the AoIP @@ -263,16 +257,12 @@ uint8_t speech_mode; bool valid; } ass_compl; -#else - struct osmo_rtp_socket *rtp_socket; -#endif } abis_ip; uint8_t rqd_ta; char *name; -#ifdef ROLE_BSC struct osmo_timer_list T3101; struct osmo_timer_list T3109; struct osmo_timer_list T3111; @@ -300,88 +290,6 @@ struct gsm48_req_ref *rqd_ref; uint8_t rqd_ta; } dyn; -#else - /* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23. - * Currently we don't share these headers so this is a magic number. */ - struct llist_head sapi_cmds; - uint8_t sapis_dl[23]; - uint8_t sapis_ul[23]; - struct lapdm_channel lapdm_ch; - struct llist_head dl_tch_queue; - struct { - /* bitmask of all SI that are present/valid in si_buf */ - uint32_t valid; - uint32_t last; - /* buffers where we put the pre-computed SI: - SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */ - sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM]; - } si; - struct { - uint8_t flags; - /* RSL measurment result number, 0 at lchan_act */ - uint8_t res_nr; - /* current Tx power level of the BTS */ - uint8_t bts_tx_pwr; - /* number of measurements stored in array below */ - uint8_t num_ul_meas; - struct bts_ul_meas uplink[MAX_NUM_UL_MEAS]; - /* last L1 header from the MS */ - uint8_t l1_info[2]; - struct gsm_meas_rep_unidir ul_res; - } meas; - struct { - struct amr_multirate_conf amr_mr; - struct { - struct osmo_fsm_inst *dl_amr_fsm; - /* TCH cache */ - uint8_t cache[20]; - /* FACCH cache */ - uint8_t facch[GSM_MACBLOCK_LEN]; - uint8_t len; - uint32_t fn; - bool is_update; - /* set for each SID frame to detect talkspurt for codecs - without explicit ONSET event */ - bool ul_sid; - /* indicates if DTXd was active during DL measurement - period */ - bool dl_active; - } dtx; - uint8_t last_cmr; - uint32_t last_fn; - } tch; - - /* 3GPP TS 48.058 ? 9.3.37: [0; 255] ok, -1 means invalid*/ - int16_t ms_t_offs; - /* 3GPP TS 45.010 ? 1.2 round trip propagation delay (in symbols) or -1 */ - int16_t p_offs; - - /* BTS-side ciphering state (rx only, bi-directional, ...) */ - uint8_t ciph_state; - uint8_t ciph_ns; - uint8_t loopback; - struct { - uint8_t active; - uint8_t ref; - /* T3105: PHYS INF retransmission */ - struct osmo_timer_list t3105; - /* counts up to Ny1 */ - unsigned int phys_info_count; - } ho; - /* S counter for link loss */ - int s; - /* Kind of the release/activation. E.g. RSL or PCU */ - int rel_act_kind; - /* RTP header Marker bit to indicate beginning of speech after pause */ - bool rtp_tx_marker; - /* power handling */ - struct { - uint8_t current; - uint8_t fixed; - } ms_power_ctrl; - - struct msgb *pending_rel_ind_msg; -#endif }; enum { @@ -464,15 +372,6 @@ uint16_t arfcn; int nominal_power; /* in dBm */ unsigned int max_power_red; /* in actual dB */ - -#ifndef ROLE_BSC - struct trx_power_params power_params; - int ms_power_control; - - struct { - void *l1h; - } role_bts; -#endif union { struct { @@ -847,7 +746,6 @@ int force_combined_si; int bcch_change_mark; -#ifdef ROLE_BSC /* Abis NM queue */ struct llist_head abis_queue; int abis_nm_pend; @@ -909,7 +807,6 @@ char *pcu_sock_path; struct pcu_sock_state *pcu_state; -#endif /* ROLE_BSC */ void *role; }; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 84a71cb..b001562 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -271,9 +271,6 @@ name = gsm_lchan_name_compute(lchan); lchan->name = talloc_strdup(trx, name); -#ifndef ROLE_BSC - INIT_LLIST_HEAD(&lchan->sapi_cmds); -#endif } } @@ -679,17 +676,7 @@ break; default: case GSM_PCHAN_CCCH: -#ifdef ROLE_BSC OSMO_ASSERT(lchan_nr == 0); -#else - /* - * FIXME: On octphy and litecell, we hit above assertion (see - * Max's comment at https://gerrit.osmocom.org/589 ); disabled - * for BTS until this is clarified; remove the #ifdef when it - * is fixed. - */ -#warning "fix caller that passes lchan_nr != 0" -#endif cbits = 0x10; break; } -- To view, visit https://gerrit.osmocom.org/5082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:44:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:44:32 +0000 Subject: osmo-ci[master]: jenkins docker: remove smalltalk things In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 we do have various osmo-st- related jenkins jobs, I presume you have verified that none of them uses docker images to do build testing? Holger probably knows in detail. -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:44:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:44:58 +0000 Subject: osmo-bsc[master]: mgcp: use hexadecimal digits in endpoint names In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:45:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:45:25 +0000 Subject: osmo-bsc[master]: mgcp: do not fail silently on snprintf() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:46:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:46:11 +0000 Subject: osmo-bsc[master]: cosmetic: remove duplicate logging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:46:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:46:35 +0000 Subject: osmo-bsc[master]: cosmetic: do not cast void pointer In-Reply-To: References: Message-ID: Patch Set 3: I'm not sure we should spend time on this kind of things. It's not bad style to have the typecast... -- To view, visit https://gerrit.osmocom.org/4984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:47:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:47:36 +0000 Subject: osmo-bsc[master]: mgcp: cosmetic fixups In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:48:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:48:05 +0000 Subject: osmo-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:48:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:48:09 +0000 Subject: [MERGED] osmo-ggsn[master]: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg ...................................................................... examples: Add secondary ipv6 google DNS to osmo-ggsn.cfg Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 --- M doc/examples/osmo-ggsn.cfg 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-ggsn.cfg b/doc/examples/osmo-ggsn.cfg index 763e561..8317684 100644 --- a/doc/examples/osmo-ggsn.cfg +++ b/doc/examples/osmo-ggsn.cfg @@ -53,6 +53,7 @@ type-support v6 ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56 ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56 no shutdown apn inet46 @@ -65,6 +66,7 @@ ip ifconfig 176.16.46.0/24 ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56 ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56 no shutdown default-apn internet -- To view, visit https://gerrit.osmocom.org/5059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5efbd1848a7974cb8dc614c4567de2658b9a7269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:48:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:48:46 +0000 Subject: osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:48:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:48:49 +0000 Subject: [MERGED] osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: auth: remove obsolete VTY commands ...................................................................... auth: remove obsolete VTY commands Authentication is no longer done in the BSC, the variables that set the authentication policy and the IMSI regex have no longer any effect. Remove auth policy and authorized-regexp Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c 7 files changed, 0 insertions(+), 64 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 69f8ab7..60338d2 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -8,8 +8,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - auth policy closed - authorized-regexp .* location updating reject cause 13 encryption a5 0 authentication optional diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 59e7090..f9f5ba6 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -7,8 +7,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - auth policy closed - authorized-regexp .* location updating reject cause 13 encryption a5 0 authentication optional diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 75109e3..857dd4f 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -368,9 +368,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm_auth_policy auth_policy; - regex_t authorized_regexp; - char *authorized_reg_str; enum gsm48_reject_value reject_cause; int a5_encryption; bool authentication_required; diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index fa8c477..1874200 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -477,14 +477,6 @@ return -EINVAL; } - if (bts->network->auth_policy == GSM_AUTH_POLICY_ACCEPT_ALL && - !bts->si_common.rach_control.cell_bar) - LOGP(DNM, LOGL_ERROR, "\nWARNING: You are running an 'accept-all' " - "network on a BTS that is not barred. This " - "configuration is likely to interfere with production " - "GSM networks and should only be used in a RF " - "shielded environment such as a faraday cage!\n\n"); - /* Control Channel Description is set from vty/config */ /* T3212 is set from vty/config */ diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 71c2cef..cd18e3a 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -171,10 +171,6 @@ net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s", - gsm_auth_policy_name(net->auth_policy)); - if (net->authorized_reg_str) - vty_out(vty, ", authorized regexp: %s", net->authorized_reg_str); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); @@ -803,9 +799,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); - if (gsmnet->authorized_reg_str) - vty_out(vty, " authorized-regexp %s%s", gsmnet->authorized_reg_str, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 16d51a1..b3037c6 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -44,14 +44,8 @@ { struct gsm_network *net; - const char *default_regexp = ".*"; - net = talloc_zero(ctx, struct gsm_network); if (!net) - return NULL; - - if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, - &default_regexp) != 0) return NULL; net->country_code = country_code; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 040aa15..51f16c4 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -103,40 +103,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_auth_policy, - cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|regexp|token)", - "Authentication (not cryptographic)\n" - "Set the GSM network authentication policy\n" - "Require the MS to be activated in HLR\n" - "Accept all MS, whether in HLR or not\n" - "Use regular expression for IMSI authorization decision\n" - "Use SMS-token based authentication\n") -{ - enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->auth_policy = policy; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, - "authorized-regexp REGEXP", - "Set regexp for IMSI which will be used for authorization decision\n" - "Regular expression, IMSIs matching it are allowed to use the network\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, - &gsmnet->authorized_reg_str, argc, argv) != 0) { - vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", - argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - - return CMD_SUCCESS; -} - DEFUN(cfg_net_reject_cause, cfg_net_reject_cause_cmd, "location updating reject cause <2-111>", @@ -329,8 +295,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); - install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_authentication_cmd); -- To view, visit https://gerrit.osmocom.org/5069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:24 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/4980/5/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 731: .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), the halt state when entered immediately terminates. Yet we are accepting inbound events like DLCX_ALL_RESP only in that state. How can that be? -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:41 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGsmTester: Put several permission categories under cat U... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGsmTester: Put several permission categories under cat User Permission ...................................................................... OsmoGsmTester: Put several permission categories under cat User Permission Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39 --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 146dae1..d19f909 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -444,7 +444,7 @@ your terminal is in turn is picked up in the tcpdump trace, and so forth. When testing 'tcpdump' access, make sure to have proper filter expressions in place. -==== Allow Core Files +===== Allow Core Files In case a binary run for the test crashes, a core file of the crash should be written. This requires a limit rule. Create a file with the required rule: @@ -464,7 +464,7 @@ sysctl -w kernel.core_pattern=core ---- -==== Allow Realtime Priority +===== Allow Realtime Priority Certain binaries should be run with real-time priority, like 'osmo-bts-trx'. Add this permission on the main unit: @@ -477,7 +477,7 @@ Re-login the user to make these changes take effect. [[user_config_uhd]] -==== UHD +===== UHD Grant permission to use the UHD driver to run USRP devices for osmo-bts-trx, by adding the jenkins user to the 'usrp' group: @@ -486,7 +486,7 @@ gpasswd -a jenkins usrp ---- -==== Allow CAP_NET_RAW capability +===== Allow CAP_NET_RAW capability Certain binaries require 'CAP_NET_RAW' to be set, like 'osmo-bts-octphy' as it uses a 'AF_PACKET' socket. -- To view, visit https://gerrit.osmocom.org/4670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9f846af0311d768c5dd6f9da572c8f6482f4d39 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:41 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add suites_dir section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Add suites_dir section ...................................................................... OsmoGSMTester: Add suites_dir section Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424 --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index a56c4ad..def9843 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,16 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[suites_dir]] +==== 'suites_dir' + +Suites contain a set of tests which are designed to be run together to test a +set of features given a specific set of resources. As a result, resources are +allocated per suite and not per test. + +Tests for a given suite are located in the form of '.py' python scripts in the +same directory where the 'suite.conf' lays. + [[scenarios_dir]] ==== 'scenarios_dir' -- To view, visit https://gerrit.osmocom.org/4668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:41 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add state_dir section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Add state_dir section ...................................................................... OsmoGSMTester: Add state_dir section Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index def9843..7e250e0 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -54,10 +54,32 @@ scenarios_dir: './scenarios' ---- +[[state_dir]] +==== 'state_dir' + +It contains global or system-wide state for osmo-gsm-tester. In a typical state +dir you can find the following files: + +'last_used_msisdn.state':: + Contains last used msisdn number, which is automatically increased every + time osmo-gsm-tester needs to assign a new subscriber in a test. +'lock':: + Lock file used to implement a mutual exclusion zone around the + 'reserved_resources.state' file. +'reserved_resources.state':: + File containing a set of reserved resources by any number of + osmo-gsm-tester instances. Each osmo-gsm-tester instance is responsible + to clear its resources from the list once it is done using them and are + no longer reserved. + If you would like to set up several separate configurations (not typical), note that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +This way, several concurrent users of osmo-gsm-tester (ie. several +osmo-gsm-tester processes running in parallel) can run without interfering with +each other (e.g. using same ARFCN, same IP or same ofono modem path). + [[suites_dir]] ==== 'suites_dir' -- To view, visit https://gerrit.osmocom.org/4669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie12e3933747a4e698de59ff9ac57281e9f261d3d Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:41 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Add scenarios_dir section ...................................................................... OsmoGSMTester: Add scenarios_dir section It explains how scenario combination works Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f --- M OsmoGSMTester/chapters/config.adoc 1 file changed, 55 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index 3f8cb44..a56c4ad 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -58,6 +58,61 @@ that the 'state_dir' is used to reserve resources, which only works when all configurations that share resources also use the same 'state_dir'. +[[scenarios_dir]] +==== 'scenarios_dir' + +This dir contains scenario configuration files. + +Scenarios define constraints to serve the resource requests of a 'suite.conf', +to select specific resources from the general resource pool specified in 'resources.conf'. + +All 'times' attributes are expanded before matching. For example, if a 'suite.conf' +requests two BTS, we may enforce that both BTS should be of type 'osmo-bts-sysmo' in +these ways: + +---- +resources: + bts: + - type: osmo-bts-sysmo + - type: osmo-bts-sysmo +---- + +or alternatively, + +---- +resources: + bts: + - times: 2 + type: osmo-bts-sysmo +---- + +If only one resource is specified in the scenario, then the resource allocator +assumes the restriction is to be applied to the first resource and that remaining +resources have no restrictions to be taken into consideration. + +To apply restrictions only on the second resource, the first element can be left +emtpy, like: + +---- +resources: + bts: + - {} + - type: osmo-bts-sysmo +---- + +On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any number of +such scenario configurations can be combined in the form: + +---- +:[+[+...]] +---- + +e.g. + +---- +my_suite:sysmo+tch_f+amr +---- + [[resources_conf]] === 'resources.conf' -- To view, visit https://gerrit.osmocom.org/4667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:54:41 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: Update import test->testenv In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGSMTester: Update import test->testenv ...................................................................... OsmoGSMTester: Update import test->testenv Latest changes in osmo-gsm-tester require this import change. Depends on: osmo-gsm-tester I520bd046cb09042b5567d967f951f050e4e02e85 Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a --- M OsmoGSMTester/chapters/intro.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 55f1a5e..14daba4 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -161,7 +161,7 @@ ---- #!/usr/bin/env python3 -from osmo_gsm_tester.test import * +from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() -- To view, visit https://gerrit.osmocom.org/4903 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f7f7d0353014b7ef8a0c5a7707c91b2613be79a Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:04 +0000 Subject: osmo-bsc[master]: cosmetic: bsc_vty: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7089062285c40ec11af479c98b43d1d407397c82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:16 +0000 Subject: osmo-bsc[master]: cosmetic: bsc_vty: Document bvci reserved values In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:18 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: bsc_vty: Document bvci reserved values In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: bsc_vty: Document bvci reserved values ...................................................................... cosmetic: bsc_vty: Document bvci reserved values Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a --- M src/libbsc/bsc_vty.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3f75ac0..c5dedb3 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -2377,6 +2377,7 @@ "GPRS BSSGP VC Identifier\n" "GPRS BSSGP VC Identifier") { + /* ETSI TS 101 343: values 0 and 1 are reserved for signalling and PTM */ struct gsm_bts *bts = vty->index; if (bts->gprs.mode == BTS_GPRS_NONE) { -- To view, visit https://gerrit.osmocom.org/5065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:18 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: bsc_vty: Fix trailing whitespace In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: bsc_vty: Fix trailing whitespace ...................................................................... cosmetic: bsc_vty: Fix trailing whitespace Change-Id: I7089062285c40ec11af479c98b43d1d407397c82 --- M src/libbsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index cd18e3a..3f75ac0 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -605,7 +605,7 @@ else vty_out(vty, " radio-link-timeout %d%s", gsm_bts_get_radio_link_timeout(bts), VTY_NEWLINE); - + vty_out(vty, " channel allocator %s%s", bts->chan_alloc_reverse ? "descending" : "ascending", VTY_NEWLINE); @@ -1440,7 +1440,7 @@ } bts = gsm_bts_num(net, bts_nr); bts_paging_dump_vty(vty, bts); - + return CMD_SUCCESS; } for (bts_nr = 0; bts_nr < net->num_bts; bts_nr++) { -- To view, visit https://gerrit.osmocom.org/5064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7089062285c40ec11af479c98b43d1d407397c82 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:31 +0000 Subject: [MERGED] osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Replace '.' in counter names with ':' ...................................................................... Replace '.' in counter names with ':' '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Ie7734cc42151581897d220b445984448ceb57aed --- M src/gprs/gprs_sgsn.c 1 file changed, 14 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 5eff404..768d953 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -65,21 +65,21 @@ LLIST_HEAD(sgsn_pdp_ctxts); static const struct rate_ctr_desc mmctx_ctr_description[] = { - { "sign.packets.in", "Signalling Messages ( In)" }, - { "sign.packets.out", "Signalling Messages (Out)" }, - { "udata.packets.in", "User Data Messages ( In)" }, - { "udata.packets.out", "User Data Messages (Out)" }, - { "udata.bytes.in", "User Data Bytes ( In)" }, - { "udata.bytes.out", "User Data Bytes (Out)" }, + { "sign:packets:in", "Signalling Messages ( In)" }, + { "sign:packets:out", "Signalling Messages (Out)" }, + { "udata:packets:in", "User Data Messages ( In)" }, + { "udata:packets:out", "User Data Messages (Out)" }, + { "udata:bytes:in", "User Data Bytes ( In)" }, + { "udata:bytes:out", "User Data Bytes (Out)" }, { "pdp_ctx_act", "PDP Context Activations " }, { "suspend", "SUSPEND Count " }, - { "paging.ps", "Paging Packet Switched " }, - { "paging.cs", "Paging Circuit Switched " }, + { "paging:ps", "Paging Packet Switched " }, + { "paging:cs", "Paging Circuit Switched " }, { "ra_update", "Routing Area Update " }, }; static const struct rate_ctr_group_desc mmctx_ctrg_desc = { - .group_name_prefix = "sgsn.mmctx", + .group_name_prefix = "sgsn:mmctx", .group_description = "SGSN MM Context Statistics", .num_ctr = ARRAY_SIZE(mmctx_ctr_description), .ctr_desc = mmctx_ctr_description, @@ -87,14 +87,14 @@ }; static const struct rate_ctr_desc pdpctx_ctr_description[] = { - { "udata.packets.in", "User Data Messages ( In)" }, - { "udata.packets.out", "User Data Messages (Out)" }, - { "udata.bytes.in", "User Data Bytes ( In)" }, - { "udata.bytes.out", "User Data Bytes (Out)" }, + { "udata:packets:in", "User Data Messages ( In)" }, + { "udata:packets:out", "User Data Messages (Out)" }, + { "udata:bytes:in", "User Data Bytes ( In)" }, + { "udata:bytes:out", "User Data Bytes (Out)" }, }; static const struct rate_ctr_group_desc pdpctx_ctrg_desc = { - .group_name_prefix = "sgsn.pdpctx", + .group_name_prefix = "sgsn:pdpctx", .group_description = "SGSN PDP Context Statistics", .num_ctr = ARRAY_SIZE(pdpctx_ctr_description), .ctr_desc = pdpctx_ctr_description, -- To view, visit https://gerrit.osmocom.org/5077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7734cc42151581897d220b445984448ceb57aed Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:55:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:55:31 +0000 Subject: [MERGED] osmo-sgsn[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: tests: Fix selection of python version ...................................................................... tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f --- M configure.ac M tests/Makefile.am M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 8 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 9a6f963..a1dbce5 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then - AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 10bb916..3cd8bff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -56,8 +56,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count else python-tests: $(BUILT_SOURCES) diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index 7c64f48..e9d73ff --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py old mode 100644 new mode 100755 index 9b8c560..eeb151c --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/5079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:56:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:56:23 +0000 Subject: osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:56:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:56:40 +0000 Subject: osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I284627de02cd140a894445375e9152ff007a71e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 11:59:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 11:59:25 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 7: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4906/7/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 86: OSMO_ASSERT(id); we still have those OSMO_ASSERT in here, despite Neels already mentioning twice that they need to go. Please fix known review comments before re-submitting a patch, as this just multiplies the amount of time needed for code review. -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 7 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:00:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:00:43 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:01:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:01:05 +0000 Subject: osmo-bsc[master]: compiler warnings: drop some unused variables In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:01:17 +0000 Subject: osmo-bsc[master]: compiler warnings: constify in abis_nm.c In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5045 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:01:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:01:39 +0000 Subject: osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_* In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:01:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:01:49 +0000 Subject: osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:02:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:02:06 +0000 Subject: osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:02:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:02:19 +0000 Subject: osmo-bsc[master]: examples: add osmo-bsc-minimal.cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:02:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:02:55 +0000 Subject: osmo-bsc[master]: HO prep: pass gsm_network to gsm_bts_alloc() already In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:06:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:06:34 +0000 Subject: osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5050/2/src/libbsc/handover_vty.c File src/libbsc/handover_vty.c: Line 2: #include no copyright header / disclaimer in new C file -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:06:58 +0000 Subject: osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_* In-Reply-To: References: Message-ID: Patch Set 2: Doh! Missed this one and merged the same thing recently. Sorry about it. -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:08:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:08:02 +0000 Subject: osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:11:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 12:11:10 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 7: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/4905/7/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 63: LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", I think it's 0x prefixed in other patches now? https://gerrit.osmocom.org/#/c/4905/7/tests/mgcp/mgcp_test.c File tests/mgcp/mgcp_test.c: Line 579: OSMO_ASSERT(strlen(conn_id) <= 32); so we receive a response from another network element, which is UDP based and can be spoofed by anyone, and we crash our MGW based on this? "ASSERT" should be used in cases where something has gone wrong so badly that assumptions of the developer have not been fulfilled. Under no circumstances we should ASSERT on any message received from a remote entity on the network. -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 7 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:25:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:25:59 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: tighten function type signatures Message-ID: Review at https://gerrit.osmocom.org/5083 cosmetic: tighten function type signatures * change return type to bool * constify parameters The nm_is_running(), trx_is_usable() and ts_is_usable() always return boolean value and are always used as such anyway. The also do not change their parameters. Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505 --- M include/osmocom/bsc/abis_nm.h M include/osmocom/bsc/chan_alloc.h M src/libbsc/abis_nm.c M src/libbsc/chan_alloc.c 4 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/5083/1 diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index b0cb166..18f87cd 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -163,7 +163,7 @@ /* Functions calling into other code parts */ bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts); -int nm_is_running(struct gsm_nm_state *s); +bool nm_is_running(const struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 7388e14..320fa94 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -49,6 +49,6 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts); void network_chan_load(struct pchan_load *pl, struct gsm_network *net); -int trx_is_usable(struct gsm_bts_trx *trx); +bool trx_is_usable(const struct gsm_bts_trx *trx); #endif /* _CHAN_ALLOC_H */ diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index 295cefd..f1a56a6 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -159,7 +159,7 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb); -int nm_is_running(struct gsm_nm_state *s) { +bool nm_is_running(const struct gsm_nm_state *s) { return (s->operational == NM_OPSTATE_ENABLED) && ( (s->availability == NM_AVSTATE_OK) || (s->availability == 0xff) diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index f0275bc..4b2531e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -36,41 +36,41 @@ #include -static int ts_is_usable(struct gsm_bts_trx_ts *ts) +static bool ts_is_usable(const struct gsm_bts_trx_ts *ts) { /* FIXME: How does this behave for BS-11 ? */ if (is_ipaccess_bts(ts->trx->bts)) { if (!nm_is_running(&ts->mo.nm_state)) - return 0; + return false; } /* If a TCH/F_PDCH TS is busy changing, it is already taken or not * yet available. */ if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) { if (ts->flags & TS_F_PDCH_PENDING_MASK) - return 0; + return false; } /* If a dynamic channel is busy changing, it is already taken or not * yet available. */ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { if (ts->dyn.pchan_is != ts->dyn.pchan_want) - return 0; + return false; } - return 1; + return true; } -int trx_is_usable(struct gsm_bts_trx *trx) +bool trx_is_usable(const struct gsm_bts_trx *trx) { /* FIXME: How does this behave for BS-11 ? */ if (is_ipaccess_bts(trx->bts)) { if (!nm_is_running(&trx->mo.nm_state) || !nm_is_running(&trx->bb_transc.mo.nm_state)) - return 0; + return false; } - return 1; + return true; } static struct gsm_lchan * -- To view, visit https://gerrit.osmocom.org/5083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:25:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:25:59 +0000 Subject: [PATCH] osmo-bsc[master]: Fix tests linking Message-ID: Review at https://gerrit.osmocom.org/5084 Fix tests linking Code in libbsc is using gsm48_create_mm_serv_rej() which is defined in libcommon-cs but neither libbsc itself nor tests using it are actually linked against libcommon-cs. Fix this by using proper include and linking where necessary. Also change build order to make sure libcommon-cs is built before libbsc. Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 --- M src/Makefile.am M src/libbsc/Makefile.am M src/libbsc/gsm_04_08_utils.c M tests/abis/Makefile.am M tests/nanobts_omlattr/Makefile.am 5 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/5084/1 diff --git a/src/Makefile.am b/src/Makefile.am index dd1ad3d..454bf26 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,10 +22,10 @@ # Libraries SUBDIRS = \ libcommon \ + libcommon-cs \ libbsc \ libtrau \ libfilter \ - libcommon-cs \ $(NULL) # Programs diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..fc12d05 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -17,6 +17,8 @@ libbsc.a \ $(NULL) +libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a + libbsc_a_SOURCES = \ abis_nm.c \ abis_nm_vty.c \ diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..451133d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -29,7 +29,7 @@ #include #include - +#include #include #include #include diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 1c5dede..8dc6248 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -27,6 +27,7 @@ abis_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 8b5e116..4b49518 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -26,6 +26,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:25:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:25:59 +0000 Subject: [PATCH] osmo-bsc[master]: OML: check TRX usability when reporting Message-ID: Review at https://gerrit.osmocom.org/5085 OML: check TRX usability when reporting Use already available function to check that TRX is actually usable when reporting OML status via CTRL. Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a Related: OS#2486 --- M src/libbsc/abis_nm.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/5085/1 diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index f1a56a6..c9f03e1 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -46,6 +46,7 @@ #include #include #include +#include #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -693,6 +694,10 @@ llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + + if (!trx_is_usable(trx)) + return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) return false; } -- To view, visit https://gerrit.osmocom.org/5085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 12:30:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 12:30:30 +0000 Subject: osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5047/1/include/osmocom/bsc/handover.h File include/osmocom/bsc/handover.h: Line 3: struct gsm_lchan; Why is this better than including gsm_data_shared.h? -- To view, visit https://gerrit.osmocom.org/5047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:06:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:06:07 +0000 Subject: [PATCH] osmo-sgsn[master]: sgsn_cdr: Split log formatting into a snprintf function Message-ID: Review at https://gerrit.osmocom.org/5086 sgsn_cdr: Split log formatting into a snprintf function This function is going to be re-used to send TRAP messages over CTRL interface. Related: OS#2360 Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d --- M src/gprs/sgsn_cdr.c 1 file changed, 52 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/86/5086/1 diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c index 474d41a..bc051ac 100644 --- a/src/gprs/sgsn_cdr.c +++ b/src/gprs/sgsn_cdr.c @@ -68,12 +68,34 @@ fprintf(cdr_file, "timestamp,imsi,imei,msisdn,cell_id,lac,hlr,event,pdp_duration,ggsn_addr,sgsn_addr,apni,eua_addr,vol_in,vol_out,charging_id\n"); } +static int cdr_snprintf_mm(char *buf, size_t size, const char *ev, + struct sgsn_mm_ctx *mmctx) +{ + struct tm tm; + struct timeval tv; + int ret; + + gettimeofday(&tv, NULL); + gmtime_r(&tv.tv_sec, &tm); + ret = snprintf(buf, size, "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + (int)(tv.tv_usec / 1000), + mmctx->imsi, + mmctx->imei, + mmctx->msisdn, + mmctx->gb.cell_id, + mmctx->ra.lac, + mmctx->hlr, + ev); + return ret; +} + static void cdr_log_mm(struct sgsn_instance *inst, const char *ev, struct sgsn_mm_ctx *mmctx) { FILE *cdr_file; - struct tm tm; - struct timeval tv; + char buf[1024]; if (!inst->cfg.cdr.filename) return; @@ -86,19 +108,8 @@ } maybe_print_header(cdr_file); - gettimeofday(&tv, NULL); - gmtime_r(&tv.tv_sec, &tm); - fprintf(cdr_file, "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s\n", - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec, - (int)(tv.tv_usec / 1000), - mmctx->imsi, - mmctx->imei, - mmctx->msisdn, - mmctx->gb.cell_id, - mmctx->ra.lac, - mmctx->hlr, - ev); + cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx); + fprintf(cdr_file, "%s\n", buf); fclose(cdr_file); } @@ -124,10 +135,9 @@ } } -static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev, +static int cdr_snprintf_pdp(char *buf, size_t size, const char *ev, struct sgsn_pdp_ctx *pdp) { - FILE *cdr_file; char apni[(pdp->lib ? pdp->lib->apn_use.l : 0) + 1]; char ggsn_addr[INET_ADDRSTRLEN + 1]; char sgsn_addr[INET_ADDRSTRLEN + 1]; @@ -136,9 +146,7 @@ struct timeval tv; time_t duration; struct timespec tp; - - if (!inst->cfg.cdr.filename) - return; + int ret; memset(apni, 0, sizeof(apni)); memset(ggsn_addr, 0, sizeof(ggsn_addr)); @@ -154,15 +162,6 @@ if (pdp->ggsn) inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, sizeof(sgsn_addr)); - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); - clock_gettime(CLOCK_MONOTONIC, &tp); gettimeofday(&tv, NULL); @@ -172,8 +171,8 @@ /* Check the duration of the PDP context */ duration = tp.tv_sec - pdp->cdr_start.tv_sec; - fprintf(cdr_file, - "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 ",%" PRIu64 ",%u\n", + ret = snprintf(buf, size, + "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 ",%" PRIu64 ",%u", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, (int)(tv.tv_usec / 1000), @@ -192,6 +191,28 @@ pdp->cdr_bytes_in, pdp->cdr_bytes_out, pdp->cdr_charging_id); + return ret; +} + +static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev, + struct sgsn_pdp_ctx *pdp) +{ + FILE *cdr_file; + char buf[1024]; + + if (!inst->cfg.cdr.filename) + return; + + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp); + fprintf(cdr_file, "%s\n", buf); fclose(cdr_file); } -- To view, visit https://gerrit.osmocom.org/5086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:06:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:06:08 +0000 Subject: [PATCH] osmo-sgsn[master]: Add vty cmd 'cdr trap' to send CDR through CTRL iface Message-ID: Review at https://gerrit.osmocom.org/5087 Add vty cmd 'cdr trap' to send CDR through CTRL iface Default behavior is to have them disabled, and can be explicitly disabled too by using 'no cdr trap' cmd. Tested with osmo_ctrl.py that messages are send successfully: TRAP 0 cdr-v1 20171129125950222,901700000015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1 Related: OS#2360 Change-Id: I1d144d87effd934d991257a65e19cf046a938907 --- M include/osmocom/sgsn/sgsn.h M src/gprs/sgsn_cdr.c M src/gprs/sgsn_main.c M src/gprs/sgsn_vty.c 4 files changed, 70 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/5087/1 diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 464a64f..7e0b5d4 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -52,6 +52,7 @@ struct sgsn_cdr { char *filename; + bool trap; int interval; }; diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c index bc051ac..55aa664 100644 --- a/src/gprs/sgsn_cdr.c +++ b/src/gprs/sgsn_cdr.c @@ -18,6 +18,8 @@ * */ +#include + #include #include #include @@ -38,6 +40,7 @@ /* TODO...avoid going through a global */ extern struct sgsn_instance *sgsn; +extern struct ctrl_handle *g_ctrlh; /** * The CDR module will generate an entry like: @@ -59,6 +62,11 @@ * CAUSE_FOR_TERM, # CAUSE_FOR_TERM */ +static void send_cdr_trap(char *value) +{ + if (ctrl_cmd_send_trap(g_ctrlh, "cdr-v1", value) < 0) + LOGP(DGPRS, LOGL_ERROR, "Failed to create and send TRAP cdr-v1\n"); +} static void maybe_print_header(FILE *cdr_file) { @@ -97,21 +105,27 @@ FILE *cdr_file; char buf[1024]; - if (!inst->cfg.cdr.filename) + if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap) return; - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx); - fprintf(cdr_file, "%s\n", buf); - fclose(cdr_file); + if (inst->cfg.cdr.trap) + send_cdr_trap(buf); + + if (inst->cfg.cdr.filename) { + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + fprintf(cdr_file, "%s\n", buf); + + fclose(cdr_file); + } } static void extract_eua(struct ul66_t *eua, char *eua_addr) @@ -200,20 +214,26 @@ FILE *cdr_file; char buf[1024]; - if (!inst->cfg.cdr.filename) + if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap) return; - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp); - fprintf(cdr_file, "%s\n", buf); - fclose(cdr_file); + + if (inst->cfg.cdr.trap) + send_cdr_trap(buf); + + if (inst->cfg.cdr.filename) { + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + fprintf(cdr_file, "%s\n", buf); + fclose(cdr_file); + } } static void cdr_pdp_timeout(void *_data) diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index fe4192b..b2a028c 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -76,6 +76,7 @@ #include void *tall_bsc_ctx; +struct ctrl_handle *g_ctrlh; struct gprs_ns_inst *sgsn_nsi; static int daemonize = 0; @@ -367,7 +368,6 @@ int main(int argc, char **argv) { - struct ctrl_handle *ctrl; int rc; #if BUILD_IU struct osmo_sccp_instance *sccp; @@ -454,9 +454,9 @@ /* start control interface after reading config for * ctrl_vty_get_bind_addr() */ - ctrl = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), + g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_SGSN); - if (!ctrl) { + if (!g_ctrlh) { LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); exit(1); } diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index a01de2d..c8dfc43 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -233,6 +233,10 @@ vty_out(vty, " cdr filename %s%s", g_cfg->cdr.filename, VTY_NEWLINE); else vty_out(vty, " no cdr filename%s", VTY_NEWLINE); + if (g_cfg->cdr.trap) + vty_out(vty, " cdr trap%s", VTY_NEWLINE); + else + vty_out(vty, " no cdr trap%s", VTY_NEWLINE); vty_out(vty, " cdr interval %d%s", g_cfg->cdr.interval, VTY_NEWLINE); vty_out(vty, " timer t3312 %d%s", g_cfg->timers.T3312, VTY_NEWLINE); @@ -1100,7 +1104,7 @@ DEFUN(cfg_cdr_filename, cfg_cdr_filename_cmd, "cdr filename NAME", - "CDR\nSet filename\nname\n") + "CDR\nEnable saving CDR to filename\nname\n") { talloc_free(g_cfg->cdr.filename); g_cfg->cdr.filename = talloc_strdup(tall_vty_ctx, argv[0]); @@ -1109,10 +1113,26 @@ DEFUN(cfg_no_cdr_filename, cfg_no_cdr_filename_cmd, "no cdr filename", - NO_STR "CDR\nDisable CDR generation\n") + NO_STR "CDR\nDisable saving CDR to file\n") { talloc_free(g_cfg->cdr.filename); g_cfg->cdr.filename = NULL; + return CMD_SUCCESS; +} + +DEFUN(cfg_cdr_trap, cfg_cdr_trap_cmd, + "cdr trap", + "CDR\nEnable sending CDR via TRAP CTRL messages\n") +{ + g_cfg->cdr.trap = true; + return CMD_SUCCESS; +} + +DEFUN(cfg_no_cdr_trap, cfg_no_cdr_trap_cmd, + "no cdr trap", + NO_STR "CDR\nDisable sending CDR via TRAP CTRL messages\n") +{ + g_cfg->cdr.trap = false; return CMD_SUCCESS; } @@ -1250,6 +1270,8 @@ install_element(SGSN_NODE, &cfg_no_apn_name_cmd); install_element(SGSN_NODE, &cfg_cdr_filename_cmd); install_element(SGSN_NODE, &cfg_no_cdr_filename_cmd); + install_element(SGSN_NODE, &cfg_cdr_trap_cmd); + install_element(SGSN_NODE, &cfg_no_cdr_trap_cmd); install_element(SGSN_NODE, &cfg_cdr_interval_cmd); install_element(SGSN_NODE, &cfg_ggsn_dynamic_lookup_cmd); install_element(SGSN_NODE, &cfg_grx_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/5087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d144d87effd934d991257a65e19cf046a938907 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:19:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 13:19:27 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: drop unused include Message-ID: Review at https://gerrit.osmocom.org/5088 cosmetic: drop unused include Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8 --- M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/sgsn.h 2 files changed, 0 insertions(+), 192 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/88/5088/1 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..9d2ee6e 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -53,7 +53,6 @@ rrlp.h \ rs232.h \ rtp_proxy.h \ - sgsn.h \ signal.h \ silent_call.h \ sms_queue.h \ diff --git a/include/osmocom/bsc/sgsn.h b/include/osmocom/bsc/sgsn.h deleted file mode 100644 index f71b649..0000000 --- a/include/osmocom/bsc/sgsn.h +++ /dev/null @@ -1,191 +0,0 @@ -#ifndef _SGSN_H -#define _SGSN_H - - -#include -#include -#include -#include -#include -#include - -#include - -struct gprs_gsup_client; -struct hostent; - -enum sgsn_auth_policy { - SGSN_AUTH_POLICY_OPEN, - SGSN_AUTH_POLICY_CLOSED, - SGSN_AUTH_POLICY_ACL_ONLY, - SGSN_AUTH_POLICY_REMOTE -}; - - -enum sgsn_rate_ctr_keys { - CTR_LLC_DL_BYTES, - CTR_LLC_UL_BYTES, - CTR_LLC_DL_PACKETS, - CTR_LLC_UL_PACKETS, - CTR_GPRS_ATTACH_REQUEST, - CTR_GPRS_ATTACH_ACKED, - CTR_GPRS_ATTACH_REJECTED, - CTR_GPRS_DETACH_REQUEST, - CTR_GPRS_DETACH_ACKED, - CTR_GPRS_ROUTING_AREA_REQUEST, - CTR_GPRS_ROUTING_AREA_ACKED, - CTR_GPRS_ROUTING_AREA_REJECT, - /* PDP single packet counter / GSM 04.08 9.5.1 - 9.5.9 */ - CTR_PDP_ACTIVATE_REQUEST, - CTR_PDP_ACTIVATE_REJECT, - CTR_PDP_ACTIVATE_ACCEPT, - CTR_PDP_REQUEST_ACTIVATE, /* unused */ - CTR_PDP_REQUEST_ACTIVATE_REJ, /* unused */ - CTR_PDP_MODIFY_REQUEST, /* unsued */ - CTR_PDP_MODIFY_ACCEPT, /* unused */ - CTR_PDP_DL_DEACTIVATE_REQUEST, - CTR_PDP_DL_DEACTIVATE_ACCEPT, - CTR_PDP_UL_DEACTIVATE_REQUEST, - CTR_PDP_UL_DEACTIVATE_ACCEPT, -}; - -struct sgsn_cdr { - char *filename; - int interval; -}; - -struct sgsn_config { - /* parsed from config file */ - - char *gtp_statedir; - struct sockaddr_in gtp_listenaddr; - - /* misc */ - struct gprs_ns_inst *nsi; - - enum sgsn_auth_policy auth_policy; - enum gprs_ciph_algo cipher; - struct llist_head imsi_acl; - - struct sockaddr_in gsup_server_addr; - int gsup_server_port; - - int require_authentication; - int require_update_location; - - /* CDR configuration */ - struct sgsn_cdr cdr; - - struct { - int T3312; - int T3322; - int T3350; - int T3360; - int T3370; - int T3313; - int T3314; - int T3316; - int T3385; - int T3386; - int T3395; - int T3397; - } timers; - - int dynamic_lookup; - - struct oap_client_config oap; - - /* RFC1144 TCP/IP header compression */ - struct { - int active; - int passive; - int s01; - } pcomp_rfc1144; - - /* V.42vis data compression */ - struct { - int active; - int passive; - int p0; - int p1; - int p2; - } dcomp_v42bis; - - struct { - int rab_assign_addr_enc; - } iu; -}; - -struct sgsn_instance { - char *config_file; - struct sgsn_config cfg; - /* File descriptor wrappers for LibGTP */ - struct osmo_fd gtp_fd0; - struct osmo_fd gtp_fd1c; - struct osmo_fd gtp_fd1u; - /* Timer for libGTP */ - struct osmo_timer_list gtp_timer; - /* GSN instance for libgtp */ - struct gsn_t *gsn; - /* Subscriber */ - struct gsup_client *gsup_client; - /* LLME inactivity timer */ - struct osmo_timer_list llme_timer; - - /* c-ares event loop integration */ - struct osmo_timer_list ares_timer; - struct llist_head ares_fds; - ares_channel ares_channel; - struct ares_addr_node *ares_servers; - - struct rate_ctr_group *rate_ctrs; -}; - -extern struct sgsn_instance *sgsn; - -/* sgsn_vty.c */ - -int sgsn_vty_init(struct sgsn_config *cfg); -int sgsn_parse_config(const char *config_file); - -/* sgsn.c */ - -/* Main input function for Gb proxy */ -int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci); - - -struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, - struct sgsn_mm_ctx *mmctx, - uint16_t nsapi, - struct tlv_parsed *tp); -int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx); -void sgsn_pdp_upd_gtp_u(struct sgsn_pdp_ctx *pdp, void *addr, size_t alen); - -/* gprs_sndcp.c */ - -/* Entry point for the SNSM-ACTIVATE.indication */ -int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); -/* Entry point for the SNSM-DEACTIVATE.indication */ -int sndcp_sm_deactivate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); -/* Called by SNDCP when it has received/re-assembled a N-PDU */ -int sgsn_rx_sndcp_ud_ind(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, - struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); -int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, - void *mmcontext); -int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, - uint8_t *hdr, uint16_t len); - - -/* - * CDR related functionality - */ -int sgsn_cdr_init(struct sgsn_instance *sgsn); - - -/* - * C-ARES related functionality - */ -int sgsn_ares_init(struct sgsn_instance *sgsn); -int sgsn_ares_query(struct sgsn_instance *sgsm, const char *name, ares_host_callback cb, void *data); - -#endif -- To view, visit https://gerrit.osmocom.org/5088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:21:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:21:42 +0000 Subject: [PATCH] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5024 to look at the new patch set (#6). client: use osmo_strlcpy instead of strncpy simplify \nul termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M tests/mgcp_client/mgcp_client_test.c 4 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/5024/6 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ac86f52..ee8d267 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -201,8 +201,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) @@ -398,7 +397,7 @@ unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf); unsigned int i; - strncpy(strbuf, (const char*)msg->data, l); + osmo_strlcpy(strbuf, (const char*)msg->data, l); for (i = 0; i < sizeof(strbuf); i++) { if (strbuf[i] == '\n' || strbuf[i] == '\r') { strbuf[i] = '\0'; diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e33596d..dcfc2ff 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; @@ -140,7 +141,7 @@ conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; - strcpy(conn->name, name); + osmo_strlcpy(conn->name, name, sizeof(conn->name)); rc = mgcp_alloc_id(endp, conn->id); if (rc < 0) { talloc_free(conn); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index a02b0d1..816f16b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -88,7 +88,7 @@ if (endp->cfg->net_ports.bind_addr) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */ - strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); @@ -96,7 +96,7 @@ /* No specific bind IP is configured for the RTP traffic, so * assume the IP where we listen for incoming MGCP messages * as bind IP */ - strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 5fd59e9..37fe0b8 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -46,14 +46,14 @@ l = strlen(head); msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, head, l); + osmo_strlcpy(data, head, l); data = (char*)msgb_put(msg, 1); *data = '\n'; l = strlen(params); data = (char*)msgb_put(msg, l); - strncpy(data, params, l); + osmo_strlcpy(data, params, l); return msg; } @@ -66,7 +66,7 @@ char *data; msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, str, l); + osmo_strlcpy(data, str, l); return msg; } -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:21:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:21:42 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5060 to look at the new patch set (#2). cosmetic: clearly mark endpoint numbers as hex The log prints the endpoint numbers as hexadecimal numbers, but it does not prefix them with "0x". Add "0x" prefixes to all endpoint number outputs in the log Change-Id: I284627de02cd140a894445375e9152ff007a71e6 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c 4 files changed, 83 insertions(+), 83 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/60/5060/2 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index dcfc2ff..ae3f026 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -61,7 +61,7 @@ } } - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + LOGP(DLMGCP, LOGL_ERROR, "endpoint:0x%x, unable to generate a unique connectionIdentifier\n", ENDPOINT_NUMBER(endp)); return -1; diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 9803921..17b1026 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -82,7 +82,7 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x missing connection mode\n", + "endpoint:0x%x missing connection mode\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -101,7 +101,7 @@ conn->mode = MGCP_CONN_LOOPBACK; else { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x unknown connection mode: '%s'\n", + "endpoint:0x%x unknown connection mode: '%s'\n", ENDPOINT_NUMBER(endp), mode); ret = -1; } @@ -113,16 +113,16 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x conn:%s\n", + "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn)); LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x connection mode '%s' %d\n", + "endpoint:0x%x connection mode '%s' %d\n", ENDPOINT_NUMBER(endp), mode, conn->mode); /* Special handling f?r RTP connections */ if (conn->type == MGCP_CONN_TYPE_RTP) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x output_enabled %d\n", + LOGP(DLMGCP, LOGL_DEBUG, "endpoint:0x%x output_enabled %d\n", ENDPOINT_NUMBER(endp), conn->u.rtp.end.output_enabled); } @@ -318,7 +318,7 @@ if (strcmp(endp->callid, callid) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x CallIDs does not match '%s' != '%s'\n", + "endpoint:0x%x CallIDs does not match '%s' != '%s'\n", ENDPOINT_NUMBER(endp), endp->callid, callid); return -1; } @@ -335,7 +335,7 @@ /* Check for null identifiers */ if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (missing)\n", + "endpoint:0x%x invalid ConnectionIdentifier (missing)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -343,7 +343,7 @@ /* Check for empty connection identifiers */ if (strlen(conn_id) == 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (empty)\n", + "endpoint:0x%x invalid ConnectionIdentifier (empty)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -351,7 +351,7 @@ /* Check for over long connection identifiers */ if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + "endpoint:0x%x invalid ConnectionIdentifier (too long) 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -361,7 +361,7 @@ return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + "endpoint:0x%x no connection found under ConnectionIdentifier 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 816f16b..eb44f9b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", + "endpoint:0x%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:0x%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", + "endpoint:0x%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:0x%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -162,8 +162,8 @@ OSMO_ASSERT(conn); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", + "endpoint:0x%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr, @@ -184,7 +184,7 @@ failed: LOGP(DRTP, LOGL_ERROR, - "endpoint:%x Failed to send dummy %s packet.\n", + "endpoint:0x%x Failed to send dummy %s packet.\n", ENDPOINT_NUMBER(endp), was_rtcp ? "RTCP" : "RTP"); return -1; @@ -393,7 +393,7 @@ struct mgcp_rtp_end *dst_end, char *data, int *len, int buf_size) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -407,7 +407,7 @@ struct mgcp_rtp_end *dst_end, struct mgcp_rtp_end *src_end) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -419,7 +419,7 @@ struct mgcp_conn_rtp *conn) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x conn:%s using format defaults\n", + "endpoint:0x%x conn:%s using format defaults\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); *payload_type = conn->end.codec.payload_type; @@ -516,7 +516,7 @@ state->out_stream.last_timestamp = timestamp; state->out_stream.ssrc = ssrc - 1; /* force output SSRC change */ LOGP(DRTP, LOGL_INFO, - "endpoint:%x initializing stream, SSRC: %u timestamp: %u " + "endpoint:0x%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, state->seq_offset, state->packet_duration, @@ -525,14 +525,14 @@ state->packet_duration = rtp_end->codec.rate * 20 / 1000; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x fixed packet duration is not available, " + "endpoint:0x%x fixed packet duration is not available, " "using fixed 20ms instead: %d from %s:%d\n", ENDPOINT_NUMBER(endp), state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } } else if (state->in_stream.ssrc != ssrc) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC changed: %u -> %u " + "endpoint:0x%x SSRC changed: %u -> %u " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, rtp_hdr->ssrc, @@ -561,7 +561,7 @@ rtp_end->force_constant_ssrc -= 1; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC patching enabled, SSRC: %u " + "endpoint:0x%x SSRC patching enabled, SSRC: %u " "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, @@ -619,7 +619,7 @@ #if 0 DEBUGP(DRTP, - "endpoint:%x payload hdr payload %u -> endp payload %u\n", + "endpoint:0x%x payload hdr payload %u -> endp payload %u\n", ENDPOINT_NUMBER(endp), rtp_hdr->payload_type, payload); rtp_hdr->payload_type = payload; #endif @@ -670,16 +670,16 @@ if (is_rtp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTP packet...\n", + "endpoint:0x%x delivering RTP packet...\n", ENDPOINT_NUMBER(endp)); } else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTCP packet...\n", + "endpoint:0x%x delivering RTCP packet...\n", ENDPOINT_NUMBER(endp)); } LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x loop:%d, mode:%d ", + "endpoint:0x%x loop:%d, mode:%d ", ENDPOINT_NUMBER(endp), tcfg->audio_loop, conn_src->conn->mode); if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) LOGPC(DRTP, LOGL_DEBUG, "(loopback)\n"); @@ -695,7 +695,7 @@ if (!rtp_end->output_enabled) { rtp_end->dropped_packets += 1; LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x output disabled, drop to %s %s " + "endpoint:0x%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -718,7 +718,7 @@ mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, buflen); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x process/send to %s %s " + "endpoint:0x%x process/send to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), ntohs(rtp_end->rtp_port), @@ -757,7 +757,7 @@ return nbytes; } else if (!tcfg->omit_rtcp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x send to %s %s rtp_port:%u rtcp_port:%u\n", + "endpoint:0x%x send to %s %s rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), @@ -804,13 +804,13 @@ if (rc < 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to receive packet, errno: %d/%s\n", + "endpoint:0x%x failed to receive packet, errno: %d/%s\n", ENDPOINT_NUMBER(endp), errno, strerror(errno)); return -1; } if (tossed) { - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); } @@ -830,11 +830,11 @@ if (memcmp(&addr->sin_addr, &conn->end.addr, sizeof(addr->sin_addr)) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong address: %s, ", + "endpoint:0x%x data from wrong address: %s, ", ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); LOGPC(DRTP, LOGL_ERROR, "expected: %s\n", inet_ntoa(conn->end.addr)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -846,12 +846,12 @@ if (conn->end.rtp_port != addr->sin_port && conn->end.rtcp_port != addr->sin_port) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong source port: %d, ", + "endpoint:0x%x data from wrong source port: %d, ", ENDPOINT_NUMBER(endp), ntohs(addr->sin_port)); LOGPC(DRTP, LOGL_ERROR, "expected: %d for RTP or %d for RTCP\n", ntohs(conn->end.rtp_port), ntohs(conn->end.rtcp_port)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -868,14 +868,14 @@ if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination IP-address is invalid\n", + "endpoint:0x%x destination IP-address is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } if (conn->end.rtp_port == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination rtp port is invalid\n", + "endpoint:0x%x destination rtp port is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -897,7 +897,7 @@ endp = conn->conn->endp; tcfg = endp->tcfg; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x receiving RTP/RTCP packet...\n", ENDPOINT_NUMBER(endp)); rc = receive_from(endp, fd->fd, addr, buf, buf_size); @@ -905,11 +905,11 @@ return -1; *proto = fd == &conn->end.rtp ? MGCP_PROTO_RTP : MGCP_PROTO_RTCP; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x ", ENDPOINT_NUMBER(endp)); LOGPC(DRTP, LOGL_DEBUG, "receiveing from %s %s %d\n", conn->conn->name, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); /* Check if the origin of the RTP packet seems plausible */ @@ -921,10 +921,10 @@ /* Filter out dummy message */ if (rc == 1 && buf[0] == MGCP_DUMMY_LOAD) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x dummy message received\n", + "endpoint:0x%x dummy message received\n", ENDPOINT_NUMBER(endp)); LOGP(DRTP, LOGL_ERROR, - "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); + "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -948,7 +948,7 @@ struct mgcp_endpoint *endp; endp = conn_src->conn->endp; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x destin conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_dst->conn)); /* Before we try to deliver the packet, we check if the destination @@ -962,7 +962,7 @@ switch (conn_dst->type) { case MGCP_RTP_DEFAULT: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_RTP_DEFAULT, " + "endpoint:0x%x endpoint type is MGCP_RTP_DEFAULT, " "using mgcp_send() to forward data directly\n", ENDPOINT_NUMBER(endp)); return mgcp_send(endp, proto == MGCP_PROTO_RTP, @@ -970,7 +970,7 @@ case MGCP_OSMUX_BSC_NAT: case MGCP_OSMUX_BSC: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_OSMUX_BSC_NAT, " + "endpoint:0x%x endpoint type is MGCP_OSMUX_BSC_NAT, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n", ENDPOINT_NUMBER(endp)); return osmux_xfrm_to_osmux(buf, buf_size, conn_dst); @@ -980,7 +980,7 @@ * be discarded, this should not happen, normally the MGCP type * should be properly set */ LOGP(DRTP, LOGL_ERROR, - "endpoint:%x bad MGCP type -- data discarded!\n", + "endpoint:0x%x bad MGCP type -- data discarded!\n", ENDPOINT_NUMBER(endp)); return -1; @@ -1025,7 +1025,7 @@ /* There is no destination conn, stop here */ if (!conn_dst) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find destination conn\n", + "endpoint:0x%x unable to find destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1033,7 +1033,7 @@ /* The destination conn is not an RTP connection */ if (conn_dst->type != MGCP_CONN_TYPE_RTP) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find suitable destination conn\n", + "endpoint:0x%x unable to find suitable destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1067,7 +1067,7 @@ endp = conn_src->conn->endp; OSMO_ASSERT(endp); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x source conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ @@ -1158,7 +1158,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtp, rtp_end->local_port) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTP port: %s:%d\n", endpno, source_addr, rtp_end->local_port); goto cleanup0; } @@ -1166,7 +1166,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtcp, rtp_end->local_port + 1) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTCP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTCP port: %s:%d\n", endpno, source_addr, rtp_end->local_port + 1); goto cleanup1; } @@ -1178,7 +1178,7 @@ rtp_end->rtp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTP port %d\n", endpno, + "endpoint:0x%x failed to register RTP port %d\n", endpno, rtp_end->local_port); goto cleanup2; } @@ -1186,7 +1186,7 @@ rtp_end->rtcp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTCP port %d\n", endpno, + "endpoint:0x%x failed to register RTCP port %d\n", endpno, rtp_end->local_port + 1); goto cleanup3; } @@ -1222,7 +1222,7 @@ if (end->rtp.fd != -1 || end->rtcp.fd != -1) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x %u was already bound on conn:%s\n", + "endpoint:0x%x %u was already bound on conn:%s\n", ENDPOINT_NUMBER(endp), rtp_port, mgcp_conn_dump(conn->conn)); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index feca8da..a1ecce2 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -534,7 +534,7 @@ * callids match up so that we are sure that this is our call */ if (endp->callid && mgcp_verify_call_id(endp, callid)) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x allready seized by other call (%s)\n", + "CRCX: endpoint:0x%x allready seized by other call (%s)\n", ENDPOINT_NUMBER(endp), endp->callid); if (tcfg->force_realloc) /* This is not our call, toss everything by releasing @@ -560,7 +560,7 @@ _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x unable to allocate RTP connection\n", + "CRCX: endpoint:0x%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; @@ -581,7 +581,7 @@ conn->osmux.state = OSMUX_STATE_NEGOTIATING; } else if (endp->cfg->osmux == OSMUX_USAGE_ONLY) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x osmux only and no osmux offered\n", + "CRCX: endpoint:0x%x osmux only and no osmux offered\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -608,7 +608,7 @@ if (setup_rtp_processing(endp, conn) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x could not start RTP processing!\n", + "CRCX: endpoint:0x%x could not start RTP processing!\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -621,7 +621,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x CRCX rejected by policy\n", + "CRCX: endpoint:0x%x CRCX rejected by policy\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); return create_err_response(endp, 400, "CRCX", p->trans); @@ -637,7 +637,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", + "CRCX: endpoint:0x%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -649,13 +649,13 @@ send_dummy(endp, conn); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x connection successfully created\n", + "CRCX: endpoint:0x%x connection successfully created\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "CRCX", p->trans); error2: mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x unable to create connection resource error\n", + "CRCX: endpoint:0x%x unable to create connection resource error\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, error_code, "CRCX", p->trans); } @@ -680,7 +680,7 @@ if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x endpoint is not holding a connection.\n", + "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -714,7 +714,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "MDCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -723,7 +723,7 @@ mgcp_header_done: if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", + "MDCX: endpoint:0x%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -762,7 +762,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x rejected by policy\n", + "MDCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -771,7 +771,7 @@ case MGCP_POLICY_DEFER: /* stop processing */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x defered by policy\n", + "MDCX: endpoint:0x%x defered by policy\n", ENDPOINT_NUMBER(endp)); return NULL; break; @@ -785,7 +785,7 @@ /* modify */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x modified conn:%s\n", + "MDCX: endpoint:0x%x modified conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); if (p->cfg->change_cb) p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), @@ -801,14 +801,14 @@ goto out_silent; LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x connection successfully modified\n", + "MDCX: endpoint:0x%x connection successfully modified\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "MDCX", p->trans); error3: return create_err_response(endp, error_code, "MDCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -828,12 +828,12 @@ return create_err_response(NULL, error_code, "DLCX", p->trans); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x deleting connection ...\n", + "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x endpoint is not holding a connection.\n", + "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "DLCX", p->trans); } @@ -857,7 +857,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "DLCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -871,7 +871,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x rejected by policy\n", + "DLCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -892,7 +892,7 @@ * RFC3435 Section F.7) */ if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", + "DLCX: endpoint:0x%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); @@ -912,11 +912,11 @@ mgcp_format_stats(stats, sizeof(stats), conn->conn); /* delete connection */ - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x deleting conn:%s\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x deleting conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); mgcp_conn_free(endp, conn_id); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x connection successfully deleted\n", + "DLCX: endpoint:0x%x connection successfully deleted\n", ENDPOINT_NUMBER(endp)); /* When all connections are closed, the endpoint will be released @@ -924,7 +924,7 @@ if (llist_count(&endp->conns) <= 0) { mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_DEBUG, - "DLCX: endpoint:%x endpoint released\n", + "DLCX: endpoint:0x%x endpoint released\n", ENDPOINT_NUMBER(endp)); } @@ -940,7 +940,7 @@ return create_err_response(endp, error_code, "DLCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -1188,7 +1188,7 @@ * \param[in] endp endpoint to release */ void mgcp_release_endp(struct mgcp_endpoint *endp) { - LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:%x\n", + LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", ENDPOINT_NUMBER(endp)); /* Normally this function should only be called wehen -- To view, visit https://gerrit.osmocom.org/5060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I284627de02cd140a894445375e9152ff007a71e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:21:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:21:42 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4905 to look at the new patch set (#8). libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 970 insertions(+), 168 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/4905/8 diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ad972de..ac86f52 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -258,6 +258,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -288,7 +340,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -650,7 +708,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -721,8 +778,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 31713cb..e33596d 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,46 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + /* Generate a connection id that is unique for the current endpoint. + * Technically a counter would be sufficient, but in order to + * be able to find a specific connection in large logfiles and to + * prevent unintentional connections we assign the connection + * identifiers randomly from a reasonable large number space */ + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unique + * for this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_LENGTH); + return 0; + } + } + + LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + ENDPOINT_NUMBER(endp)); + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,28 +118,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); - /* Id is a mandatory parameter */ - if (!id) - return NULL; - - /* Prevent over long id strings */ - if (strlen(id) >= MGCP_CONN_ID_LENGTH) - return NULL; - /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -112,7 +141,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 672a8d4..feca8da 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -468,7 +468,10 @@ callid = (const char *)line + 3; break; case 'I': - conn_id = (const char *)line + 3; + /* It is illegal to send a connection identifier + * together with a CRCX, the MGW will assign the + * connection identifier by itself on CRCX */ + return create_err_response(NULL, 523, "CRCX", p->trans); break; case 'M': mode = (const char *)line + 3; @@ -506,13 +509,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +556,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 7d976da..fb99911 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id && strlen(conn_id)) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,18 +555,95 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memset(conn_id, 0, conn_id_len); + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\r') + conn_id[i] = '\0'; + } + + /* A valid conn_id must at least contain one digit, and must + * not exceed a length of 32 digits */ + OSMO_ASSERT(strlen(conn_id) <= 32); + OSMO_ASSERT(strlen(conn_id) > 0); + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -574,6 +652,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -582,7 +661,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -591,11 +670,15 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); if (dummy_packets) @@ -656,7 +739,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -681,11 +764,14 @@ { struct mgcp_config *cfg; int i; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -694,24 +780,30 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg && strcmp(t->name, CRCX)) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -732,6 +824,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -741,12 +834,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -761,7 +858,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -864,7 +961,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -874,7 +971,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1013,6 +1110,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1032,9 +1130,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1092,6 +1191,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1103,85 +1203,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1198,19 +1308,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1223,6 +1335,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1232,9 +1345,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1281,9 +1395,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:21:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:21:42 +0000 Subject: [PATCH] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4906 to look at the new patch set (#8). MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 106 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/4906/8 diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..29dc458 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_LENGTH 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..c3f9ba1 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..0eed89e 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -30,6 +30,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_LENGTH]; }; struct mgcp_response { @@ -63,7 +64,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..ad972de 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -718,7 +718,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..31713cb 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,13 +78,21 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); + + /* Id is a mandatory parameter */ + if (!id) + return NULL; + + /* Prevent over long id strings */ + if (strlen(id) >= MGCP_CONN_ID_LENGTH) + return NULL; /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) @@ -102,9 +110,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +134,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +155,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +178,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +250,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +260,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..9803921 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing)\n", + ENDPOINT_NUMBER(endp)); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty)\n", + ENDPOINT_NUMBER(endp)); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index f542745..672a8d4 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 80396e0..e938391 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index f35dc93..7d976da 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -604,7 +604,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1032,9 +1032,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1110,7 +1110,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1124,7 +1124,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1138,7 +1138,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1152,7 +1152,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1169,7 +1169,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1181,7 +1181,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1198,7 +1198,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1210,7 +1210,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1232,9 +1232,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:21:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:21:42 +0000 Subject: [PATCH] osmo-mgw[master]: cosmetic: fix sourcecode formatting In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5034 to look at the new patch set (#5). cosmetic: fix sourcecode formatting Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 --- M include/osmocom/mgcp_client/mgcp_client.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/5034/5 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 0eed89e..cf5e8c4 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -27,9 +27,9 @@ typedef unsigned int mgcp_trans_id_t; struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - const char *comment; + int response_code; + mgcp_trans_id_t trans_id; + const char *comment; char conn_id[MGCP_CONN_ID_LENGTH]; }; -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:27:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 13:27:26 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static Message-ID: Review at https://gerrit.osmocom.org/5089 cosmetic: mark gsm_objclass2mo as static It's only used once in the same file so there's no need to put it into global header. Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9 --- M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data_shared.c 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/89/5089/1 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 37f7976..1953ed4 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -858,10 +858,6 @@ void gsm_abis_mo_reset(struct gsm_abis_mo *mo); -struct gsm_abis_mo * -gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst); - struct gsm_nm_state * gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class, const struct abis_om_obj_inst *obj_inst); diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index b001562..8480892 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -485,7 +485,7 @@ } /* obtain the MO structure for a given object instance */ -struct gsm_abis_mo * +static inline struct gsm_abis_mo * gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, const struct abis_om_obj_inst *obj_inst) { -- To view, visit https://gerrit.osmocom.org/5089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:35:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:35:54 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config Message-ID: Review at https://gerrit.osmocom.org/5090 osmo-bsc: Remove 'auth policy' cmd from config As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command has been dropped and is no longer recognized. Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31 --- M example/defaults.conf M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/90/5090/1 diff --git a/example/defaults.conf b/example/defaults.conf index 86223d1..5517212 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -13,7 +13,6 @@ mnc: 70 short_name: osmo-gsm-tester-msc long_name: osmo-gsm-tester-msc - auth_policy: closed encryption: a5_0 authentication: optional diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 1b21e63..c1f3cc7 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -31,7 +31,6 @@ mobile network code ${bsc.net.mnc} short name ${bsc.net.short_name} long name ${bsc.net.long_name} - auth policy ${bsc.net.auth_policy} location updating reject cause 13 encryption ${bsc.net.encryption} authentication ${bsc.net.authentication} -- To view, visit https://gerrit.osmocom.org/5090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:35:55 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config Message-ID: Review at https://gerrit.osmocom.org/5091 osmo-bsc: Remove authentication cmd from config authentication is firmly VLR land and must go away from bsc. That option is a leftover from nitb. It will be removed at some point. Change-Id: I3bb4189b33173245116018e437e113c6c1226639 --- M example/defaults.conf M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/91/5091/1 diff --git a/example/defaults.conf b/example/defaults.conf index 5517212..7468722 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -14,7 +14,6 @@ short_name: osmo-gsm-tester-msc long_name: osmo-gsm-tester-msc encryption: a5_0 - authentication: optional msc: net: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index c1f3cc7..18b2321 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -33,7 +33,6 @@ long name ${bsc.net.long_name} location updating reject cause 13 encryption ${bsc.net.encryption} - authentication ${bsc.net.authentication} neci 1 rrlp mode none mm info 1 -- To view, visit https://gerrit.osmocom.org/5091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:40:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:40:54 +0000 Subject: [ABANDON] osmo-bts[master]: oml: Use new API abis_nm_admin_name In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: oml: Use new API abis_nm_admin_name ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/4357 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3a013a924257490d9b26376d96f8e38cdf2cd971 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:44:54 +0000 Subject: osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:44:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:44:55 +0000 Subject: osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:44:57 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:44:57 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-bsc: Remove authentication cmd from config In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-bsc: Remove authentication cmd from config ...................................................................... osmo-bsc: Remove authentication cmd from config authentication is firmly VLR land and must go away from bsc. That option is a leftover from nitb. It will be removed at some point. Change-Id: I3bb4189b33173245116018e437e113c6c1226639 --- M example/defaults.conf M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index 5517212..7468722 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -14,7 +14,6 @@ short_name: osmo-gsm-tester-msc long_name: osmo-gsm-tester-msc encryption: a5_0 - authentication: optional msc: net: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index c1f3cc7..18b2321 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -33,7 +33,6 @@ long name ${bsc.net.long_name} location updating reject cause 13 encryption ${bsc.net.encryption} - authentication ${bsc.net.authentication} neci 1 rrlp mode none mm info 1 -- To view, visit https://gerrit.osmocom.org/5091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3bb4189b33173245116018e437e113c6c1226639 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:44:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 13:44:58 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-bsc: Remove 'auth policy' cmd from config In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-bsc: Remove 'auth policy' cmd from config ...................................................................... osmo-bsc: Remove 'auth policy' cmd from config As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command has been dropped and is no longer recognized. Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31 --- M example/defaults.conf M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index 86223d1..5517212 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -13,7 +13,6 @@ mnc: 70 short_name: osmo-gsm-tester-msc long_name: osmo-gsm-tester-msc - auth_policy: closed encryption: a5_0 authentication: optional diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 1b21e63..c1f3cc7 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -31,7 +31,6 @@ mobile network code ${bsc.net.mnc} short name ${bsc.net.short_name} long name ${bsc.net.long_name} - auth policy ${bsc.net.auth_policy} location updating reject cause 13 encryption ${bsc.net.encryption} authentication ${bsc.net.authentication} -- To view, visit https://gerrit.osmocom.org/5090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:47:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 13:47:02 +0000 Subject: [PATCH] osmo-bsc[master]: OML: check GPRS state when reporting status Message-ID: Review at https://gerrit.osmocom.org/5092 OML: check GPRS state when reporting status If GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked than report it as degraded. Related: OS#2486 Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc --- M src/libbsc/abis_nm.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/5092/1 diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index c9f03e1..ec235a8 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -691,6 +691,18 @@ if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) return false; + if (bts->gprs.mode != BTS_GPRS_NONE) { + if (bts->gprs.cell.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nse.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nsvc[0].mo.nm_state.administrative == NM_STATE_LOCKED && + bts->gprs.nsvc[1].mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + } + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 13:49:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 13:49:03 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#6). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c 12 files changed, 1,087 insertions(+), 309 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/6 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..9c6c858 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -5,3 +5,5 @@ struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); + +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..907e303 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,47 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer + * needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..438b7cf 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + osmo_strlcpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..881a81c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -78,6 +78,7 @@ #include #include +#include #include @@ -1328,8 +1329,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teadown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1386,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1418,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1761,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1803,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2687,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2728,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2744,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2771,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2787,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = rtp->ip; + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..60e2b1b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -187,3 +187,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..250b4ec 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include "../../bscconfig.h" @@ -140,287 +142,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..8b0b704 --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,951 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* Note: If the logic that controls the RAN is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Note: Under normal conditions, the MSC logic should + * always command to release the call at some point. + * However, the release may be missing due to errors + * in the MSC logic and we may have reached ST_HALT + * because of cascading errors and timeouts. In this + * and only in this case we will allow ST_HALT to + * free all context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: connection context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 6 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:12:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:12:11 +0000 Subject: [PATCH] osmo-msc[master]: Add basic CTRL test Message-ID: Review at https://gerrit.osmocom.org/5093 Add basic CTRL test All the CTRL tests were skipped automatically because they were inherited from before repo split time. This means that MSC CTRL interface was not tested at all. Add trivial test which uses generic rate counter introspection so we at least check that MSC's CTRL interface is not completely broken. Change-Id: I784feece666b00752a81f2c126e6f255505445be --- M tests/ctrl_test_runner.py 1 file changed, 8 insertions(+), 387 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/5093/1 diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..9a976a5 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -148,395 +148,18 @@ return responses -class TestCtrlBSC(TestCtrlBase): - - def tearDown(self): - TestCtrlBase.tearDown(self) - os.unlink("tmp_dummy_sock") - +class TestCtrlMSC(TestCtrlBase): def ctrl_command(self): - return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c", - "doc/examples/osmo-bsc/osmo-bsc.cfg"] + return ["./src/osmo-msc/osmo-msc", "-c", + "doc/examples/osmo-msc/osmo-msc.cfg"] def ctrl_app(self): - return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc") + return (4255, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc") - def testCtrlErrs(self): - r = self.do_get('invalid') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Command not found') + def testRateCounters(self): + r = self.do_get('rate_ctr.*') - r = self.do_set('rf_locked', '999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value failed verification.') - - r = self.do_get('bts') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while parsing the index.') - - r = self.do_get('bts.999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while resolving object') - - def testBtsLac(self): - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '1') - - r = self.do_set('bts.0.location-area-code', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.location-area-code', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsCi(self): - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '0') - - r = self.do_set('bts.0.cell-identity', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.cell-identity', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsGenerateSystemInformation(self): - r = self.do_get('bts.0.send-new-system-informations') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write Only attribute') - - # No RSL links so it will fail - r = self.do_set('bts.0.send-new-system-informations', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Failed to generate SI') - - def testBtsChannelLoad(self): - r = self.do_set('bts.0.channel-load', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.channel-load') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], - 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0') - - def testBtsOmlConnectionState(self): - """Check OML state. It will not be connected""" - r = self.do_set('bts.0.oml-connection-state', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.oml-connection-state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], 'disconnected') - - def testTrxPowerRed(self): - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '20') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '22') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value must be even') - - def testTrxArfcn(self): - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '871') - - r = self.do_set('bts.0.trx.0.arfcn', '873') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_set('bts.0.trx.0.arfcn', '2000') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testRfLock(self): - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_set('rf_locked', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '1') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,locked,off') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=off') - - r = self.do_set('rf_locked', '0') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '0') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=on') - - def testTimezone(self): - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_set('timezone', '-2,15,2') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - # Test invalid input - r = self.do_set('timezone', '-2,15,2,5,6,7') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_set('timezone', '-2,15') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '-2') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '1') - - r = self.do_set('timezone', 'off') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - def testMcc(self): - r = self.do_set('mcc', '23') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - r = self.do_set('mcc', '023') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - def testMnc(self): - r = self.do_set('mnc', '9') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - r = self.do_set('mnc', '09') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - - def testMccMncApply(self): - # Test some invalid input - r = self.do_set('mcc-mnc-apply', 'WRONG') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '1,') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Set it again - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Nothing changed') - - # Change it - r = self.do_set('mcc-mnc-apply', '200,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Change it - r = self.do_set('mcc-mnc-apply', '201,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Verify - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '4') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '201') - - # Change it - r = self.do_set('mcc-mnc-apply', '202,03') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '3') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '202') - -class TestCtrlNAT(TestCtrlBase): - - def ctrl_command(self): - return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c", - "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"] - - def ctrl_app(self): - return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat") - - def testAccessList(self): - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - def testAccessListManagement(self): - r = self.do_set("net.0.add.allow.access-list.404", "abc") - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set("net.0.add.allow.access-list.bla", "^234$") - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') - self.assertEquals(r['value'], 'IMSI allow added to access list') - - # TODO.. find a way to actually see if this rule has been - # added. e.g. by implementing a get for the list. - -class TestCtrlSGSN(TestCtrlBase): - def ctrl_command(self): - return ["./src/gprs/osmo-sgsn", "-c", - "doc/examples/osmo-sgsn/osmo-sgsn.cfg"] - - def ctrl_app(self): - return (4251, "./src/gprs/osmo-sgsn", "OsmoSGSN", "sgsn") - - def testListSubscribers(self): - # TODO. Add command to mark a subscriber as active - r = self.do_get('subscriber-list-active-v1') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'subscriber-list-active-v1') - self.assertEquals(r['value'], None) - -def add_bsc_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")): - print("Skipping the BSC test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) - suite.addTest(test) - -def add_nat_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")): - print("Skipping the NAT test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT) - suite.addTest(test) - -def add_sgsn_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")): - print("Skipping the SGSN test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlSGSN) - suite.addTest(test) + # FIXME: add MSC-specific CTRL test in here if __name__ == '__main__': import argparse @@ -568,8 +191,6 @@ os.chdir(workdir) print "Running tests for specific control commands" suite = unittest.TestSuite() - add_bsc_test(suite, workdir) - add_nat_test(suite, workdir) - add_sgsn_test(suite, workdir) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCtrlMSC)) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) -- To view, visit https://gerrit.osmocom.org/5093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I784feece666b00752a81f2c126e6f255505445be Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:22:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:22:03 +0000 Subject: osmo-bsc[master]: cosmetic: tighten function type signatures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:22:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:22:27 +0000 Subject: osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:22:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:22:43 +0000 Subject: osmo-bsc[master]: OML: check TRX usability when reporting In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:22:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:22:58 +0000 Subject: osmo-bsc[master]: OML: check GPRS state when reporting status In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:23:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:23:13 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: tighten function type signatures In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: cosmetic: tighten function type signatures ...................................................................... cosmetic: tighten function type signatures * change return type to bool * constify parameters The nm_is_running(), trx_is_usable() and ts_is_usable() always return boolean value and are always used as such anyway. The also do not change their parameters. Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505 --- M include/osmocom/bsc/abis_nm.h M include/osmocom/bsc/chan_alloc.h M src/libbsc/abis_nm.c M src/libbsc/chan_alloc.c 4 files changed, 11 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index b0cb166..18f87cd 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -163,7 +163,7 @@ /* Functions calling into other code parts */ bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts); -int nm_is_running(struct gsm_nm_state *s); +bool nm_is_running(const struct gsm_nm_state *s); int abis_nm_vty_init(void); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 7388e14..320fa94 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -49,6 +49,6 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts); void network_chan_load(struct pchan_load *pl, struct gsm_network *net); -int trx_is_usable(struct gsm_bts_trx *trx); +bool trx_is_usable(const struct gsm_bts_trx *trx); #endif /* _CHAN_ALLOC_H */ diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index 295cefd..f1a56a6 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -159,7 +159,7 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb); -int nm_is_running(struct gsm_nm_state *s) { +bool nm_is_running(const struct gsm_nm_state *s) { return (s->operational == NM_OPSTATE_ENABLED) && ( (s->availability == NM_AVSTATE_OK) || (s->availability == 0xff) diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index f0275bc..4b2531e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -36,41 +36,41 @@ #include -static int ts_is_usable(struct gsm_bts_trx_ts *ts) +static bool ts_is_usable(const struct gsm_bts_trx_ts *ts) { /* FIXME: How does this behave for BS-11 ? */ if (is_ipaccess_bts(ts->trx->bts)) { if (!nm_is_running(&ts->mo.nm_state)) - return 0; + return false; } /* If a TCH/F_PDCH TS is busy changing, it is already taken or not * yet available. */ if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) { if (ts->flags & TS_F_PDCH_PENDING_MASK) - return 0; + return false; } /* If a dynamic channel is busy changing, it is already taken or not * yet available. */ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { if (ts->dyn.pchan_is != ts->dyn.pchan_want) - return 0; + return false; } - return 1; + return true; } -int trx_is_usable(struct gsm_bts_trx *trx) +bool trx_is_usable(const struct gsm_bts_trx *trx) { /* FIXME: How does this behave for BS-11 ? */ if (is_ipaccess_bts(trx->bts)) { if (!nm_is_running(&trx->mo.nm_state) || !nm_is_running(&trx->bb_transc.mo.nm_state)) - return 0; + return false; } - return 1; + return true; } static struct gsm_lchan * -- To view, visit https://gerrit.osmocom.org/5083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:23:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:23:23 +0000 Subject: osmo-msc[master]: Add basic CTRL test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I784feece666b00752a81f2c126e6f255505445be Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:23:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:23:45 +0000 Subject: osmo-msc[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:23:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:23:57 +0000 Subject: [MERGED] osmo-msc[master]: Add basic CTRL test In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add basic CTRL test ...................................................................... Add basic CTRL test All the CTRL tests were skipped automatically because they were inherited from before repo split time. This means that MSC CTRL interface was not tested at all. Add trivial test which uses generic rate counter introspection so we at least check that MSC's CTRL interface is not completely broken. Change-Id: I784feece666b00752a81f2c126e6f255505445be --- M tests/ctrl_test_runner.py 1 file changed, 8 insertions(+), 387 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 2e59e13..9a976a5 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -148,395 +148,18 @@ return responses -class TestCtrlBSC(TestCtrlBase): - - def tearDown(self): - TestCtrlBase.tearDown(self) - os.unlink("tmp_dummy_sock") - +class TestCtrlMSC(TestCtrlBase): def ctrl_command(self): - return ["./src/osmo-bsc/osmo-bsc", "-r", "tmp_dummy_sock", "-c", - "doc/examples/osmo-bsc/osmo-bsc.cfg"] + return ["./src/osmo-msc/osmo-msc", "-c", + "doc/examples/osmo-msc/osmo-msc.cfg"] def ctrl_app(self): - return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc") + return (4255, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc") - def testCtrlErrs(self): - r = self.do_get('invalid') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Command not found') + def testRateCounters(self): + r = self.do_get('rate_ctr.*') - r = self.do_set('rf_locked', '999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value failed verification.') - - r = self.do_get('bts') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while parsing the index.') - - r = self.do_get('bts.999') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Error while resolving object') - - def testBtsLac(self): - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '1') - - r = self.do_set('bts.0.location-area-code', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.location-area-code') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.location-area-code') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.location-area-code', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsCi(self): - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '0') - - r = self.do_set('bts.0.cell-identity', '23') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_get('bts.0.cell-identity') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.cell-identity') - self.assertEquals(r['value'], '23') - - r = self.do_set('bts.0.cell-identity', '-1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testBtsGenerateSystemInformation(self): - r = self.do_get('bts.0.send-new-system-informations') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write Only attribute') - - # No RSL links so it will fail - r = self.do_set('bts.0.send-new-system-informations', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Failed to generate SI') - - def testBtsChannelLoad(self): - r = self.do_set('bts.0.channel-load', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.channel-load') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], - 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0') - - def testBtsOmlConnectionState(self): - """Check OML state. It will not be connected""" - r = self.do_set('bts.0.oml-connection-state', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read Only attribute') - - # No RSL link so everything is 0 - r = self.do_get('bts.0.oml-connection-state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['value'], 'disconnected') - - def testTrxPowerRed(self): - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '20') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '22') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_get('bts.0.trx.0.max-power-reduction') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') - self.assertEquals(r['value'], '22') - - r = self.do_set('bts.0.trx.0.max-power-reduction', '1') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value must be even') - - def testTrxArfcn(self): - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '871') - - r = self.do_set('bts.0.trx.0.arfcn', '873') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_get('bts.0.trx.0.arfcn') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.trx.0.arfcn') - self.assertEquals(r['value'], '873') - - r = self.do_set('bts.0.trx.0.arfcn', '2000') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Input not within the range') - - def testRfLock(self): - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_set('rf_locked', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '1') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,locked,off') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=off') - - r = self.do_set('rf_locked', '0') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], '0') - - time.sleep(1.5) - - r = self.do_get('bts.0.rf_state') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.rf_state') - self.assertEquals(r['value'], 'inoperational,unlocked,on') - - r = self.do_get('rf_locked') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'rf_locked') - self.assertEquals(r['value'], 'state=off,policy=on') - - def testTimezone(self): - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_set('timezone', '-2,15,2') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - # Test invalid input - r = self.do_set('timezone', '-2,15,2,5,6,7') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], '-2,15,2') - - r = self.do_set('timezone', '-2,15') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '-2') - self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('timezone', '1') - - r = self.do_set('timezone', 'off') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - r = self.do_get('timezone') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'timezone') - self.assertEquals(r['value'], 'off') - - def testMcc(self): - r = self.do_set('mcc', '23') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - r = self.do_set('mcc', '023') - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '23') - - def testMnc(self): - r = self.do_set('mnc', '9') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - r = self.do_set('mnc', '09') - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '9') - - - def testMccMncApply(self): - # Test some invalid input - r = self.do_set('mcc-mnc-apply', 'WRONG') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '1,') - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Set it again - r = self.do_set('mcc-mnc-apply', '200,3') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Nothing changed') - - # Change it - r = self.do_set('mcc-mnc-apply', '200,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Change it - r = self.do_set('mcc-mnc-apply', '201,4') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - # Verify - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '4') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '201') - - # Change it - r = self.do_set('mcc-mnc-apply', '202,03') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'mcc-mnc-apply') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - r = self.do_get('mnc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mnc') - self.assertEquals(r['value'], '3') - - r = self.do_get('mcc') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'mcc') - self.assertEquals(r['value'], '202') - -class TestCtrlNAT(TestCtrlBase): - - def ctrl_command(self): - return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c", - "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"] - - def ctrl_app(self): - return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat") - - def testAccessList(self): - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - def testAccessListManagement(self): - r = self.do_set("net.0.add.allow.access-list.404", "abc") - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set("net.0.add.allow.access-list.bla", "^234$") - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') - self.assertEquals(r['value'], 'IMSI allow added to access list') - - # TODO.. find a way to actually see if this rule has been - # added. e.g. by implementing a get for the list. - -class TestCtrlSGSN(TestCtrlBase): - def ctrl_command(self): - return ["./src/gprs/osmo-sgsn", "-c", - "doc/examples/osmo-sgsn/osmo-sgsn.cfg"] - - def ctrl_app(self): - return (4251, "./src/gprs/osmo-sgsn", "OsmoSGSN", "sgsn") - - def testListSubscribers(self): - # TODO. Add command to mark a subscriber as active - r = self.do_get('subscriber-list-active-v1') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'subscriber-list-active-v1') - self.assertEquals(r['value'], None) - -def add_bsc_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")): - print("Skipping the BSC test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) - suite.addTest(test) - -def add_nat_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")): - print("Skipping the NAT test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT) - suite.addTest(test) - -def add_sgsn_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")): - print("Skipping the SGSN test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlSGSN) - suite.addTest(test) + # FIXME: add MSC-specific CTRL test in here if __name__ == '__main__': import argparse @@ -568,8 +191,6 @@ os.chdir(workdir) print "Running tests for specific control commands" suite = unittest.TestSuite() - add_bsc_test(suite, workdir) - add_nat_test(suite, workdir) - add_sgsn_test(suite, workdir) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCtrlMSC)) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) -- To view, visit https://gerrit.osmocom.org/5093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I784feece666b00752a81f2c126e6f255505445be Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:24:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:24:31 +0000 Subject: osmo-msc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4991/1//COMMIT_MSG Commit Message: Line 11: are not MSC-specific: leftover from repository split. they are not MSC-specific, ok. But where have they been moved now? Needs to be stated here. -- To view, visit https://gerrit.osmocom.org/4991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:24:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:24:51 +0000 Subject: osmo-bsc[master]: cosmetic: drop unused include In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:24:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:24:54 +0000 Subject: [MERGED] osmo-msc[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove obsolete ./configure option ...................................................................... Remove obsolete ./configure option The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 --- M README.vty-tests M configure.ac M contrib/jenkins.sh 3 files changed, 3 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/README.vty-tests b/README.vty-tests index ba1b87c..0669ea8 100644 --- a/README.vty-tests +++ b/README.vty-tests @@ -4,7 +4,7 @@ and pass the following configure options here: - ./configure --enable-vty-tests --enable-external-tests + ./configure --enable-external-tests The VTY tests are then included in the standard check target: diff --git a/configure.ac b/configure.ac index f965240..5766fd0 100644 --- a/configure.ac +++ b/configure.ac @@ -160,11 +160,6 @@ CHECK_TM_INCLUDES_TM_GMTOFF -AC_ARG_ENABLE([vty_tests], - AC_HELP_STRING([--enable-vty-tests], - [Include the VTY/CTRL tests in make check (deprecated) - [default=no]]), - [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d8853d1..b0dde06 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -48,12 +48,12 @@ cd "$base" autoreconf --install --force -./configure --enable-smpp $IU --enable-vty-tests --enable-external-tests +./configure --enable-smpp $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-smpp $IU --enable-external-tests" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/4990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ab3ac3d9becee6b4e989b4e71d34598ea012f47 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:25:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:25:03 +0000 Subject: osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:25:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:25:16 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: drop unused include In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: cosmetic: drop unused include ...................................................................... cosmetic: drop unused include Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8 --- M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/sgsn.h 2 files changed, 0 insertions(+), 192 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..9d2ee6e 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -53,7 +53,6 @@ rrlp.h \ rs232.h \ rtp_proxy.h \ - sgsn.h \ signal.h \ silent_call.h \ sms_queue.h \ diff --git a/include/osmocom/bsc/sgsn.h b/include/osmocom/bsc/sgsn.h deleted file mode 100644 index f71b649..0000000 --- a/include/osmocom/bsc/sgsn.h +++ /dev/null @@ -1,191 +0,0 @@ -#ifndef _SGSN_H -#define _SGSN_H - - -#include -#include -#include -#include -#include -#include - -#include - -struct gprs_gsup_client; -struct hostent; - -enum sgsn_auth_policy { - SGSN_AUTH_POLICY_OPEN, - SGSN_AUTH_POLICY_CLOSED, - SGSN_AUTH_POLICY_ACL_ONLY, - SGSN_AUTH_POLICY_REMOTE -}; - - -enum sgsn_rate_ctr_keys { - CTR_LLC_DL_BYTES, - CTR_LLC_UL_BYTES, - CTR_LLC_DL_PACKETS, - CTR_LLC_UL_PACKETS, - CTR_GPRS_ATTACH_REQUEST, - CTR_GPRS_ATTACH_ACKED, - CTR_GPRS_ATTACH_REJECTED, - CTR_GPRS_DETACH_REQUEST, - CTR_GPRS_DETACH_ACKED, - CTR_GPRS_ROUTING_AREA_REQUEST, - CTR_GPRS_ROUTING_AREA_ACKED, - CTR_GPRS_ROUTING_AREA_REJECT, - /* PDP single packet counter / GSM 04.08 9.5.1 - 9.5.9 */ - CTR_PDP_ACTIVATE_REQUEST, - CTR_PDP_ACTIVATE_REJECT, - CTR_PDP_ACTIVATE_ACCEPT, - CTR_PDP_REQUEST_ACTIVATE, /* unused */ - CTR_PDP_REQUEST_ACTIVATE_REJ, /* unused */ - CTR_PDP_MODIFY_REQUEST, /* unsued */ - CTR_PDP_MODIFY_ACCEPT, /* unused */ - CTR_PDP_DL_DEACTIVATE_REQUEST, - CTR_PDP_DL_DEACTIVATE_ACCEPT, - CTR_PDP_UL_DEACTIVATE_REQUEST, - CTR_PDP_UL_DEACTIVATE_ACCEPT, -}; - -struct sgsn_cdr { - char *filename; - int interval; -}; - -struct sgsn_config { - /* parsed from config file */ - - char *gtp_statedir; - struct sockaddr_in gtp_listenaddr; - - /* misc */ - struct gprs_ns_inst *nsi; - - enum sgsn_auth_policy auth_policy; - enum gprs_ciph_algo cipher; - struct llist_head imsi_acl; - - struct sockaddr_in gsup_server_addr; - int gsup_server_port; - - int require_authentication; - int require_update_location; - - /* CDR configuration */ - struct sgsn_cdr cdr; - - struct { - int T3312; - int T3322; - int T3350; - int T3360; - int T3370; - int T3313; - int T3314; - int T3316; - int T3385; - int T3386; - int T3395; - int T3397; - } timers; - - int dynamic_lookup; - - struct oap_client_config oap; - - /* RFC1144 TCP/IP header compression */ - struct { - int active; - int passive; - int s01; - } pcomp_rfc1144; - - /* V.42vis data compression */ - struct { - int active; - int passive; - int p0; - int p1; - int p2; - } dcomp_v42bis; - - struct { - int rab_assign_addr_enc; - } iu; -}; - -struct sgsn_instance { - char *config_file; - struct sgsn_config cfg; - /* File descriptor wrappers for LibGTP */ - struct osmo_fd gtp_fd0; - struct osmo_fd gtp_fd1c; - struct osmo_fd gtp_fd1u; - /* Timer for libGTP */ - struct osmo_timer_list gtp_timer; - /* GSN instance for libgtp */ - struct gsn_t *gsn; - /* Subscriber */ - struct gsup_client *gsup_client; - /* LLME inactivity timer */ - struct osmo_timer_list llme_timer; - - /* c-ares event loop integration */ - struct osmo_timer_list ares_timer; - struct llist_head ares_fds; - ares_channel ares_channel; - struct ares_addr_node *ares_servers; - - struct rate_ctr_group *rate_ctrs; -}; - -extern struct sgsn_instance *sgsn; - -/* sgsn_vty.c */ - -int sgsn_vty_init(struct sgsn_config *cfg); -int sgsn_parse_config(const char *config_file); - -/* sgsn.c */ - -/* Main input function for Gb proxy */ -int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci); - - -struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, - struct sgsn_mm_ctx *mmctx, - uint16_t nsapi, - struct tlv_parsed *tp); -int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx); -void sgsn_pdp_upd_gtp_u(struct sgsn_pdp_ctx *pdp, void *addr, size_t alen); - -/* gprs_sndcp.c */ - -/* Entry point for the SNSM-ACTIVATE.indication */ -int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); -/* Entry point for the SNSM-DEACTIVATE.indication */ -int sndcp_sm_deactivate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); -/* Called by SNDCP when it has received/re-assembled a N-PDU */ -int sgsn_rx_sndcp_ud_ind(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, - struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); -int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, - void *mmcontext); -int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, - uint8_t *hdr, uint16_t len); - - -/* - * CDR related functionality - */ -int sgsn_cdr_init(struct sgsn_instance *sgsn); - - -/* - * C-ARES related functionality - */ -int sgsn_ares_init(struct sgsn_instance *sgsn); -int sgsn_ares_query(struct sgsn_instance *sgsm, const char *name, ares_host_callback cb, void *data); - -#endif -- To view, visit https://gerrit.osmocom.org/5088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:26:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 14:26:16 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: mark gsm_objclass2mo as static In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: cosmetic: mark gsm_objclass2mo as static ...................................................................... cosmetic: mark gsm_objclass2mo as static It's only used once in the same file so there's no need to put it into global header. Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9 --- M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data_shared.c 2 files changed, 1 insertion(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 37f7976..1953ed4 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -858,10 +858,6 @@ void gsm_abis_mo_reset(struct gsm_abis_mo *mo); -struct gsm_abis_mo * -gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst); - struct gsm_nm_state * gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class, const struct abis_om_obj_inst *obj_inst); diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index b001562..8480892 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -485,7 +485,7 @@ } /* obtain the MO structure for a given object instance */ -struct gsm_abis_mo * +static inline struct gsm_abis_mo * gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, const struct abis_om_obj_inst *obj_inst) { -- To view, visit https://gerrit.osmocom.org/5089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:27:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 14:27:22 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 8: (1 comment) https://gerrit.osmocom.org/#/c/4906/8/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 140: OSMO_ASSERT(id); are we sure about all o those OSMO_ASSERT? Are we sure they are never called from a code path that receives MGCP messages and parses them? Basically it should not be possible to reach any of the OSMO_ASSERT from a hand-crafted invalid MGCP packet received. -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 14:32:16 +0000 Subject: [PATCH] osmo-bsc[master]: sccp-lite: remove obsolete VTY commands Message-ID: Review at https://gerrit.osmocom.org/5094 sccp-lite: remove obsolete VTY commands remove obsolete vty commands: - token - auth-key - no auth-key Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_vty.c 2 files changed, 0 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/94/5094/1 diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 4a283d1..a3e0106 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -72,10 +72,6 @@ /* Connection data */ - char *bsc_token; - uint8_t bsc_key[16]; - uint8_t bsc_key_present; - int ping_timeout; int pong_timeout; struct osmo_timer_list ping_timer; diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index 0003cfa..a87b20f 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -108,11 +108,6 @@ struct bsc_msc_dest *dest; vty_out(vty, "msc %d%s", msc->nr, VTY_NEWLINE); - if (msc->bsc_token) - vty_out(vty, " token %s%s", msc->bsc_token, VTY_NEWLINE); - if (msc->bsc_key_present) - vty_out(vty, " auth-key %s%s", - osmo_hexdump(msc->bsc_key, sizeof(msc->bsc_key)), VTY_NEWLINE); if (msc->core_mnc != -1) vty_out(vty, " core-mobile-network-code %d%s", msc->core_mnc, VTY_NEWLINE); @@ -233,41 +228,6 @@ if (bsc->acc_lst_name) vty_out(vty, " access-list-name %s%s", bsc->acc_lst_name, VTY_NEWLINE); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_bsc_token, - cfg_net_bsc_token_cmd, - "token TOKEN", - "A token for the BSC to be sent to the MSC\n" "A token\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - osmo_talloc_replace_string(osmo_bsc_data(vty), &data->bsc_token, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_bsc_key, - cfg_net_bsc_key_cmd, - "auth-key KEY", - "Authentication (secret) key configuration\n" - "Security key\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - osmo_hexparse(argv[0], data->bsc_key, sizeof(data->bsc_key)); - data->bsc_key_present = 1; - return CMD_SUCCESS; -} - -DEFUN(cfg_net_no_bsc_key, cfg_net_bsc_no_key_cmd, - "no auth-key", - NO_STR "Authentication (secret) key configuration\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - memset(data->bsc_key, 0, sizeof(data->bsc_key)); - data->bsc_key_present = 0; return CMD_SUCCESS; } @@ -989,9 +949,6 @@ install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd); install_node(&msc_node, config_write_msc); - install_element(MSC_NODE, &cfg_net_bsc_token_cmd); - install_element(MSC_NODE, &cfg_net_bsc_key_cmd); - install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd); install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); install_element(MSC_NODE, &cfg_net_bsc_mcc_cmd); install_element(MSC_NODE, &cfg_net_bsc_lac_cmd); -- To view, visit https://gerrit.osmocom.org/5094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 14:32:16 +0000 Subject: [PATCH] osmo-bsc[master]: auth: remove unused structs Message-ID: Review at https://gerrit.osmocom.org/5095 auth: remove unused structs The following structs are no longer used/needed: - gsm_auth_algo - gsm_auth_info - gsm_auth_tuple - gsm_security_operation Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 0 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/95/5095/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..865340d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -55,35 +55,6 @@ struct msgb *msg, void *data, void *param); -/* Real authentication information containing Ki */ -enum gsm_auth_algo { - AUTH_ALGO_NONE, - AUTH_ALGO_XOR, - AUTH_ALGO_COMP128v1, -}; - -struct gsm_auth_info { - enum gsm_auth_algo auth_algo; - unsigned int a3a8_ki_len; - uint8_t a3a8_ki[16]; -}; - -struct gsm_auth_tuple { - int use_count; - int key_seq; - struct osmo_auth_vector vec; -}; -#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */ - -/* - * AUTHENTICATION/CIPHERING state - */ -struct gsm_security_operation { - struct gsm_auth_tuple atuple; - gsm_cbfn *cb; - void *cb_data; -}; - /* * A dummy to keep a connection up for at least * a couple of seconds to work around MSC issues. -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Nov 29 14:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 14:32:16 +0000 Subject: [PATCH] osmo-bsc[master]: auth: remove obsolete VTY commands Message-ID: Review at https://gerrit.osmocom.org/5096 auth: remove obsolete VTY commands authentication (optional|required) is no longer needed, the related decisions are now made in the HLR. Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 4 files changed, 0 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/96/5096/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 60338d2..64c3abd 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -10,7 +10,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index f9f5ba6..7697481 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -9,7 +9,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..3f3935c 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -802,9 +802,6 @@ vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); - vty_out(vty, " authentication %s%s", - gsmnet->authentication_required ? "required" : "optional", - VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 51f16c4..74b1a93 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -134,20 +134,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_authentication, - cfg_net_authentication_cmd, - "authentication (optional|required)", - "Whether to enforce MS authentication in 2G\n" - "Allow MS to attach via 2G BSC without authentication\n" - "Always do authentication\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->authentication_required = (argv[0][0] == 'r') ? true : false; - - return CMD_SUCCESS; -} - DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", "Radio Resource Location Protocol\n" @@ -297,7 +283,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_authentication_cmd); install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From admin at opensuse.org Wed Nov 29 15:03:03 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:03:03 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a1ecc357696c_7c5411aef54331438@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 43s] libgtk2.0-0:amd64 depends on adwaita-icon-theme | gnome-icon-theme; however: [ 43s] Package adwaita-icon-theme is not installed. [ 43s] Package gnome-icon-theme is not installed. [ 43s] Processing triggers for libc-bin (2.26-0ubuntu2) ... [ 43s] [350/351] installing libwxgtk3.0-0v5-3.0.3.1+dfsg2-1 [ 43s] Processing triggers for libc-bin (2.26-0ubuntu2) ... [ 43s] [351/351] installing libwxgtk3.0-dev-3.0.3.1+dfsg2-1 [ 43s] update-alternatives: using /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 43s] configuring all installed packages... [ 43s] removing nis flags from //etc/nsswitch.conf... [ 43s] now finalizing build dir... [ 43s] SIOCSIFADDR: File exists [ 43s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc) [ 43s] dpkg-source: error: cannot fstat file /usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or directory [ 43s] ----------------------------------------------------------------- [ 43s] ----- building limesuite_17.06.0-1.dsc (user abuild) [ 43s] ----------------------------------------------------------------- [ 43s] ----------------------------------------------------------------- [ 43s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory [ 43s] ln: failed to access '///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or directory [ 43s] [ 43s] build83 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:02:46 UTC 2017. [ 43s] [ 43s] ### VM INTERACTION START ### [ 47s] [ 41.495950] reboot: Power down [ 47s] ### VM INTERACTION END ### [ 47s] [ 47s] build83 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:02:50 UTC 2017. [ 47s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:03:20 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:03:20 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a1ecc53eb93e_7c5411aef54331525@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/i586 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 80s] [339/342] installing libwxgtk3.0-0v5-3.0.2+dfsg-2 [ 80s] Processing triggers for libc-bin (2.24-3ubuntu1) ... [ 80s] [340/342] installing dh-strip-nondeterminism-0.028-1 [ 80s] Processing triggers for man-db (2.7.5-1) ... [ 81s] [341/342] installing dh-autoreconf-12 [ 81s] Processing triggers for man-db (2.7.5-1) ... [ 81s] [342/342] installing libwxgtk3.0-dev-3.0.2+dfsg-2 [ 81s] update-alternatives: using /usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 81s] configuring all installed packages... [ 81s] removing nis flags from //etc/nsswitch.conf... [ 81s] now finalizing build dir... [ 81s] SIOCSIFADDR: File exists [ 81s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc) [ 81s] dpkg-source: error: cannot fstat file /usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or directory [ 81s] ----------------------------------------------------------------- [ 81s] ----- building limesuite_17.06.0-1.dsc (user abuild) [ 81s] ----------------------------------------------------------------- [ 81s] ----------------------------------------------------------------- [ 81s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory [ 81s] ln: failed to access '///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or directory [ 81s] [ 81s] lamb14 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:00 UTC 2017. [ 81s] [ 81s] ### VM INTERACTION START ### [ 84s] [ 75.935473] reboot: Power down [ 84s] ### VM INTERACTION END ### [ 84s] [ 84s] lamb14 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:03 UTC 2017. [ 84s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:03:54 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:03:54 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a1ecc73e3f7a_7c5411aef543321f2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/x86_64 Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 101s] [323/326] installing dh-autoreconf-14 [ 101s] Processing triggers for man-db (2.7.6.1-2) ... [ 101s] [324/326] installing libgtk2.0-0-2.24.31-2 [ 101s] Processing triggers for libc-bin (2.24-11+deb9u1) ... [ 101s] [325/326] installing libwxgtk3.0-0v5-3.0.2+dfsg-4 [ 102s] Processing triggers for libc-bin (2.24-11+deb9u1) ... [ 102s] [326/326] installing libwxgtk3.0-dev-3.0.2+dfsg-4 [ 102s] update-alternatives: using /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 102s] configuring all installed packages... [ 102s] removing nis flags from //etc/nsswitch.conf... [ 102s] now finalizing build dir... [ 102s] SIOCSIFADDR: File exists [ 102s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc) [ 102s] dpkg-source: error: cannot fstat file /usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or directory [ 102s] ----------------------------------------------------------------- [ 102s] ----- building limesuite_17.06.0-1.dsc (user abuild) [ 102s] ----------------------------------------------------------------- [ 102s] ----------------------------------------------------------------- [ 103s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory [ 103s] ln: failed to access '///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or directory [ 103s] [ 103s] lamb19 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:48 UTC 2017. [ 103s] [ 103s] ### VM INTERACTION START ### [ 106s] [ 96.458407] reboot: Power down [ 106s] ### VM INTERACTION END ### [ 106s] [ 106s] lamb19 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:51 UTC 2017. [ 106s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:03:54 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:03:54 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a1ecc7438a6b_7c5411aef543322a5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 101s] [347/350] installing libwxgtk3.0-0v5-3.0.2+dfsg-4 [ 102s] Processing triggers for libc-bin (2.24-9ubuntu2) ... [ 102s] [348/350] installing dh-strip-nondeterminism-0.032-1 [ 102s] Processing triggers for man-db (2.7.6.1-2) ... [ 103s] [349/350] installing dh-autoreconf-13 [ 103s] Processing triggers for man-db (2.7.6.1-2) ... [ 103s] [350/350] installing libwxgtk3.0-dev-3.0.2+dfsg-4 [ 103s] update-alternatives: using /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 103s] configuring all installed packages... [ 103s] removing nis flags from //etc/nsswitch.conf... [ 103s] now finalizing build dir... [ 103s] SIOCSIFADDR: File exists [ 104s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.06.0-1.dsc) [ 104s] dpkg-source: error: cannot fstat file /usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz: No such file or directory [ 104s] ----------------------------------------------------------------- [ 104s] ----- building limesuite_17.06.0-1.dsc (user abuild) [ 104s] ----------------------------------------------------------------- [ 104s] ----------------------------------------------------------------- [ 104s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory [ 104s] ln: failed to access '///usr/src/packages/SOURCES/limesuite_17.06.0.orig.tar.gz': No such file or directory [ 104s] [ 104s] lamb55 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:48 UTC 2017. [ 104s] [ 104s] ### VM INTERACTION START ### [ 107s] [ 98.895275] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] lamb55 failed "build limesuite_17.06.0-1.dsc" at Wed Nov 29 15:03:51 UTC 2017. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:03:54 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:03:54 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a1ecc74ad717_7c5411aef543323ed@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/i586 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:22:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:22:57 +0000 Subject: osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 let's also remove the authentication_required field from gsm_network (gsm_data_shared.h) -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:24:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:24:49 +0000 Subject: osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: > let's also remove the authentication_required field from > gsm_network (gsm_data_shared.h) actually gsm_data.h -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:26:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:26:53 +0000 Subject: osmo-bsc[master]: auth: remove unused structs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5095/1/include/osmocom/bsc/gsm_data.h File include/osmocom/bsc/gsm_data.h: Line 161 -1: also drop this -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:36:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:36:02 +0000 Subject: osmo-bsc[master]: sccp-lite: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 it appears that all three of the struct members removed in bsc_msc_data.h are still being used in osmo_bsc_msc.c ... wondering how that can pass the build, but it certainly does somehow. Could you clarify this? osmo-bsc_nat also appears to have related code. -- To view, visit https://gerrit.osmocom.org/5094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From admin at opensuse.org Wed Nov 29 15:37:21 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:37:21 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a1ed4507ee85_7c5411aef54341412@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/i586 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 80s] [348/348] installing libwxgtk3.0-dev-3.0.2+dfsg-4 [ 80s] update-alternatives: using /usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 80s] configuring all installed packages... [ 80s] removing nis flags from //etc/nsswitch.conf... [ 80s] now finalizing build dir... [ 80s] SIOCSIFADDR: File exists [ 81s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc) [ 81s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD [ 81s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz [ 81s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz [ 81s] ----------------------------------------------------------------- [ 81s] ----- building limesuite_17.09.1-1.dsc (user abuild) [ 81s] ----------------------------------------------------------------- [ 81s] ----------------------------------------------------------------- [ 81s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted trailer line [ 81s] LINE: -- Lime Microsystems Fri Sep 1 15:43:31 2017 +0300 [ 81s] dpkg-buildpackage: warning: debian/changelog(l7): found start of entry where expected more change data or trailer [ 81s] LINE: limesuite (17.09.0-1) unstable; urgency=low [ 81s] dpkg-buildpackage: warning: debian/changelog(l7): found end of file where expected more change data or trailer [ 81s] Can't call method "epoch" on an undefined value at /usr/share/perl5/Dpkg/Changelog.pm line 498. [ 81s] [ 81s] lamb75 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:08 UTC 2017. [ 81s] [ 81s] ### VM INTERACTION START ### [ 85s] [ 75.137972] reboot: Power down [ 85s] ### VM INTERACTION END ### [ 85s] [ 85s] lamb75 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:13 UTC 2017. [ 85s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:37:38 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:37:38 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a1ed45246fbf_7c5411aef54341935@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 87s] [350/350] installing libwxgtk3.0-dev-3.0.2+dfsg-4 [ 87s] update-alternatives: using /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 87s] configuring all installed packages... [ 87s] removing nis flags from //etc/nsswitch.conf... [ 87s] now finalizing build dir... [ 87s] SIOCSIFADDR: File exists [ 87s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc) [ 88s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD [ 88s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz [ 88s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz [ 88s] ----------------------------------------------------------------- [ 88s] ----- building limesuite_17.09.1-1.dsc (user abuild) [ 88s] ----------------------------------------------------------------- [ 88s] ----------------------------------------------------------------- [ 88s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted trailer line [ 88s] LINE: -- Lime Microsystems Fri Sep 1 15:43:31 2017 +0300 [ 88s] dpkg-buildpackage: warning: debian/changelog(l7): found start of entry where expected more change data or trailer [ 88s] LINE: limesuite (17.09.0-1) unstable; urgency=low [ 88s] dpkg-buildpackage: warning: debian/changelog(l7): found end of file where expected more change data or trailer [ 88s] Can't call method "epoch" on an undefined value at /usr/share/perl5/Dpkg/Changelog.pm line 498. [ 88s] [ 88s] lamb55 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:33 UTC 2017. [ 88s] [ 88s] ### VM INTERACTION START ### [ 92s] [ 82.402653] reboot: Power down [ 92s] ### VM INTERACTION END ### [ 92s] [ 92s] lamb55 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:37 UTC 2017. [ 92s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:37:55 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:37:55 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a1ed46cb2aad_7c5411aef5434202a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/i586 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 108s] [342/342] installing libwxgtk3.0-dev-3.0.2+dfsg-2 [ 108s] update-alternatives: using /usr/lib/i386-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 108s] configuring all installed packages... [ 108s] removing nis flags from //etc/nsswitch.conf... [ 108s] now finalizing build dir... [ 108s] SIOCSIFADDR: File exists [ 109s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc) [ 109s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD [ 109s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz [ 109s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz [ 109s] ----------------------------------------------------------------- [ 109s] ----- building limesuite_17.09.1-1.dsc (user abuild) [ 109s] ----------------------------------------------------------------- [ 109s] ----------------------------------------------------------------- [ 110s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted trailer line [ 110s] LINE: -- Lime Microsystems Fri Sep 1 15:43:31 2017 +0300 [ 110s] dpkg-buildpackage: warning: debian/changelog(l7): found start of entry where expected more change data or trailer [ 110s] LINE: limesuite (17.09.0-1) unstable; urgency=low [ 110s] dpkg-buildpackage: warning: debian/changelog(l7): found end of file where expected more change data or trailer [ 110s] Can't call method "epoch" on an undefined value at /usr/share/perl5/Dpkg/Changelog.pm line 498. [ 110s] [ 110s] cloud104 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:38 UTC 2017. [ 110s] [ 110s] ### VM INTERACTION START ### [ 113s] [ 96.202281] reboot: Power down [ 116s] ### VM INTERACTION END ### [ 116s] [ 116s] cloud104 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:46 UTC 2017. [ 116s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:37:55 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:37:55 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a1ed46dcf9e9_7c5411aef54342156@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/limesuite failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 87s] [344/344] installing libwxgtk3.0-dev-3.0.2+dfsg-2 [ 87s] update-alternatives: using /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-3.0 to provide /usr/bin/wx-config (wx-config) in auto mode [ 87s] configuring all installed packages... [ 87s] removing nis flags from //etc/nsswitch.conf... [ 87s] now finalizing build dir... [ 87s] SIOCSIFADDR: File exists [ 87s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES/limesuite_17.09.1-1.dsc) [ 88s] dpkg-source: info: extracting limesuite in /usr/src/packages/BUILD [ 88s] dpkg-source: info: unpacking limesuite_17.09.1.orig.tar.gz [ 88s] dpkg-source: info: unpacking limesuite_17.09.1-1.debian.tar.xz [ 88s] ----------------------------------------------------------------- [ 88s] ----- building limesuite_17.09.1-1.dsc (user abuild) [ 88s] ----------------------------------------------------------------- [ 88s] ----------------------------------------------------------------- [ 88s] dpkg-buildpackage: warning: debian/changelog(l5): badly formatted trailer line [ 88s] LINE: -- Lime Microsystems Fri Sep 1 15:43:31 2017 +0300 [ 88s] dpkg-buildpackage: warning: debian/changelog(l7): found start of entry where expected more change data or trailer [ 88s] LINE: limesuite (17.09.0-1) unstable; urgency=low [ 88s] dpkg-buildpackage: warning: debian/changelog(l7): found end of file where expected more change data or trailer [ 88s] Can't call method "epoch" on an undefined value at /usr/share/perl5/Dpkg/Changelog.pm line 498. [ 88s] [ 88s] lamb18 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:36 UTC 2017. [ 88s] [ 88s] ### VM INTERACTION START ### [ 92s] [ 83.466399] reboot: Power down [ 92s] ### VM INTERACTION END ### [ 92s] [ 92s] lamb18 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:37:41 UTC 2017. [ 92s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:38:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:38:45 +0000 Subject: osmo-bsc[master]: sccp-lite: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 ah! just spotted the #if 0 all around that code in bsc_msc_data.c, vim coloring didn't work because of some comments in there apparently. So ok to remove, also follow up with dropping the #if 0 code I guess. Also I guess the osmo-bsc_nat is fine to still entertain a token. -- To view, visit https://gerrit.osmocom.org/5094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:02 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5041 to look at the new patch set (#2). mobile: Declare struct osmocom/vty to be self includeable In file included from settings.c:27:0: ../../include/osmocom/bb/mobile/app_mobile.h:10:42: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), ^~~~~~~~~~ ../../include/osmocom/bb/mobile/app_mobile.h:14:26: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int mobile_delete(struct osmocom_ms *ms, int force); Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/5041/2 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 83c07d6..23d0ac8 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -5,6 +5,9 @@ extern char *config_dir; +struct osmocom_ms; +struct vty; + int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); int l23_app_exit(void); -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:02 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4737 to look at the new patch set (#7). mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 226 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/7 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 7a935f9..8f5cdc3 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -85,6 +85,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index eb54e2c..d2457c4 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -22,5 +22,8 @@ void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct osmocom_ms *ms); + #endif diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 47870e5..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..b3b9c99 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *L) +{ + lua_getglobal(L, "_G"); + luaL_setfuncs(L, global_runtime, 0); + lua_pop(L, 1); +} + +static void add_runtime(lua_State *L, struct osmocom_ms *ms) +{ + add_globals(L); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..61466f7 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 2b51837..6d50c6b 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -143,6 +144,8 @@ talloc_free(abbrev); } + script_lua_close(ms); + return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 81c20fe..8767985 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1531,6 +1531,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2740,6 +2742,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2931,6 +2957,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:02 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4840 to look at the new patch set (#5). mobile: Create "ms" singleton for struct osmocom_ms Make the MS the script is associated with accessible to lua. Provide access to IMSI and IMEI. The IMSI might not be available at the given time and just return an empty string. Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/script_lua.c 3 files changed, 272 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/40/4840/5 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 8f5cdc3..486c36d 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -87,6 +87,7 @@ struct llist_head trans_list; void *lua_state; + int lua_cb_ref; char *lua_script; }; diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 0c0d4d7..a7af1f5 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -39,6 +39,7 @@ #include #include #include +#include #include extern void *l23_ctx; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index cd7e8bc..cbba070 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -94,6 +95,30 @@ { NULL, NULL }, }; +/* Push table and function. Stack+=2 */ +static bool load_cb(lua_State *L, int ref, const char *cb_name) +{ + lua_rawgeti(L, LUA_REGISTRYINDEX, ref); + lua_pushstring(L, cb_name); + lua_gettable(L, -2); + if (lua_isnil(L, -1)) { + LOGP(DLUA, LOGL_DEBUG, "No handler for %s\n", cb_name); + lua_pop(L, 2); + return false; + } + return true; +} + +/* Call callback. Stack-=func + args. func/args popped by lua_pcall */ +static void call_cb(lua_State *L, int args) +{ + int err = lua_pcall(L, args, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 2); + } +} + static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_userdata *timer = (void *)(intptr_t) param->timer_id; @@ -108,6 +133,109 @@ LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); lua_pop(L, 1); } +} + +static void handle_started(struct mobile_prim_intf *intf, struct mobile_started_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Started")) + return; + + lua_pushinteger(L, param->started); + + call_cb(L, 1); + lua_pop(L, 1); +} + +static void handle_shutdown(struct mobile_prim_intf *intf, struct mobile_shutdown_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Shutdown")) + return; + + lua_pushinteger(L, param->old_state); + lua_pushinteger(L, param->new_state); + + call_cb(L, 2); + lua_pop(L, 1); +} + +static void handle_sms(struct mobile_prim_intf *intf, struct mobile_sms_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Sms")) + return; + + lua_createtable(L, 0, 11); + + lua_pushinteger(L, param->sms.validity_minutes); + lua_setfield(L, -2, "validity_minutes"); + + lua_pushinteger(L, param->sms.reply_path_req); + lua_setfield(L, -2, "reply_path_req"); + + lua_pushinteger(L, param->sms.status_rep_req); + lua_setfield(L, -2, "status_rep_req"); + + lua_pushinteger(L, param->sms.ud_hdr_ind); + lua_setfield(L, -2, "ud_hdr_ind"); + + lua_pushinteger(L, param->sms.protocol_id); + lua_setfield(L, -2, "protocol_id"); + + lua_pushinteger(L, param->sms.data_coding_scheme); + lua_setfield(L, -2, "data_coding_scheme"); + + lua_pushinteger(L, param->sms.msg_ref); + lua_setfield(L, -2, "msg_ref"); + + lua_pushstring(L, param->sms.address); + lua_setfield(L, -2, "address"); + + lua_pushinteger(L, param->sms.time); + lua_setfield(L, -2, "time"); + + lua_pushlstring(L, (char *) param->sms.user_data, param->sms.user_data_len); + lua_setfield(L, -2, "user_data"); + + lua_pushstring(L, param->sms.text); + lua_setfield(L, -2, "text"); + + lua_pushinteger(L, param->cause_valid); + lua_pushinteger(L, param->cause); + + call_cb(L, 3); + lua_pop(L, 1); +} + +static void handle_mm(struct mobile_prim_intf *intf, struct mobile_mm_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Mm")) + return; + + lua_pushinteger(L, param->state); + lua_pushinteger(L, param->substate); + lua_pushinteger(L, param->prev_substate); + + call_cb(L, 3); + lua_pop(L, 1); } static int lua_osmo_timeout(lua_State *L) @@ -164,8 +292,125 @@ { NULL, NULL }, }; +static int lua_osmo_ms(lua_State *L) +{ + lua_pushlightuserdata(L, get_primitive(L)->ms); + luaL_getmetatable(L, "MS"); + lua_setmetatable(L, -2); + + return 1; +} + +static int lua_ms_imei(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->settings.imei); + return 1; +} +static int lua_ms_imsi(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->subscr.imsi); + return 1; +} + +static int lua_ms_shutdown_state(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->shutdown); + return 1; +} + +static int lua_ms_started(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->started); + return 1; +} + +static int lua_ms_register(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + /* callbacks must be a table */ + luaL_checktype(L, 2, LUA_TTABLE); + + if (ms->lua_cb_ref != LUA_REFNIL) + luaL_unref(L, LUA_REGISTRYINDEX, ms->lua_cb_ref); + ms->lua_cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + return 0; +} + +static int lua_ms_no_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + char *name; + int res; + + res = mobile_start(ms, &name); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + int argc = lua_gettop(L); + int force = 0; + int res; + + if (argc >= 1) { + luaL_argcheck(L, lua_isboolean(L, -1), 1, "Force"); + force = lua_toboolean(L, -1); + } + + res = mobile_stop(ms, force); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_sms_send_simple(lua_State *L) +{ + const char *sms_sca, *number, *text; + int msg_ref, rc; + + luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); + luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); + luaL_argcheck(L, lua_isstring(L, -3), 2, "number must be a string"); + luaL_argcheck(L, lua_isstring(L, -4), 1, "sms_sca must be a string"); + + msg_ref = (int) lua_tonumber(L, -1); + text = lua_tostring(L, -2); + number = lua_tostring(L, -3); + sms_sca = lua_tostring(L, -4); + + rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); + lua_pushinteger(L, rc); + return 1; +} + +static const struct luaL_Reg ms_funcs[] = { + { "imsi", lua_ms_imsi }, + { "imei", lua_ms_imei }, + { "shutdown_state", lua_ms_shutdown_state }, + { "started", lua_ms_started }, + { "register", lua_ms_register }, + { "start", lua_ms_no_shutdown }, + { "stop", lua_ms_shutdown }, + { "sms_send_simple", lua_ms_sms_send_simple }, + { NULL, NULL }, +}; + + static const struct luaL_Reg osmo_funcs[] = { { "timeout", lua_osmo_timeout }, + { "ms", lua_osmo_ms }, { NULL, NULL }, }; @@ -174,6 +419,18 @@ switch (OSMO_PRIM_HDR(&prim->hdr)) { case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): handle_timeout(intf, (struct mobile_timer_param *) &prim->u.timer); + break; + case OSMO_PRIM(PRIM_MOB_STARTED, PRIM_OP_INDICATION): + handle_started(intf, (struct mobile_started_param *) &prim->u.started); + break; + case OSMO_PRIM(PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION): + handle_shutdown(intf, (struct mobile_shutdown_param *) &prim->u.shutdown); + break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_INDICATION): + handle_sms(intf, (struct mobile_sms_param *) &prim->u.sms); + break; + case OSMO_PRIM(PRIM_MOB_MM, PRIM_OP_INDICATION): + handle_mm(intf, (struct mobile_mm_param *) &prim->u.mm); break; default: LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); @@ -196,6 +453,16 @@ lua_pop(L, 1); } +static void create_meta_table(lua_State *L, const char *name, const luaL_Reg *regs) +{ + luaL_newmetatable(L, name); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, regs, 0); + lua_pop(L, 1); +} + static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); @@ -206,13 +473,8 @@ lua_setglobal(L, "osmo"); /* Create metatables so we can GC objects... */ - luaL_newmetatable(L, "Timer"); - lua_pushliteral(L, "__index"); - lua_pushvalue(L, -2); - lua_rawset(L, -3); - luaL_setfuncs(L, timer_funcs, 0); - lua_pop(L, 1); - + create_meta_table(L, "Timer", timer_funcs); + create_meta_table(L, "MS", ms_funcs); /* Remember the primitive pointer... store it in the registry */ lua_pushlightuserdata(L, lua_prim_key); @@ -251,6 +513,7 @@ if (!ms->lua_state) return -1; + ms->lua_cb_ref = LUA_REFNIL; luaL_openlibs(ms->lua_state); intf = mobile_prim_intf_alloc(ms); -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:03 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: ms->shutdown was not converted properly to enum Message-ID: Review at https://gerrit.osmocom.org/5097 mobile: ms->shutdown was not converted properly to enum ms->shutdown is ms->shutdown != 0 which should have been converted to ms->shutdown != MS_SHUTDOWN_NONE. This is fixing sending SMS. This was introduced in Iee1140e4848923c7270495c381bf87b7e3fddee1. Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/97/5097/1 diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 73fad84..f09d7a1 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -632,7 +632,7 @@ LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n"); /* no running, no transaction */ - if (!ms->started || ms->shutdown != MS_SHUTDOWN_COMPL) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { LOGP(DLSMS, LOGL_ERROR, "Phone is down\n"); gsm411_sms_report(ms, sms, GSM411_RP_CAUSE_MO_TEMP_FAIL); sms_free(sms); -- To view, visit https://gerrit.osmocom.org/5097 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:03 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms Message-ID: Review at https://gerrit.osmocom.org/5098 mobile: Re-introduce msg_ref in struct gsm_sms In I4bac5f06921b5fd85a98d97770d42d4858ca1c42 I have removed the msg_ref field. But in case we delete a transaction with a pending SMS we need to get the msg_ref from somewhere. This is a partial revert but for RX SMS it makes sure that msg_ref will be set (it wasn't set before). Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c 2 files changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/98/5098/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index 0d0578a..a94d1aa 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -11,6 +11,7 @@ uint8_t ud_hdr_ind; uint8_t protocol_id; uint8_t data_coding_scheme; + uint8_t msg_ref; char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes * BCD == 20 bytes string */ time_t time; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index f09d7a1..eb09854 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -232,6 +232,7 @@ int rc = 0; gsms = sms_alloc(); + gsms->msg_ref = msg_ref; /* invert those fields where 0 means active/present */ sms_mti = *smsp & 0x03; @@ -296,7 +297,7 @@ LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, " "UserDataLength: 0x%02x, UserData: \"%s\"\n", - sms_mti, msg_ref, + sms_mti, gsms->msg_ref, gsms->protocol_id, gsms->data_coding_scheme, gsms->address, gsms->user_data_len, sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text : @@ -528,7 +529,7 @@ /* generate a msgb containing a TPDU derived from struct gsm_sms, * returns total size of TPDU */ -static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t msg_ref) +static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms) { uint8_t *smsp; uint8_t da[12]; /* max len per 03.40 */ @@ -559,7 +560,7 @@ /* generate message ref */ smsp = msgb_put(msg, 1); - *smsp = msg_ref; + *smsp = sms->msg_ref; /* generate destination address */ if (sms->address[0] == '+') @@ -620,7 +621,7 @@ /* Take a SMS in gsm_sms structure and send it. */ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, - struct gsm_sms *sms, uint8_t msg_ref) + struct gsm_sms *sms) { struct msgb *msg; struct gsm_trans *trans; @@ -688,14 +689,14 @@ rp_ud_len = (uint8_t *)msgb_put(msg, 1); /* generate the 03.40 TPDU */ - rc = gsm340_gen_tpdu(msg, sms, msg_ref); + rc = gsm340_gen_tpdu(msg, sms); if (rc < 0) goto error; *rp_ud_len = rc; LOGP(DLSMS, LOGL_INFO, "TX: SMS DELIVER\n"); - gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, msg_ref); + gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, sms->msg_ref); return gsm411_smr_send(&trans->sms.smr_inst, GSM411_SM_RL_DATA_REQ, msg); } @@ -709,7 +710,8 @@ if (!sms) return -ENOMEM; - return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref); + sms->msg_ref = msg_ref; + return gsm411_tx_sms_submit(ms, sms_sca, sms); } /* -- To view, visit https://gerrit.osmocom.org/5098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:03 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Use enum and not magic value in the VTY Message-ID: Review at https://gerrit.osmocom.org/5099 mobile: Use enum and not magic value in the VTY Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/99/5099/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 5a47736..eafed6e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2703,7 +2703,7 @@ return CMD_SUCCESS; llist_for_each_entry(tmp, &ms_list, entity) { - if (tmp->shutdown == 3) + if (tmp->shutdown == MS_SHUTDOWN_COMPL) continue; if (!strcmp(ms->settings.layer2_socket_path, tmp->settings.layer2_socket_path)) { -- To view, visit https://gerrit.osmocom.org/5099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:03 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function Message-ID: Review at https://gerrit.osmocom.org/5100 mobile: Move starting/stopping a MS into a separate function Move the check if within the mobile app there is no other active MS using the same L1 socket. This way we can call this function from the primitive code as well. Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 67 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/00/5100/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 23d0ac8..eb54e2c 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -14,9 +14,10 @@ int l23_app_work(int *quit); int mobile_delete(struct osmocom_ms *ms, int force); struct osmocom_ms *mobile_new(char *name); -int mobile_init(struct osmocom_ms *ms); int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int mobile_start(struct osmocom_ms *ms, char **other_name); +int mobile_stop(struct osmocom_ms *ms, int force); void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index c5c84e6..b2900ad 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -181,7 +181,7 @@ } /* power-on ms instance */ -int mobile_init(struct osmocom_ms *ms) +static int mobile_init(struct osmocom_ms *ms) { int rc; @@ -245,6 +245,51 @@ return 0; } +int mobile_start(struct osmocom_ms *ms, char **other_name) +{ + struct osmocom_ms *tmp; + int rc; + + if (ms->shutdown != MS_SHUTDOWN_COMPL) + return 0; + + llist_for_each_entry(tmp, &ms_list, entity) { + if (tmp->shutdown == MS_SHUTDOWN_COMPL) + continue; + if (!strcmp(ms->settings.layer2_socket_path, + tmp->settings.layer2_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -1; + } + if (!strcmp(ms->settings.sap_socket_path, + tmp->settings.sap_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -2; + } + } + + rc = mobile_init(ms); + if (rc < 0) + return -3; + return 0; +} + +int mobile_stop(struct osmocom_ms *ms, int force) +{ + if (force && ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) + return mobile_exit(ms, 1); + if (!force && ms->shutdown == MS_SHUTDOWN_NONE) + return mobile_exit(ms, 0); + return 0; +} + + /* create ms instance */ struct osmocom_ms *mobile_new(char *name) { diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index eafed6e..81c20fe 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2696,35 +2696,25 @@ DEFUN(cfg_no_shutdown, cfg_ms_no_shutdown_cmd, "no shutdown", NO_STR "Activate and run MS") { - struct osmocom_ms *ms = vty->index, *tmp; + struct osmocom_ms *ms = vty->index; + char *other_name = NULL; int rc; - if (ms->shutdown != MS_SHUTDOWN_COMPL) - return CMD_SUCCESS; - - llist_for_each_entry(tmp, &ms_list, entity) { - if (tmp->shutdown == MS_SHUTDOWN_COMPL) - continue; - if (!strcmp(ms->settings.layer2_socket_path, - tmp->settings.layer2_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same layer2-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - if (!strcmp(ms->settings.sap_socket_path, - tmp->settings.sap_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same sap-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - } - - rc = mobile_init(ms); - if (rc < 0) { + rc = mobile_start(ms, &other_name); + switch (rc) { + case -1: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -2: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -3: vty_out(vty, "Connection to layer 1 failed!%s", VTY_NEWLINE); return CMD_WARNING; @@ -2737,10 +2727,7 @@ "Shut down and deactivate MS") { struct osmocom_ms *ms = vty->index; - - if (ms->shutdown == MS_SHUTDOWN_NONE) - mobile_exit(ms, 0); - + mobile_stop(ms, 0); return CMD_SUCCESS; } @@ -2749,9 +2736,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) - mobile_exit(ms, 1); - + mobile_stop(ms, 1); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:04 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:04 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind Message-ID: Review at https://gerrit.osmocom.org/5101 mobile: Notify MM status changes and generate primitive op ind Notify once the mm state has been changed. Unfortunaley one state transition can immediately trigger more transitions (recursively). In the mid-term it might be best to force all primitives to be async to avoid unpredictable behavior (e.g. make a shutdown while being a recursion down?) Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/01/5101/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 6804fc0..39b4945 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -19,6 +19,7 @@ PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, PRIM_MOB_SMS, + PRIM_MOB_MM, }; struct mobile_prim_intf { @@ -65,6 +66,15 @@ int cause; }; +/** + * Mobility Management (MM) state changes. + */ +struct mobile_mm_param { + int state; /*!< The new MM state */ + int substate; /*!< The current substate */ + int prev_substate; /*!< The previous substate */ +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { @@ -72,6 +82,7 @@ struct mobile_started_param started; struct mobile_shutdown_param shutdown; struct mobile_sms_param sms; + struct mobile_mm_param mm; } u; }; @@ -86,3 +97,4 @@ void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int subs, int old_subs); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index f32d57a..0c0d4d7 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -961,6 +961,7 @@ mm->state = state; mm->substate = substate; + mobile_prim_ntfy_mm_status(ms, mm->state, mm->substate, mm->mr_substate); /* resend detach event, if flag is set */ if (state == GSM48_MM_ST_MM_IDLE && mm->delay_detach) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index 0902139..fd486ea 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -144,6 +144,16 @@ dispatch(ms, prim); } +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int substate, int mr_substate) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_MM, PRIM_OP_INDICATION); + + prim->u.mm.state = state; + prim->u.mm.substate = substate; + prim->u.mm.prev_substate = mr_substate; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/5101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:39:04 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 15:39:04 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Use new LOGPSRCC macro to print multiple values Message-ID: Review at https://gerrit.osmocom.org/5102 mobile: Use new LOGPSRCC macro to print multiple values We need continuation to avoid printing the logging category again. E.g. when print(one, two, three) is called. Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/5102/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index cbba070..422f9e4 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -56,10 +56,11 @@ lua_getstack(L, 1, &ar); lua_getinfo(L, "nSl", &ar); + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, "%s", ""); for (i = 1; i <= argc; ++i) { if (!lua_isstring(L, i)) continue; - LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + LOGPSRCC(DLUA, loglevel, ar.source, ar.currentline, 1, "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); } LOGPC(DLUA, loglevel, "\n"); -- To view, visit https://gerrit.osmocom.org/5102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From admin at opensuse.org Wed Nov 29 15:38:47 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:38:47 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a1ed4a67c16b_7c5411aef5434247a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/armv7l Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 171s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/c++ -DGLEW_STATIC -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/myriad7 -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/usr/src/packages/BUILD/src/oglGraph/glew -I/usr/src/packages/BUILD/src/oglGraph/glew/GL -I/usr/src/packages/BUILD/src/oglGraph -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -march=native -mfpmath=both -Wno-narrowing -Wall -fvisibility=hidden -std=gnu++11 -o CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o -c /usr/src/packages/BUILD/src/oglGraph/dlgMarkers.cpp [ 171s] c++: error: unrecognized command line option '-mfpmath=both' [ 171s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:89: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o' failed [ 171s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 171s] make[3]: *** Waiting for unfinished jobs.... [ 171s] c++: error: unrecognized command line option '-mfpmath=both' [ 171s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:65: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o' failed [ 171s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o] Error 1 [ 171s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 171s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 171s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 171s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 171s] Makefile:130: recipe for target 'all' failed [ 171s] make[1]: *** [all] Error 2 [ 171s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 171s] dh_auto_build: make -j2 returned exit code 2 [ 171s] debian/rules:28: recipe for target 'binary' failed [ 171s] make: *** [binary] Error 2 [ 171s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 171s] [ 171s] armbuild01 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:38:31 UTC 2017. [ 171s] [ 171s] ### VM INTERACTION START ### [ 174s] [ 153.595017] SysRq : Power Off [ 175s] [ 153.606439] reboot: Power down [ 175s] ### VM INTERACTION END ### [ 175s] [ 175s] armbuild01 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:38:35 UTC 2017. [ 175s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 15:40:12 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:40:12 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a1ed4e6c5534_7c5411aef54342637@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/aarch64 Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 257s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o] Error 1 [ 257s] make[3]: *** Waiting for unfinished jobs.... [ 257s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:89: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o' failed [ 257s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 257s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:113: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o' failed [ 257s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o] Error 1 [ 257s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:137: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/glew/glew.c.o' failed [ 257s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/glew/glew.c.o] Error 1 [ 257s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 257s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 257s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 257s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 257s] Makefile:130: recipe for target 'all' failed [ 257s] make[1]: *** [all] Error 2 [ 257s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 257s] dh_auto_build: make -j8 returned exit code 2 [ 257s] debian/rules:28: recipe for target 'binary' failed [ 257s] make: *** [binary] Error 2 [ 257s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 257s] [ 257s] obs-arm-6 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:39:55 UTC 2017. [ 257s] [ 257s] ### VM INTERACTION START ### [ 260s] [ 213.350522] sysrq: SysRq : Power Off [ 260s] [ 213.362877] reboot: Power down [ 261s] ### VM INTERACTION END ### [ 261s] [ 261s] obs-arm-6 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:39:59 UTC 2017. [ 261s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:42:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:42:20 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 8: (1 comment) https://gerrit.osmocom.org/#/c/4906/8/src/libosmo-mgcp/mgcp_conn.c File src/libosmo-mgcp/mgcp_conn.c: Line 140: OSMO_ASSERT(id); > are we sure about all o those OSMO_ASSERT? Are we sure they are never call (and once we made sure they can't be reached, it amounts to code bloat anyway ... I do understand the desire to assert correctness everywhere, I did the same not so long ago.) -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 15:42:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 15:42:57 +0000 Subject: osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5050/2/src/libbsc/handover_vty.c File src/libbsc/handover_vty.c: Line 2: #include > no copyright header / disclaimer in new C file argh! thx -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From admin at opensuse.org Wed Nov 29 15:58:29 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 15:58:29 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a1ed9384ec9e_7c5411aef543497dd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/armv7l Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 314s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/c++ -DGLEW_STATIC -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/myriad7 -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/usr/src/packages/BUILD/src/oglGraph/glew -I/usr/src/packages/BUILD/src/oglGraph/glew/GL -I/usr/src/packages/BUILD/src/oglGraph -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -march=native -mfpmath=both -Wno-narrowing -Wall -fvisibility=hidden -std=gnu++11 -o CMakeFiles/oglGraph.dir/GLFont.cpp.o -c /usr/src/packages/BUILD/src/oglGraph/GLFont.cpp [ 314s] c++: error: unrecognized command line option '-mfpmath=both' [ 314s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:65: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o' failed [ 314s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o] Error 1 [ 314s] make[3]: *** Waiting for unfinished jobs.... [ 314s] c++: error: unrecognized command line option '-mfpmath=both' [ 314s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:89: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o' failed [ 314s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 314s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 314s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 314s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 314s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 314s] Makefile:130: recipe for target 'all' failed [ 314s] make[1]: *** [all] Error 2 [ 314s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 314s] dh_auto_build: make -j2 returned exit code 2 [ 314s] debian/rules:28: recipe for target 'binary' failed [ 314s] make: *** [binary] Error 2 [ 314s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 314s] [ 314s] armbuild02 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:58:24 UTC 2017. [ 314s] [ 314s] ### VM INTERACTION START ### [ 318s] [ 295.888669] SysRq : Power Off [ 318s] [ 295.925736] reboot: Power down [ 318s] ### VM INTERACTION END ### [ 318s] [ 318s] armbuild02 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 15:58:28 UTC 2017. [ 318s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 16:06:58 +0000 Subject: [PATCH] osmo-bsc[master]: auth: remove unused structs In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5095 to look at the new patch set (#2). auth: remove unused structs The following structs are no longer used/needed: - gsm_auth_algo - gsm_auth_info - gsm_auth_tuple - gsm_security_operation Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 0 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/95/5095/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..5190a27 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -55,35 +55,6 @@ struct msgb *msg, void *data, void *param); -/* Real authentication information containing Ki */ -enum gsm_auth_algo { - AUTH_ALGO_NONE, - AUTH_ALGO_XOR, - AUTH_ALGO_COMP128v1, -}; - -struct gsm_auth_info { - enum gsm_auth_algo auth_algo; - unsigned int a3a8_ki_len; - uint8_t a3a8_ki[16]; -}; - -struct gsm_auth_tuple { - int use_count; - int key_seq; - struct osmo_auth_vector vec; -}; -#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */ - -/* - * AUTHENTICATION/CIPHERING state - */ -struct gsm_security_operation { - struct gsm_auth_tuple atuple; - gsm_cbfn *cb; - void *cb_data; -}; - /* * A dummy to keep a connection up for at least * a couple of seconds to work around MSC issues. @@ -154,12 +125,6 @@ uint8_t expire_timer_stopped; /* SMS helpers for libmsc */ uint8_t next_rp_ref; - - /* - * Operations that have a state and might be pending - */ - struct gsm_security_operation *sec_operation; - struct gsm_anchor_operation *anch_operation; struct osmo_fsm_inst *conn_fsm; -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 29 Nov 2017 16:06:58 +0000 Subject: [PATCH] osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5096 to look at the new patch set (#2). auth: remove obsolete VTY commands authentication (optional|required) is no longer needed, the related decisions are now made in the HLR. Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 5 files changed, 0 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/96/5096/2 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 60338d2..64c3abd 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -10,7 +10,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index f9f5ba6..7697481 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -9,7 +9,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 5190a27..91aee43 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -335,7 +335,6 @@ char *name_short; enum gsm48_reject_value reject_cause; int a5_encryption; - bool authentication_required; int neci; int send_mm_info; struct { diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..3f3935c 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -802,9 +802,6 @@ vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); - vty_out(vty, " authentication %s%s", - gsmnet->authentication_required ? "required" : "optional", - VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 51f16c4..74b1a93 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -134,20 +134,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_authentication, - cfg_net_authentication_cmd, - "authentication (optional|required)", - "Whether to enforce MS authentication in 2G\n" - "Allow MS to attach via 2G BSC without authentication\n" - "Always do authentication\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->authentication_required = (argv[0][0] == 'r') ? true : false; - - return CMD_SUCCESS; -} - DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", "Radio Resource Location Protocol\n" @@ -297,7 +283,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_authentication_cmd); install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:15:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:15:12 +0000 Subject: [PATCH] osmo-bsc[master]: cleanup: gsm_data_shared.h: drop unused ROLE_* In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5046 to look at the new patch set (#3). cleanup: gsm_data_shared.h: drop unused ROLE_* While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, drop the ROLE #ifdefs and an unused void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 --- M include/osmocom/bsc/gsm_data_shared.h 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/5046/3 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 37f7976..c264e74 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -19,6 +19,7 @@ #include #include + #include #include @@ -806,8 +807,6 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; - - void *role; }; -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:15:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:15:12 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5050 to look at the new patch set (#3). HO prep: introduce per-BTS handover config, with defaults on net node It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. Though the ho_cfg value getter/setter function definitions are made by a macro, the declarations in handover_cfg.h are written out in full for better API readability. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h A include/osmocom/bsc/handover_cfg.h A include/osmocom/bsc/handover_vty.h M src/libbsc/Makefile.am M src/libbsc/bsc_vty.c M src/libbsc/handover_decision.c A src/libbsc/handover_vty.c M src/libbsc/net_init.c M src/libcommon/Makefile.am M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c A src/libcommon/handover_cfg.c M tests/Makefile.am A tests/handover_cfg.vty 16 files changed, 681 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/5050/3 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..614f633 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -28,7 +28,9 @@ gsm_data_shared.h \ gsm_subscriber.h \ handover.h \ + handover_cfg.h \ handover_decision.h \ + handover_vty.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..120537e 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -373,22 +373,7 @@ bool authentication_required; int neci; int send_mm_info; - struct { - int active; - /* Window RXLEV averaging */ - unsigned int win_rxlev_avg; /* number of SACCH frames */ - /* Window RXQUAL averaging */ - unsigned int win_rxqual_avg; /* number of SACCH frames */ - /* Window RXLEV neighbouring cells averaging */ - unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */ - - /* how often should we check for power budget HO */ - unsigned int pwr_interval; /* SACCH frames */ - /* how much better does a neighbor cell have to be ? */ - unsigned int pwr_hysteresis; /* dBm */ - /* maximum distacne before we try a handover */ - unsigned int max_distance; /* TA values */ - } handover; + struct handover_cfg *ho; struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 19664e9..52a90c0 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -808,6 +808,8 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + + struct handover_cfg *ho; }; diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h new file mode 100644 index 0000000..9b0ad5e --- /dev/null +++ b/include/osmocom/bsc/handover_cfg.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +struct vty; + +/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover + * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, + * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ +struct handover_cfg; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); + +bool ho_get_active(struct handover_cfg *ho); +void ho_set_active(struct handover_cfg *ho, bool val); +bool ho_isset_active(struct handover_cfg *ho); +void ho_clear_active(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg(struct handover_cfg *ho); +void ho_set_win_rxlev_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxqual_avg(struct handover_cfg *ho); +void ho_set_win_rxqual_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxqual_avg(struct handover_cfg *ho); +void ho_clear_win_rxqual_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_set_win_rxlev_avg_neigh(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg_neigh(struct handover_cfg *ho); + +unsigned int ho_get_pwr_interval(struct handover_cfg *ho); +void ho_set_pwr_interval(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_interval(struct handover_cfg *ho); +void ho_clear_pwr_interval(struct handover_cfg *ho); + +unsigned int ho_get_pwr_hysteresis(struct handover_cfg *ho); +void ho_set_pwr_hysteresis(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_hysteresis(struct handover_cfg *ho); +void ho_clear_pwr_hysteresis(struct handover_cfg *ho); + +unsigned int ho_get_max_distance(struct handover_cfg *ho); +void ho_set_max_distance(struct handover_cfg *ho, unsigned int val); +bool ho_isset_max_distance(struct handover_cfg *ho); +void ho_clear_max_distance(struct handover_cfg *ho); diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h new file mode 100644 index 0000000..48af136 --- /dev/null +++ b/include/osmocom/bsc/handover_vty.h @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +void ho_vty_init(); +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho); diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..79a3739 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -53,5 +53,6 @@ net_init.c \ bsc_dyn_ts.c \ bts_ipaccess_nanobts_omlattr.c \ + handover_vty.c \ $(NULL) diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..231527d 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -184,8 +186,27 @@ VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); - vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", - VTY_NEWLINE); + + { + struct gsm_bts *bts; + unsigned int ho_active_count = 0; + unsigned int ho_inactive_count = 0; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (ho_get_active(bts->ho)) + ho_active_count ++; + else + ho_inactive_count ++; + } + + if (ho_active_count && ho_inactive_count) + vty_out(vty, " Handover: On at %u BTS, Off at %u BTS%s", + ho_active_count, ho_inactive_count, VTY_NEWLINE); + else + vty_out(vty, " Handover: %s%s", ho_active_count ? "On" : "Off", + VTY_NEWLINE); + } + network_chan_load(&pl, net); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); @@ -771,6 +792,8 @@ if (bts->pcu_sock_path) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); + ho_vty_write(vty, " ", bts->ho); + config_write_bts_model(vty, bts); } @@ -810,19 +833,9 @@ vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); - vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); - vty_out(vty, " handover window rxlev averaging %u%s", - gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxqual averaging %u%s", - gsmnet->handover.win_rxqual_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxlev neighbor averaging %u%s", - gsmnet->handover.win_rxlev_avg_neigh, VTY_NEWLINE); - vty_out(vty, " handover power budget interval %u%s", - gsmnet->handover.pwr_interval, VTY_NEWLINE); - vty_out(vty, " handover power budget hysteresis %u%s", - gsmnet->handover.pwr_hysteresis, VTY_NEWLINE); - vty_out(vty, " handover maximum distance %u%s", - gsmnet->handover.max_distance, VTY_NEWLINE); + + ho_vty_write(vty, " ", gsmnet->ho); + VTY_OUT_TIMER(3101); VTY_OUT_TIMER(3103); VTY_OUT_TIMER(3105); @@ -1491,100 +1504,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -#define HANDOVER_STR "Handover Options\n" - -DEFUN(cfg_net_handover, cfg_net_handover_cmd, - "handover (0|1)", - HANDOVER_STR - "Don't perform in-call handover\n" - "Perform in-call handover\n") -{ - int enable = atoi(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - if (enable && ipacc_rtp_direct) { - vty_out(vty, "%% Cannot enable handover unless RTP Proxy mode " - "is enabled by using the -P command line option%s", - VTY_NEWLINE); - return CMD_WARNING; - } - gsmnet->handover.active = enable; - - return CMD_SUCCESS; -} - -#define HO_WIN_STR HANDOVER_STR "Measurement Window\n" -#define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n" -#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n" -#define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n" -#define HO_AVG_COUNT_STR "Amount to use for Averaging\n" - -DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd, - "handover window rxlev averaging <1-10>", - HO_WIN_RXLEV_STR - "How many RxLev measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd, - "handover window rxqual averaging <1-10>", - HO_WIN_RXQUAL_STR - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxqual_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd, - "handover window rxlev neighbor averaging <1-10>", - HO_WIN_RXLEV_STR "Neighbor\n" - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd, - "handover power budget interval <1-99>", - HO_PBUDGET_STR - "How often to check if we have a better cell (SACCH frames)\n" - "Interval\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_interval = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd, - "handover power budget hysteresis <0-999>", - HO_PBUDGET_STR - "How many dB does a neighbor to be stronger to become a HO candidate\n" - "Hysteresis\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_hysteresis = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd, - "handover maximum distance <0-9999>", - HANDOVER_STR - "How big is the maximum timing advance before HO is forced\n" - "Distance\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.max_distance = atoi(argv[0]); return CMD_SUCCESS; } @@ -4241,13 +4160,6 @@ logging_vty_add_cmds(NULL); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_handover_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_neigh_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_interval_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_hysteresis_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_max_distance_cmd); install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_net_T3103_cmd); install_element(GSMNET_NODE, &cfg_net_T3105_cmd); @@ -4262,6 +4174,7 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + /* See also handover commands added on net level from handover_vty.c */ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -4367,6 +4280,7 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); + /* See also handover commands added on bts level from handover_vty.c */ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); @@ -4405,6 +4319,8 @@ e1inp_vty_init(); osmo_fsm_vty_add_cmds(); + ho_vty_init(); + bsc_vty_init_extra(); return 0; diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c index 09c7eaa..a717653 100644 --- a/src/libbsc/handover_decision.c +++ b/src/libbsc/handover_decision.c @@ -30,8 +30,10 @@ #include #include #include -#include #include + +#include +#include /* Get reference to a neighbor cell on a given BCCH ARFCN */ static struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts, @@ -187,7 +189,7 @@ /* attempt to do a handover */ static int attempt_handover(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; struct neigh_meas_proc *best_cell = NULL; unsigned int best_better_db = 0; int i, rc; @@ -204,10 +206,10 @@ continue; /* caculate average rxlev for this cell over the window */ - avg = neigh_meas_avg(nmp, net->handover.win_rxlev_avg_neigh); + avg = neigh_meas_avg(nmp, ho_get_win_rxlev_avg_neigh(bts->ho)); /* check if hysteresis is fulfilled */ - if (avg < mr->dl.full.rx_lev + net->handover.pwr_hysteresis) + if (avg < mr->dl.full.rx_lev + ho_get_pwr_hysteresis(bts->ho)) continue; better = avg - mr->dl.full.rx_lev; @@ -222,7 +224,7 @@ LOGP(DHO, LOGL_INFO, "%s: Cell on ARFCN %u is better: ", gsm_ts_name(mr->lchan->ts), best_cell->arfcn); - if (!net->handover.active) { + if (!ho_get_active(bts->ho)) { LOGPC(DHO, LOGL_INFO, "Skipping, Handover disabled\n"); return 0; } @@ -248,7 +250,7 @@ * attempt a handover */ static int process_meas_rep(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; enum meas_rep_field dlev, dqual; int av_rxlev; @@ -274,7 +276,7 @@ process_meas_neigh(mr); av_rxlev = get_meas_rep_avg(mr->lchan, dlev, - net->handover.win_rxlev_avg); + ho_get_win_rxlev_avg(bts->ho)); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && @@ -290,11 +292,11 @@ return attempt_handover(mr); /* Distance */ - if (mr->ms_l1.ta > net->handover.max_distance) + if (mr->ms_l1.ta > ho_get_max_distance(bts->ho)) return attempt_handover(mr); /* Power Budget AKA Better Cell */ - if ((mr->nr % net->handover.pwr_interval) == 0) + if ((mr->nr % ho_get_pwr_interval(bts->ho)) == 0) return attempt_handover(mr); return 0; diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c new file mode 100644 index 0000000..fb37edc --- /dev/null +++ b/src/libbsc/handover_vty.c @@ -0,0 +1,152 @@ +/* OsmoBSC interface to quagga VTY for handover parameters */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +static struct handover_cfg *ho_cfg_from_vty(struct vty *vty) +{ + switch (vty->node) { + case GSMNET_NODE: + return gsmnet_from_vty(vty)->ho; + case BTS_NODE: + OSMO_ASSERT(vty->index); + return ((struct gsm_bts *)vty->index)->ho; + default: + OSMO_ASSERT(false); + } +} + +#define HANDOVER_STR "Handover options\n" +#define HO_WIN_STR HANDOVER_STR "Measurement averaging settings\n" +#define HO_WIN_RXLEV_STR HO_WIN_STR "Received-Level averaging\n" +#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received-Quality averaging\n" +#define HO_POWER_BUDGET_STR HANDOVER_STR "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" +#define HO_AVG_COUNT_STR "Number of values to average over\n" +#define DEFAULT_STR "Use default, remove explicit setting on this node\n" + +#define HO_COMMON_VTY(NAME, CMDSTR, DOCSTR) \ +DEFUN(cfg_ho_##NAME, cfg_ho_##NAME##_cmd, \ + CMDSTR, DOCSTR) \ +{ \ + struct handover_cfg *ho = ho_cfg_from_vty(vty); \ + const char *val = argv[0]; \ + if (!strcmp(val, "default")) \ + ho_clear_##NAME(ho); \ + else \ + ho_set_##NAME(ho, atoi(val)); \ + return CMD_SUCCESS; \ +} + +HO_COMMON_VTY(active, + "handover (0|1|default)", + HANDOVER_STR + "Disable in-call handover\n" + "Enable in-call handover\n" + "Enable/Disable HO: " DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg, + "handover window rxlev averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many RxLev measurements are used for averaging\n" + "RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxqual_avg, + "handover window rxqual averaging (<1-10>|default)", + HO_WIN_RXQUAL_STR + "How many RxQual measurements are used for averaging\n" + "RxQual averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg_neigh, + "handover window rxlev neighbor averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many Neighbor RxLev measurements are used for averaging\n" + "How many Neighbor RxLev measurements are used for averaging\n" + "Neighbor RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(pwr_interval, + "handover power budget interval (<1-99>|default)", + HO_POWER_BUDGET_STR + "How often to check for a better cell (SACCH frames)\n" + "Check for stronger neighbor every N number of SACCH frames\n" + DEFAULT_STR) + +HO_COMMON_VTY(pwr_hysteresis, + "handover power budget hysteresis (<0-999>|default)", + HO_POWER_BUDGET_STR + "How many dBm stronger must a neighbor be to become a HO candidate\n" + "Neighbor's strength difference in dBm\n" + DEFAULT_STR) + +HO_COMMON_VTY(max_distance, + "handover maximum distance (<0-9999>|default)", + HANDOVER_STR + "Timing-Advance (i.e. distance) triggering\n" + "Timing-Advance (i.e. distance) triggering\n" + "Maximum Timing-Advance value before forcing HO\n" + DEFAULT_STR) + +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho) +{ + if (ho_isset_active(ho)) + vty_out(vty, "%shandover %u%s", indent, ho_get_active(ho) ? 1 : 0, VTY_NEWLINE); + if (ho_isset_win_rxlev_avg(ho)) + vty_out(vty, "%shandover window rxlev averaging %u%s", + indent, ho_get_win_rxlev_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxqual_avg(ho)) + vty_out(vty, "%shandover window rxqual averaging %u%s", + indent, ho_get_win_rxqual_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxlev_avg_neigh(ho)) + vty_out(vty, "%shandover window rxlev neighbor averaging %u%s", + indent, ho_get_win_rxlev_avg_neigh(ho), VTY_NEWLINE); + if (ho_isset_pwr_interval(ho)) + vty_out(vty, "%shandover power budget interval %u%s", + indent, ho_get_pwr_interval(ho), VTY_NEWLINE); + if (ho_isset_pwr_hysteresis(ho)) + vty_out(vty, "%shandover power budget hysteresis %u%s", + indent, ho_get_pwr_hysteresis(ho), VTY_NEWLINE); + if (ho_isset_max_distance(ho)) + vty_out(vty, "%shandover maximum distance %u%s", + indent, ho_get_max_distance(ho), VTY_NEWLINE); +} + +static void ho_vty_init_cmds(int parent_node) +{ + install_element(parent_node, &cfg_ho_active_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxqual_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_neigh_cmd); + install_element(parent_node, &cfg_ho_pwr_interval_cmd); + install_element(parent_node, &cfg_ho_pwr_hysteresis_cmd); + install_element(parent_node, &cfg_ho_max_distance_cmd); +} + +void ho_vty_init() +{ + ho_vty_init_cmds(GSMNET_NODE); + ho_vty_init_cmds(BTS_NODE); +} + diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..3f05273 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -21,6 +21,7 @@ #include #include #include +#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -57,13 +58,7 @@ net->T3122 = GSM_T3122_DEFAULT; net->T3141 = GSM_T3141_DEFAULT; - /* default set of handover parameters */ - net->handover.win_rxlev_avg = 10; - net->handover.win_rxqual_avg = 1; - net->handover.win_rxlev_avg_neigh = 10; - net->handover.pwr_interval = 6; - net->handover.pwr_hysteresis = 3; - net->handover.max_distance = 9999; + net->ho = ho_cfg_init(net, NULL); INIT_LLIST_HEAD(&net->bts_list); diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..d82b188 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -26,4 +26,5 @@ socket.c \ talloc_ctx.c \ gsm_subscriber_base.c \ + handover_cfg.c \ $(NULL) diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..e38da14 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -37,6 +37,7 @@ #include #include #include +#include void *tall_bsc_ctx; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index d7c9f3d..a74b4c8 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -33,6 +33,7 @@ #include #include +#include void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { @@ -363,6 +364,8 @@ /* si handling */ bts->bcch_change_mark = 1; + bts->ho = ho_cfg_init(bts, net->ho); + return bts; } diff --git a/src/libcommon/handover_cfg.c b/src/libcommon/handover_cfg.c new file mode 100644 index 0000000..e36a738 --- /dev/null +++ b/src/libcommon/handover_cfg.c @@ -0,0 +1,93 @@ +/* OsmoBSC handover configuration implementation */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include +#include + +struct handover_cfg { + struct handover_cfg *higher_level_cfg; + + bool has_active; + bool active; + + /* Window parameters in number of SACCH frames */ + bool has_win_rxlev_avg; + unsigned int win_rxlev_avg; + bool has_win_rxqual_avg; + unsigned int win_rxqual_avg; + bool has_win_rxlev_avg_neigh; + unsigned int win_rxlev_avg_neigh; + + /* how often should we check for power budget HO */ + bool has_pwr_interval; + unsigned int pwr_interval; /* SACCH frames */ + bool has_pwr_hysteresis; + unsigned int pwr_hysteresis; /* dBm */ + bool has_max_distance; + unsigned int max_distance; /* TA values */ +}; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg) +{ + struct handover_cfg *ho = talloc_zero(ctx, struct handover_cfg); + OSMO_ASSERT(ho); + ho->higher_level_cfg = higher_level_cfg; + return ho; +} + +#define HO_GETTER_SETTER_DEFS(TYPE, NAME, DEFAULT_VAL) \ +TYPE ho_get_##NAME(struct handover_cfg *ho) \ +{ \ + if (ho->has_##NAME) \ + return ho->NAME; \ + if (ho->higher_level_cfg) \ + return ho_get_##NAME(ho->higher_level_cfg); \ + return DEFAULT_VAL; \ +} \ +\ +void ho_set_##NAME(struct handover_cfg *ho, TYPE value) \ +{ \ + ho->NAME = value; \ + ho->has_##NAME = true; \ +} \ +\ +bool ho_isset_##NAME(struct handover_cfg *ho) \ +{ \ + return ho->has_##NAME; \ +} \ +\ +void ho_clear_##NAME(struct handover_cfg *ho) \ +{ \ + ho->has_##NAME = false; \ +} + +HO_GETTER_SETTER_DEFS(bool, active, false) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg, 10) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxqual_avg, 1) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg_neigh, 10) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_interval, 6) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_hysteresis, 3) +HO_GETTER_SETTER_DEFS(unsigned int, max_distance, 9999) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..d4390af 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,7 @@ $(TESTSUITE) \ vty_test_runner.py \ ctrl_test_runner.py \ + handover_cfg.vty \ $(NULL) TESTSUITE = $(srcdir)/testsuite @@ -45,11 +46,21 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) + $(MAKE) vty-test osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-test U=-u +vty-test: + osmo_verify_transcript_vty.py -v \ + -n OsmoBSC -p 4242 \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + $(U) $(srcdir)/*.vty else python-tests: $(BUILT_SOURCES) echo "Not running python-based tests (determined at configure-time)" diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty new file mode 100644 index 0000000..9dacc36 --- /dev/null +++ b/tests/handover_cfg.vty @@ -0,0 +1,315 @@ +OsmoBSC> show network +... + Handover: Off +... +OsmoBSC> enable + +OsmoBSC# !--- No handover config present +OsmoBSC# show running-config +... +network + network country code 901 + mobile network code 70 + short name OsmoBSC + long name OsmoBSC + auth policy closed + authorized-regexp .* + location updating reject cause 13 + encryption a5 0 + authentication optional + neci 0 + paging any use tch 0 + rrlp mode none + mm info 1 + dyn_ts_allow_tch_f 1 + periodic location update 30 + bts 0 + type sysmobts + band DCS1800 + cell_identity 0 + location_area_code 23 + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + early-classmark-sending-3g allowed + ip.access unit_id 1800 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode automatic + codec-support fr + gprs mode none + no force-combined-si + trx 0 +... + +OsmoBSC# !--- Toggling handover on network level affects 'show network': +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On +... + +OsmoBSC(config-net)# !--- If network level default is 'on', bts level can still override to 'off': +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover 0 +OsmoBSC(config-net-bts)# do show network +... + Handover: Off +... +OsmoBSC(config-net-bts)# exit + +OsmoBSC(config-net)# !--- Create a *second* BTS that is not explicitly 'off': +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-net-bts)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... + +OsmoBSC(config-net-bts)# !--- Add arbitrary handover config item for bts 1: +OsmoBSC(config-net-bts)# handover power budget interval 23 +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# !--- HO is 'on' globally, bts 0 disables it, bts 1 tweaks a param: +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Set global default to 'off', now bts 1 also uses the global default of 'off': +OsmoBSC(config-net)# handover 0 +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 0 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove the global setting, i.e. use the factory default net level, with same effect: +OsmoBSC(config-net)# handover default +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Re-enable net-level handover, but bts 0 remains disabled explicitly +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove explicit setting of bts 0 to also use the global setting: +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover default +OsmoBSC(config-net-bts)# do show network +... + Handover: On +... +OsmoBSC(config-net-bts)# show running-config +... +network +... + handover 1 +... + bts 0 +... + bts 1 +... + handover power budget interval 23 +... + + +OsmoBSC(config-net-bts)# !--- Checking online help +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# list +... + handover (0|1|default) + handover window rxlev averaging (<1-10>|default) + handover window rxqual averaging (<1-10>|default) + handover window rxlev neighbor averaging (<1-10>|default) + handover power budget interval (<1-99>|default) + handover power budget hysteresis (<0-999>|default) + handover maximum distance (<0-9999>|default) +... + +OsmoBSC(config-net)# handover? + handover Handover options + +OsmoBSC(config-net)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node + + +OsmoBSC(config-net)# !--- Same on BTS level +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover? + handover Handover options + +OsmoBSC(config-net-bts)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net-bts)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net-bts)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net-bts)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:18:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:18:43 +0000 Subject: [PATCH] osmo-bsc[master]: cleanup: drop unused gsm_bts.role In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5046 to look at the new patch set (#4). cleanup: drop unused gsm_bts.role While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, the ROLE #ifdefs were dropped, also drop void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 --- M include/osmocom/bsc/gsm_data_shared.h 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/5046/4 diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 37f7976..14d2415 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -806,8 +806,6 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; - - void *role; }; -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:19:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:19:14 +0000 Subject: osmo-bsc[master]: cleanup: drop unused gsm_bts.role In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 re-add earlier +2 after trivial changes -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From admin at opensuse.org Wed Nov 29 16:05:05 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:05:05 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a1edad3856cd_7c5411aef54351533@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Debian_9.0/aarch64 Package network:osmocom:nightly/limesuite failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 709s] [ 6%] Building CXX object src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o [ 709s] cd /usr/src/packages/BUILD/obj-aarch64-linux-gnu/src/oglGraph && /usr/bin/c++ -DGLEW_STATIC -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/myriad7 -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -isystem /usr/lib/aarch64-linux-gnu/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/usr/src/packages/BUILD/src/oglGraph/glew -I/usr/src/packages/BUILD/src/oglGraph/glew/GL -I/usr/src/packages/BUILD/src/oglGraph -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -march=native -mfpmath=both -Wno-narrowing -Wall -fvisibility=hidden -std=gnu++11 -o CMakeFiles/oglGraph.dir/GLFont.cpp.o -c /usr/src/packages/BUILD/src/oglGraph/GLFont.cpp [ 709s] c++: error: unrecognized command line option '-mfpmath=both' [ 709s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:113: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o' failed [ 709s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o] Error 1 [ 709s] c++: error: unrecognized command line option '-mfpmath=both' [ 709s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:89: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o' failed [ 709s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 709s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 709s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 709s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 709s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 709s] Makefile:130: recipe for target 'all' failed [ 709s] make[1]: *** [all] Error 2 [ 709s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 709s] dh_auto_build: make -j4 returned exit code 2 [ 709s] debian/rules:28: recipe for target 'binary' failed [ 709s] make: *** [binary] Error 2 [ 709s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 709s] [ 709s] obs-arm-2 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:04:53 UTC 2017. [ 709s] [ 709s] ### VM INTERACTION START ### [ 713s] [ 645.460523] sysrq: SysRq : Power Off [ 713s] [ 645.476176] reboot: Power down [ 713s] ### VM INTERACTION END ### [ 713s] [ 713s] obs-arm-2 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:04:58 UTC 2017. [ 713s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 16:17:21 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:17:21 +0000 Subject: Build failure of network:osmocom:nightly/soapyuhd in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a1eddc3c2cc4_7c5411aef54354565@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/soapyuhd/Debian_8.0/i586 Package network:osmocom:nightly/soapyuhd failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly soapyuhd Last lines of build log: [ 113s] make[3]: *** [CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o] Error 1 [ 113s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-i586-linux-gnu' [ 113s] CMakeFiles/Makefile2:98: recipe for target 'CMakeFiles/uhdSupport.dir/all' failed [ 113s] make[2]: *** [CMakeFiles/uhdSupport.dir/all] Error 2 [ 113s] make[2]: *** Waiting for unfinished jobs.... [ 134s] Linking CXX shared module libsoapySupport.so [ 134s] /usr/bin/cmake -E cmake_link_script CMakeFiles/soapySupport.dir/link.txt --verbose=1 [ 135s] /usr/bin/c++ -fPIC -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++0x -fvisibility-inlines-hidden -Wl,-z,relro -Wl,--no-undefined -shared -Wl,-soname,libsoapySupport.so -o libsoapySupport.so CMakeFiles/soapySupport.dir/UHDSoapyDevice.cpp.o -luhd -lSoapySDR -lboost_thread -lboost_system -lpthread [ 135s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-i586-linux-gnu' [ 135s] /usr/bin/cmake -E cmake_progress_report /usr/src/packages/BUILD/obj-i586-linux-gnu/CMakeFiles 1 [ 135s] [100%] Built target soapySupport [ 135s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-i586-linux-gnu' [ 135s] Makefile:130: recipe for target 'all' failed [ 135s] make[1]: *** [all] Error 2 [ 135s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-i586-linux-gnu' [ 135s] dh_auto_build: make -j8 returned exit code 2 [ 135s] debian/rules:11: recipe for target 'build' failed [ 135s] make: *** [build] Error 2 [ 135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 135s] [ 135s] lamb51 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:13 UTC 2017. [ 135s] [ 135s] ### VM INTERACTION START ### [ 136s] Powering off. [ 136s] [ 126.846400] reboot: Power down [ 136s] ### VM INTERACTION END ### [ 136s] [ 136s] lamb51 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:14 UTC 2017. [ 136s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 16:17:21 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:17:21 +0000 Subject: Build failure of network:osmocom:nightly/soapyuhd in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a1eddc4f5f6_7c5411aef54354697@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/soapyuhd/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/soapyuhd failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly soapyuhd Last lines of build log: [ 121s] ^ [ 122s] CMakeFiles/uhdSupport.dir/build.make:65: recipe for target 'CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o' failed [ 122s] make[3]: *** [CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o] Error 1 [ 122s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 122s] CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/uhdSupport.dir/all' failed [ 122s] make[2]: *** [CMakeFiles/uhdSupport.dir/all] Error 2 [ 122s] make[2]: *** Waiting for unfinished jobs.... [ 141s] [ 75%] Linking CXX shared module libsoapySupport.so [ 141s] /usr/bin/cmake -E cmake_link_script CMakeFiles/soapySupport.dir/link.txt --verbose=1 [ 141s] /usr/bin/x86_64-linux-gnu-g++ -fPIC -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--no-undefined -shared -o libsoapySupport.so CMakeFiles/soapySupport.dir/UHDSoapyDevice.cpp.o -luhd -lSoapySDR -lboost_thread -lboost_system -lboost_chrono -lboost_date_time -lboost_atomic -lpthread [ 141s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 141s] [ 75%] Built target soapySupport [ 141s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 141s] Makefile:141: recipe for target 'all' failed [ 141s] make[1]: *** [all] Error 2 [ 141s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 141s] dh_auto_build: make -j8 returned exit code 2 [ 141s] debian/rules:11: recipe for target 'build' failed [ 141s] make: *** [build] Error 2 [ 141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 141s] [ 141s] lamb01 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:11 UTC 2017. [ 141s] [ 141s] ### VM INTERACTION START ### [ 144s] [ 135.610548] reboot: Power down [ 144s] ### VM INTERACTION END ### [ 144s] [ 144s] lamb01 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:14 UTC 2017. [ 144s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 16:17:21 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:17:21 +0000 Subject: Build failure of network:osmocom:nightly/soapyuhd in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a1eddc38682f_7c5411aef5435444d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/soapyuhd/xUbuntu_16.04/i586 Package network:osmocom:nightly/soapyuhd failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly soapyuhd Last lines of build log: [ 125s] ^ [ 125s] CMakeFiles/uhdSupport.dir/build.make:65: recipe for target 'CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o' failed [ 125s] make[3]: *** [CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o] Error 1 [ 125s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-i686-linux-gnu' [ 125s] CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/uhdSupport.dir/all' failed [ 125s] make[2]: *** [CMakeFiles/uhdSupport.dir/all] Error 2 [ 125s] make[2]: *** Waiting for unfinished jobs.... [ 145s] [ 75%] Linking CXX shared module libsoapySupport.so [ 145s] /usr/bin/cmake -E cmake_link_script CMakeFiles/soapySupport.dir/link.txt --verbose=1 [ 145s] /usr/bin/i686-linux-gnu-g++ -fPIC -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--no-undefined -shared -o libsoapySupport.so CMakeFiles/soapySupport.dir/UHDSoapyDevice.cpp.o -luhd -lSoapySDR -lboost_thread -lboost_system -lboost_chrono -lboost_date_time -lboost_atomic -lpthread [ 145s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-i686-linux-gnu' [ 146s] [ 75%] Built target soapySupport [ 146s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-i686-linux-gnu' [ 146s] Makefile:141: recipe for target 'all' failed [ 146s] make[1]: *** [all] Error 2 [ 146s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-i686-linux-gnu' [ 146s] dh_auto_build: make -j8 returned exit code 2 [ 146s] debian/rules:11: recipe for target 'build' failed [ 146s] make: *** [build] Error 2 [ 146s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 146s] [ 146s] lamb27 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:09 UTC 2017. [ 146s] [ 146s] ### VM INTERACTION START ### [ 149s] [ 140.104633] reboot: Power down [ 149s] ### VM INTERACTION END ### [ 149s] [ 149s] lamb27 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:17:13 UTC 2017. [ 149s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 29 16:16:29 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:16:29 +0000 Subject: Build failure of network:osmocom:nightly/soapyuhd in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a1edd71d1e35_7c5411aef54354183@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/soapyuhd/Debian_8.0/x86_64 Package network:osmocom:nightly/soapyuhd failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly soapyuhd Last lines of build log: [ 64s] make[3]: *** [CMakeFiles/uhdSupport.dir/SoapyUHDDevice.cpp.o] Error 1 [ 64s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 64s] CMakeFiles/Makefile2:98: recipe for target 'CMakeFiles/uhdSupport.dir/all' failed [ 64s] make[2]: *** [CMakeFiles/uhdSupport.dir/all] Error 2 [ 64s] make[2]: *** Waiting for unfinished jobs.... [ 78s] Linking CXX shared module libsoapySupport.so [ 78s] /usr/bin/cmake -E cmake_link_script CMakeFiles/soapySupport.dir/link.txt --verbose=1 [ 78s] /usr/bin/c++ -fPIC -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++0x -fvisibility-inlines-hidden -Wl,-z,relro -Wl,--no-undefined -shared -Wl,-soname,libsoapySupport.so -o libsoapySupport.so CMakeFiles/soapySupport.dir/UHDSoapyDevice.cpp.o -luhd -lSoapySDR -lboost_thread -lboost_system -lpthread [ 78s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 78s] /usr/bin/cmake -E cmake_progress_report /usr/src/packages/BUILD/obj-x86_64-linux-gnu/CMakeFiles 1 [ 78s] [100%] Built target soapySupport [ 78s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 78s] Makefile:130: recipe for target 'all' failed [ 78s] make[1]: *** [all] Error 2 [ 78s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-x86_64-linux-gnu' [ 78s] dh_auto_build: make -j3 returned exit code 2 [ 78s] debian/rules:11: recipe for target 'build' failed [ 78s] make: *** [build] Error 2 [ 78s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 78s] [ 78s] build77 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:16:12 UTC 2017. [ 78s] [ 78s] ### VM INTERACTION START ### [ 80s] Powering off. [ 80s] [ 74.021341] reboot: Power down [ 80s] ### VM INTERACTION END ### [ 80s] [ 80s] build77 failed "build soapyuhd_0.3.3-1.dsc" at Wed Nov 29 16:16:14 UTC 2017. [ 80s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:29:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:29:08 +0000 Subject: osmo-ci[master]: jenkins docker: remove smalltalk things In-Reply-To: References: Message-ID: Patch Set 3: > we do have various osmo-st- related jenkins jobs have taken a look now, and actually none seem to use docker at all. Still waiting for a +2 from holger -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From admin at opensuse.org Wed Nov 29 16:29:38 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:29:38 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a1ee07e3d999_7c5411aef543563d1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Debian_9.0/aarch64 Package network:osmocom:latest/limesuite failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 328s] cc: error: unrecognized command line option '-mfpmath=both' [ 328s] c++: error: unrecognized command line option '-mfpmath=both' [ 328s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:113: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o' failed [ 328s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o] Error 1 [ 328s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:137: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/glew/glew.c.o' failed [ 328s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/glew/glew.c.o] Error 1 [ 328s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:89: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o' failed [ 328s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 328s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 328s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 328s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 328s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 328s] Makefile:130: recipe for target 'all' failed [ 328s] make[1]: *** [all] Error 2 [ 328s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-aarch64-linux-gnu' [ 328s] dh_auto_build: make -j8 returned exit code 2 [ 328s] debian/rules:28: recipe for target 'binary' failed [ 328s] make: *** [binary] Error 2 [ 328s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 328s] [ 328s] obs-arm-5 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:29:26 UTC 2017. [ 328s] [ 328s] ### VM INTERACTION START ### [ 331s] [ 302.402115] sysrq: SysRq : Power Off [ 331s] [ 302.416860] reboot: Power down [ 333s] ### VM INTERACTION END ### [ 333s] [ 333s] obs-arm-5 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:29:31 UTC 2017. [ 333s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:35:13 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 29 Nov 2017 16:35:13 +0000 Subject: osmo-ci[master]: jenkins docker: remove smalltalk things In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From admin at opensuse.org Wed Nov 29 16:41:38 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 Nov 2017 16:41:38 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a1ee34d2a9dc_7c5411aef543572f1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Debian_9.0/armv7l Package network:osmocom:latest/limesuite failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 205s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/GLFont.cpp.o] Error 1 [ 205s] make[3]: *** Waiting for unfinished jobs.... [ 205s] c++: error: unrecognized command line option '-mfpmath=both' [ 205s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:65: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o' failed [ 205s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o] Error 1 [ 205s] c++: error: unrecognized command line option '-mfpmath=both' [ 205s] src/oglGraph/CMakeFiles/oglGraph.dir/build.make:113: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o' failed [ 205s] make[3]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o] Error 1 [ 205s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 205s] CMakeFiles/Makefile2:283: recipe for target 'src/oglGraph/CMakeFiles/oglGraph.dir/all' failed [ 205s] make[2]: *** [src/oglGraph/CMakeFiles/oglGraph.dir/all] Error 2 [ 205s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 205s] Makefile:130: recipe for target 'all' failed [ 205s] make[1]: *** [all] Error 2 [ 205s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 205s] dh_auto_build: make -j3 returned exit code 2 [ 205s] debian/rules:28: recipe for target 'binary' failed [ 205s] make: *** [binary] Error 2 [ 205s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 205s] [ 205s] armbuild24 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:41:26 UTC 2017. [ 205s] [ 205s] ### VM INTERACTION START ### [ 208s] [ 192.145420] SysRq : Power Off [ 208s] [ 192.147319] reboot: Power down [ 208s] ### VM INTERACTION END ### [ 208s] [ 208s] armbuild24 failed "build limesuite_17.09.1-1.dsc" at Wed Nov 29 16:41:30 UTC 2017. [ 208s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:48:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:48:39 +0000 Subject: [PATCH] osmo-ci[master]: jenkins docker: move smalltalk to separate Dockerfile In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5056 to look at the new patch set (#4). jenkins docker: move smalltalk to separate Dockerfile To reduce docker image rebuild time, move the Smalltalk related commands to a separate file, which is currently not built by rebuild_osmocom_jenkins_image.sh since there are no jenkins builds using that yet. Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b --- M docker/Dockerfile_osmocom_jenkins.amd64 A docker/Dockerfile_osmocom_jenkins_st.amd64 2 files changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/56/5056/4 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 5481a50..8d97bce 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -38,19 +38,3 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install - - -RUN git clone http://git.savannah.gnu.org/r/smalltalk.git -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev -RUN cd smalltalk && autoreconf --install --force && ./configure && make install -RUN rm -rf smalltalk -RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package package.xml -RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --test package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/fakebts && gst-package --test package.xml -RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-gsm osmo-st-openbsc-test -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip -RUN pip install timeout_decorator diff --git a/docker/Dockerfile_osmocom_jenkins_st.amd64 b/docker/Dockerfile_osmocom_jenkins_st.amd64 new file mode 100644 index 0000000..f5f8458 --- /dev/null +++ b/docker/Dockerfile_osmocom_jenkins_st.amd64 @@ -0,0 +1,16 @@ +FROM osmocom:amd64 + +RUN git clone http://git.savannah.gnu.org/r/smalltalk.git +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv- +RUN cd smalltalk && autoreconf --install --force && ./configure && make install +RUN rm -rf smalltalk +RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package packag +RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-pa +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-pac +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package p +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-pac +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --t +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/ +RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-g +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip +RUN pip install timeout_decorator -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:49:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:49:12 +0000 Subject: osmo-ci[master]: jenkins docker: move smalltalk to separate Dockerfile In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:49:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 16:49:13 +0000 Subject: [MERGED] osmo-ci[master]: jenkins docker: move smalltalk to separate Dockerfile In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins docker: move smalltalk to separate Dockerfile ...................................................................... jenkins docker: move smalltalk to separate Dockerfile To reduce docker image rebuild time, move the Smalltalk related commands to a separate file, which is currently not built by rebuild_osmocom_jenkins_image.sh since there are no jenkins builds using that yet. Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b --- M docker/Dockerfile_osmocom_jenkins.amd64 A docker/Dockerfile_osmocom_jenkins_st.amd64 2 files changed, 16 insertions(+), 16 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 5481a50..8d97bce 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -38,19 +38,3 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install - - -RUN git clone http://git.savannah.gnu.org/r/smalltalk.git -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv-dev bison libgmp-dev texinfo zip libltdl-dev -RUN cd smalltalk && autoreconf --install --force && ./configure && make install -RUN rm -rf smalltalk -RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package package.xml -RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-package package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --test package.xml -RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/fakebts && gst-package --test package.xml -RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-gsm osmo-st-openbsc-test -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip -RUN pip install timeout_decorator diff --git a/docker/Dockerfile_osmocom_jenkins_st.amd64 b/docker/Dockerfile_osmocom_jenkins_st.amd64 new file mode 100644 index 0000000..f5f8458 --- /dev/null +++ b/docker/Dockerfile_osmocom_jenkins_st.amd64 @@ -0,0 +1,16 @@ +FROM osmocom:amd64 + +RUN git clone http://git.savannah.gnu.org/r/smalltalk.git +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends flex libsigsegv- +RUN cd smalltalk && autoreconf --install --force && ./configure && make install +RUN rm -rf smalltalk +RUN git clone https://github.com/zecke/petitparser.git && cd petitparser && gst-package packag +RUN git clone https://github.com/zecke/petitparser-tests.git && cd petitparser-tests && gst-pa +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-logging && cd osmo-st-logging && gst-pac +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-core && cd osmo-st-core && gst-package p +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-network && cd osmo-st-network && gst-pac +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-gsm && cd osmo-st-gsm && gst-package --t +RUN git clone git://git.osmocom.org/smalltalk/osmo-st-openbsc-test && cd osmo-st-openbsc-test/ +RUN rm -rf petitparser petitparser-tests osmo-st-logging ost-st-core osmo-st-network osmo-st-g +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python-pip +RUN pip install timeout_decorator -- To view, visit https://gerrit.osmocom.org/5056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1142f068100ef07ce7f177adaa8a0fe2fedb1b7b Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:52:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 16:52:00 +0000 Subject: [PATCH] libosmocore[master]: Add function to estimate elapsed time Message-ID: Review at https://gerrit.osmocom.org/5103 Add function to estimate elapsed time It uses monotonic clock for proper time estimation. Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Related: OS#2586 --- M TODO-RELEASE M include/osmocom/core/timer.h M src/timer.c 3 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 99865c6..5861956 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h +core osmo_time_elapsed() add function to estimate elapsed time diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h index 4958efb..612cdd3 100644 --- a/include/osmocom/core/timer.h +++ b/include/osmocom/core/timer.h @@ -50,6 +50,19 @@ #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60)) #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* we ignore leap year for simplicity */ +#define OSMO_SEC2MS(sec) (sec * 1000) +#define OSMO_SEC2CS(sec) (sec * 100) + +#define OSMO_NSEC2MS(ns) (ns / 1000000) +#define OSMO_NSEC2CS(ns) (ns / 10000000) + +enum osmo_elapsed { + T_SECS, + T_MILLIS, + T_CENTIS, + T_TEST, +}; + /*! A structure representing a single instance of a timer */ struct osmo_timer_list { struct rb_node node; /*!< rb-tree node header */ @@ -61,6 +74,8 @@ void *data; /*!< user data for callback */ }; +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind); + /* * timer management */ diff --git a/src/timer.c b/src/timer.c index 9ec7a00..46e80ce 100644 --- a/src/timer.c +++ b/src/timer.c @@ -35,6 +35,10 @@ #include #include #include +#include +#include + +#include #include #include #include @@ -168,6 +172,48 @@ return 0; } +/* isolated nanoseconds clock difference */ +static inline long t_diff_nsec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_nsec - to->tv_nsec; +} + +/* isolated seconds clock difference */ +static inline time_t t_diff_sec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_sec - to->tv_sec; +} + +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind) +{ + struct timespec t_now; + long ns; + time_t sec; + + if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed computation: %s\n", strerror(errno)); + return 0; + } + + ns = t_diff_nsec(from, &t_now); + sec = t_diff_sec(from, &t_now); + + switch (kind) { + case T_SECS: + return sec; + case T_MILLIS: + return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns); + case T_CENTIS: + return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns); + case T_TEST: + return 1486385000 + 423423; + default: + LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time computation: %u\n", kind); + } + + return 0; +} + /*! Determine time between now and the nearest timer * \returns pointer to timeval of nearest timer, NULL if there is none * -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:52:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 16:52:00 +0000 Subject: [PATCH] libosmocore[master]: NS: use monotonic clock Message-ID: Review at https://gerrit.osmocom.org/5104 NS: use monotonic clock Use monotonic clock to compute elapsed time to make sure it's not affected by system clock changes. Change-Id: Ib6949601a80747f0de1a05e0790a1bace209efbf Related: OS#2586 --- M TODO-RELEASE M include/osmocom/gprs/gprs_ns.h M src/gb/gprs_ns.c 3 files changed, 10 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/5104/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 5861956..804c2dd 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h core osmo_time_elapsed() add function to estimate elapsed time +gb struct gprs_nsvc add t_start parameter diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index b368ad9..a303732 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -127,7 +127,8 @@ struct osmo_timer_list timer; enum nsvc_timer_mode timer_mode; - struct timeval timer_started; + struct timeval timer_started; /* deprecated! will be replaced by t_start eventually */ + struct timespec t_start; int alive_retries; unsigned int remote_end_is_sgsn:1; diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 47d170d..5a0aae3 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -66,7 +66,7 @@ #include #include #include - +#include #include #include #include @@ -612,18 +612,13 @@ if (osmo_timer_pending(&nsvc->timer)) osmo_timer_del(&nsvc->timer); - osmo_gettimeofday(&nsvc->timer_started, NULL); + if (clock_gettime(CLOCK_MONOTONIC, &nsvc->t_start) != 0) { + LOGP(DNS, LOGL_ERROR, "NSEI=%u failed to start timer in mode %s (%u seconds): %s\n", + nsvc->nsei, get_value_string(timer_mode_strs, mode), seconds, strerror(errno)); + } + nsvc->timer_mode = mode; osmo_timer_schedule(&nsvc->timer, seconds, 0); -} - -static int nsvc_timer_elapsed_ms(struct gprs_nsvc *nsvc) -{ - struct timeval now, elapsed; - osmo_gettimeofday(&now, NULL); - timersub(&now, &nsvc->timer_started, &elapsed); - - return 1000 * elapsed.tv_sec + elapsed.tv_usec / 1000; } static void gprs_ns_timer_cb(void *data) @@ -1387,7 +1382,7 @@ case NS_PDUT_ALIVE_ACK: if ((*nsvc)->timer_mode == NSVC_TIMER_TNS_ALIVE) osmo_stat_item_set((*nsvc)->statg->items[NS_STAT_ALIVE_DELAY], - nsvc_timer_elapsed_ms(*nsvc)); + osmo_time_elapsed(&(*nsvc)->t_start, T_MILLIS)); /* stop Tns-alive and start Tns-test */ nsvc_start_timer(*nsvc, NSVC_TIMER_TNS_TEST); if ((*nsvc)->remote_end_is_sgsn) { -- To view, visit https://gerrit.osmocom.org/5104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6949601a80747f0de1a05e0790a1bace209efbf Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:57:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 16:57:28 +0000 Subject: osmo-bsc[master]: cleanup: drop unused gsm_bts.role In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 16:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 16:59:03 +0000 Subject: osmo-bsc[master]: auth: remove unused structs In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:04:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 29 Nov 2017 17:04:32 +0000 Subject: [PATCH] libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5103 to look at the new patch set (#2). Add function to estimate elapsed time It uses monotonic clock for proper time estimation. Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Related: OS#2586 --- M TODO-RELEASE M include/osmocom/core/timer.h M src/timer.c 3 files changed, 72 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/2 diff --git a/TODO-RELEASE b/TODO-RELEASE index 99865c6..5861956 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h +core osmo_time_elapsed() add function to estimate elapsed time diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h index 4958efb..612cdd3 100644 --- a/include/osmocom/core/timer.h +++ b/include/osmocom/core/timer.h @@ -50,6 +50,19 @@ #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60)) #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* we ignore leap year for simplicity */ +#define OSMO_SEC2MS(sec) (sec * 1000) +#define OSMO_SEC2CS(sec) (sec * 100) + +#define OSMO_NSEC2MS(ns) (ns / 1000000) +#define OSMO_NSEC2CS(ns) (ns / 10000000) + +enum osmo_elapsed { + T_SECS, + T_MILLIS, + T_CENTIS, + T_TEST, +}; + /*! A structure representing a single instance of a timer */ struct osmo_timer_list { struct rb_node node; /*!< rb-tree node header */ @@ -61,6 +74,8 @@ void *data; /*!< user data for callback */ }; +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind); + /* * timer management */ diff --git a/src/timer.c b/src/timer.c index 9ec7a00..1c8dc84 100644 --- a/src/timer.c +++ b/src/timer.c @@ -35,6 +35,10 @@ #include #include #include +#include +#include + +#include #include #include #include @@ -168,6 +172,58 @@ return 0; } +#if (!EMBEDDED) + +/* isolated nanoseconds clock difference */ +static inline long t_diff_nsec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_nsec - to->tv_nsec; +} + +/* isolated seconds clock difference */ +static inline time_t t_diff_sec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_sec - to->tv_sec; +} + +/*! Determine the time difference between now and the given time point + * \returns time difference + * + * \param[in] from timespec of a reference time point + * \param[in] kind expected return value type: milliseconds, centiseconds etc. + */ +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind) +{ + struct timespec t_now; + long ns; + time_t sec; + + if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed computation: %s\n", strerror(errno)); + return 0; + } + + ns = t_diff_nsec(from, &t_now); + sec = t_diff_sec(from, &t_now); + + switch (kind) { + case T_SECS: + return sec; + case T_MILLIS: + return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns); + case T_CENTIS: + return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns); + case T_TEST: + return 1486385000 + 423423; + default: + LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time computation: %u\n", kind); + } + + return 0; +} + +#endif /* !EMBEDDED */ + /*! Determine time between now and the nearest timer * \returns pointer to timeval of nearest timer, NULL if there is none * -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:27:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:27:07 +0000 Subject: [PATCH] python/osmo-python-tests[master]: osmo_interact_common: add '... !regex' wildcard Message-ID: Review at https://gerrit.osmocom.org/5105 osmo_interact_common: add '... !regex' wildcard Sometimes it is desirable to match any lines, just make sure that a given regex does *not* exist in the command reply. For example, during handover config tests, to verify that no handover config exists, one would have to match an entire 'show running-config' output, which is subject to change whenever the VTY changes. Add a wildcard '... !' which allows passing a regex that must not be encountered, e.g.: OsmoBSC(config-net)# show running-config ... network ... !handover bts 0 ... handover 1 ... This checks that there is no handover config on the network level while bts 0 does have handover config. Change-Id: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 --- M osmopy/osmo_interact_common.py 1 file changed, 27 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/05/5105/1 diff --git a/osmopy/osmo_interact_common.py b/osmopy/osmo_interact_common.py index 57f00bf..5efc22d 100644 --- a/osmopy/osmo_interact_common.py +++ b/osmopy/osmo_interact_common.py @@ -32,6 +32,7 @@ import traceback import socket import shlex +import re class Interact: @@ -210,25 +211,47 @@ - In 'expect', if a line is exactly '...', it matches any number of arbitrary lines in 'got'; the implementation is trivial and skips lines to the first occurence in 'got' that continues after '...'. + - If an 'expect' line is '... !regex', it matches any number of + lines like '...', but the given regex must not match any of those + lines. Return 'True' on match, or a string describing the mismatch. ''' def match_line(expect_line, got_line): return expect_line == got_line + ANY = '...' + ANY_EXCEPT = '... !' + e = 0 g = 0 while e < len(expect): - if expect[e] == '...': + if expect[e] == ANY or expect[e].startswith(ANY_EXCEPT): + wildcard = expect[e] e += 1 + g_end = g if e >= len(expect): # anything left in 'got' is accepted. - return True + g_end = len(got) # look for the next occurence of the expected line in 'got' - while g < len(got) and not match_line(expect[e], got[g]): - g += 1 + while g_end < len(got) and not match_line(expect[e], got[g_end]): + g_end += 1 + + if wildcard == ANY: + # no restrictions on lines + g = g_end + + elif wildcard.startswith(ANY_EXCEPT): + except_re = re.compile(wildcard[len(ANY_EXCEPT):]) + while g < g_end: + if except_re.search(got[g]): + return ('Got forbidden line for wildcard %r:' + ' did not expect %r in line %d of response' + % (wildcard, got[g], g)) + g += 1 + continue if g >= len(got): -- To view, visit https://gerrit.osmocom.org/5105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:32:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:32:40 +0000 Subject: python/osmo-python-tests[master]: osmo_interact_common: add '... !regex' wildcard In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 let me fast track this to reduce time spent on it. I want it for https://gerrit.osmocom.org/5050 -- To view, visit https://gerrit.osmocom.org/5105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:32:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:32:51 +0000 Subject: [MERGED] python/osmo-python-tests[master]: osmo_interact_common: add '... !regex' wildcard In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_interact_common: add '... !regex' wildcard ...................................................................... osmo_interact_common: add '... !regex' wildcard Sometimes it is desirable to match any lines, just make sure that a given regex does *not* exist in the command reply. For example, during handover config tests, to verify that no handover config exists, one would have to match an entire 'show running-config' output, which is subject to change whenever the VTY changes. Add a wildcard '... !' which allows passing a regex that must not be encountered, e.g.: OsmoBSC(config-net)# show running-config ... network ... !handover bts 0 ... handover 1 ... This checks that there is no handover config on the network level while bts 0 does have handover config. Change-Id: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 --- M osmopy/osmo_interact_common.py 1 file changed, 27 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/osmopy/osmo_interact_common.py b/osmopy/osmo_interact_common.py index 57f00bf..5efc22d 100644 --- a/osmopy/osmo_interact_common.py +++ b/osmopy/osmo_interact_common.py @@ -32,6 +32,7 @@ import traceback import socket import shlex +import re class Interact: @@ -210,25 +211,47 @@ - In 'expect', if a line is exactly '...', it matches any number of arbitrary lines in 'got'; the implementation is trivial and skips lines to the first occurence in 'got' that continues after '...'. + - If an 'expect' line is '... !regex', it matches any number of + lines like '...', but the given regex must not match any of those + lines. Return 'True' on match, or a string describing the mismatch. ''' def match_line(expect_line, got_line): return expect_line == got_line + ANY = '...' + ANY_EXCEPT = '... !' + e = 0 g = 0 while e < len(expect): - if expect[e] == '...': + if expect[e] == ANY or expect[e].startswith(ANY_EXCEPT): + wildcard = expect[e] e += 1 + g_end = g if e >= len(expect): # anything left in 'got' is accepted. - return True + g_end = len(got) # look for the next occurence of the expected line in 'got' - while g < len(got) and not match_line(expect[e], got[g]): - g += 1 + while g_end < len(got) and not match_line(expect[e], got[g_end]): + g_end += 1 + + if wildcard == ANY: + # no restrictions on lines + g = g_end + + elif wildcard.startswith(ANY_EXCEPT): + except_re = re.compile(wildcard[len(ANY_EXCEPT):]) + while g < g_end: + if except_re.search(got[g]): + return ('Got forbidden line for wildcard %r:' + ' did not expect %r in line %d of response' + % (wildcard, got[g], g)) + g += 1 + continue if g >= len(got): -- To view, visit https://gerrit.osmocom.org/5105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:02 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5050 to look at the new patch set (#5). HO prep: introduce per-BTS handover config, with defaults on net node It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) Though the ho_cfg value getter/setter function definitions are made by a macro, the declarations in handover_cfg.h are written out in full for better API readability. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h A include/osmocom/bsc/handover_cfg.h A include/osmocom/bsc/handover_vty.h M src/libbsc/Makefile.am M src/libbsc/bsc_vty.c M src/libbsc/handover_decision.c A src/libbsc/handover_vty.c M src/libbsc/net_init.c M src/libcommon/Makefile.am M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c A src/libcommon/handover_cfg.c M tests/Makefile.am A tests/handover_cfg.vty 16 files changed, 639 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/5050/5 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1f7cd39..614f633 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -28,7 +28,9 @@ gsm_data_shared.h \ gsm_subscriber.h \ handover.h \ + handover_cfg.h \ handover_decision.h \ + handover_vty.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..120537e 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -373,22 +373,7 @@ bool authentication_required; int neci; int send_mm_info; - struct { - int active; - /* Window RXLEV averaging */ - unsigned int win_rxlev_avg; /* number of SACCH frames */ - /* Window RXQUAL averaging */ - unsigned int win_rxqual_avg; /* number of SACCH frames */ - /* Window RXLEV neighbouring cells averaging */ - unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */ - - /* how often should we check for power budget HO */ - unsigned int pwr_interval; /* SACCH frames */ - /* how much better does a neighbor cell have to be ? */ - unsigned int pwr_hysteresis; /* dBm */ - /* maximum distacne before we try a handover */ - unsigned int max_distance; /* TA values */ - } handover; + struct handover_cfg *ho; struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index de0b6c2..58ff183 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -807,6 +807,8 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + + struct handover_cfg *ho; }; diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h new file mode 100644 index 0000000..9b0ad5e --- /dev/null +++ b/include/osmocom/bsc/handover_cfg.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +struct vty; + +/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover + * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, + * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ +struct handover_cfg; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); + +bool ho_get_active(struct handover_cfg *ho); +void ho_set_active(struct handover_cfg *ho, bool val); +bool ho_isset_active(struct handover_cfg *ho); +void ho_clear_active(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg(struct handover_cfg *ho); +void ho_set_win_rxlev_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxqual_avg(struct handover_cfg *ho); +void ho_set_win_rxqual_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxqual_avg(struct handover_cfg *ho); +void ho_clear_win_rxqual_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_set_win_rxlev_avg_neigh(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg_neigh(struct handover_cfg *ho); + +unsigned int ho_get_pwr_interval(struct handover_cfg *ho); +void ho_set_pwr_interval(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_interval(struct handover_cfg *ho); +void ho_clear_pwr_interval(struct handover_cfg *ho); + +unsigned int ho_get_pwr_hysteresis(struct handover_cfg *ho); +void ho_set_pwr_hysteresis(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_hysteresis(struct handover_cfg *ho); +void ho_clear_pwr_hysteresis(struct handover_cfg *ho); + +unsigned int ho_get_max_distance(struct handover_cfg *ho); +void ho_set_max_distance(struct handover_cfg *ho, unsigned int val); +bool ho_isset_max_distance(struct handover_cfg *ho); +void ho_clear_max_distance(struct handover_cfg *ho); diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h new file mode 100644 index 0000000..48af136 --- /dev/null +++ b/include/osmocom/bsc/handover_vty.h @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +void ho_vty_init(); +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho); diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..79a3739 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -53,5 +53,6 @@ net_init.c \ bsc_dyn_ts.c \ bts_ipaccess_nanobts_omlattr.c \ + handover_vty.c \ $(NULL) diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..231527d 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -184,8 +186,27 @@ VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); - vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", - VTY_NEWLINE); + + { + struct gsm_bts *bts; + unsigned int ho_active_count = 0; + unsigned int ho_inactive_count = 0; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (ho_get_active(bts->ho)) + ho_active_count ++; + else + ho_inactive_count ++; + } + + if (ho_active_count && ho_inactive_count) + vty_out(vty, " Handover: On at %u BTS, Off at %u BTS%s", + ho_active_count, ho_inactive_count, VTY_NEWLINE); + else + vty_out(vty, " Handover: %s%s", ho_active_count ? "On" : "Off", + VTY_NEWLINE); + } + network_chan_load(&pl, net); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); @@ -771,6 +792,8 @@ if (bts->pcu_sock_path) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); + ho_vty_write(vty, " ", bts->ho); + config_write_bts_model(vty, bts); } @@ -810,19 +833,9 @@ vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); - vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); - vty_out(vty, " handover window rxlev averaging %u%s", - gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxqual averaging %u%s", - gsmnet->handover.win_rxqual_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxlev neighbor averaging %u%s", - gsmnet->handover.win_rxlev_avg_neigh, VTY_NEWLINE); - vty_out(vty, " handover power budget interval %u%s", - gsmnet->handover.pwr_interval, VTY_NEWLINE); - vty_out(vty, " handover power budget hysteresis %u%s", - gsmnet->handover.pwr_hysteresis, VTY_NEWLINE); - vty_out(vty, " handover maximum distance %u%s", - gsmnet->handover.max_distance, VTY_NEWLINE); + + ho_vty_write(vty, " ", gsmnet->ho); + VTY_OUT_TIMER(3101); VTY_OUT_TIMER(3103); VTY_OUT_TIMER(3105); @@ -1491,100 +1504,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -#define HANDOVER_STR "Handover Options\n" - -DEFUN(cfg_net_handover, cfg_net_handover_cmd, - "handover (0|1)", - HANDOVER_STR - "Don't perform in-call handover\n" - "Perform in-call handover\n") -{ - int enable = atoi(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - if (enable && ipacc_rtp_direct) { - vty_out(vty, "%% Cannot enable handover unless RTP Proxy mode " - "is enabled by using the -P command line option%s", - VTY_NEWLINE); - return CMD_WARNING; - } - gsmnet->handover.active = enable; - - return CMD_SUCCESS; -} - -#define HO_WIN_STR HANDOVER_STR "Measurement Window\n" -#define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n" -#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n" -#define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n" -#define HO_AVG_COUNT_STR "Amount to use for Averaging\n" - -DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd, - "handover window rxlev averaging <1-10>", - HO_WIN_RXLEV_STR - "How many RxLev measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd, - "handover window rxqual averaging <1-10>", - HO_WIN_RXQUAL_STR - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxqual_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd, - "handover window rxlev neighbor averaging <1-10>", - HO_WIN_RXLEV_STR "Neighbor\n" - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd, - "handover power budget interval <1-99>", - HO_PBUDGET_STR - "How often to check if we have a better cell (SACCH frames)\n" - "Interval\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_interval = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd, - "handover power budget hysteresis <0-999>", - HO_PBUDGET_STR - "How many dB does a neighbor to be stronger to become a HO candidate\n" - "Hysteresis\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_hysteresis = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd, - "handover maximum distance <0-9999>", - HANDOVER_STR - "How big is the maximum timing advance before HO is forced\n" - "Distance\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.max_distance = atoi(argv[0]); return CMD_SUCCESS; } @@ -4241,13 +4160,6 @@ logging_vty_add_cmds(NULL); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_handover_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_neigh_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_interval_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_hysteresis_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_max_distance_cmd); install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_net_T3103_cmd); install_element(GSMNET_NODE, &cfg_net_T3105_cmd); @@ -4262,6 +4174,7 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + /* See also handover commands added on net level from handover_vty.c */ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -4367,6 +4280,7 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); + /* See also handover commands added on bts level from handover_vty.c */ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); @@ -4405,6 +4319,8 @@ e1inp_vty_init(); osmo_fsm_vty_add_cmds(); + ho_vty_init(); + bsc_vty_init_extra(); return 0; diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c index 09c7eaa..a717653 100644 --- a/src/libbsc/handover_decision.c +++ b/src/libbsc/handover_decision.c @@ -30,8 +30,10 @@ #include #include #include -#include #include + +#include +#include /* Get reference to a neighbor cell on a given BCCH ARFCN */ static struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts, @@ -187,7 +189,7 @@ /* attempt to do a handover */ static int attempt_handover(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; struct neigh_meas_proc *best_cell = NULL; unsigned int best_better_db = 0; int i, rc; @@ -204,10 +206,10 @@ continue; /* caculate average rxlev for this cell over the window */ - avg = neigh_meas_avg(nmp, net->handover.win_rxlev_avg_neigh); + avg = neigh_meas_avg(nmp, ho_get_win_rxlev_avg_neigh(bts->ho)); /* check if hysteresis is fulfilled */ - if (avg < mr->dl.full.rx_lev + net->handover.pwr_hysteresis) + if (avg < mr->dl.full.rx_lev + ho_get_pwr_hysteresis(bts->ho)) continue; better = avg - mr->dl.full.rx_lev; @@ -222,7 +224,7 @@ LOGP(DHO, LOGL_INFO, "%s: Cell on ARFCN %u is better: ", gsm_ts_name(mr->lchan->ts), best_cell->arfcn); - if (!net->handover.active) { + if (!ho_get_active(bts->ho)) { LOGPC(DHO, LOGL_INFO, "Skipping, Handover disabled\n"); return 0; } @@ -248,7 +250,7 @@ * attempt a handover */ static int process_meas_rep(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; enum meas_rep_field dlev, dqual; int av_rxlev; @@ -274,7 +276,7 @@ process_meas_neigh(mr); av_rxlev = get_meas_rep_avg(mr->lchan, dlev, - net->handover.win_rxlev_avg); + ho_get_win_rxlev_avg(bts->ho)); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && @@ -290,11 +292,11 @@ return attempt_handover(mr); /* Distance */ - if (mr->ms_l1.ta > net->handover.max_distance) + if (mr->ms_l1.ta > ho_get_max_distance(bts->ho)) return attempt_handover(mr); /* Power Budget AKA Better Cell */ - if ((mr->nr % net->handover.pwr_interval) == 0) + if ((mr->nr % ho_get_pwr_interval(bts->ho)) == 0) return attempt_handover(mr); return 0; diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c new file mode 100644 index 0000000..fb37edc --- /dev/null +++ b/src/libbsc/handover_vty.c @@ -0,0 +1,152 @@ +/* OsmoBSC interface to quagga VTY for handover parameters */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +static struct handover_cfg *ho_cfg_from_vty(struct vty *vty) +{ + switch (vty->node) { + case GSMNET_NODE: + return gsmnet_from_vty(vty)->ho; + case BTS_NODE: + OSMO_ASSERT(vty->index); + return ((struct gsm_bts *)vty->index)->ho; + default: + OSMO_ASSERT(false); + } +} + +#define HANDOVER_STR "Handover options\n" +#define HO_WIN_STR HANDOVER_STR "Measurement averaging settings\n" +#define HO_WIN_RXLEV_STR HO_WIN_STR "Received-Level averaging\n" +#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received-Quality averaging\n" +#define HO_POWER_BUDGET_STR HANDOVER_STR "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" +#define HO_AVG_COUNT_STR "Number of values to average over\n" +#define DEFAULT_STR "Use default, remove explicit setting on this node\n" + +#define HO_COMMON_VTY(NAME, CMDSTR, DOCSTR) \ +DEFUN(cfg_ho_##NAME, cfg_ho_##NAME##_cmd, \ + CMDSTR, DOCSTR) \ +{ \ + struct handover_cfg *ho = ho_cfg_from_vty(vty); \ + const char *val = argv[0]; \ + if (!strcmp(val, "default")) \ + ho_clear_##NAME(ho); \ + else \ + ho_set_##NAME(ho, atoi(val)); \ + return CMD_SUCCESS; \ +} + +HO_COMMON_VTY(active, + "handover (0|1|default)", + HANDOVER_STR + "Disable in-call handover\n" + "Enable in-call handover\n" + "Enable/Disable HO: " DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg, + "handover window rxlev averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many RxLev measurements are used for averaging\n" + "RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxqual_avg, + "handover window rxqual averaging (<1-10>|default)", + HO_WIN_RXQUAL_STR + "How many RxQual measurements are used for averaging\n" + "RxQual averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg_neigh, + "handover window rxlev neighbor averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many Neighbor RxLev measurements are used for averaging\n" + "How many Neighbor RxLev measurements are used for averaging\n" + "Neighbor RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(pwr_interval, + "handover power budget interval (<1-99>|default)", + HO_POWER_BUDGET_STR + "How often to check for a better cell (SACCH frames)\n" + "Check for stronger neighbor every N number of SACCH frames\n" + DEFAULT_STR) + +HO_COMMON_VTY(pwr_hysteresis, + "handover power budget hysteresis (<0-999>|default)", + HO_POWER_BUDGET_STR + "How many dBm stronger must a neighbor be to become a HO candidate\n" + "Neighbor's strength difference in dBm\n" + DEFAULT_STR) + +HO_COMMON_VTY(max_distance, + "handover maximum distance (<0-9999>|default)", + HANDOVER_STR + "Timing-Advance (i.e. distance) triggering\n" + "Timing-Advance (i.e. distance) triggering\n" + "Maximum Timing-Advance value before forcing HO\n" + DEFAULT_STR) + +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho) +{ + if (ho_isset_active(ho)) + vty_out(vty, "%shandover %u%s", indent, ho_get_active(ho) ? 1 : 0, VTY_NEWLINE); + if (ho_isset_win_rxlev_avg(ho)) + vty_out(vty, "%shandover window rxlev averaging %u%s", + indent, ho_get_win_rxlev_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxqual_avg(ho)) + vty_out(vty, "%shandover window rxqual averaging %u%s", + indent, ho_get_win_rxqual_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxlev_avg_neigh(ho)) + vty_out(vty, "%shandover window rxlev neighbor averaging %u%s", + indent, ho_get_win_rxlev_avg_neigh(ho), VTY_NEWLINE); + if (ho_isset_pwr_interval(ho)) + vty_out(vty, "%shandover power budget interval %u%s", + indent, ho_get_pwr_interval(ho), VTY_NEWLINE); + if (ho_isset_pwr_hysteresis(ho)) + vty_out(vty, "%shandover power budget hysteresis %u%s", + indent, ho_get_pwr_hysteresis(ho), VTY_NEWLINE); + if (ho_isset_max_distance(ho)) + vty_out(vty, "%shandover maximum distance %u%s", + indent, ho_get_max_distance(ho), VTY_NEWLINE); +} + +static void ho_vty_init_cmds(int parent_node) +{ + install_element(parent_node, &cfg_ho_active_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxqual_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_neigh_cmd); + install_element(parent_node, &cfg_ho_pwr_interval_cmd); + install_element(parent_node, &cfg_ho_pwr_hysteresis_cmd); + install_element(parent_node, &cfg_ho_max_distance_cmd); +} + +void ho_vty_init() +{ + ho_vty_init_cmds(GSMNET_NODE); + ho_vty_init_cmds(BTS_NODE); +} + diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..3f05273 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -21,6 +21,7 @@ #include #include #include +#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -57,13 +58,7 @@ net->T3122 = GSM_T3122_DEFAULT; net->T3141 = GSM_T3141_DEFAULT; - /* default set of handover parameters */ - net->handover.win_rxlev_avg = 10; - net->handover.win_rxqual_avg = 1; - net->handover.win_rxlev_avg_neigh = 10; - net->handover.pwr_interval = 6; - net->handover.pwr_hysteresis = 3; - net->handover.max_distance = 9999; + net->ho = ho_cfg_init(net, NULL); INIT_LLIST_HEAD(&net->bts_list); diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..d82b188 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -26,4 +26,5 @@ socket.c \ talloc_ctx.c \ gsm_subscriber_base.c \ + handover_cfg.c \ $(NULL) diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..e38da14 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -37,6 +37,7 @@ #include #include #include +#include void *tall_bsc_ctx; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index d7c9f3d..a74b4c8 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -33,6 +33,7 @@ #include #include +#include void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { @@ -363,6 +364,8 @@ /* si handling */ bts->bcch_change_mark = 1; + bts->ho = ho_cfg_init(bts, net->ho); + return bts; } diff --git a/src/libcommon/handover_cfg.c b/src/libcommon/handover_cfg.c new file mode 100644 index 0000000..e36a738 --- /dev/null +++ b/src/libcommon/handover_cfg.c @@ -0,0 +1,93 @@ +/* OsmoBSC handover configuration implementation */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include +#include + +struct handover_cfg { + struct handover_cfg *higher_level_cfg; + + bool has_active; + bool active; + + /* Window parameters in number of SACCH frames */ + bool has_win_rxlev_avg; + unsigned int win_rxlev_avg; + bool has_win_rxqual_avg; + unsigned int win_rxqual_avg; + bool has_win_rxlev_avg_neigh; + unsigned int win_rxlev_avg_neigh; + + /* how often should we check for power budget HO */ + bool has_pwr_interval; + unsigned int pwr_interval; /* SACCH frames */ + bool has_pwr_hysteresis; + unsigned int pwr_hysteresis; /* dBm */ + bool has_max_distance; + unsigned int max_distance; /* TA values */ +}; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg) +{ + struct handover_cfg *ho = talloc_zero(ctx, struct handover_cfg); + OSMO_ASSERT(ho); + ho->higher_level_cfg = higher_level_cfg; + return ho; +} + +#define HO_GETTER_SETTER_DEFS(TYPE, NAME, DEFAULT_VAL) \ +TYPE ho_get_##NAME(struct handover_cfg *ho) \ +{ \ + if (ho->has_##NAME) \ + return ho->NAME; \ + if (ho->higher_level_cfg) \ + return ho_get_##NAME(ho->higher_level_cfg); \ + return DEFAULT_VAL; \ +} \ +\ +void ho_set_##NAME(struct handover_cfg *ho, TYPE value) \ +{ \ + ho->NAME = value; \ + ho->has_##NAME = true; \ +} \ +\ +bool ho_isset_##NAME(struct handover_cfg *ho) \ +{ \ + return ho->has_##NAME; \ +} \ +\ +void ho_clear_##NAME(struct handover_cfg *ho) \ +{ \ + ho->has_##NAME = false; \ +} + +HO_GETTER_SETTER_DEFS(bool, active, false) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg, 10) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxqual_avg, 1) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg_neigh, 10) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_interval, 6) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_hysteresis, 3) +HO_GETTER_SETTER_DEFS(unsigned int, max_distance, 9999) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..d4390af 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,7 @@ $(TESTSUITE) \ vty_test_runner.py \ ctrl_test_runner.py \ + handover_cfg.vty \ $(NULL) TESTSUITE = $(srcdir)/testsuite @@ -45,11 +46,21 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) + $(MAKE) vty-test osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-test U=-u +vty-test: + osmo_verify_transcript_vty.py -v \ + -n OsmoBSC -p 4242 \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + $(U) $(srcdir)/*.vty else python-tests: $(BUILT_SOURCES) echo "Not running python-based tests (determined at configure-time)" diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty new file mode 100644 index 0000000..d86ed99 --- /dev/null +++ b/tests/handover_cfg.vty @@ -0,0 +1,273 @@ +OsmoBSC> show network +... + Handover: Off +... +OsmoBSC> enable + +OsmoBSC# !--- No handover config present +OsmoBSC# show running-config +... !handover + +OsmoBSC# !--- Toggling handover on network level affects 'show network': +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On +... + +OsmoBSC(config-net)# !--- If network level default is 'on', bts level can still override to 'off': +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover 0 +OsmoBSC(config-net-bts)# do show network +... + Handover: Off +... +OsmoBSC(config-net-bts)# exit + +OsmoBSC(config-net)# !--- Create a *second* BTS that is not explicitly 'off': +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-net-bts)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... + +OsmoBSC(config-net-bts)# !--- Add arbitrary handover config item for bts 1: +OsmoBSC(config-net-bts)# handover power budget interval 23 +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# !--- HO is 'on' globally, bts 0 disables it, bts 1 tweaks a param: +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Set global default to 'off', now bts 1 also uses the global default of 'off': +OsmoBSC(config-net)# handover 0 +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 0 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove the global setting, i.e. use the factory default net level, with same effect: +OsmoBSC(config-net)# handover default +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... !handover + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Re-enable net-level handover, but bts 0 remains disabled explicitly +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# !--- Remove explicit setting of bts 0 to also use the global setting: +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover default +OsmoBSC(config-net-bts)# do show network +... + Handover: On +... +OsmoBSC(config-net-bts)# show running-config +... +network +... + handover 1 +... + bts 0 +... !handover + bts 1 +... + handover power budget interval 23 +... + + +OsmoBSC(config-net-bts)# !--- Checking online help +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# list +... + handover (0|1|default) + handover window rxlev averaging (<1-10>|default) + handover window rxqual averaging (<1-10>|default) + handover window rxlev neighbor averaging (<1-10>|default) + handover power budget interval (<1-99>|default) + handover power budget hysteresis (<0-999>|default) + handover maximum distance (<0-9999>|default) +... + +OsmoBSC(config-net)# handover? + handover Handover options + +OsmoBSC(config-net)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node + + +OsmoBSC(config-net)# !--- Same on BTS level +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover? + handover Handover options + +OsmoBSC(config-net-bts)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net-bts)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net-bts)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net-bts)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:18 +0000 Subject: [MERGED] osmo-bsc[master]: cleanup: drop unused gsm_bts.role In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cleanup: drop unused gsm_bts.role ...................................................................... cleanup: drop unused gsm_bts.role While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, the ROLE #ifdefs were dropped, also drop void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 --- M include/osmocom/bsc/gsm_data_shared.h 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 1953ed4..bf67041 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -806,8 +806,6 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; - - void *role; }; -- To view, visit https://gerrit.osmocom.org/5046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:19 +0000 Subject: [MERGED] osmo-bsc[master]: examples: add osmo-bsc-minimal.cfg In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: examples: add osmo-bsc-minimal.cfg ...................................................................... examples: add osmo-bsc-minimal.cfg An upcoming VTY test requires a cfg that doesn't have handover values set. Prepare for that by adding a minimal BSC config. It is a version further stripped down from the Osmocom Network In The Box wiki page. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e --- A doc/examples/osmo-bsc/osmo-bsc-minimal.cfg 1 file changed, 36 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg new file mode 100644 index 0000000..c972e06 --- /dev/null +++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg @@ -0,0 +1,36 @@ +network + network country code 901 + mobile network code 70 + mm info 1 + short name OsmoBSC + long name OsmoBSC + bts 0 + type sysmobts + band GSM-1800 + location_area_code 23 + ip.access unit_id 1800 0 + trx 0 + rf_locked 0 + arfcn 868 + nominal power 23 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + timeslot 1 + phys_chan_config SDCCH8 + timeslot 2 + phys_chan_config TCH/F + timeslot 3 + phys_chan_config TCH/F + timeslot 4 + phys_chan_config TCH/F + timeslot 5 + phys_chan_config TCH/F + timeslot 6 + phys_chan_config TCH/F + timeslot 7 + phys_chan_config TCH/F +e1_input + e1_line 0 driver ipa +msc 0 + allow-emergency deny + codec-list hr3 -- To view, visit https://gerrit.osmocom.org/5048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:19 +0000 Subject: [MERGED] osmo-bsc[master]: compiler warnings: add includes in abis_rsl.h, gsm_data_shar... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: compiler warnings: add includes in abis_rsl.h, gsm_data_shared.h ...................................................................... compiler warnings: add includes in abis_rsl.h, gsm_data_shared.h Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f --- M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/gsm_data_shared.h 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index c092723..b30702f 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -27,6 +27,7 @@ #include #include #include +#include struct gsm_bts; struct gsm_lchan; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index bf67041..45d67f6 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -21,6 +21,7 @@ #include #include #include +#include /* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1: 4-bit index is used (2#1111 = 10#15) */ -- To view, visit https://gerrit.osmocom.org/5043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:19 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: handover.h: use "#pragma once", declare structs, comments ...................................................................... cosmetic: handover.h: use "#pragma once", declare structs, comments Use new #pragma style instead of #ifndef dance. Forward-declare all structs we're using pointers of. Move function comments to their definitions in the .c file. Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea --- M include/osmocom/bsc/handover.h M src/libbsc/handover_logic.c 2 files changed, 5 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h index 3fe71a2..9e2ba1a 100644 --- a/include/osmocom/bsc/handover.h +++ b/include/osmocom/bsc/handover.h @@ -1,14 +1,9 @@ -#ifndef _HANDOVER_H -#define _HANDOVER_H +#pragma once +struct gsm_lchan; +struct gsm_bts; struct gsm_subscriber_connection; int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts); - -/* clear any operation for this connection */ void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan); - -/* Return the old lchan or NULL. This is meant for audio handling */ struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan); - -#endif /* _HANDOVER_H */ diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index ace8ac3..7b9dece 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -159,6 +159,7 @@ return 0; } +/* clear any operation for this connection */ void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan) { struct bsc_handover *ho; @@ -366,6 +367,7 @@ return 0; } +/* Return the old lchan or NULL. This is meant for audio handling */ struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan) { struct bsc_handover *ho; -- To view, visit https://gerrit.osmocom.org/5047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:20 +0000 Subject: [MERGED] osmo-bsc[master]: HO prep: pass gsm_network to gsm_bts_alloc() already In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: HO prep: pass gsm_network to gsm_bts_alloc() already ...................................................................... HO prep: pass gsm_network to gsm_bts_alloc() already Prepare for a future change that accesses bts->network during gsm_bts_alloc(). Currently, gsm_bts_alloc() takes a ctx parameter, and gsm_bts_alloc_register() then gets the gsm_network pointer and sets bts->network to it. All callers anyway pass gsm_network as ctx to gsm_bts_alloc(), and anything else would not make sense anyway. So enforce passing exactly gsm_network to gsm_bts_alloc() and already set the bts->network pointer from there. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a --- M include/osmocom/bsc/gsm_data_shared.h M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c 3 files changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 45d67f6..d7514ca 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -810,7 +810,7 @@ }; -struct gsm_bts *gsm_bts_alloc(void *talloc_ctx, uint8_t bts_num); +struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num); struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num); struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index ef72881..6a78e3a 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -261,7 +261,6 @@ net->num_bts++; - bts->network = net; bts->type = type; bts->model = model; bts->bsic = bsic; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 8480892..e4ae339 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -309,9 +309,9 @@ .initial_mcs = 6, }; -struct gsm_bts *gsm_bts_alloc(void *ctx, uint8_t bts_num) +struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num) { - struct gsm_bts *bts = talloc_zero(ctx, struct gsm_bts); + struct gsm_bts *bts = talloc_zero(net, struct gsm_bts); int i; if (!bts) @@ -320,6 +320,8 @@ bts->nr = bts_num; bts->num_trx = 0; INIT_LLIST_HEAD(&bts->trx_list); + bts->network = net; + bts->ms_max_power = 15; /* dBm */ gsm_mo_init(&bts->mo, bts, NM_OC_BTS, -- To view, visit https://gerrit.osmocom.org/5049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:20 +0000 Subject: [MERGED] osmo-bsc[master]: compiler warnings: constify in abis_nm.c In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: compiler warnings: constify in abis_nm.c ...................................................................... compiler warnings: constify in abis_nm.c Constify in- and output arguments for Parse Attribute Response Info chain to avoid compiler warnings, and more clearly indicate const data in the first place. Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb --- M src/libbsc/abis_nm.c 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index f1a56a6..2c84ba7 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -455,7 +455,7 @@ } /* Parse Attribute Response Info - return pointer to the actual content */ -static inline uint8_t *parse_attr_resp_info_unreported(uint8_t bts_nr, uint8_t *ari, uint16_t ari_len, uint16_t *out_len) +static inline const uint8_t *parse_attr_resp_info_unreported(uint8_t bts_nr, const uint8_t *ari, uint16_t ari_len, uint16_t *out_len) { uint8_t num_unreported = ari[0], i; @@ -474,7 +474,7 @@ } /* Parse Attribute Response Info content for 3GPP TS 52.021 ?9.4.30 Manufacturer Id */ -static inline uint8_t *parse_attr_resp_info_manuf_id(struct gsm_bts *bts, uint8_t *data, uint16_t *data_len) +static inline const uint8_t *parse_attr_resp_info_manuf_id(struct gsm_bts *bts, const uint8_t *data, uint16_t *data_len) { struct tlv_parsed tp; uint16_t m_id_len = 0; @@ -513,7 +513,7 @@ } /* Parse Attribute Response Info content for 3GPP TS 52.021 ?9.4.28 Manufacturer Dependent State */ -static inline uint8_t *parse_attr_resp_info_manuf_state(const struct gsm_bts_trx *trx, uint8_t *data, uint16_t *data_len) +static inline const uint8_t *parse_attr_resp_info_manuf_state(const struct gsm_bts_trx *trx, const uint8_t *data, uint16_t *data_len) { struct tlv_parsed tp; const uint8_t *power; @@ -542,7 +542,8 @@ struct e1inp_sign_link *sign_link = mb->dst; struct gsm_bts *bts = trx ? trx->bts : sign_link->trx->bts; struct tlv_parsed tp; - uint8_t *data, i; + const uint8_t *data; + int i; uint16_t data_len; int rc; struct abis_nm_sw_desc sw_descr[MAX_BTS_ATTR]; -- To view, visit https://gerrit.osmocom.org/5045 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:37:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:37:21 +0000 Subject: [MERGED] osmo-bsc[master]: compiler warnings: drop some unused variables In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: compiler warnings: drop some unused variables ...................................................................... compiler warnings: drop some unused variables Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4 --- M src/libbsc/abis_om2000_vty.c M src/libbsc/pcu_sock.c 2 files changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/abis_om2000_vty.c b/src/libbsc/abis_om2000_vty.c index e1dd914..b55a6c4 100644 --- a/src/libbsc/abis_om2000_vty.c +++ b/src/libbsc/abis_om2000_vty.c @@ -424,7 +424,6 @@ "SuperChannel (Packet Abis)\n") { struct gsm_bts *bts = vty->index; - struct con_group *cg; if (bts->type != GSM_BTS_TYPE_RBS2000) { vty_out(vty, "%% Command only works for RBS2000%s", diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c index 40dd68d..9f1c80c 100644 --- a/src/libbsc/pcu_sock.c +++ b/src/libbsc/pcu_sock.c @@ -356,9 +356,6 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, struct gsm_pcu_if_data *data_req) { - uint8_t is_ptcch; - struct gsm_bts_trx *trx; - struct gsm_bts_trx_ts *ts; struct msgb *msg; char imsi_digit_buf[4]; uint32_t tlli = -1; -- To view, visit https://gerrit.osmocom.org/5044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:42:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:42:19 +0000 Subject: [PATCH] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5050 to look at the new patch set (#7). HO prep: introduce per-BTS handover config, with defaults on net node It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) Though the ho_cfg value getter/setter function definitions are made by a macro, the declarations in handover_cfg.h are written out in full for better API readability. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h A include/osmocom/bsc/handover_cfg.h A include/osmocom/bsc/handover_vty.h M src/libbsc/Makefile.am M src/libbsc/bsc_vty.c M src/libbsc/handover_decision.c A src/libbsc/handover_vty.c M src/libbsc/net_init.c M src/libcommon/Makefile.am M src/libcommon/gsm_data.c M src/libcommon/gsm_data_shared.c A src/libcommon/handover_cfg.c M tests/Makefile.am A tests/handover_cfg.vty 16 files changed, 639 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/5050/7 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..10467c5 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -28,7 +28,9 @@ gsm_data_shared.h \ gsm_subscriber.h \ handover.h \ + handover_cfg.h \ handover_decision.h \ + handover_vty.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..120537e 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -373,22 +373,7 @@ bool authentication_required; int neci; int send_mm_info; - struct { - int active; - /* Window RXLEV averaging */ - unsigned int win_rxlev_avg; /* number of SACCH frames */ - /* Window RXQUAL averaging */ - unsigned int win_rxqual_avg; /* number of SACCH frames */ - /* Window RXLEV neighbouring cells averaging */ - unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */ - - /* how often should we check for power budget HO */ - unsigned int pwr_interval; /* SACCH frames */ - /* how much better does a neighbor cell have to be ? */ - unsigned int pwr_hysteresis; /* dBm */ - /* maximum distacne before we try a handover */ - unsigned int max_distance; /* TA values */ - } handover; + struct handover_cfg *ho; struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index d7514ca..cc465e9 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -807,6 +807,8 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + + struct handover_cfg *ho; }; diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h new file mode 100644 index 0000000..9b0ad5e --- /dev/null +++ b/include/osmocom/bsc/handover_cfg.h @@ -0,0 +1,47 @@ +#pragma once + +#include + +struct vty; + +/* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover + * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, + * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ +struct handover_cfg; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); + +bool ho_get_active(struct handover_cfg *ho); +void ho_set_active(struct handover_cfg *ho, bool val); +bool ho_isset_active(struct handover_cfg *ho); +void ho_clear_active(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg(struct handover_cfg *ho); +void ho_set_win_rxlev_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxqual_avg(struct handover_cfg *ho); +void ho_set_win_rxqual_avg(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxqual_avg(struct handover_cfg *ho); +void ho_clear_win_rxqual_avg(struct handover_cfg *ho); + +unsigned int ho_get_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_set_win_rxlev_avg_neigh(struct handover_cfg *ho, unsigned int val); +bool ho_isset_win_rxlev_avg_neigh(struct handover_cfg *ho); +void ho_clear_win_rxlev_avg_neigh(struct handover_cfg *ho); + +unsigned int ho_get_pwr_interval(struct handover_cfg *ho); +void ho_set_pwr_interval(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_interval(struct handover_cfg *ho); +void ho_clear_pwr_interval(struct handover_cfg *ho); + +unsigned int ho_get_pwr_hysteresis(struct handover_cfg *ho); +void ho_set_pwr_hysteresis(struct handover_cfg *ho, unsigned int val); +bool ho_isset_pwr_hysteresis(struct handover_cfg *ho); +void ho_clear_pwr_hysteresis(struct handover_cfg *ho); + +unsigned int ho_get_max_distance(struct handover_cfg *ho); +void ho_set_max_distance(struct handover_cfg *ho, unsigned int val); +bool ho_isset_max_distance(struct handover_cfg *ho); +void ho_clear_max_distance(struct handover_cfg *ho); diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h new file mode 100644 index 0000000..48af136 --- /dev/null +++ b/include/osmocom/bsc/handover_vty.h @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +void ho_vty_init(); +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho); diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..79a3739 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -53,5 +53,6 @@ net_init.c \ bsc_dyn_ts.c \ bts_ipaccess_nanobts_omlattr.c \ + handover_vty.c \ $(NULL) diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..231527d 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -184,8 +186,27 @@ VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); - vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", - VTY_NEWLINE); + + { + struct gsm_bts *bts; + unsigned int ho_active_count = 0; + unsigned int ho_inactive_count = 0; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (ho_get_active(bts->ho)) + ho_active_count ++; + else + ho_inactive_count ++; + } + + if (ho_active_count && ho_inactive_count) + vty_out(vty, " Handover: On at %u BTS, Off at %u BTS%s", + ho_active_count, ho_inactive_count, VTY_NEWLINE); + else + vty_out(vty, " Handover: %s%s", ho_active_count ? "On" : "Off", + VTY_NEWLINE); + } + network_chan_load(&pl, net); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); @@ -771,6 +792,8 @@ if (bts->pcu_sock_path) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); + ho_vty_write(vty, " ", bts->ho); + config_write_bts_model(vty, bts); } @@ -810,19 +833,9 @@ vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); - vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); - vty_out(vty, " handover window rxlev averaging %u%s", - gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxqual averaging %u%s", - gsmnet->handover.win_rxqual_avg, VTY_NEWLINE); - vty_out(vty, " handover window rxlev neighbor averaging %u%s", - gsmnet->handover.win_rxlev_avg_neigh, VTY_NEWLINE); - vty_out(vty, " handover power budget interval %u%s", - gsmnet->handover.pwr_interval, VTY_NEWLINE); - vty_out(vty, " handover power budget hysteresis %u%s", - gsmnet->handover.pwr_hysteresis, VTY_NEWLINE); - vty_out(vty, " handover maximum distance %u%s", - gsmnet->handover.max_distance, VTY_NEWLINE); + + ho_vty_write(vty, " ", gsmnet->ho); + VTY_OUT_TIMER(3101); VTY_OUT_TIMER(3103); VTY_OUT_TIMER(3105); @@ -1491,100 +1504,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -#define HANDOVER_STR "Handover Options\n" - -DEFUN(cfg_net_handover, cfg_net_handover_cmd, - "handover (0|1)", - HANDOVER_STR - "Don't perform in-call handover\n" - "Perform in-call handover\n") -{ - int enable = atoi(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - if (enable && ipacc_rtp_direct) { - vty_out(vty, "%% Cannot enable handover unless RTP Proxy mode " - "is enabled by using the -P command line option%s", - VTY_NEWLINE); - return CMD_WARNING; - } - gsmnet->handover.active = enable; - - return CMD_SUCCESS; -} - -#define HO_WIN_STR HANDOVER_STR "Measurement Window\n" -#define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n" -#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n" -#define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n" -#define HO_AVG_COUNT_STR "Amount to use for Averaging\n" - -DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd, - "handover window rxlev averaging <1-10>", - HO_WIN_RXLEV_STR - "How many RxLev measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd, - "handover window rxqual averaging <1-10>", - HO_WIN_RXQUAL_STR - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxqual_avg = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd, - "handover window rxlev neighbor averaging <1-10>", - HO_WIN_RXLEV_STR "Neighbor\n" - "How many RxQual measurements are used for averaging\n" - HO_AVG_COUNT_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd, - "handover power budget interval <1-99>", - HO_PBUDGET_STR - "How often to check if we have a better cell (SACCH frames)\n" - "Interval\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_interval = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd, - "handover power budget hysteresis <0-999>", - HO_PBUDGET_STR - "How many dB does a neighbor to be stronger to become a HO candidate\n" - "Hysteresis\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.pwr_hysteresis = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd, - "handover maximum distance <0-9999>", - HANDOVER_STR - "How big is the maximum timing advance before HO is forced\n" - "Distance\n" "Number\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->handover.max_distance = atoi(argv[0]); return CMD_SUCCESS; } @@ -4241,13 +4160,6 @@ logging_vty_add_cmds(NULL); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_handover_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_neigh_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_interval_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_pwr_hysteresis_cmd); - install_element(GSMNET_NODE, &cfg_net_ho_max_distance_cmd); install_element(GSMNET_NODE, &cfg_net_T3101_cmd); install_element(GSMNET_NODE, &cfg_net_T3103_cmd); install_element(GSMNET_NODE, &cfg_net_T3105_cmd); @@ -4262,6 +4174,7 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + /* See also handover commands added on net level from handover_vty.c */ install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -4367,6 +4280,7 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); + /* See also handover commands added on bts level from handover_vty.c */ install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); @@ -4405,6 +4319,8 @@ e1inp_vty_init(); osmo_fsm_vty_add_cmds(); + ho_vty_init(); + bsc_vty_init_extra(); return 0; diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c index 09c7eaa..a717653 100644 --- a/src/libbsc/handover_decision.c +++ b/src/libbsc/handover_decision.c @@ -30,8 +30,10 @@ #include #include #include -#include #include + +#include +#include /* Get reference to a neighbor cell on a given BCCH ARFCN */ static struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts, @@ -187,7 +189,7 @@ /* attempt to do a handover */ static int attempt_handover(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; struct neigh_meas_proc *best_cell = NULL; unsigned int best_better_db = 0; int i, rc; @@ -204,10 +206,10 @@ continue; /* caculate average rxlev for this cell over the window */ - avg = neigh_meas_avg(nmp, net->handover.win_rxlev_avg_neigh); + avg = neigh_meas_avg(nmp, ho_get_win_rxlev_avg_neigh(bts->ho)); /* check if hysteresis is fulfilled */ - if (avg < mr->dl.full.rx_lev + net->handover.pwr_hysteresis) + if (avg < mr->dl.full.rx_lev + ho_get_pwr_hysteresis(bts->ho)) continue; better = avg - mr->dl.full.rx_lev; @@ -222,7 +224,7 @@ LOGP(DHO, LOGL_INFO, "%s: Cell on ARFCN %u is better: ", gsm_ts_name(mr->lchan->ts), best_cell->arfcn); - if (!net->handover.active) { + if (!ho_get_active(bts->ho)) { LOGPC(DHO, LOGL_INFO, "Skipping, Handover disabled\n"); return 0; } @@ -248,7 +250,7 @@ * attempt a handover */ static int process_meas_rep(struct gsm_meas_rep *mr) { - struct gsm_network *net = mr->lchan->ts->trx->bts->network; + struct gsm_bts *bts = mr->lchan->ts->trx->bts; enum meas_rep_field dlev, dqual; int av_rxlev; @@ -274,7 +276,7 @@ process_meas_neigh(mr); av_rxlev = get_meas_rep_avg(mr->lchan, dlev, - net->handover.win_rxlev_avg); + ho_get_win_rxlev_avg(bts->ho)); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && @@ -290,11 +292,11 @@ return attempt_handover(mr); /* Distance */ - if (mr->ms_l1.ta > net->handover.max_distance) + if (mr->ms_l1.ta > ho_get_max_distance(bts->ho)) return attempt_handover(mr); /* Power Budget AKA Better Cell */ - if ((mr->nr % net->handover.pwr_interval) == 0) + if ((mr->nr % ho_get_pwr_interval(bts->ho)) == 0) return attempt_handover(mr); return 0; diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c new file mode 100644 index 0000000..fb37edc --- /dev/null +++ b/src/libbsc/handover_vty.c @@ -0,0 +1,152 @@ +/* OsmoBSC interface to quagga VTY for handover parameters */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +static struct handover_cfg *ho_cfg_from_vty(struct vty *vty) +{ + switch (vty->node) { + case GSMNET_NODE: + return gsmnet_from_vty(vty)->ho; + case BTS_NODE: + OSMO_ASSERT(vty->index); + return ((struct gsm_bts *)vty->index)->ho; + default: + OSMO_ASSERT(false); + } +} + +#define HANDOVER_STR "Handover options\n" +#define HO_WIN_STR HANDOVER_STR "Measurement averaging settings\n" +#define HO_WIN_RXLEV_STR HO_WIN_STR "Received-Level averaging\n" +#define HO_WIN_RXQUAL_STR HO_WIN_STR "Received-Quality averaging\n" +#define HO_POWER_BUDGET_STR HANDOVER_STR "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" +#define HO_AVG_COUNT_STR "Number of values to average over\n" +#define DEFAULT_STR "Use default, remove explicit setting on this node\n" + +#define HO_COMMON_VTY(NAME, CMDSTR, DOCSTR) \ +DEFUN(cfg_ho_##NAME, cfg_ho_##NAME##_cmd, \ + CMDSTR, DOCSTR) \ +{ \ + struct handover_cfg *ho = ho_cfg_from_vty(vty); \ + const char *val = argv[0]; \ + if (!strcmp(val, "default")) \ + ho_clear_##NAME(ho); \ + else \ + ho_set_##NAME(ho, atoi(val)); \ + return CMD_SUCCESS; \ +} + +HO_COMMON_VTY(active, + "handover (0|1|default)", + HANDOVER_STR + "Disable in-call handover\n" + "Enable in-call handover\n" + "Enable/Disable HO: " DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg, + "handover window rxlev averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many RxLev measurements are used for averaging\n" + "RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxqual_avg, + "handover window rxqual averaging (<1-10>|default)", + HO_WIN_RXQUAL_STR + "How many RxQual measurements are used for averaging\n" + "RxQual averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(win_rxlev_avg_neigh, + "handover window rxlev neighbor averaging (<1-10>|default)", + HO_WIN_RXLEV_STR + "How many Neighbor RxLev measurements are used for averaging\n" + "How many Neighbor RxLev measurements are used for averaging\n" + "Neighbor RxLev averaging: " HO_AVG_COUNT_STR + DEFAULT_STR) + +HO_COMMON_VTY(pwr_interval, + "handover power budget interval (<1-99>|default)", + HO_POWER_BUDGET_STR + "How often to check for a better cell (SACCH frames)\n" + "Check for stronger neighbor every N number of SACCH frames\n" + DEFAULT_STR) + +HO_COMMON_VTY(pwr_hysteresis, + "handover power budget hysteresis (<0-999>|default)", + HO_POWER_BUDGET_STR + "How many dBm stronger must a neighbor be to become a HO candidate\n" + "Neighbor's strength difference in dBm\n" + DEFAULT_STR) + +HO_COMMON_VTY(max_distance, + "handover maximum distance (<0-9999>|default)", + HANDOVER_STR + "Timing-Advance (i.e. distance) triggering\n" + "Timing-Advance (i.e. distance) triggering\n" + "Maximum Timing-Advance value before forcing HO\n" + DEFAULT_STR) + +void ho_vty_write(struct vty *vty, const char *indent, struct handover_cfg *ho) +{ + if (ho_isset_active(ho)) + vty_out(vty, "%shandover %u%s", indent, ho_get_active(ho) ? 1 : 0, VTY_NEWLINE); + if (ho_isset_win_rxlev_avg(ho)) + vty_out(vty, "%shandover window rxlev averaging %u%s", + indent, ho_get_win_rxlev_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxqual_avg(ho)) + vty_out(vty, "%shandover window rxqual averaging %u%s", + indent, ho_get_win_rxqual_avg(ho), VTY_NEWLINE); + if (ho_isset_win_rxlev_avg_neigh(ho)) + vty_out(vty, "%shandover window rxlev neighbor averaging %u%s", + indent, ho_get_win_rxlev_avg_neigh(ho), VTY_NEWLINE); + if (ho_isset_pwr_interval(ho)) + vty_out(vty, "%shandover power budget interval %u%s", + indent, ho_get_pwr_interval(ho), VTY_NEWLINE); + if (ho_isset_pwr_hysteresis(ho)) + vty_out(vty, "%shandover power budget hysteresis %u%s", + indent, ho_get_pwr_hysteresis(ho), VTY_NEWLINE); + if (ho_isset_max_distance(ho)) + vty_out(vty, "%shandover maximum distance %u%s", + indent, ho_get_max_distance(ho), VTY_NEWLINE); +} + +static void ho_vty_init_cmds(int parent_node) +{ + install_element(parent_node, &cfg_ho_active_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxqual_avg_cmd); + install_element(parent_node, &cfg_ho_win_rxlev_avg_neigh_cmd); + install_element(parent_node, &cfg_ho_pwr_interval_cmd); + install_element(parent_node, &cfg_ho_pwr_hysteresis_cmd); + install_element(parent_node, &cfg_ho_max_distance_cmd); +} + +void ho_vty_init() +{ + ho_vty_init_cmds(GSMNET_NODE); + ho_vty_init_cmds(BTS_NODE); +} + diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..3f05273 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -21,6 +21,7 @@ #include #include #include +#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -57,13 +58,7 @@ net->T3122 = GSM_T3122_DEFAULT; net->T3141 = GSM_T3141_DEFAULT; - /* default set of handover parameters */ - net->handover.win_rxlev_avg = 10; - net->handover.win_rxqual_avg = 1; - net->handover.win_rxlev_avg_neigh = 10; - net->handover.pwr_interval = 6; - net->handover.pwr_hysteresis = 3; - net->handover.max_distance = 9999; + net->ho = ho_cfg_init(net, NULL); INIT_LLIST_HEAD(&net->bts_list); diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..d82b188 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -26,4 +26,5 @@ socket.c \ talloc_ctx.c \ gsm_subscriber_base.c \ + handover_cfg.c \ $(NULL) diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..e38da14 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -37,6 +37,7 @@ #include #include #include +#include void *tall_bsc_ctx; diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index e4ae339..69230bc 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -33,6 +33,7 @@ #include #include +#include void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { @@ -363,6 +364,8 @@ /* si handling */ bts->bcch_change_mark = 1; + bts->ho = ho_cfg_init(bts, net->ho); + return bts; } diff --git a/src/libcommon/handover_cfg.c b/src/libcommon/handover_cfg.c new file mode 100644 index 0000000..e36a738 --- /dev/null +++ b/src/libcommon/handover_cfg.c @@ -0,0 +1,93 @@ +/* OsmoBSC handover configuration implementation */ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2009-2010 by Harald Welte + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include +#include + +struct handover_cfg { + struct handover_cfg *higher_level_cfg; + + bool has_active; + bool active; + + /* Window parameters in number of SACCH frames */ + bool has_win_rxlev_avg; + unsigned int win_rxlev_avg; + bool has_win_rxqual_avg; + unsigned int win_rxqual_avg; + bool has_win_rxlev_avg_neigh; + unsigned int win_rxlev_avg_neigh; + + /* how often should we check for power budget HO */ + bool has_pwr_interval; + unsigned int pwr_interval; /* SACCH frames */ + bool has_pwr_hysteresis; + unsigned int pwr_hysteresis; /* dBm */ + bool has_max_distance; + unsigned int max_distance; /* TA values */ +}; + +struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg) +{ + struct handover_cfg *ho = talloc_zero(ctx, struct handover_cfg); + OSMO_ASSERT(ho); + ho->higher_level_cfg = higher_level_cfg; + return ho; +} + +#define HO_GETTER_SETTER_DEFS(TYPE, NAME, DEFAULT_VAL) \ +TYPE ho_get_##NAME(struct handover_cfg *ho) \ +{ \ + if (ho->has_##NAME) \ + return ho->NAME; \ + if (ho->higher_level_cfg) \ + return ho_get_##NAME(ho->higher_level_cfg); \ + return DEFAULT_VAL; \ +} \ +\ +void ho_set_##NAME(struct handover_cfg *ho, TYPE value) \ +{ \ + ho->NAME = value; \ + ho->has_##NAME = true; \ +} \ +\ +bool ho_isset_##NAME(struct handover_cfg *ho) \ +{ \ + return ho->has_##NAME; \ +} \ +\ +void ho_clear_##NAME(struct handover_cfg *ho) \ +{ \ + ho->has_##NAME = false; \ +} + +HO_GETTER_SETTER_DEFS(bool, active, false) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg, 10) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxqual_avg, 1) +HO_GETTER_SETTER_DEFS(unsigned int, win_rxlev_avg_neigh, 10) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_interval, 6) +HO_GETTER_SETTER_DEFS(unsigned int, pwr_hysteresis, 3) +HO_GETTER_SETTER_DEFS(unsigned int, max_distance, 9999) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..d4390af 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,7 @@ $(TESTSUITE) \ vty_test_runner.py \ ctrl_test_runner.py \ + handover_cfg.vty \ $(NULL) TESTSUITE = $(srcdir)/testsuite @@ -45,11 +46,21 @@ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) + $(MAKE) vty-test osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-test U=-u +vty-test: + osmo_verify_transcript_vty.py -v \ + -n OsmoBSC -p 4242 \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + $(U) $(srcdir)/*.vty else python-tests: $(BUILT_SOURCES) echo "Not running python-based tests (determined at configure-time)" diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty new file mode 100644 index 0000000..b65d5ae --- /dev/null +++ b/tests/handover_cfg.vty @@ -0,0 +1,273 @@ +OsmoBSC> show network +... + Handover: Off +... +OsmoBSC> enable + +OsmoBSC# ### No handover config present +OsmoBSC# show running-config +... !handover + +OsmoBSC# ### Toggling handover on network level affects 'show network': +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On +... + +OsmoBSC(config-net)# ### If network level default is 'on', bts level can still override to 'off': +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover 0 +OsmoBSC(config-net-bts)# do show network +... + Handover: Off +... +OsmoBSC(config-net-bts)# exit + +OsmoBSC(config-net)# ### Create a *second* BTS that is not explicitly 'off': +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-net-bts)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... + +OsmoBSC(config-net-bts)# ### Add arbitrary handover config item for bts 1: +OsmoBSC(config-net-bts)# handover power budget interval 23 +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# ### HO is 'on' globally, bts 0 disables it, bts 1 tweaks a param: +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# ### Set global default to 'off', now bts 1 also uses the global default of 'off': +OsmoBSC(config-net)# handover 0 +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 0 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# ### Remove the global setting, i.e. use the factory default net level, with same effect: +OsmoBSC(config-net)# handover default +OsmoBSC(config-net)# do show network +... + Handover: Off +... +OsmoBSC(config-net)# show running-config +... +network +... !handover + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# ### Re-enable net-level handover, but bts 0 remains disabled explicitly +OsmoBSC(config-net)# handover 1 +OsmoBSC(config-net)# do show network +... + Handover: On at 1 BTS, Off at 1 BTS +... +OsmoBSC(config-net)# show running-config +... +network +... + handover 1 +... + bts 0 +... + handover 0 +... + bts 1 +... + handover power budget interval 23 +... + +OsmoBSC(config-net)# ### Remove explicit setting of bts 0 to also use the global setting: +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover default +OsmoBSC(config-net-bts)# do show network +... + Handover: On +... +OsmoBSC(config-net-bts)# show running-config +... +network +... + handover 1 +... + bts 0 +... !handover + bts 1 +... + handover power budget interval 23 +... + + +OsmoBSC(config-net-bts)# ### Checking online help +OsmoBSC(config-net-bts)# exit +OsmoBSC(config-net)# list +... + handover (0|1|default) + handover window rxlev averaging (<1-10>|default) + handover window rxqual averaging (<1-10>|default) + handover window rxlev neighbor averaging (<1-10>|default) + handover power budget interval (<1-99>|default) + handover power budget hysteresis (<0-999>|default) + handover maximum distance (<0-9999>|default) +... + +OsmoBSC(config-net)# handover? + handover Handover options + +OsmoBSC(config-net)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node + + +OsmoBSC(config-net)# ### Same on BTS level +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# handover? + handover Handover options + +OsmoBSC(config-net-bts)# handover ? + 0 Disable in-call handover + 1 Enable in-call handover + default Enable/Disable HO: Use default, remove explicit setting on this node + window Measurement averaging settings + power Neighbor cell power triggering + maximum Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover window ? + rxlev Received-Level averaging + rxqual Received-Quality averaging + +OsmoBSC(config-net-bts)# handover window rxlev ? + averaging How many RxLev measurements are used for averaging + neighbor How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev averaging ? + <1-10> RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxlev neighbor ? + averaging How many Neighbor RxLev measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxlev neighbor averaging ? + <1-10> Neighbor RxLev averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover window rxqual ? + averaging How many RxQual measurements are used for averaging + +OsmoBSC(config-net-bts)# handover window rxqual averaging ? + <1-10> RxQual averaging: Number of values to average over + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power ? + budget Neighbor cell power triggering + +OsmoBSC(config-net-bts)# handover power budget ? + interval How often to check for a better cell (SACCH frames) + hysteresis How many dBm stronger must a neighbor be to become a HO candidate + +OsmoBSC(config-net-bts)# handover power budget interval ? + <1-99> Check for stronger neighbor every N number of SACCH frames + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover power budget hysteresis ? + <0-999> Neighbor's strength difference in dBm + default Use default, remove explicit setting on this node + +OsmoBSC(config-net-bts)# handover maximum ? + distance Timing-Advance (i.e. distance) triggering + +OsmoBSC(config-net-bts)# handover maximum distance ? + <0-9999> Maximum Timing-Advance value before forcing HO + default Use default, remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:48:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:48:59 +0000 Subject: [PATCH] osmo-ci[master]: docker for jenkins: update on changes in osmo-python-tests Message-ID: Review at https://gerrit.osmocom.org/5106 docker for jenkins: update on changes in osmo-python-tests Download (ADD) the latest patch from git.osmocom.org so that the image gets rebuilt when new changes were merged to master. Change-Id: I215f5f6504018d589fa44776a332757a7b870d53 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/06/5106/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 8d97bce..10c49c3 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -37,4 +37,5 @@ # and all RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client +ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/commit RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install -- To view, visit https://gerrit.osmocom.org/5106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I215f5f6504018d589fa44776a332757a7b870d53 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:49:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:49:40 +0000 Subject: osmo-ci[master]: docker for jenkins: update on changes in osmo-python-tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I215f5f6504018d589fa44776a332757a7b870d53 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 17:49:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 29 Nov 2017 17:49:42 +0000 Subject: [MERGED] osmo-ci[master]: docker for jenkins: update on changes in osmo-python-tests In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: docker for jenkins: update on changes in osmo-python-tests ...................................................................... docker for jenkins: update on changes in osmo-python-tests Download (ADD) the latest patch from git.osmocom.org so that the image gets rebuilt when new changes were merged to master. Change-Id: I215f5f6504018d589fa44776a332757a7b870d53 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 8d97bce..10c49c3 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -37,4 +37,5 @@ # and all RUN DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen g++ libtalloc-dev libpcsclite-dev make gcc pkgconf libtool autoconf autoconf-archive automake libortp-dev asciidoc mscgen git libsctp-dev libpcap-dev osc libc-ares-dev libgps-dev libsofia-sip-ua-glib-dev libssl-dev libsqlite3-dev libusb-dev libffi-dev libfftw3-dev flex bison libdbi-dev libsnmp-dev libncurses5-dev libgsm1-dev python-minimal python3 libdbd-sqlite3 cppcheck htop libgmp-dev gawk texinfo flex bison bc libsigsegv-dev libffi-dev libusb-1.0-0-dev libreadline-dev debhelper devscripts gcc-arm-none-eabi git-buildpackage dh-systemd dh-autoreconf bc openssh-client +ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/commit RUN git clone git://git.osmocom.org/python/osmo-python-tests && cd osmo-python-tests && python2 ./setup.py install && python3 ./setup.py install -- To view, visit https://gerrit.osmocom.org/5106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I215f5f6504018d589fa44776a332757a7b870d53 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:25:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:25:11 +0000 Subject: libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5103/2/src/timer.c File src/timer.c: PS2, Line 216: case T_TEST: : return 1486385000 + 423423; can you please elaborate how ths is used? -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:25:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:25:42 +0000 Subject: osmo-bsc[master]: auth: remove unused structs In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:26:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:26:01 +0000 Subject: osmo-bsc[master]: sccp-lite: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:26:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:26:13 +0000 Subject: osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:28:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:28:00 +0000 Subject: osmo-hlr[master]: db_get_auth_data / db_get_auc: clarify return values In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:28:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:28:13 +0000 Subject: osmo-hlr[master]: osmo-hlr: log details for unknown IMSI / no auth data / db e... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4988 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:28:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:28:49 +0000 Subject: osmo-hlr[master]: db_test: also test db_get_auc() return values In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4989 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0158228afbd78b8ca21f62dffa9f868674682b9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:30:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:30:14 +0000 Subject: osmo-sgsn[master]: sgsn_cdr: Split log formatting into a snprintf function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:31:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 Nov 2017 18:31:12 +0000 Subject: osmo-sgsn[master]: Add vty cmd 'cdr trap' to send CDR through CTRL iface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d144d87effd934d991257a65e19cf046a938907 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:49:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 18:49:19 +0000 Subject: [MERGED] osmo-sgsn[master]: Add vty cmd 'cdr trap' to send CDR through CTRL iface In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add vty cmd 'cdr trap' to send CDR through CTRL iface ...................................................................... Add vty cmd 'cdr trap' to send CDR through CTRL iface Default behavior is to have them disabled, and can be explicitly disabled too by using 'no cdr trap' cmd. Tested with osmo_ctrl.py that messages are send successfully: TRAP 0 cdr-v1 20171129125950222,901700000015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1 Related: OS#2360 Change-Id: I1d144d87effd934d991257a65e19cf046a938907 --- M include/osmocom/sgsn/sgsn.h M src/gprs/sgsn_cdr.c M src/gprs/sgsn_main.c M src/gprs/sgsn_vty.c 4 files changed, 70 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 464a64f..7e0b5d4 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -52,6 +52,7 @@ struct sgsn_cdr { char *filename; + bool trap; int interval; }; diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c index bc051ac..55aa664 100644 --- a/src/gprs/sgsn_cdr.c +++ b/src/gprs/sgsn_cdr.c @@ -18,6 +18,8 @@ * */ +#include + #include #include #include @@ -38,6 +40,7 @@ /* TODO...avoid going through a global */ extern struct sgsn_instance *sgsn; +extern struct ctrl_handle *g_ctrlh; /** * The CDR module will generate an entry like: @@ -59,6 +62,11 @@ * CAUSE_FOR_TERM, # CAUSE_FOR_TERM */ +static void send_cdr_trap(char *value) +{ + if (ctrl_cmd_send_trap(g_ctrlh, "cdr-v1", value) < 0) + LOGP(DGPRS, LOGL_ERROR, "Failed to create and send TRAP cdr-v1\n"); +} static void maybe_print_header(FILE *cdr_file) { @@ -97,21 +105,27 @@ FILE *cdr_file; char buf[1024]; - if (!inst->cfg.cdr.filename) + if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap) return; - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx); - fprintf(cdr_file, "%s\n", buf); - fclose(cdr_file); + if (inst->cfg.cdr.trap) + send_cdr_trap(buf); + + if (inst->cfg.cdr.filename) { + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + fprintf(cdr_file, "%s\n", buf); + + fclose(cdr_file); + } } static void extract_eua(struct ul66_t *eua, char *eua_addr) @@ -200,20 +214,26 @@ FILE *cdr_file; char buf[1024]; - if (!inst->cfg.cdr.filename) + if (!inst->cfg.cdr.filename && !inst->cfg.cdr.trap) return; - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp); - fprintf(cdr_file, "%s\n", buf); - fclose(cdr_file); + + if (inst->cfg.cdr.trap) + send_cdr_trap(buf); + + if (inst->cfg.cdr.filename) { + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + fprintf(cdr_file, "%s\n", buf); + fclose(cdr_file); + } } static void cdr_pdp_timeout(void *_data) diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index fe4192b..b2a028c 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -76,6 +76,7 @@ #include void *tall_bsc_ctx; +struct ctrl_handle *g_ctrlh; struct gprs_ns_inst *sgsn_nsi; static int daemonize = 0; @@ -367,7 +368,6 @@ int main(int argc, char **argv) { - struct ctrl_handle *ctrl; int rc; #if BUILD_IU struct osmo_sccp_instance *sccp; @@ -454,9 +454,9 @@ /* start control interface after reading config for * ctrl_vty_get_bind_addr() */ - ctrl = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), + g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_SGSN); - if (!ctrl) { + if (!g_ctrlh) { LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); exit(1); } diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index a01de2d..c8dfc43 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -233,6 +233,10 @@ vty_out(vty, " cdr filename %s%s", g_cfg->cdr.filename, VTY_NEWLINE); else vty_out(vty, " no cdr filename%s", VTY_NEWLINE); + if (g_cfg->cdr.trap) + vty_out(vty, " cdr trap%s", VTY_NEWLINE); + else + vty_out(vty, " no cdr trap%s", VTY_NEWLINE); vty_out(vty, " cdr interval %d%s", g_cfg->cdr.interval, VTY_NEWLINE); vty_out(vty, " timer t3312 %d%s", g_cfg->timers.T3312, VTY_NEWLINE); @@ -1100,7 +1104,7 @@ DEFUN(cfg_cdr_filename, cfg_cdr_filename_cmd, "cdr filename NAME", - "CDR\nSet filename\nname\n") + "CDR\nEnable saving CDR to filename\nname\n") { talloc_free(g_cfg->cdr.filename); g_cfg->cdr.filename = talloc_strdup(tall_vty_ctx, argv[0]); @@ -1109,10 +1113,26 @@ DEFUN(cfg_no_cdr_filename, cfg_no_cdr_filename_cmd, "no cdr filename", - NO_STR "CDR\nDisable CDR generation\n") + NO_STR "CDR\nDisable saving CDR to file\n") { talloc_free(g_cfg->cdr.filename); g_cfg->cdr.filename = NULL; + return CMD_SUCCESS; +} + +DEFUN(cfg_cdr_trap, cfg_cdr_trap_cmd, + "cdr trap", + "CDR\nEnable sending CDR via TRAP CTRL messages\n") +{ + g_cfg->cdr.trap = true; + return CMD_SUCCESS; +} + +DEFUN(cfg_no_cdr_trap, cfg_no_cdr_trap_cmd, + "no cdr trap", + NO_STR "CDR\nDisable sending CDR via TRAP CTRL messages\n") +{ + g_cfg->cdr.trap = false; return CMD_SUCCESS; } @@ -1250,6 +1270,8 @@ install_element(SGSN_NODE, &cfg_no_apn_name_cmd); install_element(SGSN_NODE, &cfg_cdr_filename_cmd); install_element(SGSN_NODE, &cfg_no_cdr_filename_cmd); + install_element(SGSN_NODE, &cfg_cdr_trap_cmd); + install_element(SGSN_NODE, &cfg_no_cdr_trap_cmd); install_element(SGSN_NODE, &cfg_cdr_interval_cmd); install_element(SGSN_NODE, &cfg_ggsn_dynamic_lookup_cmd); install_element(SGSN_NODE, &cfg_grx_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/5087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d144d87effd934d991257a65e19cf046a938907 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Nov 29 18:49:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 Nov 2017 18:49:19 +0000 Subject: [MERGED] osmo-sgsn[master]: sgsn_cdr: Split log formatting into a snprintf function In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: sgsn_cdr: Split log formatting into a snprintf function ...................................................................... sgsn_cdr: Split log formatting into a snprintf function This function is going to be re-used to send TRAP messages over CTRL interface. Related: OS#2360 Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d --- M src/gprs/sgsn_cdr.c 1 file changed, 52 insertions(+), 31 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c index 474d41a..bc051ac 100644 --- a/src/gprs/sgsn_cdr.c +++ b/src/gprs/sgsn_cdr.c @@ -68,12 +68,34 @@ fprintf(cdr_file, "timestamp,imsi,imei,msisdn,cell_id,lac,hlr,event,pdp_duration,ggsn_addr,sgsn_addr,apni,eua_addr,vol_in,vol_out,charging_id\n"); } +static int cdr_snprintf_mm(char *buf, size_t size, const char *ev, + struct sgsn_mm_ctx *mmctx) +{ + struct tm tm; + struct timeval tv; + int ret; + + gettimeofday(&tv, NULL); + gmtime_r(&tv.tv_sec, &tm); + ret = snprintf(buf, size, "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + (int)(tv.tv_usec / 1000), + mmctx->imsi, + mmctx->imei, + mmctx->msisdn, + mmctx->gb.cell_id, + mmctx->ra.lac, + mmctx->hlr, + ev); + return ret; +} + static void cdr_log_mm(struct sgsn_instance *inst, const char *ev, struct sgsn_mm_ctx *mmctx) { FILE *cdr_file; - struct tm tm; - struct timeval tv; + char buf[1024]; if (!inst->cfg.cdr.filename) return; @@ -86,19 +108,8 @@ } maybe_print_header(cdr_file); - gettimeofday(&tv, NULL); - gmtime_r(&tv.tv_sec, &tm); - fprintf(cdr_file, "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s\n", - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec, - (int)(tv.tv_usec / 1000), - mmctx->imsi, - mmctx->imei, - mmctx->msisdn, - mmctx->gb.cell_id, - mmctx->ra.lac, - mmctx->hlr, - ev); + cdr_snprintf_mm(buf, sizeof(buf), ev, mmctx); + fprintf(cdr_file, "%s\n", buf); fclose(cdr_file); } @@ -124,10 +135,9 @@ } } -static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev, +static int cdr_snprintf_pdp(char *buf, size_t size, const char *ev, struct sgsn_pdp_ctx *pdp) { - FILE *cdr_file; char apni[(pdp->lib ? pdp->lib->apn_use.l : 0) + 1]; char ggsn_addr[INET_ADDRSTRLEN + 1]; char sgsn_addr[INET_ADDRSTRLEN + 1]; @@ -136,9 +146,7 @@ struct timeval tv; time_t duration; struct timespec tp; - - if (!inst->cfg.cdr.filename) - return; + int ret; memset(apni, 0, sizeof(apni)); memset(ggsn_addr, 0, sizeof(ggsn_addr)); @@ -154,15 +162,6 @@ if (pdp->ggsn) inet_ntop(AF_INET, &pdp->ggsn->gsn->gsnc.s_addr, sgsn_addr, sizeof(sgsn_addr)); - cdr_file = fopen(inst->cfg.cdr.filename, "a"); - if (!cdr_file) { - LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", - inst->cfg.cdr.filename); - return; - } - - maybe_print_header(cdr_file); - clock_gettime(CLOCK_MONOTONIC, &tp); gettimeofday(&tv, NULL); @@ -172,8 +171,8 @@ /* Check the duration of the PDP context */ duration = tp.tv_sec - pdp->cdr_start.tv_sec; - fprintf(cdr_file, - "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 ",%" PRIu64 ",%u\n", + ret = snprintf(buf, size, + "%04d%02d%02d%02d%02d%02d%03d,%s,%s,%s,%d,%d,%s,%s,%ld,%s,%s,%s,%s,%" PRIu64 ",%" PRIu64 ",%u", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, (int)(tv.tv_usec / 1000), @@ -192,6 +191,28 @@ pdp->cdr_bytes_in, pdp->cdr_bytes_out, pdp->cdr_charging_id); + return ret; +} + +static void cdr_log_pdp(struct sgsn_instance *inst, const char *ev, + struct sgsn_pdp_ctx *pdp) +{ + FILE *cdr_file; + char buf[1024]; + + if (!inst->cfg.cdr.filename) + return; + + cdr_file = fopen(inst->cfg.cdr.filename, "a"); + if (!cdr_file) { + LOGP(DGPRS, LOGL_ERROR, "Failed to open %s\n", + inst->cfg.cdr.filename); + return; + } + + maybe_print_header(cdr_file); + cdr_snprintf_pdp(buf, sizeof(buf), ev, pdp); + fprintf(cdr_file, "%s\n", buf); fclose(cdr_file); } -- To view, visit https://gerrit.osmocom.org/5086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 30 08:17:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 30 Nov 2017 08:17:42 +0000 Subject: [MERGED] osmo-bsc[master]: bssap: remove libosmo-legacy-mgcp dependancy In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: bssap: remove libosmo-legacy-mgcp dependancy ...................................................................... bssap: remove libosmo-legacy-mgcp dependancy the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() which are used to calculate the port in the sccp-lite / non AoIP case are part of libosmo-legacy-mgcp. Unfortunately libosmo-mgcp and libosmo-legacy-mgcp cause problems when used at the same time. Replace the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() with a local helper function. Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 15 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 59c2979..73776ad 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -454,6 +453,19 @@ return -1; } +/* Helper function to calculate the port number for a given + * timeslot/multiplex. This functionality is needed to support + * the sccp-lite scenario where the MGW is handled externally */ +static inline int mgcp_timeslot_to_port(int multiplex, int timeslot, int base) +{ + if (timeslot == 0) { + LOGP(DLMGCP, LOGL_ERROR, "Timeslot should not be 0\n"); + timeslot = 255; + } + + return base + (timeslot + (32 * multiplex)) * 2; +} + /* * Handle the assignment request message. * @@ -468,7 +480,7 @@ uint8_t timeslot = 0; uint8_t multiplex = 0; enum gsm48_chan_mode chan_mode = GSM48_CMODE_SIGN; - int port, full_rate = -1; + int full_rate = -1; bool aoip = false; struct sockaddr_storage rtp_addr; struct gsm0808_channel_type ct; @@ -603,8 +615,7 @@ * (the MSC does that for us). We set conn->rtp_ip to 0 and check * on this later. By this we know that we have to behave accordingly * to sccp-lite. */ - port = mgcp_timeslot_to_endpoint(multiplex, timeslot); - conn->rtp_port = rtp_calculate_port(port, msc->rtp_base); + conn->rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); conn->rtp_ip = 0; return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } -- To view, visit https://gerrit.osmocom.org/4963 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 30 08:18:45 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 30 Nov 2017 08:18:45 +0000 Subject: [MERGED] osmo-bsc[master]: sccp-lite: remove obsolete VTY commands In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: sccp-lite: remove obsolete VTY commands ...................................................................... sccp-lite: remove obsolete VTY commands remove obsolete vty commands: - token - auth-key - no auth-key Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_vty.c 2 files changed, 0 insertions(+), 47 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 4a283d1..a3e0106 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -72,10 +72,6 @@ /* Connection data */ - char *bsc_token; - uint8_t bsc_key[16]; - uint8_t bsc_key_present; - int ping_timeout; int pong_timeout; struct osmo_timer_list ping_timer; diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index 0003cfa..a87b20f 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -108,11 +108,6 @@ struct bsc_msc_dest *dest; vty_out(vty, "msc %d%s", msc->nr, VTY_NEWLINE); - if (msc->bsc_token) - vty_out(vty, " token %s%s", msc->bsc_token, VTY_NEWLINE); - if (msc->bsc_key_present) - vty_out(vty, " auth-key %s%s", - osmo_hexdump(msc->bsc_key, sizeof(msc->bsc_key)), VTY_NEWLINE); if (msc->core_mnc != -1) vty_out(vty, " core-mobile-network-code %d%s", msc->core_mnc, VTY_NEWLINE); @@ -233,41 +228,6 @@ if (bsc->acc_lst_name) vty_out(vty, " access-list-name %s%s", bsc->acc_lst_name, VTY_NEWLINE); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_bsc_token, - cfg_net_bsc_token_cmd, - "token TOKEN", - "A token for the BSC to be sent to the MSC\n" "A token\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - osmo_talloc_replace_string(osmo_bsc_data(vty), &data->bsc_token, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_bsc_key, - cfg_net_bsc_key_cmd, - "auth-key KEY", - "Authentication (secret) key configuration\n" - "Security key\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - osmo_hexparse(argv[0], data->bsc_key, sizeof(data->bsc_key)); - data->bsc_key_present = 1; - return CMD_SUCCESS; -} - -DEFUN(cfg_net_no_bsc_key, cfg_net_bsc_no_key_cmd, - "no auth-key", - NO_STR "Authentication (secret) key configuration\n") -{ - struct bsc_msc_data *data = bsc_msc_data(vty); - - memset(data->bsc_key, 0, sizeof(data->bsc_key)); - data->bsc_key_present = 0; return CMD_SUCCESS; } @@ -989,9 +949,6 @@ install_element(BSC_NODE, &cfg_bsc_no_acc_lst_name_cmd); install_node(&msc_node, config_write_msc); - install_element(MSC_NODE, &cfg_net_bsc_token_cmd); - install_element(MSC_NODE, &cfg_net_bsc_key_cmd); - install_element(MSC_NODE, &cfg_net_bsc_no_key_cmd); install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); install_element(MSC_NODE, &cfg_net_bsc_mcc_cmd); install_element(MSC_NODE, &cfg_net_bsc_lac_cmd); -- To view, visit https://gerrit.osmocom.org/5094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 30 08:31:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 30 Nov 2017 08:31:03 +0000 Subject: [MERGED] osmo-bsc[master]: auth: remove unused structs In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: auth: remove unused structs ...................................................................... auth: remove unused structs The following structs are no longer used/needed: - gsm_auth_algo - gsm_auth_info - gsm_auth_tuple - gsm_security_operation Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 857dd4f..5190a27 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -55,35 +55,6 @@ struct msgb *msg, void *data, void *param); -/* Real authentication information containing Ki */ -enum gsm_auth_algo { - AUTH_ALGO_NONE, - AUTH_ALGO_XOR, - AUTH_ALGO_COMP128v1, -}; - -struct gsm_auth_info { - enum gsm_auth_algo auth_algo; - unsigned int a3a8_ki_len; - uint8_t a3a8_ki[16]; -}; - -struct gsm_auth_tuple { - int use_count; - int key_seq; - struct osmo_auth_vector vec; -}; -#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */ - -/* - * AUTHENTICATION/CIPHERING state - */ -struct gsm_security_operation { - struct gsm_auth_tuple atuple; - gsm_cbfn *cb; - void *cb_data; -}; - /* * A dummy to keep a connection up for at least * a couple of seconds to work around MSC issues. @@ -154,12 +125,6 @@ uint8_t expire_timer_stopped; /* SMS helpers for libmsc */ uint8_t next_rp_ref; - - /* - * Operations that have a state and might be pending - */ - struct gsm_security_operation *sec_operation; - struct gsm_anchor_operation *anch_operation; struct osmo_fsm_inst *conn_fsm; -- To view, visit https://gerrit.osmocom.org/5095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 30 08:31:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 30 Nov 2017 08:31:03 +0000 Subject: [MERGED] osmo-bsc[master]: auth: remove obsolete VTY commands In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: auth: remove obsolete VTY commands ...................................................................... auth: remove obsolete VTY commands authentication (optional|required) is no longer needed, the related decisions are now made in the HLR. Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 5 files changed, 0 insertions(+), 21 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 60338d2..64c3abd 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -10,7 +10,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index f9f5ba6..7697481 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -9,7 +9,6 @@ long name OsmoBSC location updating reject cause 13 encryption a5 0 - authentication optional neci 0 paging any use tch 0 rrlp mode none diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 5190a27..91aee43 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -335,7 +335,6 @@ char *name_short; enum gsm48_reject_value reject_cause; int a5_encryption; - bool authentication_required; int neci; int send_mm_info; struct { diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index c5dedb3..3f3935c 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -802,9 +802,6 @@ vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); - vty_out(vty, " authentication %s%s", - gsmnet->authentication_required ? "required" : "optional", - VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 51f16c4..74b1a93 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -134,20 +134,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_authentication, - cfg_net_authentication_cmd, - "authentication (optional|required)", - "Whether to enforce MS authentication in 2G\n" - "Allow MS to attach via 2G BSC without authentication\n" - "Always do authentication\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->authentication_required = (argv[0][0] == 'r') ? true : false; - - return CMD_SUCCESS; -} - DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", "Radio Resource Location Protocol\n" @@ -297,7 +283,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_authentication_cmd); install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 30 08:41:35 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 30 Nov 2017 08:41:35 +0000 Subject: [PATCH] osmo-mgw[master]: conn: remove assertions Message-ID: Review at https://gerrit.osmocom.org/5107 conn: remove assertions Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 0 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/07/5107/1 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index ae3f026..4090a9f 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -124,10 +124,6 @@ struct mgcp_conn *conn; int rc; - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - OSMO_ASSERT(strlen(name) < sizeof(conn->name)); - /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) return NULL; @@ -170,11 +166,6 @@ * \returns pointer to allocated connection, NULL if not found */ struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { @@ -192,11 +183,6 @@ struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -214,11 +200,6 @@ * \param[in] id identification number of the connection */ void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -246,9 +227,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_oldest(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; if (llist_empty(&endp->conns)) @@ -265,9 +243,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_all(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; struct mgcp_conn *conn_tmp; -- To view, visit https://gerrit.osmocom.org/5107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Nov 30 10:43:55 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 Nov 2017 10:43:55 +0000 Subject: libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5103/2/src/timer.c File src/timer.c: Line 219: LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time computation: %u\n", kind); White-space fix required... -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:00:29 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 Nov 2017 11:00:29 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-bsc: Remove token cmd from config Message-ID: Review at https://gerrit.osmocom.org/5108 osmo-bsc: Remove token cmd from config In 3b18044859df15ffd2ad4c3e5c3d2c94a2923eb9 this command has been dropped and is no longer recognized. Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f --- M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/08/5108/1 diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b2321..18b3761 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -74,7 +74,6 @@ % endfor %endfor msc - token msc_token_23_42 core-mobile-country-code ${bsc.net.mcc} core-mobile-network-code ${bsc.net.mnc} ip.access rtp-base 25000 -- To view, visit https://gerrit.osmocom.org/5108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:01:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 11:01:33 +0000 Subject: [MERGED] osmo-hlr[master]: db_test: also test db_get_auc() return values In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: db_test: also test db_get_auc() return values ...................................................................... db_test: also test db_get_auc() return values Verify that it returns -ENOENT on non-existing IMSI and -ENOKEY for no auth data. Move the auc_compute_vectors() stub to the top near the db_get_auc() call, and just return num_vec to get a successful return value when auth data is present. Change-Id: Ic0158228afbd78b8ca21f62dffa9f868674682b9 --- M tests/db/db_test.c M tests/db/db_test.err 2 files changed, 80 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 1a5d7e0..6bf7a86 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -100,6 +100,22 @@ fprintf(stderr, "\n"); \ } while (0) +#define N_VECTORS 3 + +#define ASSERT_DB_GET_AUC(imsi, expect_rc) \ + do { \ + struct osmo_auth_vector vec[N_VECTORS]; \ + ASSERT_RC(db_get_auc(dbc, imsi, 3, vec, N_VECTORS, NULL, NULL), expect_rc); \ + } while (0) + +/* Not linking the real auc_compute_vectors(), just returning num_vec. + * This gets called by db_get_auc(), but we're only interested in its rc. */ +int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, + struct osmo_sub_auth_data *aud2g, + struct osmo_sub_auth_data *aud3g, + const uint8_t *rand_auts, const uint8_t *auts) +{ return num_vec; } + static struct db_context *dbc = NULL; static void *ctx = NULL; static struct hlr_subscriber g_subscr; @@ -457,6 +473,7 @@ comment("Get auth data for non-existent subscriber"); ASSERT_SEL_AUD(unknown_imsi, -ENOENT, 0); + ASSERT_DB_GET_AUC(imsi0, -ENOENT); comment("Create subscriber"); @@ -465,6 +482,7 @@ id = g_subscr.id; ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 2G only"); @@ -473,6 +491,7 @@ mk_aud_2g(OSMO_AUTH_ALG_COMP128v1, "0123456789abcdef0123456789abcdef")), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); /* same again */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -501,6 +520,7 @@ mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -516,6 +536,7 @@ mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 3G only"); @@ -526,6 +547,7 @@ "C01ffedC1cadaeAc1d1f1edAcac1aB0a", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); /* same again */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -563,6 +585,7 @@ mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -575,6 +598,7 @@ "BeefedCafeFaceAcedAddedDecadeFee", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, @@ -582,6 +606,7 @@ "asdfasdfasdf", 99999)), 0); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); comment("Set auth data, 2G and 3G"); @@ -595,6 +620,7 @@ "DeafBeddedBabeAcceededFadedDecaf", 5)), 0); ASSERT_SEL_AUD(imsi0, 0, id); + ASSERT_DB_GET_AUC(imsi0, N_VECTORS); comment("Set invalid auth data"); @@ -670,9 +696,11 @@ * and make sure there are no auth data leftovers for this ID. */ OSMO_ASSERT(id == g_subscr.id); ASSERT_SEL_AUD(imsi0, -ENOKEY, id); + ASSERT_DB_GET_AUC(imsi0, -ENOKEY); ASSERT_RC(db_subscr_delete_by_id(dbc, id), 0); ASSERT_SEL(imsi, imsi0, -ENOENT); + ASSERT_DB_GET_AUC(imsi0, -ENOENT); comment_end(); } @@ -835,11 +863,6 @@ } /* stubs */ -int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, - struct osmo_sub_auth_data *aud2g, - struct osmo_sub_auth_data *aud3g, - const uint8_t *rand_auts, const uint8_t *auts) -{ OSMO_ASSERT(false); return -1; } void *lu_op_alloc_conn(void *conn) { OSMO_ASSERT(false); return NULL; } void lu_op_tx_del_subscr_data(void *luop) diff --git a/tests/db/db_test.err b/tests/db/db_test.err index c5e5bac..1d34045 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -715,6 +715,9 @@ DAUC IMSI='999999999': No such subscriber +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -2 +DAUC IMSI='123456789000000': No such subscriber + --- Create subscriber @@ -731,6 +734,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + --- Set auth data, 2G only @@ -745,6 +752,11 @@ .u.gsm.ki = '0123456789abcdef0123456789abcdef', } 3G: none + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 3G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_COMP128v1, "0123456789abcdef0123456789abcdef")) --> 0 @@ -804,6 +816,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> -ENOENT db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_XOR, "CededEffacedAceFacedBadFadedBeef")) --> 0 @@ -825,6 +841,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + --- Set auth data, 3G only @@ -843,6 +863,12 @@ .u.umts.amf = '0000', .u.umts.ind_bitlen = 5, } + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_MILENAGE, "BeefedCafeFaceAcedAddedDecadeFee", true, "C01ffedC1cadaeAc1d1f1edAcac1aB0a", 5)) --> 0 @@ -917,6 +943,10 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)) --> -ENOENT db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_MILENAGE, "CededEffacedAceFacedBadFadedBeef", false, "BeefedCafeFaceAcedAddedDecadeFee", 5)) --> 0 @@ -935,12 +965,22 @@ .u.umts.ind_bitlen = 5, } +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB + db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, "asdfasdfasd", false, "asdfasdfasdf", 99999)) --> 0 db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data --- Set auth data, 2G and 3G @@ -965,6 +1005,11 @@ .u.umts.amf = '0000', .u.umts.ind_bitlen = 5, } + +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> 3 +DAUC IMSI='123456789000000': Calling to generate 3 vectors +DAUC IMSI='123456789000000': Generated 3 vectors +DAUC IMSI='123456789000000': Updating SQN=0 in DB --- Set invalid auth data @@ -1179,11 +1224,18 @@ DAUC IMSI='123456789000000': No 3G Auth Data +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -126 +DAUC IMSI='123456789000000': No 2G Auth Data +DAUC IMSI='123456789000000': No 3G Auth Data + db_subscr_delete_by_id(dbc, id) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123456789000000': No such subscriber +db_get_auc(dbc, imsi0, 3, vec, N_VECTORS, NULL, NULL) --> -2 +DAUC IMSI='123456789000000': No such subscriber + ===== test_subscr_aud: SUCCESS -- To view, visit https://gerrit.osmocom.org/4989 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0158228afbd78b8ca21f62dffa9f868674682b9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:01:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 11:01:33 +0000 Subject: [MERGED] osmo-hlr[master]: osmo-hlr: log details for unknown IMSI / no auth data / db e... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-hlr: log details for unknown IMSI / no auth data / db error ...................................................................... osmo-hlr: log details for unknown IMSI / no auth data / db error For unknown IMSI and no auth data for a known IMSI, log respective messages on NOTICE level. For database error, log on ERROR level. Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a --- M src/hlr.c 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index 58f94f3..168e203 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -74,10 +74,17 @@ /* 0 means "0 tuples generated", which shouldn't happen. * Treat the same as "no auth data". */ case -ENOKEY: + LOGP(DAUC, LOGL_NOTICE, "%s: IMSI known, but has no auth data;" + " Returning slightly inaccurate cause 'IMSI Unknown' via GSUP\n", + gsup->imsi); + gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; + break; case -ENOENT: + LOGP(DAUC, LOGL_NOTICE, "%s: IMSI not known\n", gsup->imsi); gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; default: + LOGP(DAUC, LOGL_ERROR, "%s: failure to look up IMSI in db\n", gsup->imsi); gsup_out.cause = GMM_CAUSE_NET_FAIL; break; } -- To view, visit https://gerrit.osmocom.org/4988 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3838fa78567e7e92d797d90b8b90865d9ebba90a Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:01:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 11:01:34 +0000 Subject: [MERGED] osmo-hlr[master]: db_get_auth_data / db_get_auc: clarify return values In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: db_get_auth_data / db_get_auc: clarify return values ...................................................................... db_get_auth_data / db_get_auc: clarify return values Differentiate between "IMSI unknown" and "IMSI has no auth data": in case of known IMSI lacking auth data, return -ENOKEY instead of -ENOENT. Fix API doc comments to reflect what the functions actually return, on top of adding the -ENOKEY detail. Adjust db_test expectations from -ENOENT to -ENOKEY where appropriate. Adjust VTY and CTRL command rc evaluation. A subsequent patch will use these return values to log details on each of these situations. Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 --- M src/ctrl.c M src/db_auc.c M src/hlr.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 6 files changed, 53 insertions(+), 34 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl.c b/src/ctrl.c index 3e81661..8ae9d7c 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -228,11 +228,16 @@ rc = db_get_auth_data(hlr->dbc, imsi, &aud2g, &aud3g, NULL); - if (rc == -ENOENT) { + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: /* No auth data found, tell the print*() functions about it. */ aud2g.algo = OSMO_AUTH_ALG_NONE; aud3g.algo = OSMO_AUTH_ALG_NONE; - } else if (rc) { + break; + default: cmd->reply = "Error retrieving authentication data."; return CTRL_CMD_ERROR; } @@ -258,11 +263,16 @@ rc = db_get_auth_data(hlr->dbc, subscr.imsi, &aud2g, &aud3g, NULL); - if (rc == -ENOENT) { + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: /* No auth data found, tell the print*() functions about it. */ aud2g.algo = OSMO_AUTH_ALG_NONE; aud3g.algo = OSMO_AUTH_ALG_NONE; - } else if (rc) { + break; + default: cmd->reply = "Error retrieving authentication data."; return CTRL_CMD_ERROR; } diff --git a/src/db_auc.c b/src/db_auc.c index 7bbc93f..5fb5e3a 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -74,7 +74,9 @@ } /* obtain the authentication data for a given imsi - * returns -1 in case of error, 0 for unknown IMSI, 1 for success */ + * returns 0 for success, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auth_data(struct db_context *dbc, const char *imsi, struct osmo_sub_auth_data *aud2g, struct osmo_sub_auth_data *aud3g, @@ -163,15 +165,16 @@ LOGAUC(imsi, LOGL_DEBUG, "No 3G Auth Data\n"); if (aud2g->type == 0 && aud3g->type == 0) - ret = -ENOENT; + ret = -ENOKEY; out: db_remove_reset(stmt); return ret; } -/* return -1 in case of error, 0 for unknown imsi, positive for number - * of vectors generated */ +/* return number of vectors generated, negative value on error: + * -ENOENT if the IMSI is not known, -ENOKEY if the IMSI is known but has no auth data, + * -EIO on db failure */ int db_get_auc(struct db_context *dbc, const char *imsi, unsigned int auc_3g_ind, struct osmo_auth_vector *vec, unsigned int num_vec, const uint8_t *rand_auts, diff --git a/src/hlr.c b/src/hlr.c index bcae3b5..58f94f3 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -71,6 +71,9 @@ gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR; switch (rc) { case 0: + /* 0 means "0 tuples generated", which shouldn't happen. + * Treat the same as "no auth data". */ + case -ENOKEY: case -ENOENT: gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; break; diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 0a9ba76..5a300a7 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -72,14 +72,17 @@ OSMO_ASSERT(g_hlr); rc = db_get_auth_data(g_hlr->dbc, subscr->imsi, &aud2g, &aud3g, NULL); - if (rc) { - if (rc == -ENOENT) { - aud2g.algo = OSMO_AUTH_ALG_NONE; - aud3g.algo = OSMO_AUTH_ALG_NONE; - } else { - vty_out(vty, "%% Error retrieving data from database (%d)%s", rc, VTY_NEWLINE); - return; - } + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: + aud2g.algo = OSMO_AUTH_ALG_NONE; + aud3g.algo = OSMO_AUTH_ALG_NONE; + break; + default: + vty_out(vty, "%% Error retrieving data from database (%d)%s", rc, VTY_NEWLINE); + return; } if (aud2g.type != OSMO_AUTH_TYPE_NONE && aud2g.type != OSMO_AUTH_TYPE_GSM) { diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 23b84cc..1a5d7e0 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -464,7 +464,7 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G only"); @@ -500,7 +500,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -515,7 +515,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 3G only"); @@ -562,7 +562,7 @@ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); /* Removing nothing results in -ENOENT */ ASSERT_RC(db_subscr_update_aud_by_id(dbc, id, @@ -581,7 +581,7 @@ "asdfasdfasd", false, "asdfasdfasdf", 99999)), 0); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth data, 2G and 3G"); @@ -669,7 +669,7 @@ /* For this test to work, we want to get the same subscriber ID back, * and make sure there are no auth data leftovers for this ID. */ OSMO_ASSERT(id == g_subscr.id); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_subscr_delete_by_id(dbc, id), 0); ASSERT_SEL(imsi, imsi0, -ENOENT); @@ -697,15 +697,15 @@ ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set SQN, but no 3G auth data present"); ASSERT_RC(db_update_sqn(dbc, id, 123), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); ASSERT_RC(db_update_sqn(dbc, id, 543), -ENOENT); - ASSERT_SEL_AUD(imsi0, -ENOENT, id); + ASSERT_SEL_AUD(imsi0, -ENOKEY, id); comment("Set auth 3G data"); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index f7acfec..c5e5bac 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -726,7 +726,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -799,7 +799,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, NULL)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -820,7 +820,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_2g(OSMO_AUTH_ALG_NONE, "f000000000000f00000000000f000000")) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -912,7 +912,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, NULL, false, NULL, 0)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -937,7 +937,7 @@ db_subscr_update_aud_by_id(dbc, id, mk_aud_3g(OSMO_AUTH_ALG_NONE, "asdfasdfasd", false, "asdfasdfasdf", 99999)) --> 0 -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1174,7 +1174,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1214,7 +1214,7 @@ .imsi = '123456789000000', } -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1225,7 +1225,7 @@ db_update_sqn(dbc, id, 123) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data @@ -1233,7 +1233,7 @@ db_update_sqn(dbc, id, 543) --> -ENOENT DAUC Cannot update SQN for subscriber ID=1: no auc_3g entry for such subscriber -db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -2 +db_get_auth_data(dbc, imsi0, &g_aud2g, &g_aud3g, &g_id) --> -126 DAUC IMSI='123456789000000': No 2G Auth Data DAUC IMSI='123456789000000': No 3G Auth Data -- To view, visit https://gerrit.osmocom.org/4987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf6304d23585f2ed45e050fa27c787f2d66fd3f7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:05:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 Nov 2017 11:05:22 +0000 Subject: osmo-gsm-tester[master]: osmo-bsc: Remove token cmd from config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:05:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 Nov 2017 11:05:25 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-bsc: Remove token cmd from config In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-bsc: Remove token cmd from config ...................................................................... osmo-bsc: Remove token cmd from config In 3b18044859df15ffd2ad4c3e5c3d2c94a2923eb9 this command has been dropped and is no longer recognized. Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f --- M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b2321..18b3761 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -74,7 +74,6 @@ % endfor %endfor msc - token msc_token_23_42 core-mobile-country-code ${bsc.net.mcc} core-mobile-network-code ${bsc.net.mnc} ip.access rtp-base 25000 -- To view, visit https://gerrit.osmocom.org/5108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:31:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 11:31:03 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client: don't configure "bts base" In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4701 to look at the new patch set (#2). mgcp_client: don't configure "bts base" There should not be any BTS base port to be configured at an MGCP client. Possibly this is related to the legacy behavior of libosmo-legacy-mgcp, and certainly has no place in libosmo-mgcp-client. Further changes may be needed to follow up on removal of the BTS base port concept, at least drop it from the VTY for now. Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_vty.c 3 files changed, 0 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/01/4701/2 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..8a2c404 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -21,7 +21,6 @@ int remote_port; uint16_t first_endpoint; uint16_t last_endpoint; - uint16_t bts_base; }; typedef unsigned int mgcp_trans_id_t; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..a35ad6f 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -45,7 +45,6 @@ .remote_port = -1, .first_endpoint = 0, .last_endpoint = 0, - .bts_base = 0, }; } @@ -383,7 +382,6 @@ mgcp->actual.first_endpoint = conf->first_endpoint > 0 ? (uint16_t)conf->first_endpoint : 0; mgcp->actual.last_endpoint = conf->last_endpoint > 0 ? (uint16_t)conf->last_endpoint : 0; - mgcp->actual.bts_base = conf->bts_base > 0 ? (uint16_t)conf->bts_base : 4000; return mgcp; } diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index f8129c0..1d58bb5 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -123,32 +123,12 @@ "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") -#define BTS_START_STR "First UDP port allocated for the BTS side\n" -#define UDP_PORT_STR "UDP Port number\n" -DEFUN(cfg_mgw_rtp_bts_base_port, - cfg_mgw_rtp_bts_base_port_cmd, - "mgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) -{ - global_mgcp_client_conf->bts_base = atoi(argv[0]); - return CMD_SUCCESS; -} -ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, - cfg_mgcpgw_rtp_bts_base_port_cmd, - "mgcpgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) - int mgcp_client_config_write(struct vty *vty, const char *indent) { const char *addr; int port; uint16_t first_endpoint; uint16_t last_endpoint; - uint16_t bts_base; addr = global_mgcp_client_conf->local_addr; if (addr) @@ -175,12 +155,6 @@ first_endpoint, last_endpoint, VTY_NEWLINE); } - bts_base = global_mgcp_client_conf->bts_base; - if (bts_base) { - vty_out(vty, "%smgw bts-base %u%s", indent, - bts_base, VTY_NEWLINE); - } - return CMD_SUCCESS; } @@ -194,7 +168,6 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); - install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -202,5 +175,4 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); - install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 30 11:39:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 30 Nov 2017 11:39:38 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log timer override Message-ID: Review at https://gerrit.osmocom.org/5109 TBF: log timer override Currently TBF support only single Txxxx timer so scheduling another timer will cancel out the one which already running. Until the proper fix is in place, let's at least log this situation as error. Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Related: OS#2407 --- M src/tbf.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/5109/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 8e54157..a8ad0f8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -535,7 +535,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "%s starting timer %u.\n", tbf_name(tbf), T); else - LOGP(DRLCMAC, LOGL_DEBUG, "%s restarting timer %u " + LOGP(DRLCMAC, LOGL_ERROR, "%s restarting timer %u " "while old timer %u pending \n", tbf_name(tbf), T, tbf->T); -- To view, visit https://gerrit.osmocom.org/5109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Nov 30 12:32:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 30 Nov 2017 12:32:06 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#11). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 8 files changed, 30,849 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/11 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Thu Nov 30 12:33:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 30 Nov 2017 12:33:25 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 11: How about this? Seems like best of both worlds to me: we got unified interface for rach encoding and the code which uses old version continues to work as before. -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 13:02:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 13:02:23 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client: add transaction cleanup Message-ID: Review at https://gerrit.osmocom.org/5110 mgcp_client: add transaction cleanup So far, if an MGCP message is sent, the transaction gets enqueued, but there is no way to end the transaction other than receiving a valid reply. So, if the caller decides that the transaction timed out and tears down the priv pointer passed to mgcp_client_tx, and if then a late reply arrives, the callback will dereference the invalid priv pointer and cause a segfault. Hence it is possible to crash an mgcp_client program by sending a late response. Furthermore, if no reply ever arrives, we would keep the pending response in the list forever, amounting to a "memory leak". Add mgcp_client_cancel() to discard a pending transaction. The caller can now decide to discard a pending response when it sees fit (e.g. the caller's timeout expired). This needs to be added to OsmoMSC and OsmoBSC. Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id from a generated MGCP message. No public API is broken; but refine the negative return code from mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still -1 if decoding failed. This is mainly for mgcp_client_test. Implement a test for mgcp_client_cancel() in mgcp_client_test.c. Found-by: dexter Change-Id: I16811e168a46a82a05943252a737b3434143f4bd --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.err M tests/mgcp_client/mgcp_client_test.ok 5 files changed, 124 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/5110/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..f404131 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -92,6 +92,7 @@ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv); +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id); enum mgcp_connection_mode; @@ -110,6 +111,7 @@ OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg); extern const struct value_string mgcp_client_connection_mode_strs[]; static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode) diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..96ad359 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -260,13 +260,11 @@ static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, - struct mgcp_response *r) + mgcp_trans_id_t trans_id) { struct mgcp_response_pending *pending; - if (!r) - return NULL; llist_for_each_entry(pending, &mgcp->responses_pending, entry) { - if (pending->trans_id == r->head.trans_id) { + if (pending->trans_id == trans_id) { llist_del(&pending->entry); return pending; } @@ -292,12 +290,12 @@ return -1; } - pending = mgcp_client_response_pending_get(mgcp, &r); + pending = mgcp_client_response_pending_get(mgcp, r.head.trans_id); if (!pending) { LOGP(DLMGCP, LOGL_ERROR, "Cannot find matching MGCP transaction for trans_id %d\n", r.head.trans_id); - return -1; + return -ENOENT; } mgcp_client_handle_response(mgcp, pending, &r); @@ -503,7 +501,10 @@ * response_cb. NOTE: the response_cb still needs to call * mgcp_response_parse_params(response) to get the parsed parameters -- to * potentially save some CPU cycles, only the head line has been parsed when - * the response_cb is invoked. */ + * the response_cb is invoked. + * Before the priv pointer becomes invalid, e.g. due to transaction timeout, + * mgcp_client_cancel() needs to be called for this transaction. + */ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv) { @@ -544,6 +545,31 @@ /* Pass NULL to response cb to indicate an error */ mgcp_client_handle_response(mgcp, pending, NULL); return -1; +} + +/* Cancel a pending transaction. + * Should a priv pointer passed to mgcp_client_tx() become invalid, this function must be called. In + * practical terms, if the caller of mgcp_client_tx() wishes to tear down a transaction without having + * received a response this function must be called. The trans_id can be obtained by calling + * mgcp_msg_trans_id() on the msgb produced by mgcp_msg_gen(). + */ +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id) +{ + struct mgcp_response_pending *pending = mgcp_client_response_pending_get(mgcp, trans_id); + if (!pending) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot cancel, no such transaction: %u\n", trans_id); + return -ENOENT; + } + LOGP(DLMGCP, LOGL_ERROR, "Canceled transaction %u\n", trans_id); + talloc_free(pending); + return 0; + /* We don't really need to clean up the wqueue: In all sane cases, the msgb has already been sent + * out and is no longer in the wqueue. If it still is in the wqueue, then sending MGCP messages + * per se is broken and the program should notice so by a full wqueue. Even if this was called + * before we had a chance to send out the message and it is still going to be sent, we will just + * ignore the reply to it later. Removing a msgb from the wqueue here would just introduce more + * bug surface in terms of failing to update wqueue API's counters or some such. + */ } static struct msgb *mgcp_msg_from_buf(mgcp_trans_id_t trans_id, @@ -751,6 +777,12 @@ return msg; } +/* Retrieve the MGCP transaction ID from a msgb generated by mgcp_msg_gen() */ +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg) +{ + return (mgcp_trans_id_t)msg->cb[MSGB_CB_MGCP_TRANS_ID]; +} + struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp) { return &mgcp->actual; diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..0de449a 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -24,6 +24,7 @@ #include #include #include +#include void *ctx; @@ -73,7 +74,7 @@ static struct mgcp_client_conf conf; struct mgcp_client *mgcp = NULL; -static void reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, +static int reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, int conn_id, const char *params) { static char compose[4096 - 128]; @@ -87,7 +88,7 @@ printf("composed response:\n-----\n%s\n-----\n", compose); - mgcp_client_rx(mgcp, from_str(compose)); + return mgcp_client_rx(mgcp, from_str(compose)); } void test_response_cb(struct mgcp_response *response, void *priv) @@ -225,6 +226,51 @@ msgb_free(msg); } +void test_mgcp_client_cancel() +{ + mgcp_trans_id_t trans_id; + struct msgb *msg; + struct mgcp_msg mgcp_msg = { + .verb = MGCP_VERB_CRCX, + .audio_ip = "192.168.100.23", + .endpoint = "23 at mgw", + .audio_port = 1234, + .call_id = 47, + .conn_id = 11, + .conn_mode = MGCP_CONN_RECV_SEND, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID + | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE), + }; + + printf("\n%s():\n", __func__); + fprintf(stderr, "\n%s():\n", __func__); + + if (mgcp) + talloc_free(mgcp); + mgcp = mgcp_client_init(ctx, &conf); + + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + trans_id = mgcp_msg_trans_id(msg); + fprintf(stderr, "- composed msg with trans_id=%u\n", trans_id); + + fprintf(stderr, "- not in queue yet, cannot cancel yet\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "- enqueue\n"); + dummy_mgcp_send(msg); + + fprintf(stderr, "- cancel succeeds\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == 0); + + fprintf(stderr, "- late response gets discarded\n"); + OSMO_ASSERT(reply_to(trans_id, 200, "OK", 1, "v=0\r\n") == -ENOENT); + + fprintf(stderr, "- canceling again does nothing\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "%s() done\n", __func__); +} + static const struct log_info_cat log_categories[] = { }; @@ -244,10 +290,13 @@ log_set_use_color(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 1); + log_set_category_filter(osmo_stderr_target, DLMGCP, 1, LOGL_DEBUG); + mgcp_client_conf_init(&conf); test_crcx(); test_mgcp_msg(); + test_mgcp_client_cancel(); printf("Done\n"); fprintf(stderr, "Done\n"); diff --git a/tests/mgcp_client/mgcp_client_test.err b/tests/mgcp_client/mgcp_client_test.err index 24151ee..8e9f648 100644 --- a/tests/mgcp_client/mgcp_client_test.err +++ b/tests/mgcp_client/mgcp_client_test.err @@ -1,2 +1,15 @@ DLMGCP message buffer to small, can not generate MGCP message + +test_mgcp_client_cancel(): +- composed msg with trans_id=1 +- not in queue yet, cannot cancel yet +DLMGCP Cannot cancel, no such transaction: 1 +- enqueue +- cancel succeeds +DLMGCP Canceled transaction 1 +- late response gets discarded +DLMGCP Cannot find matching MGCP transaction for trans_id 1 +- canceling again does nothing +DLMGCP Cannot cancel, no such transaction: 1 +test_mgcp_client_cancel() done Done diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index d4efee4..4039bb0 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -59,4 +59,23 @@ Overfolow test: + +test_mgcp_client_cancel(): +composed: +----- +CRCX 1 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:AMR, nt:IN +M: sendrecv + +----- +composed response: +----- +200 1 OK +I: 1 + +v=0 + +----- Done -- To view, visit https://gerrit.osmocom.org/5110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 30 13:02:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 13:02:23 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client_test makefile: add update_exp target Message-ID: Review at https://gerrit.osmocom.org/5111 mgcp_client_test makefile: add update_exp target Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 --- M tests/mgcp_client/Makefile.am 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/11/5111/1 diff --git a/tests/mgcp_client/Makefile.am b/tests/mgcp_client/Makefile.am index 5cd0d8a..5ce9538 100644 --- a/tests/mgcp_client/Makefile.am +++ b/tests/mgcp_client/Makefile.am @@ -37,3 +37,6 @@ $(LIBRARY_DL) \ $(LIBOSMONETIF_LIBS) \ $(NULL) + +update_exp: + $(builddir)/mgcp_client_test >$(srcdir)/mgcp_client_test.ok 2>$(srcdir)/mgcp_client_test.err -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Nov 30 13:10:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 13:10:51 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_client: add transaction cleanup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5110 to look at the new patch set (#2). mgcp_client: add transaction cleanup So far, if an MGCP message is sent, the transaction gets enqueued, but there is no way to end the transaction other than receiving a valid reply. So, if the caller decides that the transaction timed out and tears down the priv pointer passed to mgcp_client_tx, and if then a late reply arrives, the callback will dereference the invalid priv pointer and cause a segfault. Hence it is possible to crash an mgcp_client program by sending a late response. Furthermore, if no reply ever arrives, we would keep the pending response in the list forever, amounting to a "memory leak". Add mgcp_client_cancel() to discard a pending transaction. The caller can now decide to discard a pending response when it sees fit (e.g. the caller's timeout expired). This needs to be added to OsmoMSC and OsmoBSC. Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id from a generated MGCP message. No public API is broken; but refine the negative return code from mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still -1 if decoding failed. This is mainly for mgcp_client_test. Implement a test for mgcp_client_cancel() in mgcp_client_test.c. Tweak internal mgcp_client_response_pending_get() to take only the transaction id as argument instead of the entire mgcp message struct. Found-by: dexter Related: OS#2695 OS#2696 Change-Id: I16811e168a46a82a05943252a737b3434143f4bd --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.err M tests/mgcp_client/mgcp_client_test.ok 5 files changed, 125 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/5110/2 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..f404131 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -92,6 +92,7 @@ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv); +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id); enum mgcp_connection_mode; @@ -110,6 +111,7 @@ OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg); extern const struct value_string mgcp_client_connection_mode_strs[]; static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode) diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..108ac8f 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -260,13 +260,11 @@ static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, - struct mgcp_response *r) + mgcp_trans_id_t trans_id) { struct mgcp_response_pending *pending; - if (!r) - return NULL; llist_for_each_entry(pending, &mgcp->responses_pending, entry) { - if (pending->trans_id == r->head.trans_id) { + if (pending->trans_id == trans_id) { llist_del(&pending->entry); return pending; } @@ -292,12 +290,12 @@ return -1; } - pending = mgcp_client_response_pending_get(mgcp, &r); + pending = mgcp_client_response_pending_get(mgcp, r.head.trans_id); if (!pending) { LOGP(DLMGCP, LOGL_ERROR, "Cannot find matching MGCP transaction for trans_id %d\n", r.head.trans_id); - return -1; + return -ENOENT; } mgcp_client_handle_response(mgcp, pending, &r); @@ -503,7 +501,10 @@ * response_cb. NOTE: the response_cb still needs to call * mgcp_response_parse_params(response) to get the parsed parameters -- to * potentially save some CPU cycles, only the head line has been parsed when - * the response_cb is invoked. */ + * the response_cb is invoked. + * Before the priv pointer becomes invalid, e.g. due to transaction timeout, + * mgcp_client_cancel() needs to be called for this transaction. + */ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv) { @@ -544,6 +545,32 @@ /* Pass NULL to response cb to indicate an error */ mgcp_client_handle_response(mgcp, pending, NULL); return -1; +} + +/* Cancel a pending transaction. + * Should a priv pointer passed to mgcp_client_tx() become invalid, this function must be called. In + * practical terms, if the caller of mgcp_client_tx() wishes to tear down a transaction without having + * received a response this function must be called. The trans_id can be obtained by calling + * mgcp_msg_trans_id() on the msgb produced by mgcp_msg_gen(). + */ +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id) +{ + struct mgcp_response_pending *pending = mgcp_client_response_pending_get(mgcp, trans_id); + if (!pending) { + /* INFO is sufficient, it is not harmful to cancel a transaction twice. */ + LOGP(DLMGCP, LOGL_INFO, "Cannot cancel, no such transaction: %u\n", trans_id); + return -ENOENT; + } + LOGP(DLMGCP, LOGL_INFO, "Canceled transaction %u\n", trans_id); + talloc_free(pending); + return 0; + /* We don't really need to clean up the wqueue: In all sane cases, the msgb has already been sent + * out and is no longer in the wqueue. If it still is in the wqueue, then sending MGCP messages + * per se is broken and the program should notice so by a full wqueue. Even if this was called + * before we had a chance to send out the message and it is still going to be sent, we will just + * ignore the reply to it later. Removing a msgb from the wqueue here would just introduce more + * bug surface in terms of failing to update wqueue API's counters or some such. + */ } static struct msgb *mgcp_msg_from_buf(mgcp_trans_id_t trans_id, @@ -751,6 +778,12 @@ return msg; } +/* Retrieve the MGCP transaction ID from a msgb generated by mgcp_msg_gen() */ +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg) +{ + return (mgcp_trans_id_t)msg->cb[MSGB_CB_MGCP_TRANS_ID]; +} + struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp) { return &mgcp->actual; diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..0de449a 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -24,6 +24,7 @@ #include #include #include +#include void *ctx; @@ -73,7 +74,7 @@ static struct mgcp_client_conf conf; struct mgcp_client *mgcp = NULL; -static void reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, +static int reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, int conn_id, const char *params) { static char compose[4096 - 128]; @@ -87,7 +88,7 @@ printf("composed response:\n-----\n%s\n-----\n", compose); - mgcp_client_rx(mgcp, from_str(compose)); + return mgcp_client_rx(mgcp, from_str(compose)); } void test_response_cb(struct mgcp_response *response, void *priv) @@ -225,6 +226,51 @@ msgb_free(msg); } +void test_mgcp_client_cancel() +{ + mgcp_trans_id_t trans_id; + struct msgb *msg; + struct mgcp_msg mgcp_msg = { + .verb = MGCP_VERB_CRCX, + .audio_ip = "192.168.100.23", + .endpoint = "23 at mgw", + .audio_port = 1234, + .call_id = 47, + .conn_id = 11, + .conn_mode = MGCP_CONN_RECV_SEND, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID + | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE), + }; + + printf("\n%s():\n", __func__); + fprintf(stderr, "\n%s():\n", __func__); + + if (mgcp) + talloc_free(mgcp); + mgcp = mgcp_client_init(ctx, &conf); + + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + trans_id = mgcp_msg_trans_id(msg); + fprintf(stderr, "- composed msg with trans_id=%u\n", trans_id); + + fprintf(stderr, "- not in queue yet, cannot cancel yet\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "- enqueue\n"); + dummy_mgcp_send(msg); + + fprintf(stderr, "- cancel succeeds\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == 0); + + fprintf(stderr, "- late response gets discarded\n"); + OSMO_ASSERT(reply_to(trans_id, 200, "OK", 1, "v=0\r\n") == -ENOENT); + + fprintf(stderr, "- canceling again does nothing\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "%s() done\n", __func__); +} + static const struct log_info_cat log_categories[] = { }; @@ -244,10 +290,13 @@ log_set_use_color(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 1); + log_set_category_filter(osmo_stderr_target, DLMGCP, 1, LOGL_DEBUG); + mgcp_client_conf_init(&conf); test_crcx(); test_mgcp_msg(); + test_mgcp_client_cancel(); printf("Done\n"); fprintf(stderr, "Done\n"); diff --git a/tests/mgcp_client/mgcp_client_test.err b/tests/mgcp_client/mgcp_client_test.err index 24151ee..8e9f648 100644 --- a/tests/mgcp_client/mgcp_client_test.err +++ b/tests/mgcp_client/mgcp_client_test.err @@ -1,2 +1,15 @@ DLMGCP message buffer to small, can not generate MGCP message + +test_mgcp_client_cancel(): +- composed msg with trans_id=1 +- not in queue yet, cannot cancel yet +DLMGCP Cannot cancel, no such transaction: 1 +- enqueue +- cancel succeeds +DLMGCP Canceled transaction 1 +- late response gets discarded +DLMGCP Cannot find matching MGCP transaction for trans_id 1 +- canceling again does nothing +DLMGCP Cannot cancel, no such transaction: 1 +test_mgcp_client_cancel() done Done diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index d4efee4..4039bb0 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -59,4 +59,23 @@ Overfolow test: + +test_mgcp_client_cancel(): +composed: +----- +CRCX 1 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:AMR, nt:IN +M: sendrecv + +----- +composed response: +----- +200 1 OK +I: 1 + +v=0 + +----- Done -- To view, visit https://gerrit.osmocom.org/5110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Nov 30 13:12:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 13:12:52 +0000 Subject: osmo-mgw[master]: mgcp_client: add transaction cleanup In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5110/2/tests/mgcp_client/mgcp_client_test.c File tests/mgcp_client/mgcp_client_test.c: Line 248: if (mgcp) this is not nice, but following the current scheme in this file. fixing would be a separate patch, not bothering. -- To view, visit https://gerrit.osmocom.org/5110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 30 18:03:46 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 30 Nov 2017 18:03:46 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Speculative crash fix of the SI pointer Message-ID: Review at https://gerrit.osmocom.org/5112 mobile: Speculative crash fix of the SI pointer The SIs are kept per ARFCN and for the current cell the cs->si alias will be assigned[1]. On mobile_exit all SIs will be freed but the alias will not be set to NULL. This is a speculative fix but it doesn't seem to make things worse. Related: OS#2690 [1] cs->si = cs->list[cs->arfci].sysinfo; Change-Id: Icf20f9aa03dd26d4bee78772b7f3da034bb34b99 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/12/5112/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 6de8bec..c3485b6 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -5141,6 +5141,7 @@ } cs->list[i].flags = 0; } + cs->si = NULL; /* store BA list */ ba_filename = talloc_asprintf(ms, "%s/%s.ba", config_dir, ms->name); -- To view, visit https://gerrit.osmocom.org/5112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf20f9aa03dd26d4bee78772b7f3da034bb34b99 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu Nov 30 20:58:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 20:58:51 +0000 Subject: osmocom-bb[master]: mobile: Speculative crash fix of the SI pointer In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf20f9aa03dd26d4bee78772b7f3da034bb34b99 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:00:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:00:37 +0000 Subject: osmocom-bb[master]: mobile: ms->shutdown was not converted properly to enum In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5097 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:07:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:07:14 +0000 Subject: osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 looks sane enough, yet I can't seem to find the place where a transaction is deleted with a pending SMS, as the commit log states? -- To view, visit https://gerrit.osmocom.org/5098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:08:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:08:43 +0000 Subject: osmocom-bb[master]: mobile: Use enum and not magic value in the VTY In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:10:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:10:15 +0000 Subject: osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5041/3/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h File src/host/layer23/include/osmocom/bb/mobile/app_mobile.h: Line 9: struct vty; but struct vty is not used here? -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:21:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:21:38 +0000 Subject: osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (5 comments) https://gerrit.osmocom.org/#/c/5100/2/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h File src/host/layer23/include/osmocom/bb/mobile/app_mobile.h: Line 20: int mobile_stop(struct osmocom_ms *ms, int force); as n00b I can't understand the difference between mobile_stop() and mobile_exit(), maybe the functions could use an api comment? https://gerrit.osmocom.org/#/c/5100/2/src/host/layer23/src/mobile/app_mobile.c File src/host/layer23/src/mobile/app_mobile.c: Line 253: if (ms->shutdown != MS_SHUTDOWN_COMPL) (log?) Line 262: "use the same layer2-socket.\nPlease shutdown " sure about \n in the middle of a LOGP? Makes sense in VTY output but "corrupts" the log output Line 278: if (rc < 0) (log?) Line 288: return mobile_exit(ms, 0); (log why nothing is done?) -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 30 21:29:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 21:29:16 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+1 (3 comments) https://gerrit.osmocom.org/#/c/4771/7//COMMIT_MSG Commit Message: Line 10: interface. This will allow to move it to a different thread or I think you should mention that it is an interface. ;) ;) https://gerrit.osmocom.org/#/c/4771/7/src/host/layer23/src/mobile/primitives.c File src/host/layer23/src/mobile/primitives.c: Line 39: intf->ms = ms; depends on the usage, but ... if the osmocom_ms gets freed, should there be a safeguard to tear down / invalidate the prim_intf->ms as well? Line 101: (ws) -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Nov 30 22:17:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 30 Nov 2017 22:17:28 +0000 Subject: osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Patch Set 7: Code-Review-2 I'm still going to tweak the parameter naming... -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No